axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cooper <overh...@bigpond.com>
Subject hexBinary serialization to XML looks wrong
Date Fri, 14 Oct 2005 06:43:36 GMT
I have a schema with an element defined as xsd:hexBinary with a fixed 
size of 16:

<simpleType name="GUIDType">
    <restriction base="hexBinary">
      <length value="16" fixed="true"></length>
    </restriction>
  </simpleType>

I am using document literal for a web service operation and the message 
refers to a complex type that contains an element that is GUIDType. In 
the implementation of the web service as generated by Axis (I am actualy 
using eclipse wtp 0.7.1 but I believe this is what is going on) I create 
the required objects for my message including populating the byte array 
that was generated for the hexBinary. When I examine the SOAP message 
the element (called GUID) is like this:
<GUID>
<GUID>115</GUID>
<GUID>-43</GUID>
<GUID>26</GUID>
<GUID>-69</GUID>
<GUID>-40</GUID>
<GUID>-100</GUID>
<GUID>-72</GUID>
<GUID>25</GUID>
<GUID>111</GUID>
<GUID>14</GUID>
<GUID>-5</GUID>
<GUID>104</GUID>
<GUID>-110</GUID>
<GUID>-7</GUID>
<GUID>77</GUID>
<GUID>104</GUID>
</GUID>

when I would expect something looking like this:

<GUID>0a2bcdef0a2bcdef0a2bcdef0a2bcdef</GUID> (random value- not 
intended to be same as above)

So, what am I doing wrong? Can anyone help.

Thanks, Matty.


Mime
View raw message