You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Geert van der Sman <Ge...@anachron.com> on 2005/03/30 15:31:26 UTC
Axis support for JAX-RPC mapping files?
Hello,
Does Axis have support for java-wsdl-mapping? I suppose my question implies
that you can deploy the webservice with an webservices.xml file that points
to both the wsdl & the mapping file(s).
The underlying problem is that I have a XSD (schema) & an EJB that needs to
be exposed as a webservice. The field names for the javabean that I need to
pass to the WS do not match the element names in the schema.
Simplified it looks like this:
>>>>>>>>>>>EJB method>>>>>>>>>>>>>>>>
EJB method: createInvoice(Invoice invoice){}
>>>>>>>>>>>Bean>>>>>>>>>>>>>>>>
class Invoice{
String invoiceDate;
String invoiceId;
etc...
}
>>>>>>>>>>>Schema>>>>>>>>>>>>>>>>
<xs:schema>
<xs:element name="FACTUUR">
<xs:complexType>
<xs:sequence>
<xs:element name="factuur_datum" type="xs:string"/>
<xs:element name="factuur_nummer" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Here "FACUUR" maps to "Invoice" etc.
>>>>>>>>>>>WSDD>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<beanMapping qname="inv:FACTUUR"
type="java:com.company.invoice.Invoice"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
>>>>>>>>>>WSDL>>>>>>>>>>>>>>>>>>>>>>>>>>
<wsdl:message name="createInvoiceRequest">
<wsdl:part name="Invoice" element="xx:FACTUUR"/>
</wsdl:message>
>>>>>>>>>>end example>>>>>>>>>>>>>>>>>>
I guess the mapping between the bean fields & schema's element names is not
handled in this scenario and needs a custom solutions.
I see 2 solutions:
1) use java-wsdl-mapping
2) Write a java delegate class to map the names
maybe 3) a custom serializer/deserializer referenced from the wsdd
Any advice?
Regards,
Geert