I discovered another problem with the code generation:

(AXIS Beta 2)

In WSDL:
                        <xsd:simpleType name="TpOctet">
                                <xsd:restriction base="xsd:hexBinary"/>
                        </xsd:simpleType>

Generated Java:

public class TpOctet implements java.io.Serializable,
org.apache.axis.encoding.SimpleType {
    private byte[] value;
...
// Simple Types must have a String constructor
    public TpOctet(java.lang.String value) {
        this.value = new byte[](value);
    }

when compiled:

    [javac]
C:\Development\ISGSDK\xgw\build\genWSDLsrc\org\csapi\www\TpOctet.java:30:
'{' expected
    [javac]         this.value = new byte[](value);

Which is invalid because the implementation type is an array of a basic
type.

the solution is to replace the offending line to:

this.value = value.getBytes();

I don't have a good feeling modifying generated code :)

How buggy IS the code generator anyway? Is there a list somewhere that
specifies the limitations of WSDL2JAVA? (Such as this problem, plus with
anyURI?)

Thanks,
Han

Reply via email to