You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2002/09/11 17:11:31 UTC

DO NOT REPLY [Bug 12538] New: - hexBinary type generates java-code with wrong ser-/deserializer..

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12538>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12538

hexBinary type generates java-code with wrong ser-/deserializer..

           Summary: hexBinary type generates java-code with wrong ser-
                    /deserializer..
           Product: Axis
           Version: beta-3
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: jesper.soderlund@smarttrust.com


With the WSDL-snipppet bellow:

			<xs:simpleType name="AIDType">
				<xs:restriction base="xs:hexBinary">
					<xs:maxLength value="16"/>
					<xs:minLength value="5"/>
				</xs:restriction>
			</xs:simpleType>

The following code is generated with doesn't serialize or deserialize the byte[]
data correctly, it seems to only do a "toString()".

AIDType snippet:
...

    /**
     * Get Custom Serializer
//     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.SimpleSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.SimpleDeserializer(
            _javaType, _xmlType, typeDesc);
    }
...

That what gets transmitted (snoop with tcpmon) is the following:
  <multiRef id="id2" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns4:AIDType" xmlns:ns4="http://new.webservice.namespace"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">[B@d86fd3</multiRef>


I guess the HexSerializer / HexDeserializer should be used instead?