DatenThielt has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, Currently I am trying to create a tiny bit of code, To connect to a WSDL Service, The problem is I have tried everything from SOAP::Lite to SOAP::WSDL without being able to get it to work correctly, The only thing I have been able to do is get it to return a list of methods I can use, and then when I sent the correct method incorrect envelope,

If anyone could take a look at the WSDL and tell me why its so abnormal (I have been able to connect to other WSDL's fine) and maybe show me the best, and smallest way to connect to it I would be over the moon!

The URL for the WSDL Is
https://gsxws2.apple.com/wsdl/emeaAsp/gsx-emeaAsp.wsdl

(Please note all requests require a session ID that is returned via Authenticate, If you can get it to just burp back with invalid username/password/service number that will be perfect)

Thank you!
  • Comment on Unable to get SOAP::Lite working with WSDL

Replies are listed 'Best First'.
Re: Unable to get SOAP::Lite working with WSDL
by sierpinski (Chaplain) on Mar 04, 2012 at 22:44 UTC
    What have you tried already? Do you have any code you can post to start with? You seem to be asking everyone to do the research for you for the entire project, but perhaps posting some code may allow someone to spot a simple problem.
      Sorry your correct, I have tried different formats of pretty much the same, The one I have got that gives me some sort of result is
      use SOAP::Lite; my $WSDL = 'https://gsxws2.apple.com/wsdl/emeaAsp/gsx-emeaAsp.wsdl'; my $soap = SOAP::Lite ->service($WSDL) ->on_fault(sub { my $soap = shift; my $res = shift; if(ref($res) eq '') { die($res); } else { die($res->faultstring); } return new SOAP::SOM; } ); my $result = $soap->Authenticate('Daten','xxx','ServiceNo5'); print $result;
      This tell me about the error with the Envelops, And I have no idea how to change the envelope . One thing I did try, Is downloading the WSDL, And then hosted it locally. Then I changed the soap reference in the WSDL but then that failed to connect to the service at all
        Also to note, I did try to use the stub maker but it created a file that resulted in an xml parser error.
Re: Unable to get SOAP::Lite working with WSDL
by Anonymous Monk on Mar 04, 2012 at 23:41 UTC