Thanks, knowing that helped a lot. In the end I added:
_call.setEncodingStyle("http://www.w3.org/2001/XMLSchema");
inside the various stub methods and it now works, although I'm not
entirely sure why.
Thanks again,
jason
----- Original Message ----- From: "Anne Thomas Manes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 17, 2004 3:53 PM
Subject: RE: Newbie Axis / Dotnet ArrayofString problem
This is a known soap encoding interoperability problem between .NET and Axis.
In my opinion, Axis interprets the SOAP specification correctly by using
soapenc:string rather than xsd:string, but .NET doesn't know how to
interpret soapenc:string.
For better interoperability, you should use document/literal.
Anne
-----Original Message-----
From: Jason Rousell [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 8:47 AM
To: [EMAIL PROTECTED]
Subject: Newbie Axis / Dotnet ArrayofString problem
Hi Everyone,
I've searched this list before posting and can't find an answer so here goes.
I've used WSDL2Java to create a stub etc. from the WSDL (fragment) below
in order to write client code. Everything seems fine from axis except
that the dotnet webservice returns an error.
I've tracked the problem down to the following in the soap-request:
<ns2:retrieve soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://dfes3.parity.net"> <records xsi:type="soapenc:Array" soapenc:arrayType="ns4:string[3]" xmlns:ns3="http://dfes3.parity.net/encodedTypes" xmlns:ns4="http://www.w3.org/2003/05/soap-encoding" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <item xsi:type="soapenc:string"> .... removed .... </item> </records> </ns2:retrieve>
Sending this to the .net web service returns the error:
There is an error in XML document (14, 5); The specified type was not recognized: name='string', namespace='http://www.w3.org/2003/05/soap-encoding'
The problem is with:
soapenc:arrayType="ns4:string[1]"
Which axis has created based on the wsdl.
If I manually change the above to:
soapenc:arrayType="xs:string[1]" xmlns:xs="http://www.w3.org/2001/XMLSchema"
it works, but that is a problem as I'm having to manually intervene.
I don't know if this is a problem with the request, the wsdl or the dotnet server.
The fragment of wsdl that I think is causing the problem is (I think): <s:schema targetNamespace="http://dfes3.parity.net/encodedTypes"> <s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> <s:import namespace="http://schemas.xmlsoap.org/wsdl/" /> <s:complexType name="ArrayOfString"> <s:complexContent mixed="false"> <s:restriction base="soapenc:Array"> <s:attribute wsdl:arrayType="s:string" ref="soapenc:arrayType" /> </s:restriction> </s:complexContent> </s:complexType> </s:schema>
Hope someone can help, thanks.
jason