1 Reply Latest reply on Sep 2, 2010 12:29 PM by Zoli Szugyi

    javaTypeAdapter for Strings

    Zoli Szugyi Newbie

      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.