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

Hi

I am attempting to make a call to a wsdl location at work using soap::lite. I've used it previously without issue but am coming up against and issue this time that i'm struggling to find a solution for.

My calling code is (wsdl location intentionally not included):

use SOAP::Lite 'trace', 'debug'; my $service = SOAP::Lite -> service("http:xxxxxx"); my $xmlCreationResult = $service -> getLatestPreviewSheetByHouseNumbe +r('CE_SA_SCOOBD0012_01');

I can see the expected return in the output but the code errors with: Unspecified namespace for type 'audioTrackVO'

I've tried calling the same webservice using C# and it seems to work. I also can't find much existing online that helped.

I am far from an expert on webservices but it looks to me like soap::lite is struggling to parse the result, or is picking up an issue with the result that is not being picked up in C#.

The return begins:

<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header> </env:Header> <env:Body> <tns:getLatestPreviewSheetByHouseNumberResponse xmlns:tns='urn:CommonS +ervice'> <return xmlns:ns2="urn:CommonService"> <id>51308</id> <audioTracks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi +:type="audioTrackVO"> <id>1390864</id> <classification>dual mono</classification> <languageIsoCode>POL</languageIsoCode> <previewSheetId>51308</previewSheetId> </audioTracks>

Any suggestions would be appreciated.

Replies are listed 'Best First'.
Re: SOAP::Lite - Unspecified namespace for type error
by Anonymous Monk on Jul 24, 2013 at 11:47 UTC
Re: SOAP::Lite - Unspecified namespace for type error
by freeflyer73 (Novice) on Jul 24, 2013 at 12:19 UTC

    Thanks for all the suggestions.

    Haven't had time to work through them all yet but I was prompted to try SOAP::Simple.

    Couldn't find that on the Activestate ppm repository but gave SOAP::MySOAP a try. You have to pass in the raw xml in the request but it is passing the result back to me as expected.

    I'll take a closer look at the sites provided but for now I need to press on..deadlines ;)

    Thanks for the help