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 "Kahn, Ralph" <ka...@emc.com> on 2005/11/11 00:55:07 UTC

working example of custom serializer for a class (does anyone hav e one they can post?)

Hi There,

  I am new to Axis and after using Google and reading
the documentation, I still am having trouble creating
and deploying a web service that uses a custom
serializer and de-serializer for a Java Class that I
have. 

  I understand the need to do the typeMapping in the
deploy.wsdd file.  I have a working class that
performs the function that I want and returns a
collection of data (many rows of dynamically defined
results).   What I am missing is how the serializer
would take the results of the class and convert them
into XML. I can write the class to iterate through the
collection and create whatever output I need to but I
am having trouble figuring out what Axis expects the
serialization class to provide as output(a string, a
DOM, ??).  

  Does anyone have a complete example of a web service
that uses a custom serializer and de-serializer on a
relatively complex class (i.e. rows of
dynamically defined results)?  By complete example, I
mean the .wsdd file, the web service java source file
and serializer and de-serializer java source files. 
Any help would be much appreciated.  If I get my web
service working, I promise to post it back to the list
as a working example.


Thanks,

Ralph Kahn

Re: working example of custom serializer for a class (does anyone hav e one they can post?)

Posted by Davanum Srinivas <da...@gmail.com>.
see XMLBeans based serializer/de-serializer sample:
http://svn.apache.org/viewcvs.cgi/webservices/axis/trunk/java/samples/xbeans/

The serializer/de-serializer code is here:
http://svn.apache.org/viewcvs.cgi/webservices/axis/trunk/java/src/org/apache/axis/encoding/ser/xbeans/

-- dims

On 11/10/05, Kahn, Ralph <ka...@emc.com> wrote:
> Hi There,
>
>   I am new to Axis and after using Google and reading
> the documentation, I still am having trouble creating
> and deploying a web service that uses a custom
> serializer and de-serializer for a Java Class that I
> have.
>
>   I understand the need to do the typeMapping in the
> deploy.wsdd file.  I have a working class that
> performs the function that I want and returns a
> collection of data (many rows of dynamically defined
> results).   What I am missing is how the serializer
> would take the results of the class and convert them
> into XML. I can write the class to iterate through the
> collection and create whatever output I need to but I
> am having trouble figuring out what Axis expects the
> serialization class to provide as output(a string, a
> DOM, ??).
>
>   Does anyone have a complete example of a web service
> that uses a custom serializer and de-serializer on a
> relatively complex class (i.e. rows of
> dynamically defined results)?  By complete example, I
> mean the .wsdd file, the web service java source file
> and serializer and de-serializer java source files.
> Any help would be much appreciated.  If I get my web
> service working, I promise to post it back to the list
> as a working example.
>
>
> Thanks,
>
> Ralph Kahn
>


--
Davanum Srinivas : http://wso2.com/blogs/