I have the following problem:
I set up a web service in CF8(Axis 1.2.1) which requires a complex type and 
returns a complex type.
The complex types contain only one attribute and follow the bean specification.
When I now try to consume this web service from either WLS10 or .NET it doesn't 
work.
In .NET the returned complex type is just null. In WLS10 I get the following 
error message:

Exception in thread "Main Thread" java.rmi.RemoteException: SOAPFaultException 
- FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server.userException] 
FaultString [org.xml.sax.SAXException: SimpleDeserializer encountered a child 
element, which is NOT expected, in something it was trying to deserialize.] 
FaultActor [null] Detail [<detail></detail>]; nested exception is: 
        javax.xml.rpc.soap.SOAPFaultException: org.xml.sax.SAXException: 
SimpleDeserializer encountered a child element, which is NOT expected, in 
something it was trying to deserialize.
        at 
external.webservices.cfhelloworldservice.HelloWorldService_Stub.execute(Unknown 
Source)
        at 
services.test.TestCFHelloWorldService.main(TestCFHelloWorldService.java:29)
Caused by: javax.xml.rpc.soap.SOAPFaultException: org.xml.sax.SAXException: 
SimpleDeserializer encountered a child element, which is NOT expected, in 
something it was trying to deserialize.
        at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:311)
        at 
weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:114)
        at 
weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:99)
        at 
weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:87)
        at 
weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:248)
        at 
weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:218)
        at 
weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:159)
        at 
weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:114)
        at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)
        at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:331)
        ... 2 more

However, when I consume this service with Axis 1.2.1 itself, it works.
We have other services in WLS10 and .NET that communicate with complex types 
just fine.
Here's the wsdl:
<definitions 
targetNamespace="http://166.11.22.42:8500/services/HelloWorldService"; 
xmlns:tns1="http://helloworld"; 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
xmlns:impl="http://166.11.22.42:8500/services/HelloWorldService"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:intf="http://166.11.22.42:8500/services/HelloWorldService";><wsdl:types><schema
 xmlns="http://www.w3.org/2001/XMLSchema"; 
targetNamespace="http://helloworld";><import 
namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType 
name="ResponseBase"><sequence><element name="acknowledge" 
type="xsd:boolean"/></sequence></complexType><complexType 
name="RequestBase"><sequence><element name="sayHello" nillable="true" 
type="xsd:string"/></sequence></complexType></schema></wsdl:types>
  <message name="executeRequest">
    <part name="request" type="tns1:RequestBase"/>
  </message>
  <message name="executeResponse">
    <part name="executeReturn" type="tns1:ResponseBase"/>
  </message>
  <portType name="HelloWorldService">
    <operation name="execute" parameterOrder="request">
      <input name="executeRequest" message="impl:executeRequest"/>
      <output name="executeResponse" message="impl:executeResponse"/>
    </operation>
  </portType>
  <binding name="HelloWorldServiceSoapBinding" type="impl:HelloWorldService">
    <wsdlsoap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="execute">
      <wsdlsoap:operation soapAction=""/>
      <input name="executeRequest">
        <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="http://helloworld"/>
      </input>
      <output name="executeResponse">
        <wsdlsoap:body use="encoded" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="http://166.11.22.42:8500/services/HelloWorldService"/>
      </output>
    </operation>
  </binding>
  <service name="HelloWorldServiceService">
    <port name="HelloWorldService" binding="impl:HelloWorldServiceSoapBinding">
      <wsdlsoap:address 
location="http://166.11.22.42:8500/services/HelloWorldService"/>
    </port>
  </service>
</definitions>

Here's the response I get from the Service that WLS10 and .NET cannot handle:
<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:executeResponse 
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:ns1="http://helloworld";>
         <ns1:executeReturn xsi:type="ns1:ResponseBase">
            <ns1:acknowledge xsi:type="xsd:boolean">true</ns1:acknowledge>
         </ns1:executeReturn>
      </ns1:executeResponse>
   </soapenv:Body>
</soapenv:Envelope>
Simulating the whole thing with SoapUI works just fine.

I just cannot see the error. I tried with "document" or "wrapped" but that 
didn't help either. Even upgrading to Axis 1.4 didn't help.

Any help would be appreciated.

Regards


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302606
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to