Well, there are two ways of doing this which are beyond any one of the specs.
They are the following:-
1) Use a Servlet (or JAXMServlet) to receive a request and convert it into SOAP Packet using SAAJ API, and then extract the SoapBody and convert to JAXB Objects.
InputStream --> SAAJ Objects --> Soap Body --------> JAXB Objects
for SoapBody to JAXB Objects you would need to implement a Tree Walker for SAAJ Body.
In case you don't want to create SAAJ Objects , you can directly convert inputstream to JAXB Objects, but in that case you would need to bind SOAP schema also to your custom schema. That is why , the above approach is recommended.
Advantage of Approach
+---- Able to link to JAXB
Limitations of Approach
+----- Used HTTPServlet , hence not transport-independent.
2) If you are not bounfd to JAX-RPC , you can also use Message Style Services from Axis.
Limitations of Approach
+---- Used Axis , hence not portable (Portability at source-level also lost, binary level portability is not present in JAX-RPC )
saurabh arora
>>> khookguy_at_YAHOO.COM 7/22/2003 8:14:22 AM >>>
When I tried this, the -f:nodatabinding didn't do anything (JAX-RPC) still generated complex java types. Did anyone else have any luck?
Does anyone know how I can get JAXRPC to just bind my Schema to a SOAPElement or DOM??
Thanks,
Mark
-----Original Message-----
From: Public discussion on JAX-RPC
[mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM]On Behalf Of Doug Kohlert
Sent: Friday, July 11, 2003 2:16 PM
To: JAXRPC-INTEREST_at_JAVA.SUN.COM
Subject: Re: Plugging JAXB into JAXRPC via the Extensible Type Mapping /
Serialization Framework ?
Thomas,
I have not actually tried it myself, but in theory, if you use JWSDP 1.2 and
the -f:nodatabinding option on wscompile, wscompile will bind everything to
SOAPElememt. Your application could then pass these elements onto JAXB classes
for deserialization.
I hope this helps.
Thomas Portmann wrote:
> Hi,
>
>
> I have an application with a JAXB-based XML binding, and I would like to use this binding in a JAXRPC-based client-server communication.
>
> Could you please give me the following information:
>
> Is this possible?
> If this is possible: How can I convince the wscompile script to use my serialization classes, e.g. JAXRPC API based Serializer- and DeserializerFactories? (It ignores the <typeMappingRegistry> in my config.xml.)
> Can I use the wscompile at all? - Or have I to write the ties and stubs by myself?
> If I have to do so, where is the API to use / how can I deploy this? (It seems, this doesn't make any sense...)
> If the Extensible Type Mapping is not the right way to convince the JAXRPC RI to use JAXB, is there any way at all?
>
>
> Thank you in advance for your help
>
> Thomas
>
>
>
>
> --
>
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
>
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
--
Doug Kohlert
Java Software Division
Sun Microsystems, Inc.
phone: 503 345-9806