• Resolved antonio.valdez.arce

    (@antoniovaldezarce)


    Hello, this is Antonio. I installed your plugin and as soon as I activated it I got a fatal error. The can’t parse the WSDL from https://internetmarke.deutschepost.de/OneClickForAppV3?wsdl

    here’s the full error message and trace:

    Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://internetmarke.deutschepost.de/OneClickForAppV3?wsdl' : failed to load external entity "https://internetmarke.deutschepost.de/OneClickForAppV3?wsdl" in /var/www/html/wp-content/plugins/woo-dp-internetmarke/includes/connectors/soap/OC4A.php on line 98 
    SoapFault: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://internetmarke.deutschepost.de/OneClickForAppV3?wsdl' : failed to load external entity "https://internetmarke.deutschepost.de/OneClickForAppV3?wsdl" in /var/www/html/wp-content/plugins/woo-dp-internetmarke/includes/connectors/soap/OC4A.php on line 98 Call Stack: 
    0.0008 398832 1. {main}() /var/www/html/wp-admin/admin.php:0 
    0.0008 399504 2. require_once('/var/www/html/wp-load.php') /var/www/html/wp-admin/admin.php:34 
    0.0012 400024 3. require_once('/var/www/html/wp-config.php') /var/www/html/wp-load.php:37 
    0.0012 404912 4. require_once('/var/www/html/wp-settings.php') /var/www/html/wp-config.php:106 
    0.2353 13325896 5. do_action() /var/www/html/wp-settings.php:525 
    0.2353 13326272 6. WP_Hook->do_action() /var/www/html/wp-includes/plugin.php:465 
    0.2353 13326272 7. WP_Hook->apply_filters() /var/www/html/wp-includes/class-wp-hook.php:310 
    15.3446 14826192 8. WCDPI\Internetmarke->init() /var/www/html/wp-includes/class-wp-hook.php:286 
    15.3446 14826192 9. WCDPI\Internetmarke->initClasses() /var/www/html/wp-content/plugins/woo-dp-internetmarke/includes/Internetmarke.php:255 
    15.3487 14879496 10. WCDPI\Connectors\SOAP\OC4A->__construct() /var/www/html/wp-content/plugins/woo-dp-internetmarke/includes/Internetmarke.php:148 
    15.3503 14896864 11. WCDPI\Connectors\SOAP\OC4A->SoapClient() /var/www/html/wp-content/plugins/woo-dp-internetmarke/includes/connectors/soap/OC4A.php:98

    I’ve read similar topics in your forum, but with different WSDL url.
    I have openssl in place and the ports are not blocked.

    I’d be very grateful if you can help me

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter antonio.valdez.arce

    (@antoniovaldezarce)

    I forgot to mention, the site is not online yet, and I am using docker for development. The official WordPress image.

    Hello @antoniovaldezarce,

    thank you for your message and for using our plugin.

    The error message is pretty clear however, for whatever reason the plugin cannot reach the WSDL file. Most often the issue is solved by opening up specific ports towards the outside.

    Have you tried the port checker inside the plugin settings?

    Thread Starter antonio.valdez.arce

    (@antoniovaldezarce)

    Hi @drazenbebic, thank you for your quick response!

    The quick answer is yes, I checked the Port-Checker tool and it shows that all the ports are open:

    
    Ports
    tcp://www.deutschepost.de:443	Opened
    tcp://internetmarke.deutschepost.de:443	Opened
    tcp://prodws.deutschepost.de:443	Opened
    tcp://prodws.deutschepost.de:8443	Opened
    udp://www.deutschepost.de:443	Opened
    udp://www.deutschepost.de:8443	Opened
    udp://internetmarke.deutschepost.de:443	Opened
    udp://internetmarke.deutschepost.de:8443	Opened
    udp://prodws.deutschepost.de:443	Opened
    udp://prodws.deutschepost.de:8443	Opened
    Last port check	2019-11-14, 08:13:53
    

    In order to remove the error and do a test, I downloaded the WSDL into a local file like this:

    /includes/connectors/soap/OC4A.php

    
    ...
    protected function init($email, $password)
        {
            $this->namespace = 'https://oneclickforapp.dpag.de/V3';
            // $this->wsdl      = 'https://internetmarke.deutschepost.de/OneClickForAppV3?wsdl';
            $this->wsdl      = 'https://localhost/OneClickForAppV3.xml';
    
            if ($email == null || $password == null) {
                $credentials = $this->user_repository->getCredentials();
                $this->email    = $credentials['email'];
                $this->password = $credentials['password'];
            } else {
                $this->email    = $email;
                $this->password = $password;
            }
        }
    

    I also changed it in the same way in the file /includes/connectors/soap/OC4R.php

    Obviously, the WSDL is now loaded, but I get other errors when I try to save the account settings.

    Furthermore, when I run this curl https://internetmarke.deutschepost.de/OneClickForAppV3?wsdl in the docker container terminal the WSDL is correctly loaded.

    Thanks again for your help!

    @antoniovaldezarce

    Obviously, the WSDL is now loaded, but I get other errors when I try to save the account settings.

    Do you have a specific error message? This part is interesting.

    Also, try linking to this specific .wsdl file instead of the downloaded XML:

    https://easyupload.io/l0kr0a

    Let me know if that works.

    Thread Starter antonio.valdez.arce

    (@antoniovaldezarce)

    I downloaded the .wsdl file you provided but no luck.
    When I try to save the “Portokasse” account settings (email, password), I get the error message Could not connect to host.

    Do I need to use the https protocol in my website in order to be able to connect?

    Hello @antoniovaldezarce,

    now that is odd, I have tried replacing the URL to the WSDL file and it worked fine on my end. My best guess is, that it is related to the docker environment itself, I just don’t know the exact cause.

    Could you please try and enable the plugin logger? You can find it in the “Internetmarke – Settings – Tools – Logging” menu. Afterwards try logging in and please check if there is any more detialed error message inside that log file.

    Thread Starter antonio.valdez.arce

    (@antoniovaldezarce)

    Hey @drazenbebic,
    I also suspect is related to docker.
    Anyway, I enabled the Logging, and I tried to save the Portkasse credentials and got this trace:

    
    wp-content/plugins/woo-dp-internetmarke/includes/Logger.php:327
    Exception thrown at: 2019-11-14 10:24
    Message: Could not connect to host
    Code: 0
    Thrown at: /var/www/html/wp-content/plugins/woo-dp-internetmarke/includes/connectors/soap/OC4A.php:175
    Trace:
    [0] SoapClient->__doRequest() | :
    [1] SoapClient->__soapCall() | /var/www/html/wp-content/plugins/woo-dp-internetmarke/includes/connectors/soap/OC4A.php:175
    [2] WCDPI\Connectors\SOAP\OC4A->authenticateUser() | /var/www/html/wp-content/plugins/woo-dp-internetmarke/includes/settings/Portokasse.php:224
    [3] WCDPI\Settings\Portokasse->sanitizeSettings() | /var/www/html/wp-includes/class-wp-hook.php:288
    [4] WP_Hook->apply_filters() | /var/www/html/wp-includes/plugin.php:208
    [5] apply_filters() | /var/www/html/wp-includes/formatting.php:4724
    [6] sanitize_option() | /var/www/html/wp-includes/option.php:306
    [7] update_option() | /var/www/html/wp-admin/options.php:283
    

    The exception is in this line:

    
    return $this->__soapCall(
                'authenticateUser', array(
                    'AuthenticateUserRequest' => array(
                        'username' => $email,
                        'password' => $password
                    )
                )
            );
    

    I checked the username and password, and they are the ones I provided. The key_phase, market_key and partner_id are also assigned.

    Somehow the soap connection is failing.

    Thread Starter antonio.valdez.arce

    (@antoniovaldezarce)

    Hi @drazenbebic,
    I managed to connect. The issue was in the docker image indeed. It turns out the image has a newer version of openssl on Debian which has raised the TLS security level to 2, which requires DHE at 2048-bit or higher for the encrypted exchanges.

    What I did is to reduce the security level to 1 in the file /etc/ssl/openssl.cnf:

    so, from this:
    CipherString = DEFAULT:@SECLEVEL=2

    to this:
    CipherString = DEFAULT:@SECLEVEL=1

    And now it connects correctly. I know reducing the TLS security doesn’t sound ideal, but it’s a workaround for development purposes.

    the error message now is Unknown user or invalid password but that’s another story.

    Thanks a lot for your help!

    @antoniovaldezarce,

    that’s good to know for us as well, thank you for your investigative work on this – good job!

    Should you have any other questions do not hesitate to ask us.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Fatal error: Uncaught SoapFault exception’ is closed to new replies.