Hello
I have used netbeans5.5 to create web service client from a wsdl and xsd
file. Here is a part of xsd schema :
<xsd:complexType name="extensible">
<xsd:sequence>
<xsd:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
<xsd:anyAttribute namespace="##other" processContents="lax" />
I need to pass some String data or XML data inside this extensible tag to
the web service.
I have written the following code inside jsp page :
extensible extn = new extensible();
String newItem="<test/>";
extn.getAny().add(newItem);
But on running the client application i get the following error:
javax.xml.bind.MarshalException - with linked exception:
[com.sun.istack.SAXException2: unable to marshal type "java.lang.String" as
an element because it is missing an @XmlRootElement annotation]
extension class is created correctly inside the client on compiling the
code.
Pls help me I am new to JAX-WS and webservices.
--
View this message in context: http://www.nabble.com/Pass-string-data-inside-xml-any-tag-to-a-web-service-in-JAX-WS-tf3705078.html#a10361410
Sent from the java.net - glassfish users mailing list archive at Nabble.com.