This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No databinding in JAX-WS - wsimport

 
Suresh Achary
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic