axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 11162] New: - Axis can't invoke .NET RPC WebServices
Date Thu, 25 Jul 2002 09:45:52 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11162>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11162

Axis can't invoke .NET RPC WebServices

           Summary: Axis can't invoke .NET RPC WebServices
           Product: Axis
           Version: beta-3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Basic Architecture
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: Stefan.Krause@gmx.at


Doing interop tests with .NET shows that Axis has a severe problem with .NET rpc
style webservices (i.e. Methods that are marked with
[SoapRpcMethod][WebMethod]). The returned values are wrapped in a element like
<xyzResponse>. Maybe this seems to cause problems to axis as it tries to find a
deserializer.

Here are two examples:

1. When axis invokes a service with the signature:

[SoapRpcMethod][WebMethod]
public void empty() 
{
  Debug.WriteLine("Function empty called - SUCCESS");
}
it sends:
...
SOAPAction: "http://tempuri.org/empty"
...
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
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"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
 <soapenv:Body/>
</soapenv:Envelope>

Axis can't handle the reply of .NET:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body>
<emptyResponse xmlns="http://tempuri.org/" />
</soap:Body></soap:Envelope>

Axis reports:
org.xml.sax.SAXException: Deserializing parameter 'emptyResponse':  could not fi
nd deserializer for type {http://xml.apache.org/axis/}Void
        at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:231)
        at org.apache.axis.encoding.DeserializationContextImpl.startElement(Dese
rializationContextImpl.java:857)
        at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
va:199)
        at org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
t.java:644)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:235)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:259)
        at org.apache.axis.client.Call.invoke(Call.java:1806)
        at org.apache.axis.client.Call.invoke(Call.java:1711)
        at org.apache.axis.client.Call.invoke(Call.java:1251)
        at org.tempuri.Service1SoapStub.empty(Unknown Source)
        at Test.callEmpty(Test.java:13)
        at Test.main(Test.java:173)

The wsdl is attached below. 

2. Similar case for a method with parameters:

[SoapRpcMethod][WebMethod]
public int basicArguments(int a, float c, double d, String f) 
{
 Debug.WriteLine("basicArguments called. a=" + a+", c=" + c + ", d=" + d + ",
f=" + f);
 return 100;
}

Axis sends:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
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"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
 <soapenv:Body>
  <a xsi:type="xsd:int">5</a>
  <c xsi:type="xsd:float">1.1</c>
  <d xsi:type="xsd:double">3.14</d>
  <f xsi:type="xsd:string">test</f>
 </soapenv:Body>
</soapenv:Envelope>

.NET returns:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><basicArgumentsResponse
xmlns="http://tempuri.org/">
<basicArgumentsResult>100</basicArgumentsResult>
</basicArgumentsResponse></soap:Body></soap:Envelope>

Axis throws an exception:
org.xml.sax.SAXException: SimpleDeser cannot handle structured data!
        at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDe
serializer.java:155)
        at org.apache.axis.encoding.DeserializationContextImpl.startElement(Dese
rializationContextImpl.java:857)
        at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
va:199)
        at org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
t.java:644)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:235)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:259)
        at org.apache.axis.client.Call.invoke(Call.java:1806)
        at org.apache.axis.client.Call.invoke(Call.java:1711)
        at org.apache.axis.client.Call.invoke(Call.java:1251)
        at org.tempuri.Service1SoapStub.basicArguments(Unknown Source)
        at Test.callBasicArguments(Test.java:22)
        at Test.main(Test.java:174)


The WSDL is [Did some editing since there were more methods and the get and post
bindings]:

<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns:s1="http://tempuri.org/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://tempuri.org/encodedTypes"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://tempuri.org/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<s:schema targetNamespace="http://tempuri.org/encodedTypes">
<s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<s:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</s:schema>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="int" type="s:int" />
</s:schema>
</types>
<message name="emptySoapIn" />
<message name="emptySoapOut" />
<message name="basicArgumentsSoapIn">
<part name="a" type="s:int" />
<part name="c" type="s:float" />
<part name="d" type="s:double" />
<part name="f" type="s:string" />
</message>
<message name="basicArgumentsSoapOut">
<part name="basicArgumentsResult" type="s:int" />
</message>
<portType name="Service1Soap">
<operation name="empty">
<input message="s1:emptySoapIn" />
<output message="s1:emptySoapOut" />
</operation>
<operation name="basicArguments">
<input message="s1:basicArgumentsSoapIn" />
<output message="s1:basicArgumentsSoapOut" />
</operation>
</portType>
<binding name="Service1Soap" type="s1:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="empty">
<soap:operation soapAction="http://tempuri.org/empty" style="rpc" />
<input>
<soap:body use="encoded" namespace="http://tempuri.org/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="http://tempuri.org/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
<operation name="basicArguments">
<soap:operation soapAction="http://tempuri.org/basicArguments" style="rpc" />
<input>
<soap:body use="encoded" namespace="http://tempuri.org/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="http://tempuri.org/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="Service1">
<port name="Service1Soap" binding="s1:Service1Soap">
<soap:address location="http://localhost/RPC_DOTNET/Service1.asmx" />
</port>
</service>
</definitions>

Mime
View raw message