Community

wsconsume generates JAXBelement instead of just String for xs:string

created by Viacheslav Garmash in JBoss Web Services - View the full discussion

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