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: Axis 1.2.1, Problem with Complex type deserialization
Date Sat, 10 Sep 2005 19:06:49 GMT
I think you want to use literal encoding rather than soap encoding.

On 9/8/05, Raphael Jacquemin <rjacquemin@gmail.com> wrote:
> 
> Hello everybody, 
> 
> I use Axis 1.2.1
> I try to developp a client for the WS-MetadataExchange specification.
> 
> Here is the schema XML :
> <xs:schema
>  targetNamespace='http://schemas.xmlsoap.org/ws/2004/09/mex'
>  xmlns:tns='http://schemas.xmlsoap.org/ws/2004/09/mex'
>  xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/addressing'
>  xmlns:xs='http://www.w3.org/2001/XMLSchema'
>  elementFormDefault='qualified'
>  blockDefault='#all' >
> 
>  <xs:import
>  namespace='http://schemas.xmlsoap.org/ws/2004/08/addressing'
>  schemaLocation='http://schemas.xmlsoap.org/ws/2004/08/addressing/' />
>  <!-- Get Metadata request -->
>  <xs:element name='GetMetadata' >
>  <xs:complexType>
>  <xs:sequence>
>  <xs:element ref='tns:Dialect' minOccurs='0' />
>  </xs:sequence>
>  <xs:anyAttribute namespace='##other' processContents='lax' />
>  </xs:complexType>
>  </xs:element>
> 
>  <xs:element name='Dialect' type='xs:anyURI' />
> 
>  <!-- Get Metadata response -->
>  <xs:element name='Metadata' >
>  <xs:complexType>
>  <xs:sequence>
>  <xs:element ref='tns:MetadataSection'
>  minOccurs='0'
>  maxOccurs='unbounded' />
>  </xs:sequence>
>  <xs:anyAttribute namespace='##other' processContents='lax' />
>  </xs:complexType>
>  </xs:element>
> 
>  <xs:element name='MetadataSection' >
>  <xs:complexType>
>  <xs:choice>
>  <xs:any namespace='##other'
>  processContents='lax'
>  minOccurs='0'
>  maxOccurs='unbounded' />
>  <xs:element ref='tns:MetadataReference' />
>  <xs:element ref='tns:Location' />
>  </xs:choice>
>  <xs:attribute name='Dialect' type='xs:anyURI' use='required' />
>  <xs:anyAttribute namespace='##other' processContents='lax' />
>  </xs:complexType>
>  </xs:element>
> 
>  <xs:element name='MetadataReference'
>  type='wsa:EndpointReferenceType' />
> 
>  <xs:element name='Location'
>  type='xs:anyURI' />
> 
>  <!-- count(/s:Envelope/s:Body/*) = 0 for Get request -->
>  <!-- Get Response returns xs:any -->
>  <xs:complexType name='AnyXmlType' >
>  <xs:sequence>
>  <xs:any namespace='##any' processContents='lax' />
>  </xs:sequence>
>  <xs:anyAttribute namespace='##any' processContents='lax' />
>  </xs:complexType>
> 
> </xs:schema>
> 
> 
> I developp my client using the tool WSDL2JAVA.
> There is no problem to call the service. I can see the SOAP messages in 
> TCPmon.
> 
> Exemple : 
>  <SOAP-ENV:Body id="_0">
>  <wsm:Metadata>
>  <wsm:MetadataSection Dialect="
> http://schemas.xmlsoap.org/ws/2004/08/devprof/ThisModel"<http://schemas.xmlsoap.org/ws/2004/08/devprof/ThisModel%22>
> >
>  <wdp:ThisModel>
>  <wdp:manufacturer>Schneider Electric SA</wdp:manufacturer>
>  <wdp:manufacturerURL>http://www.schneider-electric.com
> </wdp:manufacturerURL>
>  <wdp:modelName>Compteur Zebra</wdp:modelName>
>  <wdp:modelNumber>ZM-455</wdp:modelNumber>
>  <wdp:modelURL>http://www.schneider-electric.com/Zebra/ZM-455/
> </wdp:modelURL>
>  <wdp:UPC>673678460749</wdp:UPC>
>  <wdp:presentationURL>
> http://www.schneider-electric.com/Zebra/ZM-455/factsheet.html
> </wdp:presentationURL>
>  </wdp:ThisModel>
>  </wsm:MetadataSection>
>  </wsm:Metadata>
>  </SOAP-ENV:Body>
> 
> 
> But when I want to display this result in my JSP pages, I have a an 
> exception !!!
> org.xml.sax.SAXException: Invalid element in 
> org.xmlsoap.schemas.ws._2004._09.mex._MetadataSection - manufacturer
> 
> 
> As I can see in the Axis user guide, I try to use customed 
> deserialization. 
> The 
> 
> I modify the client-config.wsdd :
> <?xml version="1.0" encoding="UTF-8"?>
> <deployment name="defaultClientConfig"
>  xmlns="http://xml.apache.org/axis/wsdd/"
>  xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"<http://xml.apache.org/axis/wsdd/providers/java%22>
> >
> 
> <arrayMapping qname="ns:>MetadataSection" xmlns:ns="http://schemas.xmlsoap.org/ws/2004/09/mex
> "
>  languageSpecificType="java:
> org.xmlsoap.schemas.ws._2004._09.mex.AnyXmlType"
>  innerType="ns2:java.lang.String" xmlns:ns2="
> http://schemas.xmlsoap.org/ws/2004/09/mex"
>  encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/<http://schemas.xmlsoap.org/soap/encoding/%22/>
> >
> 
>  <transport name="http" pivot="java:
> org.apache.axis.transport.http.HTTPSender"/>
> <transport name="local" pivot="java:
> org.apache.axis.transport.local.LocalSender"/>
> <transport name="java" pivot="java:
> org.apache.axis.transport.java.JavaSender"/>
> </deployment>
> 
> 
> The Exception is still raise !!!
> I try with the other Tag, <beanMapping> and <typeMapping> but the result

> was worst !!!
> 
> 
> If you have any idea ?
> I will appreciate.
> 
> Best regards
> Raphael.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>

Mime
View raw message