Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help: Creating web service proxy using JAXB generated domains

 
Koen Verhulst
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this impossible?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Koen Verhulst
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic