axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ebert, Chris" <chris.eb...@hp.com>
Subject RE: encoded only works once?
Date Wed, 28 Sep 2005 23:21:59 GMT

Not sure it will help, but did you try 'resend request' from tcpmon? If
the first request is a little different, maybe it really is the hint you
need...
Chris


-----Original Message-----
From: Ron Reynolds [mailto:Ron@RonReynolds.com] 
Sent: Wednesday, September 28, 2005 15:18
To: Axis Users
Subject: encoded only works once?

ok, i've started this email 3 times now, then stopped, certain i could
figure it out myself, but i'm ready to admit i'm stumped.

i've been trying to nail a problem i see only with rpc-encoded -
basically i can only call it once.  tcpmon shows that the xml being sent
on the first call (the one that works) is not exactly encoded, but it's
not exactly literal either.
 all subsequent calls look like properly encoded requests, but parsing
the response by the client fails with "SimpleDeserializer encountered a
child element, which is NOT expected...".  of course the responses from
all calls (encoded and literal) are exactly the same xml which make the
client-side failure all the more confusing to me.

the WSDL/XSD of my request/response:

  <wsdl:message name="TestRequest">
    <wsdl:part name="request" type="data:ArrayOfLong"/>
  </wsdl:message>
  <wsdl:message name="TestResponse">
    <wsdl:part name="response" type="data:ArrayOfTestDatum"/>
  </wsdl:message>

  <complexType name="TestDatum">
    <sequence>
      <element name="name" type="string"/>
      <element name="value" type="string"/>
    </sequence>
  </complexType>
  <complexType name="ArrayOfTestDatum">
    <sequence><element name="data" minOccurs="0" maxOccurs="unbounded"
type="tns:TestDatum"/></sequence>
  </complexType>
  <complexType name="ArrayOfLong">
    <sequence><element name="data" minOccurs="0" maxOccurs="unbounded"
type="long"/></sequence>
  </complexType>

the first (working encoded-ish) call:
   <soapenv:Envelope ...>
      <soapenv:Body>
         <encodedTest xmlns="urn:amgen.com/freezer/data">
            <request xsi:type="ns1:ArrayOfLong" xmlns=""
xmlns:ns1="urn:amgen.com/freezer/data">
               <ns1:data xsi:type="xsd:long">1</ns1:data>
               <ns1:data xsi:type="xsd:long">2</ns1:data>
               <ns1:data xsi:type="xsd:long">3</ns1:data>
               <ns1:data xsi:type="xsd:long">0</ns1:data>
            </request>
         </encodedTest>
      </soapenv:Body>
   </soapenv:Envelope>

the second (failed encoded) call:

   <soapenv:Envelope ...>
      <soapenv:Body>
         <ns1:encodedTest
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:amgen.com/freezer/data">
            <request soapenc:arrayType="ns1:ArrayOfLong[4]"
xsi:type="soapenc:Array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
               <ns1:data href="#id0"/>
               <ns1:data href="#id1"/>
               <ns1:data href="#id2"/>
               <ns1:data href="#id3"/>
            </request>
         </ns1:encodedTest>
         <multiRef id="id3" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">2</multiRef>
         <multiRef id="id2" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">3</multiRef>
         <multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">2</multiRef>
         <multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef>
      </soapenv:Body>
   </soapenv:Envelope>

the (always successful) literal call:

   <soapenv:Envelope ...>
      <soapenv:Body>
         <literalTest xmlns="">
            <request>
               <ns1:data
xmlns:ns1="urn:amgen.com/freezer/data">1</ns1:data>
               <ns2:data
xmlns:ns2="urn:amgen.com/freezer/data">2</ns2:data>
               <ns3:data
xmlns:ns3="urn:amgen.com/freezer/data">3</ns3:data>
               <ns4:data
xmlns:ns4="urn:amgen.com/freezer/data">1</ns4:data>
            </request>
         </literalTest>
      </soapenv:Body>
   </soapenv:Envelope>

i can't continue to spend billable time beating my head against this
problem - please, somebody, toss me a hint. :-/

..................ron.


Mime
View raw message