Hello Dino,

the problem is not the Array of int's the Problem is the
String itemName.

As you see in the generated request it is missing in the Request,
if it is null. Axis on the serverside, now treating the third
Parameter: fromTimestamp as Parameter itemName and fails
with an expeption converting that long to an String.

Regards

Robert

Dino Chiesa schrieb:
It appears you are using soapenc:Array, which is a WS-I no-no. Why not
use doc/literal?

Also, for an example of transmitting arrays of complex types, between
AXIS and .NET, see
http://dinoch.dyndns.org:7070/axis1.2/AboutCtService.jsp
It is a working app. Uses doc/literal. The source is downloadable. I
don't have any problems, as far as I know, sending "null" params.

(sending null dates is a different matter)




-----Original Message-----
From: Robert Herter [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 5:35 AM
To: [email protected]
Subject: 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:     [EMAIL PROTECTED]
Fax:     +49 8031 615693
Mobile:  +49 172 8675477

E-Mail:  [EMAIL PROTECTED]
Web:     http://www.hecons.de
******************************************


--
*******************************************
Robert Herter
HeCons
Eschenweg 11

83059 Kolbermoor
Germany

Fon:     +49 700 00HERTER
         +49 8031 615691
SIP:     [EMAIL PROTECTED]
Fax:     +49 8031 615693
Mobile:  +49 172 8675477

E-Mail:  [EMAIL PROTECTED]
Web:     http://www.hecons.de
******************************************

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to