axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Reif" <Ben.R...@cgi-ams.com>
Subject RE: Urgent, Please Help - <operation> with multiple parameters including an array
Date Thu, 12 Jan 2006 15:59:54 GMT
Wouldn't this be incorrect? Because then wouldn't the SOAP message come
across like:
 
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <listTest
xmlns="http://CoretestWebServices/service/WSObjectService">
                    <WSObject>
                        ......
                    </WSObject>
                    <WSObject> 
                        ......
                    </WSObject>
                    <WSObject> 
                        ......
                    </WSObject>
                    <field>quantity</field>
                    <value>25</value>
        </listTest>
    </soapenv:Body>
</soapenv:Envelope>
 
And then wouldn't that cause Axis to be looking for a method that looks
like:
 
public WSObject[] listTest (WSObject arg1, WSObject arg2, WSObject arg3,
String field, String, value)?
 
Or, does Axis automatically see that there's multiple children of the
same type and include them in an array? This can't be, because what if I
had a method signiture that looked like:
 
public WSObject[] listTest (WSObject [] arg1, WSObject arg2, String
field, String, value)
 
Then how would the ArrayDeserializer know which WSObjects are part of
the array for the first parameter and which is on it's own for the
second? I thought that was part of the whole point of wrapping arrays as
one element in the WSDL, and I've read that this is actually prefered.
Isn't what I had originally more correct?
 
<element name="listTest">
      <complexType>
          <sequence>
              <element name="ArrayOfWSObject"
type="tns1:ArrayOfWSObject"/>
              <element name="field" type="xsd:string"/>
               <element name="value" type="xsd:string"/>
          </sequence>
      </complexType>
</element>
 
<complexType name="ArrayOfWSObject">
   <sequence>
        <element maxOccurs="unbounded" minOccurs="0" name="WSObject"
type="tns1:WSObject"/> 
   </sequence>
</complexType>
 
Where in the WSDL I have an ArrayOfWSObject referenced, and then I have
ArrayOfWSObject defined as the actual array. Then in my wsdd file I
have:
 
<arrayMapping
        xmlns:ns="http://webservices.test.domain.coretest.ams.com
<http://webservices.test.domain.coretest.ams.com/> "
        qname="ns:ArrayOfWSObject"
        type="java:com.ams.coretest.domain.test.webservices.WSObject[]"
        innerType="cmp-ns:WSObject"
xmlns:cmp-ns="http://webservices.test.domain.coretest.ams.com
<http://webservices.test.domain.coretest.ams.com/> "
        encodingStyle=""
/>
 
<operation name="listTest" qname="operNS:listTest"
xmlns:operNS="http://CoretestWebServices/service/WSObjectService" 
           returnQName="retNS:listTestResponse"
xmlns:retNS="http://CoretestWebServices/service/WSObjectService" 
           returnType="rtns:ArrayOfWSObject"
xmlns:rtns="http://webservices.test.domain.coretest.ams.com
<http://webservices.test.domain.coretest.ams.com/> " 
           returnItemQName="tns:WSObject"
xmlns:tns="http://webservices.test.domain.coretest.ams.com
<http://webservices.test.domain.coretest.ams.com/> "
soapAction="listTest" >
    <parameter qname="pns:ArrayOfWSObject"
xmlns:pns="http://CoretestWebServices/service/WSObjectService" 
           type="tns:ArrayOfWSObject"
xmlns:tns="http://webservices.test.domain.coretest.ams.com
<http://webservices.test.domain.coretest.ams.com/> " 
           itemQName="itns:WSObject"
xmlns:itns="http://webservices.test.domain.coretest.ams.com"/>
    <parameter qname="pns:field"
xmlns:pns="http://CoretestWebServices/service/WSObjectService"
type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
    <parameter qname="pns:value"
xmlns:pns="http://CoretestWebServices/service/WSObjectService"
type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
</operation>
 
Based on the method signiture in the implementation class and the wsdd
file, shouldn't the java2wsdl generate the correct WSDL that I had
before? You can't seriously expect people to be manually writting WSDL
just because they're using document or wrapped style services. Is this
just a bug in the java2wsdl Emitter, or is there something wrong with my
wsdd file?
 
Ben

Mime
View raw message