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 Jerry Hewett <je...@ix.netcom.com> on 2006/08/26 18:35:23 UTC
wsdl2java: Type {http://net.java}URI is referenced but not defined
The class being processed by Java2WSDL (non-essentials removed for brevity).
public class MyClass implements Serializable
{
public MyClass ()
{
}
public MyClass ( String lString, String pString, Integer id )
{
iLString = lString ;
iPString = pString ;
iId = id ;
}
public String getLString () { return iLString ; }
public String getPString () { return iPString ; }
public Integer getId () { return iId ; }
public void setLString ( String lString ) { iLString = lString ; }
public void setPString ( String pString ) { iPString = pString ; }
public void setId ( Integer id ) { iId = id ; }
public URI getLURI () { return getURI ( iLString ) ; }
public URI getPURI () { return getURI ( iPString ) ; }
private URI getURI ( String s )
{
return new URI(s);
}
private String iLString = null ;
private String iPString = null ;
private Integer iId = null ;
}
The XML generated by Java2WSDL. Why is "LURI" generated correctly as
"xsd:anyType" and "PURI" generated incorrectly as "tns3:URI"?
<complexType name="MyClass">
<sequence>
<element name="LString" nillable="true" type="xsd:string"/>
<element name="LURI" nillable="true" type="xsd:anyType"/>
<element name="PString" nillable="true" type="xsd:string"/>
<element name="PURI" nillable="true" type="tns3:URI"/>
<element name="id" nillable="true" type="xsd:int"/>
</sequence>
</complexType>
The above error in the generated WSDL causes the following exception in
WSDL2Java.
[wsdl2java] java.io.IOException: Type {http://net.java}URI is referenced
but not defined.
And to satisfy my own curiosity, why is the XML namespace in the WSDL for
java.net.URI being generated backwards?
xmlns:tns3="http://net.java"
Jerry H.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org