I try to user webservice client that is created using JBossWS with Axis1 server. The
problem is that I cannot receive a complex type from the server even though it is properly
returned. Judging by TCPMon U receive th following message:
| <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><so...
xmlns="http://osmoticweb.com/PurchaseService/"><customerN...
xsi:nil="true"/><quantities
xsi:nil="true"/><shippingAddress
xsi:nil="true"/></findOrderReturn></soapenv:Body></soapenv:Envelope>
|
As you see customerName has value "Ron". I user the following code to call the
server method:
| Service service = Service.create(wsdlLocation, serviceName);
| BeanService beanS = (BeanService) service.getPort(BeanService.class);
| Order o = beanS.findOrder();
|
No exceptions are thrown. Order object is returned but it has all the properties values
equal to null (as you can see from the result message from the server
"customerName" has its value).
Here is the wsdl:
| <?xml version="1.0" encoding="UTF-8"?>
| <wsdl:definitions
targetNamespace="http://osmoticweb.com/Purchase"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://osmoticweb.com/Purchase"
xmlns:intf="http://osmoticweb.com/Purchase"
xmlns:tns1="urn:BeanService"
xmlns:tns2="http://osmoticweb.com/PurchaseService/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| <!--WSDL created by Apache Axis version: 1.2.1
| Built on Jun 14, 2005 (09:15:57 EDT)-->
| <wsdl:types>
| <schema elementFormDefault="qualified"
targetNamespace="http://osmoticweb.com/Purchase"
xmlns="http://www.w3.org/2001/XMLSchema">
| <import namespace="urn:BeanService"/>
| <complexType name="ArrayOf_xsd_string">
| <sequence>
| <element maxOccurs="unbounded" minOccurs="0"
name="item" type="xsd:string"/>
| </sequence>
|
| </complexType>
| <complexType name="ArrayOf_xsd_int">
| <sequence>
| <element maxOccurs="unbounded" minOccurs="0"
name="item" type="xsd:int"/>
| </sequence>
| </complexType>
| <element name="order" type="tns1:Order"/>
| </schema>
| <schema elementFormDefault="qualified"
targetNamespace="urn:BeanService"
xmlns="http://www.w3.org/2001/XMLSchema">
|
| <import
namespace="http://osmoticweb.com/Purchase"/>
| <complexType name="Order">
| <sequence>
| <element name="customerName" nillable="true"
type="xsd:string"/>
| <element name="itemCodes" nillable="true"
type="impl:ArrayOf_xsd_string"/>
| <element name="quantities" nillable="true"
type="impl:ArrayOf_xsd_int"/>
| <element name="shippingAddress" nillable="true"
type="xsd:string"/>
| </sequence>
| </complexType>
|
| </schema>
| <schema elementFormDefault="qualified"
targetNamespace="http://osmoticweb.com/PurchaseService/"
xmlns="http://www.w3.org/2001/XMLSchema">
| <import
namespace="http://osmoticweb.com/Purchase"/>
| <import namespace="urn:BeanService"/>
| <element name="findMeReturn" type="xsd:string"/>
| <element name="findOrderReturn" type="tns1:Order"/>
| </schema>
| </wsdl:types>
|
| <wsdl:message name="findOrderRequest">
|
| </wsdl:message>
|
| <wsdl:message name="findMeResponse">
|
| <wsdl:part element="tns2:findMeReturn"
name="findMeReturn"/>
|
| </wsdl:message>
|
| <wsdl:message name="findMeRequest">
|
| <wsdl:part element="impl:order" name="order"/>
|
| </wsdl:message>
|
| <wsdl:message name="findOrderResponse">
|
| <wsdl:part element="tns2:findOrderReturn"
name="findOrderReturn"/>
|
| </wsdl:message>
|
| <wsdl:portType name="BeanService">
|
| <wsdl:operation name="findMe" parameterOrder="order">
|
| <wsdl:input message="impl:findMeRequest"
name="findMeRequest"/>
|
| <wsdl:output message="impl:findMeResponse"
name="findMeResponse"/>
|
| </wsdl:operation>
|
| <wsdl:operation name="findOrder">
|
| <wsdl:input message="impl:findOrderRequest"
name="findOrderRequest"/>
|
| <wsdl:output message="impl:findOrderResponse"
name="findOrderResponse"/>
|
| </wsdl:operation>
|
| </wsdl:portType>
|
| <wsdl:binding name="OrderProcessorSoapBinding"
type="impl:BeanService">
|
| <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
|
| <wsdl:operation name="findMe">
|
| <wsdlsoap:operation soapAction=""/>
|
| <wsdl:input name="findMeRequest">
|
| <wsdlsoap:body use="literal"/>
|
| </wsdl:input>
|
| <wsdl:output name="findMeResponse">
|
| <wsdlsoap:body use="literal"/>
|
| </wsdl:output>
|
| </wsdl:operation>
|
| <wsdl:operation name="findOrder">
|
| <wsdlsoap:operation soapAction=""/>
|
| <wsdl:input name="findOrderRequest">
|
| <wsdlsoap:body use="literal"/>
|
| </wsdl:input>
|
| <wsdl:output name="findOrderResponse">
|
| <wsdlsoap:body use="literal"/>
|
| </wsdl:output>
|
| </wsdl:operation>
|
| </wsdl:binding>
|
| <wsdl:service name="BeanServiceService">
|
| <wsdl:port binding="impl:OrderProcessorSoapBinding"
name="OrderProcessor">
|
| <wsdlsoap:address
location="http://127.0.0.1:9999/axis/services/OrderProcessor"/>
|
| </wsdl:port>
|
| </wsdl:service>
|
| </wsdl:definitions>
|
|
In case a string ibject is returned from the method than it's OK, I receive the value.
An Order object is also properly send to the server as a method parameter. What is wrong?
I've spend the whole day trying to find the cause of problem.
Order class and BeanService are generated by using WSConsume tool. JBoss 4.2.2GA is used.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149210#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...