• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help: Creating web service proxy using JAXB generated domains

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this impossible?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic