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 RaphaelJ <ra...@gmail.com> on 2010/11/04 11:41:57 UTC
Custom serialization of JDK5 Enum in Axis 1.2 on client-side
Hi Folks,
I am migrating a SOAP web service to JDK1.5. I have took advantage of native
java enums in the new code. For some reasons, I'm stuck with Axis 1.2 and it
does not natively support JDK5 "enums".
I have found a tutorial on how to implement custom a serialization /
deserialization for java enums:
http://www.developpez.net/forums/d236564/java/developpement-web-java/web-services/utiliser-type-enum-jdk5-axis/
http://www.developpez.net/forums/d236564/java/developpement-web-java/web-services/utiliser-type-enum-jdk5-axis/
(in French).
I have been able to successfully register those custom serialization
handlers on the server side via the use of "typeMapping" elements in the
".wsdd" file.
However, I can't figure out how to register the same classes on the client
side, as I don' think I can use a ".wssd" file here.
The
http://ws.apache.org/axis/java/user-guide.html#WhenBeansAreNotEnoughCustomSerialization
corresponding part in the user-guide does not help either, since it only
explains the "wsdd" file configuration on server side. Nothing on the client
side.
Any help would be appreciated.
Many thanks in advance,
Raphael
--
View this message in context: http://old.nabble.com/Custom-serialization-of-JDK5-Enum-in-Axis-1.2-on-client-side-tp30130750p30130750.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
Re: Custom serialization of JDK5 Enum in Axis 1.2 on client-side
Posted by RaphaelJ <ra...@gmail.com>.
I have finally found how to manually register a custom type mapping.
I do it when creating an instance of a Service :
service = new Service();
// Get default type mapping
TypeMapping tmap = DefaultTypeMappingImpl.getSingletonDelegate();
// Register our custom serializer / deserializer
tmap.register(
MyCustomClass.class,
MyCustomClassQName,
new MyCustomSerizalizerFactory(),
new MyCustomDeserizalizerFactory());
// Add it back to the service
service.getTypeMappingRegistry().register(
"http://schemas.xmlsoap.org/soap/encoding/", // Default encoding
tmap);
I don't know whether it is the right way to do it, but it works !
--
View this message in context: http://old.nabble.com/Custom-serialization-of-JDK5-Enum-in-Axis-1.2-on-client-side-tp30130750p30133623.html
Sent from the Axis - User mailing list archive at Nabble.com.
Re: Custom serialization of JDK5 Enum in Axis 1.2 on client-side
Posted by Andreas Veithen <an...@gmail.com>.
For Axis(2) C/C++, there is c-user and axis1-c-user.
You can get a list of all mailing lists for every TLP by looking at
http://<tlp>.apache.org/mail/.
Andreas
On Thu, Nov 4, 2010 at 17:18, Nadir Amra <am...@us.ibm.com> wrote:
> Andreas,
>
> So where do AXIS C++ users go? Is there an Axis
>
> And is there a list of WS mailing lists, because right now I am
> confused..... :-)
>
>
>
> Nadir Amra
> Integrated Web Services for IBM i Operating System
> Internet: amra@us.ibm.com
>
> Andreas Veithen <an...@gmail.com> wrote on 11/04/2010 06:38:29 AM:
>
>> From: Andreas Veithen <an...@gmail.com>
>> To: java-user@axis.apache.org
>> Date: 11/04/2010 06:39 AM
>> Subject: Re: Custom serialization of JDK5 Enum in Axis 1.2 on client-side
>>
>> As part of the promotion of the Axis project to a top level project,
>> we have decided to create separate mailing lists for Axis 1 and Axis2.
>> For all Axis 1 related questions please subscribe and post to
>> axis1-java-user@axis.apache.org. Thanks!
>>
>> Andreas
>>
>> On Thu, Nov 4, 2010 at 11:41, RaphaelJ <ra...@gmail.com> wrote:
>> >
>> >
>> > Hi Folks,
>> >
>> > I am migrating a SOAP web service to JDK1.5. I have took advantageof
>> > native
>> > java enums in the new code. For some reasons, I'm stuck with Axis 1.2
>> > and it
>> > does not natively support JDK5 "enums".
>> >
>> > I have found a tutorial on how to implement custom a serialization /
>> > deserialization for java enums:
>> >
> http://www.developpez.net/forums/d236564/java/developpement-web-
>> java/web-services/utiliser-type-enum-jdk5-axis/
>> > http://www.developpez.net/forums/d236564/java/developpement-web-
>> java/web-services/utiliser-type-enum-jdk5-axis/
>> > (in French).
>> >
>> > I have been able to successfully register those custom serialization
>> > handlers on the server side via the use of "typeMapping" elements in the
>> > ".wsdd" file.
>> >
>> > However, I can't figure out how to register the same classes on the
>> > client
>> > side, as I don' think I can use a ".wssd" file here.
>> >
>> > The
>> > http://ws.apache.org/axis/java/user-
>> guide.html#WhenBeansAreNotEnoughCustomSerialization
>> > corresponding part in the user-guide does not help either, since it
>> > only
>> > explains the "wsdd" file configuration on server side. Nothing on the
>> > client
>> > side.
>> >
>> > Any help would be appreciated.
>> >
>> > Many thanks in advance,
>> > Raphael
>> >
>> > --
>> > View this message in context: http://old.nabble.com/Custom-
>>
>> serialization-of-JDK5-Enum-in-Axis-1.2-on-client-side-tp30130750p30130750.html
>> > Sent from the Axis - User mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> > For additional commands, e-mail: java-user-help@axis.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
Re: Custom serialization of JDK5 Enum in Axis 1.2 on client-side
Posted by Nadir Amra <am...@us.ibm.com>.
Andreas,
So where do AXIS C++ users go? Is there an Axis
And is there a list of WS mailing lists, because right now I am
confused..... :-)
Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com
Andreas Veithen <an...@gmail.com> wrote on 11/04/2010 06:38:29
AM:
> From: Andreas Veithen <an...@gmail.com>
> To: java-user@axis.apache.org
> Date: 11/04/2010 06:39 AM
> Subject: Re: Custom serialization of JDK5 Enum in Axis 1.2 on
client-side
>
> As part of the promotion of the Axis project to a top level project,
> we have decided to create separate mailing lists for Axis 1 and Axis2.
> For all Axis 1 related questions please subscribe and post to
> axis1-java-user@axis.apache.org. Thanks!
>
> Andreas
>
> On Thu, Nov 4, 2010 at 11:41, RaphaelJ <ra...@gmail.com>
wrote:
> >
> >
> > Hi Folks,
> >
> > I am migrating a SOAP web service to JDK1.5. I have took advantageof
native
> > java enums in the new code. For some reasons, I'm stuck with Axis 1.2
and it
> > does not natively support JDK5 "enums".
> >
> > I have found a tutorial on how to implement custom a serialization /
> > deserialization for java enums:
> > http://www.developpez.net/forums/d236564/java/developpement-web-
> java/web-services/utiliser-type-enum-jdk5-axis/
> > http://www.developpez.net/forums/d236564/java/developpement-web-
> java/web-services/utiliser-type-enum-jdk5-axis/
> > (in French).
> >
> > I have been able to successfully register those custom serialization
> > handlers on the server side via the use of "typeMapping" elements in
the
> > ".wsdd" file.
> >
> > However, I can't figure out how to register the same classes on the
client
> > side, as I don' think I can use a ".wssd" file here.
> >
> > The
> > http://ws.apache.org/axis/java/user-
> guide.html#WhenBeansAreNotEnoughCustomSerialization
> > corresponding part in the user-guide does not help either, since it
only
> > explains the "wsdd" file configuration on server side. Nothing on the
client
> > side.
> >
> > Any help would be appreciated.
> >
> > Many thanks in advance,
> > Raphael
> >
> > --
> > View this message in context: http://old.nabble.com/Custom-
>
serialization-of-JDK5-Enum-in-Axis-1.2-on-client-side-tp30130750p30130750.html
> > Sent from the Axis - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-user-help@axis.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
Re: Custom serialization of JDK5 Enum in Axis 1.2 on client-side
Posted by Andreas Veithen <an...@gmail.com>.
As part of the promotion of the Axis project to a top level project,
we have decided to create separate mailing lists for Axis 1 and Axis2.
For all Axis 1 related questions please subscribe and post to
axis1-java-user@axis.apache.org. Thanks!
Andreas
On Thu, Nov 4, 2010 at 11:41, RaphaelJ <ra...@gmail.com> wrote:
>
>
> Hi Folks,
>
> I am migrating a SOAP web service to JDK1.5. I have took advantage of native
> java enums in the new code. For some reasons, I'm stuck with Axis 1.2 and it
> does not natively support JDK5 "enums".
>
> I have found a tutorial on how to implement custom a serialization /
> deserialization for java enums:
> http://www.developpez.net/forums/d236564/java/developpement-web-java/web-services/utiliser-type-enum-jdk5-axis/
> http://www.developpez.net/forums/d236564/java/developpement-web-java/web-services/utiliser-type-enum-jdk5-axis/
> (in French).
>
> I have been able to successfully register those custom serialization
> handlers on the server side via the use of "typeMapping" elements in the
> ".wsdd" file.
>
> However, I can't figure out how to register the same classes on the client
> side, as I don' think I can use a ".wssd" file here.
>
> The
> http://ws.apache.org/axis/java/user-guide.html#WhenBeansAreNotEnoughCustomSerialization
> corresponding part in the user-guide does not help either, since it only
> explains the "wsdd" file configuration on server side. Nothing on the client
> side.
>
> Any help would be appreciated.
>
> Many thanks in advance,
> Raphael
>
> --
> View this message in context: http://old.nabble.com/Custom-serialization-of-JDK5-Enum-in-Axis-1.2-on-client-side-tp30130750p30130750.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org