Hello everyone. I am a beginner when it comes to creating web services and I have encountered a problem that I cannot seem to find a solution to. I have created a simple web service that adds a user based on the parameters passed by the client. Now I can receive the xml(server side) and can parse it but the problem is, the elements that I have declared nillable=true, even if I have entered values in them, arrives to the server without any values. Here is the wsdl for reference:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:voxsant" xmlns:impl="urn:voxsant" xmlns:intf="urn:voxsant" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:tns1="http://model.voxsant";>
 <wsdl:types>
<schema targetNamespace="http://model.voxsant"; xmlns="http://www.w3.org/2001/XMLSchema";>
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
  <complexType name="User">
   <sequence>
       <element name="username" type="xsd:string"/>
       <element name="password" type="xsd:string"/>
       <element name="firstName" type="xsd:string"/>
       <element name="middleInitial" type="xsd:string"/>
       <element name="lastName" type="xsd:string"/>
       <element name="country" nillable="true" type="xsd:string"/>
       <element name="state" nillable="true" type="xsd:string"/>
       <element name="city" nillable="true" type="xsd:string"/>
       <element name="address1" nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="virtualNumbers" nillable="true" type="xsd:string"/>
   </sequence>
  </complexType>
 </schema>
 </wsdl:types>
 <wsdl:message name="addUserRequest">
   <wsdl:part name="in0" type="tns1:User">
   </wsdl:part>
 </wsdl:message>
 <wsdl:message name="addUserResponse">
   <wsdl:part name="addUserReturn" type="xsd:string">
   </wsdl:part>
 </wsdl:message>
 <wsdl:portType name="VoxsantService">
   <wsdl:operation name="addUser">
     <wsdl:input name="addUserRequest" message="impl:addUserRequest">
   </wsdl:input>
     <wsdl:output name="addUserResponse" message="impl:addUserResponse">
   </wsdl:output>
   </wsdl:operation>
 </wsdl:portType>
 <wsdl:binding name="VoxsantServiceSoapBinding" type="impl:VoxsantService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
   <wsdl:operation name="addUser">
     <wsdlsoap:operation soapAction=""/>
     <wsdl:input name="addUserRequest">
<wsdlsoap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:voxsant"/>
     </wsdl:input>
     <wsdl:output name="addUserResponse">
<wsdlsoap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:voxsant"/>
     </wsdl:output>
   </wsdl:operation>
 </wsdl:binding>
 <wsdl:service name="VoxsantServiceService">
<wsdl:port name="VoxsantService" binding="impl:VoxsantServiceSoapBinding"> <wsdlsoap:address location="http://localhost:8080/axis2/services/VoxsantService"/>
   </wsdl:port>
 </wsdl:service>
</wsdl:definitions>


For the entries wherein I did not enter a nillable=true, their values arrive, but for the other entries(country, state, virtual numbers etc), I do not get the values even if my test client passes it to the ws. Does anyone know where I went wrong? Would really appreciate any help, thanks

Carlo F.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to