| Author |
Help: Creating web service proxy using JAXB generated domains
|
Koen Verhulst
Greenhorn
Joined: Feb 11, 2008
Posts: 3
|
|
Hi,
I'm currently doing some investigation considering the use of web services (BPEL) as a complete application backend.
The application should contain a pojo facade which communicates with some web service proxies.
I generated my domain objects by using the JAXB Compilation option in JDeveloper. By using that, a java class can be generated
based on an XSD. Disadvantage of this use, seems to be the fact that the ObjectFactory class, generated by JAXB, is overwritten
each time I create java classes from an XSD.
Q1: Is there a solution to prevent the ObjectFactory class to be overwritten? I also could decide not to use it.
After the domain objects are created, I want to call the actual webservice and receive the response by using the JAXB marshaller
and unmarshaller. Problem here is:
Q2: How do I (manually?) create a proxy which calls the web service, by using the domain objects generated by JAXB?
(I dont have any experience in using webservice)
Q3: An important requirement is that it needs to be simple to switch from several environments (eg from development to test). How
can I fulfill this requirement in a nice, solid solution?
Any tips working with web services as the backend layer are welcome!
Thanks in advance,
Koen
|
 |
Koen Verhulst
Greenhorn
Joined: Feb 11, 2008
Posts: 3
|
|
|
Is this impossible?
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12324
|
|
I suggest that you drop back from thinking about your existing application and experiment with one or more simple web services first.
After you get a feel for implementing client and server for a simple web service your path should become clearer.
The Axis2 download contains plenty of examples.
Bill
|
Java Resources at www.wbrogden.com
|
 |
Koen Verhulst
Greenhorn
Joined: Feb 11, 2008
Posts: 3
|
|
William Brogden wrote:I suggest that you drop back from thinking about your existing application and experiment with one or more simple web services first.
After you get a feel for implementing client and server for a simple web service your path should become clearer.
The Axis2 download contains plenty of examples.
Bill
Thanks for your reply William.
I will check the Axis2 download. Using Axis2, it should be possible to:
- generate domain classes.
- marshall and unmarshall these classes.
- generate a web service stub.
- and an easy way to switch from one environment to another?
Thanks in advance,
Koen
|
 |
Peer Reynders
Bartender
Joined: Aug 19, 2005
Posts: 2906
|
|
Koen Verhulst wrote:Q1: Is there a solution to prevent the ObjectFactory class to be overwritten? I also could decide not to use it.
There must be a way "to do it" because NetBeans does it in its SOA module where JAX-WS and BPEL coexist - so this is a tool integration/configuration issue.
Basically the BPEL tool should "recognize" the XSDs used in the WSDL of the web services that it accesses and use its own classes.
|
"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
|
 |
 |
|
|
subject: Help: Creating web service proxy using JAXB generated domains
|
|
|