You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Vasilyev, Artem (DB)" <AA...@DB.luxoft.com> on 2005/04/11 10:16:24 UTC
WSDD typeMapping and WSDL
Hi all!
This is mostly user question, but it has dev. part also, so I thought I may
crosspost it here. Sorry if it's an abuse.
I use Axis 1.1 as a WS provider for Java classes.
The WSDL file is generated on-the-fly by Axis.
I want to map java.util.Date parameters to "xsd:date" to get rid of timezone
shiftings, as WiKi recommends
(http://wiki.apache.org/ws/FrontPage/Axis/DotNetInterop) inside WSDL (the
default mapping is "xsd:dateTime"), and placed following typeMapping under
<deployment>:
<typeMapping qname="xsd:date" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
languageSpecificType="java:java.util.Date"
serializer="org.apache.axis.encoding.ser.CalendarSerializerFactory"
deserializer="org.apache.axis.encoding.ser.CalendarDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
But this didn't change anything in generated WSDL.
Is there any right way to do this?
Looking into Axis code I found that <typeMapping> is used for WSDL
generation only if no default mapping exists, e.g. for custom types.
May be latest version (1.2rc3) does it? I cannot find out because 1.2rc3
doesn't work at all with our classes.
So my solution was to change JavaProvider.initServiceDesc() (just give
serviceDescription the mapping from WSDD), but I don't like it beacause it
will be eventually washed out by new Axis version.. And the mapping-to-WSDL
still doesn't work for those <typemapping> elements under <service>
elements. I guess this would be useful feature, what do you think?
---
With best regards,
Artem Vasiliev
Senior software developer
DB RDC, Luxoft,
IBS group of companies