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

Dear monks!

I am testing SOAP::Lite in conjunction with wsdl to enable real cross language functionality for web services and to learn wsdl.

Looks like theres a problem with additional namespaces and wsdl parsing in SOAP::Lite. I defined an array containing at least 1 and max 10 Elements of type string .

It looks like the SOAP::Lite Modules has problems enclosing all namespaces in the SOAP document.

The errormessage I get is:
Client Application failed during request deserialization: Unresolved prefix 'xsd1' for attribute value 'xsd1:StringArray'

Is there a way to work around that, e.g. include the TestArray definition in the main namespace?
<wsdl:definitions name="TestArray" targetNamespace="http://xxx.xxx.xxx/TestArray.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xxx.xxx.xxx/TestArray.wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://xxx.xxx.xxx/TestArray.xsd1" xmlns:xsd2="http://xxx.xxx.xxx/TestArray.xsd2"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"></wsdl:documentation> <wsdl:types> <xsd:schema targetNamespace="http://xxx.xxx.xxx/TestArray.xsd1" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://xxx.xxx.xxx/TestArray.xsd1"> <xsd:complexType name="StringArray"> <xsd:sequence> <xsd:element maxOccurs="10" minOccurs="1" name="El +ement" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:schema> </wsdl:types> <wsdl:message name="GiveMeAnArrayRequest"> <wsdl:part name="InArray" type="xsd1:StringArray"/> </wsdl:message> <wsdl:message name="GiveMeAnArrayResponse"> <wsdl:part name="OutArray" type="xsd1:StringArray"/> </wsdl:message>
The WSDL File was created with CapeClear SOAEditor, a freely available WSDL Editor.

TIA, Jan

cat /dev/world | perl -e "(/(^.*? \?) 42\!/) && (print $1))"
errors->(c)

Replies are listed 'Best First'.
Re: SOAP::Lite Bug?
by gnork (Scribe) on Jan 11, 2005 at 17:08 UTC
    Just found out that you (obviously) cant include the StringArray definition into xsd, since this is defined elsewhere (xmlns:xsd="http://www.w3.org/2001/XMLSchema"). So this solution wont work.
    Has anyone a better idea?

    cat /dev/world | perl -e "(/(^.*? \?) 42\!/) && (print $1))"
    errors->(c)