Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Generate schema from MOXY external bindings-oxm.xml file...(Generate schema from MOXY external bindings-oxm.xml file...)
Generate schema from MOXY external bindings-oxm.xml file... [message #878666] Tue, 29 May 2012 13:28 Go to next message
Eclipse UserFriend
I am trying to simplify our Java model by using the bindings-oxm.xml approach allowing us to get away from having any annotations in our Java classes which we can do based from Blaise's examples but I am trying to figure out how do I now generate a schema based on the bindings-oxm.xml? I am new to JAXB/MOXy so bare with me...

For example if we have a web service method such as:

public ResponseObject someWebServiceMethod(RequestObject obj){
 //...
}


I would like to have a response-bindings-oxm.xml and a request-bindings-oxm.xml and then based on these bindings files be able to generate the schemas which will be included in our WSDL definition which can then be used to create the relating Java classes such as ResponseObject.java and RequestObject.java using tools such as wsimport or clientgen.

Is this even possible? Or is there another approach I should be using to get the same results? The end goal I would like to achieve is:

1. not to have to embed any annotations in our Java classes

2. use the power of MOXy so that our Java model does not have to follow our XML model (ie. MOXy XPath, etc).

3. allow end clients to use tools such as wsimport or clientgen to generate the relating client Java classes.

Thanks,
Rick

[Updated on: Tue, 29 May 2012 13:33] by Moderator

Re: Generate schema from MOXY external bindings-oxm.xml file... [message #880205 is a reply to message #878666] Fri, 01 June 2012 12:17 Go to previous message
Eclipse UserFriend
Hi Rick,

I apologize for the delay in responding. We are currently in the process of closing down the EclipseLink 2.4.0 release, and that has been keeping us pretty busy.

You can use the JAXBContext to produce an XML schema from your model. Here is a link to an example:
- http://wiki.eclipse.org/EclipseLink/Examples/MOXy/JAXB/GenerateSchema

If you are using WebLogic 12.1.1 as your application server, you can specify the MOXy binding file as part of the service. Below is a link to an example:
- https://blogs.oracle.com/reynolds/entry/mapping_the_java_world_part

-Blaise
Previous Topic:[SOLVED] How to register pre/post refresh callbacks on an entity?
Next Topic:Order of inserting List items
Goto Forum:
  


Current Time: Sat Jul 05 00:43:13 EDT 2025

Powered by FUDForum. Page generated in 0.20215 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top