[jboss-user] [JBoss Web Services] - wsconsume generates JAXBelement<String> instead of just String for xs:string

Viacheslav Garmash do-not-reply at jboss.com
Wed Apr 21 12:43:57 EDT 2010

Viacheslav Garmash [http://community.jboss.org/people/vgarmash] created the discussion

"wsconsume generates JAXBelement<String> instead of just String for xs:string"

To view the discussion, visit: http://community.jboss.org/message/538815#538815

I generated client code for Bing Maps Search Web service using this command:

D:\tools\jboss-portal-2.6.3.GA\bin\wsconsume.bat -k http://dev.virtualearth.net/webservices/v1/metadata/searchservice/dev.virtualearth.net.webservices.v1.search.wsdl

It has completed job without errors but in the result I got all *xs:string* properties mapped as *JAXBElement<String>*. See attached Credentials.java and Category.java for mapping example.

When I generated client code using *wsimport* from Sun Metro it didn't do that and *xs:string* was mapped as plain String.

Please let me know if it is possible to customize the way of mapping xs:string and convince me that JAXBElement<String> is way much better than String.

P.S. Please do not offer upgrade my JBoss, JBoss-WS or anything because it is not an option for me. We currently stuck with portal 2.6.3 (JBoss AS 4.2.2) and whatever comes with it.


Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100421/4fc60d80/attachment.html 

More information about the jboss-user mailing list