axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: Problem with Retrieving the Values from the Client
Date Mon, 04 Feb 2008 12:56:42 GMT
Are you working with Axis or Axis2? (I'm guessing Axis) Which version?

Older versions of Axis had some trouble supporting rpc/literal. You
might want to use wrapped document/literal instead.

One problem I see in the WSDL: You must remove the soapEncoding
attribute from the <wsdlsoap:body> elements in your binding
definitions. (You use that attribute only if use="encoded").

Anne

On Feb 4, 2008 4:31 AM, Jose Carlo Fabian <carlo.fabian@voxsant.com> wrote:
> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message