[jboss-user] [JBoss Web Services] - javaTypeAdapter for Strings

Zoli Szugyi do-not-reply at jboss.com
Wed Aug 25 17:46:49 EDT 2010

Zoli Szugyi [http://community.jboss.org/people/zszugyi] created the discussion

"javaTypeAdapter for Strings"

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

I'm trying to specify an XmlAdapter for all the String fields in our API to remove all the invalid xml characters
from the SOAP response before sending it to a client.
I've added the following to binding.xsd under globalBindings:

         name="java.lang.String" xmlType="xs:string"

When generating the client classes, the adapter class is generated and the string fields on the generated classes
get the annotation:

    @XmlJavaTypeAdapter(Adapter2 .class)
    protected String name;

The parseString and printString methods don't ever seem to be called though.
Is it possible to even override how strings are converted?

We're using JBoss 4.2.3


ps.: I've also tried specifying the XmlJavaTypeAdapter in the package-info, but that didn't have any effect. A post on these forums suggest that
JBoss 4.2.3 doesn't support this.


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/20100825/008898f1/attachment.html 

More information about the jboss-user mailing list