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 Robert Herter <he...@hecons.de> on 2005/03/08 11:35:05 UTC
NET Client omit NULL Parameter - handling
Hello,
i have a Problem with Axis (1.2RC3) and a
.NET 1.1 (C#) Client.
Making a Request from the NET Client with
a String - Parameter = null. The generated
Request omits the Parameter (eg. itemName)
But it seams Axis is not using the Parameter-Names,
it is deserializing parameter after parameter, so
the call results in an Exeption.
Is there any Solution for this ?
Thanks for your Help
Regards
Robert
Request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://webservice.access.server.pls.schraml.de/"
xmlns:types="http://webservice.access.server.pls.schraml.de/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:getStoermeldearchiv>
<sessionid xsi:type="xsd:string">ShAurH68KuZ0</sessionid>
*********Missing ItemName which is null **************************
<fromTimestamp xsi:type="xsd:long">1110240000000</fromTimestamp>
<toTimestamp xsi:type="xsd:long">1110281315000</toTimestamp>
<stoerartId xsi:type="xsd:int">23</stoerartId>
<zustandIds href="#id1" />
</tns:getStoermeldearchiv>
<soapenc:Array id="id1" soapenc:arrayType="xsd:int[6]">
<Item>1</Item>
<Item>4</Item>
<Item>5</Item>
<Item>0</Item>
<Item>2</Item>
<Item>3</Item>
</soapenc:Array>
</soap:Body>
</soap:Envelope>
Exception:
[org.apache.axis.providers.java.RPCInvocation] org.xml.sax.SAXException:
Bad types (long -> class java.lang.String)
Using this Method:
public Stoermeldearchiv[] getStoermeldearchiv(
String sessionid,
String itemName,
long fromTimestamp, long toTimestamp,
int stoerartId,
int[] zustandIds,
String orderBy1, String ascDesc1,
String orderBy2, String ascDesc2,
String orderBy3, String ascDesc3
)
{
};
WDSL:
<wsdl:message name="getStoermeldearchivResponse">
<wsdl:part name="getStoermeldearchivReturn"
type="impl:ArrayOf_tns1_Stoermeldearchiv"/>
</wsdl:message>
<wsdl:message name="quitStoermeldearchivResponse">
<wsdl:part name="quitStoermeldearchivReturn"
type="impl:ArrayOf_tns1_Stoermeldearchiv"/>
</wsdl:message>
<wsdl:message name="getStoermeldearchivRequest">
<wsdl:part name="sessionid" type="xsd:string"/>
<wsdl:part name="itemName" type="xsd:string"/>
<wsdl:part name="fromTimestamp" type="xsd:long"/>
<wsdl:part name="toTimestamp" type="xsd:long"/>
<wsdl:part name="stoerartId" type="xsd:int"/>
<wsdl:part name="zustandIds" type="impl:ArrayOf_xsd_int"/>
<wsdl:part name="orderBy1" type="xsd:string"/>
<wsdl:part name="ascDesc1" type="xsd:string"/>
<wsdl:part name="orderBy2" type="xsd:string"/>
<wsdl:part name="ascDesc2" type="xsd:string"/>
<wsdl:part name="orderBy3" type="xsd:string"/>
<wsdl:part name="ascDesc3" type="xsd:string"/>
</wsdl:message>
--
*******************************************
Robert Herter
HeCons
Eschenweg 11
83059 Kolbermoor
Germany
Fon: +49 700 00HERTER
+49 8031 615691
SIP: 498031615691@1und1.de
Fax: +49 8031 615693
Mobile: +49 172 8675477
E-Mail: herter@hecons.de
Web: http://www.hecons.de
******************************************