File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes No databinding in JAX-WS - wsimport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "No databinding in JAX-WS - wsimport" Watch "No databinding in JAX-WS - wsimport" New topic
Author

No databinding in JAX-WS - wsimport

Suresh Achary
Greenhorn

Joined: Oct 10, 2009
Posts: 9
In Axis2 while doing "wsdl2java", we can specify databinding as "none".
Is there way to specify a no-databinding option while doing "wsimport"?
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
I don't know what databinding "none" in Axis do, so perhaps in exchange for my response, you could explain that?

Using the -b option to wsimport, you can customize the JAX-WS or JAXB binding. Reference: http://java.sun.com/javase/7/docs/technotes/tools/share/wsimport.html
This page will tell you about what kind of customizations you are able to do using a custom binding file: https://jax-ws.dev.java.net/nonav/2.1.1/docs/customizations.html
Best wishes!
Suresh Achary
Greenhorn

Joined: Oct 10, 2009
Posts: 9
Thanks Ivan Krizsan, databinding "none" in Axis2 will create the operations' implementation with parameter OMElement.
e.g. If I have an operation in the wsdl "getDepartment" which takes "Employee" and "Address" object and returns an "Department" object , it will create the method getDepartment in the skeleton as follows:-

public OMElement getDepartment(OMElement param)

By this I can easily get the payload from OMElement param and if I use any skeleton generating custom api(api to generate skeletons from wsdl) I can use the same custom skeleton generation api for all wsdls irrespective of the parameters or return types of operations. Axis2 does this perfectly well.

I was looking something similar in JAX-WS wsimport so that I can write a implmentation generation api for all wsdls.

Hope I made it clear. Do you have any thoughts on this?
Suresh Achary
Greenhorn

Joined: Oct 10, 2009
Posts: 9
Ivan Krizsan wrote:Hi!
I don't know what databinding "none" in Axis do, so perhaps in exchange for my response, you could explain that?

Using the -b option to wsimport, you can customize the JAX-WS or JAXB binding. Reference: http://java.sun.com/javase/7/docs/technotes/tools/share/wsimport.html
This page will tell you about what kind of customizations you are able to do using a custom binding file: https://jax-ws.dev.java.net/nonav/2.1.1/docs/customizations.html
Best wishes!


Thanks Ivan Krizsan, databinding "none" in Axis2 will create the operations' implementation with parameter OMElement.
e.g. If I have an operation in the wsdl "getDepartment" which takes "Employee" and "Address" object and returns an "Department" object , it will create the method getDepartment in the skeleton as follows:-

public OMElement getDepartment(OMElement param)

By this I can easily get the payload from OMElement param and if I use any skeleton generating custom api(api to generate skeletons from wsdl) I can use the same custom skeleton generation api for all wsdls irrespective of the parameters or return types of operations. Axis2 does this perfectly well.

I was looking something similar in JAX-WS wsimport so that I can write a implmentation generation api for all wsdls.

Hope I made it clear. Do you have any thoughts on this?
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Thanks a lot for that explanation!
Now, lets see if I have understood it by trying to answer your question:

There are two alternatives, as far as I understand:
1.
If you want to implement a web service endpoint that processes raw SOAP messages or the raw payload of SOAP messages using JAX-WS, your endpoint implementation class may implement the interface javax.xml.ws.Provider. Please refer to the Java SE 6 API documentation for details.
2.
By using the XML schema type anyType, which will be mapped to the javax.xml.soap.SOAPElement type (or vice versa,if you do code-first development), you can take a parameter that may contain any valid XML fragment.

Hope this is what you are looking for. If you have any further questions, please do not hesitate to ask!
 
Don't get me started about those stupid light bulbs.
 
subject: No databinding in JAX-WS - wsimport
 
Similar Threads
Maven Project Running Problem
Creating a Web Service from an Existing WSDL File.
wsimport - seperate endpoint and JAXB java files
JAX-WS RI wsimport not working
Generate @HandlerChain annotation