You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Han Wang <ha...@lucent.com> on 2002/05/17 17:24:56 UTC
WSDL2JAVA problem
I'm having trouble generating a WSDL document with xsd:anyURI
[java] java.io.IOException: Type http://www.w3.org/2001/XMLSchema:anyURI
is referenced but not defined.
A quick search on the mailing list resulted in a message Jan 23 on anyURI
not being supported yet.
I'm working off a standard submission wsdl that uses anyURI, so I don't have
the option of changing it to xsd:string for the final product. Can someone
give me a hint on when this would be put in?
Thanks,
Han Wang
hanwang@lucent.com
RE: WSDL2JAVA problem
Posted by Han Wang <ha...@lucent.com>.
One more problem:
I'm getting a null pointer exception and no description of the problem:
[apply] java.lang.NullPointerException
[apply] at org.apache.axis.wsdl.toJava.Utils.holder(Utils.java:494)
[apply] at
org.apache.axis.wsdl.toJava.JavaWriterFactory.constructSignat
ure(JavaWriterFactory.java:512)
[apply] at
org.apache.axis.wsdl.toJava.JavaWriterFactory.constructSignat
ures(JavaWriterFactory.java:478)
[apply] at
org.apache.axis.wsdl.toJava.JavaWriterFactory.writerPass(Java
WriterFactory.java:106)
[apply] at
org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:189)
[apply] at
org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:155)
[apply] at
org.apache.axis.wsdl.WSDL2Java$WSDLRunnable.run(WSDL2Java.jav
a:725)
[apply] at java.lang.Thread.run(Thread.java:536)
[apply] Result: 1
when I try to run WSDL2JAVA.
I can't post the wsdl, so does anyone have any clues?
Thanks,
Han
RE: WSDL2JAVA problem
Posted by Han Wang <ha...@lucent.com>.
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