It appears that your XML message is a bean that can be [de]serialized with the standard Bean[De]Serializer class. However, you need to register the XML message type in the axis TypeMappingRegistry so that Axis knows how to process it. Registration can be accomplished using the WSDD deployment descriptor - both on the client and server side.
See -> http://ws.apache.org/axis/java/user-guide.html#EncodingYourBeansTheBeanSerializer -- Mark > -----Original Message----- > From: babloosony [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 07, 2005 12:58 AM > To: [email protected]; [email protected] > Subject: How to Custom (De)Serilaizer in AXIS > > > Hi All, > > I am using AXIS 1.2 RC2 both on server and client. Can anyone please > tell me how to write a custom serializer and deserializer in axis in > order to consume below soap request message from AXIS Client. My WSDL > has also been included in this mail. Please redirect me to any > docs/tutorials/code samples. Please suggest .... > > > > Request Soap Message > ----------------------------------- > POST /Proj04022005Axis12Rc2Web/services/TypesService HTTP/1.0 > Content-Type: text/xml; charset=utf-8 > Accept: application/soap+xml, application/dime, > multipart/related, text/* > User-Agent: Axis/1.2RC2 > Host: 127.0.0.1:9999 > Cache-Control: no-cache > Pragma: no-cache > SOAPAction: "" > Content-Length: 501 > > > <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"> > <soapenv:Body> > <getDummyBean xmlns="http://ws.as.com/wsdl/typesws"> > <VOILA> > <ns1:j > xmlns:ns1="http://ws.as.com/schema/typesws">9999</ns1:j> > <ns2:st xmlns:ns2="http://ws.as.com/schema/typesws">BLAH > BLAH</ns2:st> > <ns3:i > xmlns:ns3="http://ws.as.com/schema/typesws">9999</ns3:i> > </VOILA> > </getDummyBean> > </soapenv:Body></soapenv:Envelope> > > > > > > Response Soap Message > ------------------------------------- > HTTP/1.1 200 OK > Server: WebSphere Application Server/5.1 > Content-Type: text/xml; charset=utf-8 > Content-Language: en-US > Connection: close > > > <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"> > <soapenv:Body> > <getDummyBeanResponse xmlns="http://ws.as.com/wsdl/typesws"> > <getDummyBeanReturn> > <i>100</i> > <st>dummystring</st> > </getDummyBeanReturn> > </getDummyBeanResponse> > </soapenv:Body></soapenv:Envelope> > > > > > > > WSDL > ---------- > <?xml version="1.0" encoding="UTF-8"?> > > <wsdl:definitions targetNamespace="http://ws.as.com/wsdl/typesws" > > xmlns:apachesoap="http://xml.apache.org/xml-soap" > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > xmlns:impl="http://ws.as.com/wsdl/typesws" > > xmlns:intf="http://ws.as.com/wsdl/typesws" > > xmlns:tns1="http://ws.as.com/wsdl/typesws" > > xmlns:tns2="http://ws.as.com/schema/typesws"> > > <wsdl:types> > <schema elementFormDefault="qualified" > > targetNamespace="http://ws.as.com/schema/typesws" > xmlns="http://www.w3.org/2001/XMLSchema"> > > <complexType name="DummyParentBean"> > <sequence> > <element name="j" type="xsd:int"/> > </sequence> > </complexType> > > <complexType name="InputBean"> > <complexContent> > <extension base="tns2:DummyParentBean"> > <sequence> > <element > name="st" nillable="true" type="xsd:string"/> > <element > name="i" type="xsd:int"/> > </sequence> > </extension> > </complexContent> > </complexType> > > <complexType name="DummyBean"> > <sequence> > <element name="i" type="xsd:int"/> > <element name="st" > nillable="true" type="xsd:string"/> > </sequence> > </complexType> > </schema> > > <schema elementFormDefault="qualified" > targetNamespace="http://ws.as.com/wsdl/typesws" > xmlns="http://www.w3.org/2001/XMLSchema"> > > <import namespace="http://ws.as.com/schema/typesws"/> > > <element name="getDummyBean"> > <complexType> > <sequence> > <element name="VOILA" > type="tns2:InputBean"/> > </sequence> > </complexType> > </element> > > <element name="getDummyBeanResponse"> > <complexType> > <sequence> > <element > name="getDummyBeanReturn" type="tns2:DummyBean"/> > </sequence> > </complexType> > </element> > </schema> > </wsdl:types> > > <wsdl:message name="getDummyBeanResponse"> > <wsdl:part element="tns1:getDummyBeanResponse" > name="parameters"/> > </wsdl:message> > <wsdl:message name="getDummyBeanRequest"> > <wsdl:part element="tns1:getDummyBean" name="parameters"/> > </wsdl:message> > > <wsdl:portType name="Types"> > <wsdl:operation name="getDummyBean"> > <wsdl:input message="impl:getDummyBeanRequest" > name="getDummyBeanRequest"/> > <wsdl:output > message="impl:getDummyBeanResponse" name="getDummyBeanResponse"/> > </wsdl:operation> > </wsdl:portType> > > <wsdl:binding name="TypesServiceSoapBinding" type="impl:Types"> > <wsdlsoap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="getDummyBean"> > <wsdlsoap:operation soapAction=""/> > <wsdl:input name="getDummyBeanRequest"> > <wsdlsoap:body use="literal"/> > </wsdl:input> > <wsdl:output name="getDummyBeanResponse"> > <wsdlsoap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > > <wsdl:service name="TypesService"> > <wsdl:port binding="impl:TypesServiceSoapBinding" > name="TypesService"> > <wsdlsoap:address > location="http://localhost:9999/Proj04022005Axis12Rc2Web/servi > ces/TypesService" > /> > </wsdl:port> > </wsdl:service> > > </wsdl:definitions> > > > > > Thanks & Regards, > Kumar. >
