Object is null but not nillable - JSR 172 client

Here's the scenario....

I have a web service that's been created with the RAD 7 wizard (IBM JAX-RPC) running on WAS 6, which works great (tested via web service explorer).

On the other end of it, I am trying to develop a web service client on a Lotus Expeditor device/mobile application, which is limited to JSR 172. (I've posted this on the Expeditor forum as well, but I believe this is more of a web service issue).

Lets focus on one request (getEmpById(String empId)). THe following is an excerpt of the wsdl for Employee:

<complexType name="Employee">

<sequence>

<element name="fax" nillable="true" type="xsd:string"/>

<element name="email" nillable="true" type="xsd:string"/>

<element name="id" type="xsd:int"/>

<element name="firstname" nillable="true" type="xsd:string"/>

<element name="fullName" nillable="true" type="xsd:string"/>

<element name="postalcode" nillable="true" type="xsd:string"/>

<element name="country" nillable="true" type="xsd:string"/>

<element name="address" nillable="true" type="xsd:string"/>

<element name="startdate" nillable="true" type="xsd:string"/>

<element name="province" nillable="true" type="xsd:string"/>

<element name="phone" nillable="true" type="xsd:string"/>

<element name="city" nillable="true" type="xsd:string"/>

<element name="trade" nillable="true" type="tns1:Trade"/>

<element name="mobile" nillable="true" type="xsd:string"/>

<element name="lastname" nillable="true" type="xsd:string"/>

</sequence>

When I call getEmpById(..) from the client, I get the following exception:

Caused by: javax.xml.rpc.JAXRPCException: CWPWS2021E: Object isnull but not nillable

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.checkNillable(Unknown Source)

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.decodePrimitiveType(Unknown Source)

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.decodeElement(Unknown Source)

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.decodeComplexType(Unknown Source)

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.decodeElement(Unknown Source)

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.decodeComplexType(Unknown Source)

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.decodeElement(Unknown Source)

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.decodeComplexType(Unknown Source)

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.decodeElement(Unknown Source)

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.decodeOperation(Unknown Source)

at com.ibm.pvcws.internal.jaxrpc.rpc.OperationImpl.invoke(Unknown Source)

at com.abc.def.workorder.ws.TestEndpointSoap_Stub.getEmpById(TestEndpointSoap_Stub.java)

But only when 'Trade' is null. If 'Employee' has any other null values it works fine, and I've narrowed it down to 'Trade'. But as you can see in the wsdl excerpt, nillable=true for Trade.

So I wonder if anyone else has encountered this issue. Any help is appreciated. I am hoping it is something obvious and due to my lack of WS experience.

Thanks,

Eric

[4478 byte] By [ericchoa] at [2007-11-27 5:33:15]
# 1
have u tried to put nillable="true" on the id element?if u've tried that but still doesn't work, try to manually put null to each of the null field when populating it... i.e. set null to the empty fields, and try again. in theory that should work... hope this help
JWKC-5ivea at 2007-7-12 15:00:07 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...