You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2002/09/27 21:11:26 UTC
DO NOT REPLY [Bug 13096] New: -
interoperability with MS Soap Toolkit is broken when using WSDL-driven Axis client.
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=13096>.
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=13096
interoperability with MS Soap Toolkit is broken when using WSDL-driven Axis client.
Summary: interoperability with MS Soap Toolkit is broken when
using WSDL-driven Axis client.
Product: Axis
Version: current (nightly)
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Critical
Priority: Other
Component: Serialization/Deserialization
AssignedTo: axis-dev@xml.apache.org
ReportedBy: mikhail.shekhtman@ssmb.com
Using the ESR sample in bug # 12753 (thanks for fixing that one!), I cannot get
Axis test case (client) to work with MS Soap Toolkit even though the same (MS-
generated WSDL) works when accessing identical Axis Web service through the
same test case (client).
Here is the code for VB service published under IIS:
============== VB SERVICE ==============================================
Public Sub esrInOut(ByVal bstrSUH As String, ByVal bstrSAH As String, _
ByVal value As Integer, _
ByRef echoVal As Integer, ByRef sqrtVal As Double)
echoVal = value
sqrtVal = Sqr(value)
End Sub
================== END OF VB SERVICE ===================================
MS Soap generated WSDL (working for Axis-to-Axis communication since 09/26/2002
build):
================== MS SOAP TLKT WSDL ===================================
<?xml version='1.0' encoding='UTF-8' ?>
<!-- Generated 09/25/02 by Microsoft SOAP Toolkit WSDL File Generator, Version
1.02.813.0 -->
<definitions name ='EsrTestService' targetNamespace
= 'http://tempuri.org/wsdl/'
xmlns:wsdlns='http://tempuri.org/wsdl/'
xmlns:typens='http://tempuri.org/type'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:stk='http://schemas.microsoft.com/soap-toolkit/wsdl-extension'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<types>
<schema targetNamespace='http://tempuri.org/type'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
elementFormDefault='qualified'>
</schema>
</types>
<message name='EsrTest.esrInOut'>
<part name='bstrSUH' type='xsd:string'/>
<part name='bstrSAH' type='xsd:string'/>
<part name='value' type='xsd:short'/>
</message>
<message name='EsrTest.esrInOutResponse'>
<part name='echoVal' type='xsd:short'/>
<part name='sqrtVal' type='xsd:double'/>
</message>
<portType name='EsrTestSoapPort'>
<operation name='esrInOut' parameterOrder='bstrSUH bstrSAH value echoVal
sqrtVal'>
<input message='wsdlns:EsrTest.esrInOut' />
<output message='wsdlns:EsrTest.esrInOutResponse' />
</operation>
</portType>
<binding name='EsrTestSoapBinding' type='wsdlns:EsrTestSoapPort' >
<stk:binding preferredEncoding='UTF-8'/>
<soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http' />
<operation name='esrInOut' >
<soap:operation soapAction='http://tempuri.org/action/EsrTest.esrInOut' />
<input>
<soap:body use='encoded' namespace='http://tempuri.org/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' />
</input>
<output>
<soap:body use='encoded' namespace='http://tempuri.org/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' />
</output>
</operation>
</binding>
<service name='EsrTestService' >
<port name='EsrTestSoapPort' binding='wsdlns:EsrTestSoapBinding' >
<soap:address location='http://localhost:8080/Esr/EsrTestService.WSDL' />
</port>
</service>
</definitions>
================== END OF MS SOAP TLKT WSDL ==============================
Axis test case (the same test case works when I call AXIS service with the
same parameters by using -FileInputStream(<WSDL file above>)- for Service) :
=================== AXIS CLIENT ==========================================
public void test1EsrTestEsrInOutMS()
{
//
// code using WSDL file to make a SOAP call
//
try
{
//load wsdl file
//setting up the call
javax.xml.rpc.Service svc =
new org.apache.axis.client.Service(
"http://localhost:8888/Esr/EsrTestService.WSDL",
new javax.xml.namespace.QName("http://tempuri.org/wsdl/",
"EsrTestService")
);
javax.xml.rpc.Call call = svc.createCall(
new javax.xml.namespace.QName("http://tempuri.org/wsdl/",
"EsrTestSoapPort"),
new javax.xml.namespace.QName("http://tempuri.org/wsdl/",
"esrInOut")
);
//init in params
Object[] soapInParams = new Object[] {
"token1",
"token2",
new Short((short)5) };
call.setTargetEndpointAddress(
"http://localhost:8888/Esr/EsrTestService.WSDL"
);
//calling soap service
Object ret = call.invoke(soapInParams);
//printing output params
java.util.Map outParams = call.getOutputParams();
java.util.Collection outs = outParams.values();
java.util.Iterator it = outs.iterator();
int i = 1;
while(it.hasNext())
{
System.out.println(i++ + ". " + it.next().toString());
}
}
catch(Exception e)
{
e.printStackTrace(System.out);
throw new junit.framework.AssertionFailedError("Exception caught: " + e);
}
}
=================== END OF AXIS CLIENT ===================================
This is the envelope exchange between Axis client and the VB Service:
======= IN ENV ===================================
<?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:esrInOut
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://tempuri.org/message/">
<bstrSUH xsi:type="xsd:string">token1</bstrSUH>
<bstrSAH xsi:type="xsd:string">token2</bstrSAH>
<value xsi:type="xsd:short">5</value>
</ns1:esrInOut>
</soapenv:Body>
</soapenv:Envelope>
======= END OF IN ENV ==============================================
======= OUT ENV ====================================================
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<SOAP-ENV:Envelope SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAPSDK1:esrInOutResponse xmlns:SOAPSDK1="http://tempuri.org/message/">
<echoVal>5</echoVal>
<sqrtVal>2.23606797749979</sqrtVal>
</SOAPSDK1:esrInOutResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
======= END OF OUT ENV =============================================
Axis test client output:
======= OUTPUT FROM THE AXIS CLIENT ABOVE ==========================
.- Exception:
org.xml.sax.SAXException: Deserializing parameter 'echoVal': could not find
deserializer for type {
http://xml.apache.org/axis/}Void
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:276)
at org.apache.axis.encoding.DeserializationContextImpl.startElement
(DeserializationContextIm
pl.java:893)
at org.apache.axis.message.SAX2EventRecorder.replay
(SAX2EventRecorder.java:200)
at org.apache.axis.message.MessageElement.publishToHandler
(MessageElement.java:684)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:243)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:267)
at org.apache.axis.client.Call.invoke(Call.java:1863)
at org.apache.axis.client.Call.invoke(Call.java:1769)
at org.apache.axis.client.Call.invoke(Call.java:1307)
at test.wsdl.esr.EsrTestServiceTestCase.test1EsrTestEsrInOutMS
(EsrTestServiceTestCase.java:1
11)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:166)
at junit.framework.TestCase.runBare(TestCase.java:140)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at junit.textui.TestRunner.doRun(TestRunner.java:74)
at junit.textui.TestRunner.start(TestRunner.java:234)
at junit.textui.TestRunner.main(TestRunner.java:112)
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: org.xml.sax.SAXException: Deserializing parameter 'echoVal':
could not find deseriali
zer for type {http://xml.apache.org/axis/}Void
faultActor: null
faultDetail:
stackTrace: org.xml.sax.SAXException: Deserializing
parameter 'echoVal': could not find des
erializer for type {http://xml.apache.org/axis/}Void
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:276)
at org.apache.axis.encoding.DeserializationContextImpl.startElement
(DeserializationContextIm
pl.java:893)
at org.apache.axis.message.SAX2EventRecorder.replay
(SAX2EventRecorder.java:200)
at org.apache.axis.message.MessageElement.publishToHandler
(MessageElement.java:684)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:243)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:267)
at org.apache.axis.client.Call.invoke(Call.java:1863)
at org.apache.axis.client.Call.invoke(Call.java:1769)
at org.apache.axis.client.Call.invoke(Call.java:1307)
at test.wsdl.esr.EsrTestServiceTestCase.test1EsrTestEsrInOutMS
(EsrTestServiceTestCase.java:1
11)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:166)
at junit.framework.TestCase.runBare(TestCase.java:140)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at junit.textui.TestRunner.doRun(TestRunner.java:74)
at junit.textui.TestRunner.start(TestRunner.java:234)
at junit.textui.TestRunner.main(TestRunner.java:112)
org.xml.sax.SAXException: Deserializing parameter 'echoVal': could not find
deserializer for type {
http://xml.apache.org/axis/}Void
org.xml.sax.SAXException: Deserializing parameter 'echoVal': could not find
deserializer for type {
http://xml.apache.org/axis/}Void
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:276)
at org.apache.axis.encoding.DeserializationContextImpl.startElement
(DeserializationContextIm
pl.java:893)
at org.apache.axis.message.SAX2EventRecorder.replay
(SAX2EventRecorder.java:200)
at org.apache.axis.message.MessageElement.publishToHandler
(MessageElement.java:684)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:243)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:267)
at org.apache.axis.client.Call.invoke(Call.java:1863)
at org.apache.axis.client.Call.invoke(Call.java:1769)
at org.apache.axis.client.Call.invoke(Call.java:1307)
at test.wsdl.esr.EsrTestServiceTestCase.test1EsrTestEsrInOutMS
(EsrTestServiceTestCase.java:1
11)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:166)
at junit.framework.TestCase.runBare(TestCase.java:140)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at junit.textui.TestRunner.doRun(TestRunner.java:74)
at junit.textui.TestRunner.start(TestRunner.java:234)
at junit.textui.TestRunner.main(TestRunner.java:112)
F
Time: 7.481
There was 1 failure:
1) test1EsrTestEsrInOutMS(test.wsdl.esr.EsrTestServiceTestCase)
junit.framework.AssertionFailedError:
Exception caught: org.xml.sax.SAXException: Deserializing
parameter 'echoVal': could not find deserializer for type
{http://xml.apache.org/axis/}Void
at test.wsdl.esr.EsrTestServiceTestCase.test1EsrTestEsrInOutMS
(EsrTestServiceTestCase.java:1
29)
FAILURES!!!
Tests run: 2, Failures: 1, Errors: 0
========== END OF OUTPUT FROM THE AXIS CLIENT ABOVE ====================
Can you take a look at this?
Thanks.
Mikhail Shekhtman
Salomon Smith Barney
mikhail.shekhtman@ssmb.com