2 Replies Latest reply on May 22, 2006 8:20 AM by Thomas Diesler

    attributes of type xsd:QName incorrectly serialized

    Robert Newbie

      I have a web service that includes a type something like this

      <schema xmlns="http://www.w3.org/2001/XMLSchema">
      <complexType name="ItemSummary">
       <element name="item" type="types:DefinedItem" />
       <attribute name="itemType" type="QName" />

      This type is the return type for a web service operation. When the
      corresponding ItemSummary java object is serialized to a soap
      message, the itemType attribute comes out like this:
      <itemSummary itemType="{urn:type-ns}ItemSubType">

      instead of something like
      <itemSummary xmlns:ns1="urn:type-ns"

      Obviously, the javax.xml.namespace.QName.toString() method is being
      used here. If I use an element of type QName instead of an attribute, I get the correct behavior.

      Is there any way to make the attribute work?