axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12116] - WSDL2Java doesn't generate compilable code for xsd:hexBinary
Date Wed, 11 Sep 2002 10:00:26 GMT
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=12116>.
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=12116

WSDL2Java doesn't generate compilable code for xsd:hexBinary

jesper.soderlund@smarttrust.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |



------- Additional Comments From jesper.soderlund@smarttrust.com  2002-09-11 10:00 -------
I want to reopen this bug as the code now generated compiles but it doesn't seem
to work correctly.

The code now generated looks like this:
    // Simple Types must have a String constructor
    public AIDType(java.lang.String value) {
        this.value = value.getBytes();
    }

Which does not give the correct bytes, e.g. the hex string "1234" will give the
byte[]={18,52} but with the current implementation it will be the byte array
{49, 50, 51, 52), ie. the ascii values of "1", "2", "3" and "4".
The generated code should look something like this to work properly:

    // Simple Types must have a String constructor
    public AIDType(java.lang.String value) {
        this.value = HexBinary.encode(value);
    }

Mime
View raw message