You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Gaetan Frenoy <ga...@frenoy.net> on 2002/05/07 09:14:09 UTC

Compatibility with Microsoft toolkit

Hi all,

After installing Axis beta 2 and Tomcat 3.3.1 on my NT box,
I could successfully run your samples - e.g. Calculator:

   java samples.userguide.example2.CalcClient -p8080 add 5 8
   Got result : 13

This looks like a great job!


Now, I was trying to call the Calculator sample from some
Visual Basic code using MS SOAP Toolkit 2.0 :

  Call soapclient.mssoapinit("http://localhost:8080/axis/Calculator.jws?wsdl")
  wscript.echo soapclient.add(1, 2)

It looks to call the service properly...Unfortunately, it failed returning
the following error:

  java.lang.IllegalArgumentException: argument type mismatch


By examining the exchanged messages with tcpdump, I can see the following

1) When call from an Axis client:
----
POST /axis/Calculator.jws HTTP/1.0
Content-Length: 485
Host: localhost
Content-Type: text/xml; charset=utf-8
SOAPAction: ""

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:SOAP-ENV="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/">
  <SOAP-ENV:Body>
   <add>
    <op1 xsi:type="xsd:int">5</op1>
    <op2 xsi:type="xsd:int">8</op2>
   </add>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
----

2) When called from MS SOAP Toolkit client:
----
POST /axis/Calculator.jws HTTP/1.1
Content-Type: text/xml; charset="UTF-8"
Host: localhost
SOAPAction: ""
Content-Length: 320

<?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:add 
xmlns:SOAPSDK1="add"><i1>1</i1><i2>2</i2></SOAPSDK1:add></SOAP-ENV:Body></SOAP-ENV:Envelope>
----

So my questions:
  - Is it supposed to fail?  I mean, isn't SOAP supposed to be independant
    of the implementation?
  - Why is that failing exactly?
  - Is this a general compatibility problem?  Note that this would be
    a showstopper for our project.
  - Is there an easy workaround transparent from the client-side?


Many thanks for your help.


--
Gaëtan Frenoy (aka Gaff)
gaetan@frenoy.net
Brussels - Belgium


Re: Compatibility with Microsoft toolkit

Posted by Gaetan Frenoy <ga...@frenoy.net>.
Hello,

On http://www.intranetjournal.com/articles/200103/id_03_21_01b.html,
I found this:

"The Apache system requires all the arguments to be typed
using the xsi:type attribute, while the Microsoft system
does not require this. The next version of Apache SOAP (2.1)
should be able to guarantee interoperability between these
two implementations. "

It answers some of my questions but now, I got more:
  - They're talking about Apache SOAP 2.1, does Axis will
    guarantee that interoperability ?
  - If yes, when?

Thanks.


At 09:14 5/7/02 +0200, you wrote:
>Hi all,
>
>After installing Axis beta 2 and Tomcat 3.3.1 on my NT box,
>I could successfully run your samples - e.g. Calculator:
>
>   java samples.userguide.example2.CalcClient -p8080 add 5 8
>   Got result : 13
>
>This looks like a great job!
>
>
>Now, I was trying to call the Calculator sample from some
>Visual Basic code using MS SOAP Toolkit 2.0 :
>
>  Call soapclient.mssoapinit("http://localhost:8080/axis/Calculator.jws?wsdl")
>  wscript.echo soapclient.add(1, 2)
>
>It looks to call the service properly...Unfortunately, it failed returning
>the following error:
>
>  java.lang.IllegalArgumentException: argument type mismatch
>
>
>By examining the exchanged messages with tcpdump, I can see the following
>
>1) When call from an Axis client:
>----
>POST /axis/Calculator.jws HTTP/1.0
>Content-Length: 485
>Host: localhost
>Content-Type: text/xml; charset=utf-8
>SOAPAction: ""
>
><?xml version="1.0" encoding="UTF-8"?>
><SOAP-ENV:Envelope 
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
>xmlns:SOAP-ENV="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/">
>  <SOAP-ENV:Body>
>   <add>
>    <op1 xsi:type="xsd:int">5</op1>
>    <op2 xsi:type="xsd:int">8</op2>
>   </add>
>  </SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>----
>
>2) When called from MS SOAP Toolkit client:
>----
>POST /axis/Calculator.jws HTTP/1.1
>Content-Type: text/xml; charset="UTF-8"
>Host: localhost
>SOAPAction: ""
>Content-Length: 320
>
><?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:add 
>xmlns:SOAPSDK1="add"><i1>1</i1><i2>2</i2></SOAPSDK1:add></SOAP-ENV:Body></SOAP-ENV:Envelope>
>----
>
>So my questions:
>  - Is it supposed to fail?  I mean, isn't SOAP supposed to be independant
>    of the implementation?
>  - Why is that failing exactly?
>  - Is this a general compatibility problem?  Note that this would be
>    a showstopper for our project.
>  - Is there an easy workaround transparent from the client-side?
>
>
>Many thanks for your help.
>
>
>--
>Gaëtan Frenoy (aka Gaff)
>gaetan@frenoy.net
>Brussels - Belgium

--
G


AW: Compatibility with Microsoft toolkit

Posted by Joachim Riedel <jo...@teksolv.de>.
>  wscript.echo soapclient.add(1, 2)

> java.lang.IllegalArgumentException: argument type mismatch

Visual Basic assumes that every number is a "double" but the Webservice
expects Integer.

Visual Basic: "Appending the literal type character I to a literal
forces it to the Integer data type. Appending the identifier type
character % to any identifier forces it to Integer."

That should help to fix your problem

Joachim