axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ANDREW MICONE" <AMIC...@DEQ.IDAHO.GOV>
Subject PS -- oops WSDL2Java
Date Fri, 03 Dec 2004 00:06:13 GMT
Sorry, misleading header, I was talking about WSDL2Java. Also, I noticed that the other server
returns type as "xsd:string[8]" and Axis returns it as "soapenc:string[8]". Is that related?
Please help. -- Andy

>>> AMICONE@DEQ.IDAHO.GOV 12/02/04 03:23PM >>>
I'm using WSDL2Java to create a service consumed by a .NET client I can't change for a WSDL
we're mandated to use. It has a service called "GetService" defined as follows in the WSDL
(details omitted):

<complexType name="ArrayOfstring">
  <complexContent>
    <restriction base="SOAP-ENC:Array">
      <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/>
    </restriction>
  </complexContent>
</complexType>
<message name="GetServicesResponse">
  <part name="return" type="typens:ArrayOfstring"/>
</message>
<operation name="GetServices" parameterOrder="securityToken serviceType">
<documentation>Query services offered by the node</documentation>
  <input message="tns:GetServices"/>
  <output message="tns:GetServicesResponse"/>
</operation>

I'm just using the binding implementation stub to craft a response. The response from the
Axis client is as follows:

<soapenv:Envelope>
<soapenv:Body>
<getServicesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return soapenc:arrayType="soapenc:string[9]" xsi:type="soapenc:Array">
<item xsi:type="soapenc:string">PNWWQX.GetProjects</item>
...

Which the .NET client says is an illegal response. ("There is an error in the XML document
(1,384)"). A response from another server which it likes is:

<soapenv:Envelope>
<soapenv:Body>
<ns1:GetServicesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[8]">
<item>GetFacilityByName</item>

There are only three differences between the messages, which I rank in decreasing likelihood
they are causing the problem:

1) That the GetServicesResponse operation defined in the WSDL is sent back as getServicesResponse
with an initial lower-case letter.

2) That the response in the second is in a user namespace.

3) The additional type information provided in the first response.

I'm thinking the most likely reason is the initial lower-case letter. How can I fix this so
the response in the first message looks like the second message using WSDL2Java (i.e. without
writing my own customized deserializer for the array). -- Andy




Mime
View raw message