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 Giannandrea Castaldi <g....@gmail.com> on 2005/04/01 10:41:25 UTC

Problem with .NET client that remove null parameters

Hi,
I've an axis server (axis 1.1 on tomcat 4.1.30) where one argument of
a method may be null and if I call the web service from an axis client
passing the null argument the call succeedes.
But in production the web service is called by a .NET client
(Microsoft WSE 2.0 SP3) that remove any null parameter and then the
axis call validation fails because the signature of the method is
wrong.
I've read this post http://java2.5341.com/msg/99543.html where they
suggest to add the parameter names in the wsdd file but our
server-config.wsdd already contains them:

---- cut here ----
...
  <operation name="myMethod" qname="ns1:myMethod"
returnQName="myMethodReturn" returnType="xsd:int"
xmlns:ns1="http://MyService"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <parameter name="param1" type="xsd:string"/>
   <parameter name="param2" type="xsd:string"/>
   <parameter name="param3" type="xsd:string"/>
   <parameter name="param4" type="xsd:string"/>
   <parameter name="param5" type="xsd:string"/>
   <parameter name="param6" type="xsd:base64Binary"/>
   <parameter name="param7" type="xsd:int"/>
   <parameter name="param8" type="xsd:boolean"/>
   <parameter mode="out" name="param9" type="xsd:string"/>
  </operation>
...
---- cut here ----


Is there a way in axis 1.1 (or 1.2RC3) to accept call with missing arguments?


Here is the error message sent back:
---- cut here ----
HTTP/1.1 500 Internal Server Error Content-Type:
text/xml;charset=utf-8 Transfer-Encoding: chunked Date: Thu, 31 Mar
2005 12:38:58 GMT Server: Apache-Coyote/1.1 Connection: close  375
<?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>
  <soapenv:Fault>
   <faultcode>soapenv:Server.generalException</faultcode>
   <faultstring>Tried to invoke method public int MyService.
   myMethod
   java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,byte[],int,boolean,javax.xml.rpc.holders.StringHolder)
with arguments

   java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,null,java.lang.Integer,javax.xml.rpc.holders.StringHolder,null.
 The arguments do not match the signature.; nested exception is:

.java.lang.IllegalArgumentException</faultstring>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>
---- cut here ----

Thanks in advance.

Giannandrea