Hi!

I'm trying to switch from Axis to Xfire on a system that has many clients.
The clients run Axis versions 1.0 - 1.4, and WSDL style has so far been
RPC/encoded. I've gotten Xfire up and running smoothly, and expose my
services with either RPC/literal or wrapped/literal. Now I only wish that my
Axis clients would cooperate... 

My problem is that it seems the clients generated by Axis wsdl2java (from
the xfire wsdls) seems to kick on the soap responses that Xfire serves, and
I get a "org.xml.sax.SAXException: SimpleDeserializer encountered a child
element, which is NOT expected, in something it was trying to deserialize."
from Axis.

Xfires rpc-literal soap response is:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   <soap:Body>
      <findCustomersResponse xmlns="http://xxx";>
         <out xmlns="">
            <ns1:CustomerDto xmlns:ns1="http://xxy";>
               ....
            </ns1:CustomerDto>
         </out>
      </findCustomersResponse>
   </soap:Body>
</soap:Envelope>


Xfires literal wrapped response is :

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   <soap:Body>
      <findCustomersResponse xmlns="http://xxx";>
         <out xmlns="http://xxx";>
            <ns1:CustomerDto xmlns:ns1="http://xxy";>
               ...
            </ns1:CustomerDto>
         </out>
      </findCustomersResponse>
   </soap:Body>
</soap:Envelope>


When I expose the service with Axis1 rpc/encoded the generated clients work
and the soap response is :

<?xml version="1.0" encoding="utf-8"?>
   <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>
         <ns1:findCustomersResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:ns1="http://aax";>
            <findCustomersReturn soapenc:arrayType="ns2:CustomerDto[1]"
xsi:type="soapenc:Array" xmlns:ns2="http://aay";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
               <findCustomersReturn href="#id0"/>
            </findCustomersReturn>
         </ns1:findCustomersResponse>
         <multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
xsi:type="ns3:CustomerDto"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:ns3="http://aay";>
            <contactInfo href="#id1"/>
            <somethingEvaluation xsi:type="ns3:SomethingEvaluationDto"
xsi:nil="true"/>
            <somethingEvaluationStatusId xsi:type="xsd:string"
xsi:nil="true"/>
            <customerUnitType href="#id2"/>
            <id href="#id3"/>
            <nationalRegisterResidence xsi:type="ns3:OtherDto"
xsi:nil="true"/>
            <organization xsi:type="ns3:OrganizationDto" xsi:nil="true"/>
            <permanentResidence href="#id4"/>
            <person href="#id5"/>
         </multiRef>
         <multiRef id="id1" ... />
         <multiRef id="id2" ... />
          ....
      </soapenv:Body>
   </soapenv:Envelope>

Has anyone solved similar problems? Is there a way of making xfire produce
more axis-friendly wsdls? Or forcing axis to generate clients correctly? Or
is this, as suggested in some forums - a problem caused by either wrong
namespaces, different serializers/deserializers or something to do with
arrays?

Any help appreciated :) 
-- 
View this message in context: 
http://www.nabble.com/Problem-using-Axis-as-client-tf3570317.html#a9974622
Sent from the XFire - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to