I want to set one String to one method in webservices.
But the provider method is accepting JAXBElement.
But I do have the String Value foe that parameter.
So can anybody say how I could convert the string to JAXBElement ??
If you are developing a client that is to use JAXB, then the first step is to generate JAXB bean classes using XJC (the JAXB XML schema compiler).
With these classes in your project, you can then create a Source object from which the XML data of the request is read along these lines:
I am totally new to this.So could not understand your point. Could you send some sample code so that I can utilize that.
I have used this codes.
and also tried with some other code.
Still I am not able to solve this.
Joined: Oct 04, 2006
When using JAXB, you start with an XML schema.
From this XML schema, you then generate a number of Java classes using XJC (http://java.sun.com/webservices/docs/2.0/jaxb/xjc.html).
Not until you have completed the above two steps can you start generating XML from instances of JAXB bean classes and/or convert XML to instances of JAXB bean classes.
Check out this JAXB tutorial: https://jaxb.dev.java.net/tutorial/ Make sure you understand what JAXB is and what it is supposed to help you with BEFORE you start writing programs of your own!