axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Immi <michael.im...@nowhow.ch>
Subject Re: [Axis2] Complex type deserializing: Empty parameter
Date Mon, 26 Feb 2007 11:47:25 GMT

I'm using Java2WSDL to generate the WSDL file with the following parameters:

Java2WSDL
  -l "http://192.168.0.118:8080/webtools/control/SOAPService"
  -o "/tmp/docgen/ServiceTestService.wsdl"
  -A "OPERATION"
  -n "http://nowhow.ch/isgate/"
  -i "ch.nowhow.wsdl.tmp.StestServiceImpl"
  "ch.nowhow.wsdl.tmp.StestServiceImpl"

The SOAP envelope is generated and sent using XML Spy.

Michael

Java class:
======
package ch.nowhow.wsdl.tmp;

import ch.nowhow.isgate.archiv.types.Parameter;

public class StestServiceImpl {
public void testService( Parameter inParam) {};
}

WSDL
====
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://nowhow.ch/isgate/" xmlns:intf="http://nowhow.ch/isgate/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="http://types.archiv.isgate.nowhow.ch"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://nowhow.ch/isgate/">
	<wsdl:types>
		<schema targetNamespace="http://types.archiv.isgate.nowhow.ch"
xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			<complexType name="Parameter">
				<sequence>
					<element name="name" nillable="true" type="soapenc:string"/>
				</sequence>
			</complexType>
		</schema>
	</wsdl:types>
	<wsdl:message name="testServiceResponse">

   </wsdl:message>
	<wsdl:message name="testServiceRequest">
		<wsdl:part name="inParam" type="tns1:Parameter">

      </wsdl:part>
	</wsdl:message>
	<wsdl:portType name="StestServiceImpl">
		<wsdl:operation name="testService" parameterOrder="inParam">
			<wsdl:input name="testServiceRequest" message="impl:testServiceRequest">

       </wsdl:input>
			<wsdl:output name="testServiceResponse"
message="impl:testServiceResponse">

       </wsdl:output>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="SOAPServiceSoapBinding" type="impl:StestServiceImpl">
		<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="testService">
			<wsdlsoap:operation soapAction="testService"/>
			<wsdl:input name="testServiceRequest">
				<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://nowhow.ch/isgate/"/>
			</wsdl:input>
			<wsdl:output name="testServiceResponse">
				<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://nowhow.ch/isgate/"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="StestServiceImplService">
		<wsdl:port name="SOAPService" binding="impl:SOAPServiceSoapBinding">
			<wsdlsoap:address
location="http://192.168.0.118:8080/webtools/control/SOAPService"/>
		</wsdl:port>
	</wsdl:service>
	<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
</wsdl:definitions>

-------------------------------

Anne Thomas Manes wrote:
> 
> How are you building/deploying this service?
> Can you post the WSDD? WSDL?
> 
> Note that the .jws deployment option does not support complex types.
> 
> Anne
> 
> On 2/26/07, Immi <michael.imhof@nowhow.ch> wrote:
>>
>> My service has one complex type parameter of type "Parameter".
>>             testService(Parameter arg);
>>
>> Now I'm sending a SOAP envelope (see bottom) to my Java server.
>> When I read the parameters using
>>       RPCElement body = ... (contains body element of SOAP envelope)
>>       body.getParams()
>> I'm getting an value of RCPParam with value = null!!!
>> For deserializing, I'm using Axis BeanDeserializer!
>>
>> Why is this null?
>> It's working with simple types and String arrays but not with complex
>> types!
>>
>> Regards
>> Michael
>>
>> SOAP ENVELOPE
>> ==========
>> <SOAP-ENV:Envelope
>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:m0="http://types.archiv.isgate.nowhow.ch"
>> xmlns:m1="http://schemas.xmlsoap.org/soap/encoding/">
>>         <SOAP-ENV:Body>
>>                 <m:testService xmlns:m="http://nowhow.ch/isgate/"
>> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>>                         <inParam xsi:type="m0:Parameter">
>>                                 <name xsi:type="m1:string" id=""
>> href="">dsfs</name>
>>                         </inParam>
>>                 </m:testService>
>>         </SOAP-ENV:Body>
>> </SOAP-ENV:Envelope>
>>
>> COMPLEX TYPE JAVA CLASS
>> =================
>> public class Parameter implements Serializable {
>>     private String name;
>>
>>     public Parameter() {
>>         super();
>>     }
>>
>>     public String getName() {
>>         return name;
>>     }
>> --
>> View this message in context:
>> http://www.nabble.com/Complex-type-deserializing%3A-Empty-parameter-tf3291993.html#a9156530
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Complex-type-deserializing%3A-Empty-parameter-tf3291993.html#a9157464
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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