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 Jarek Kucypera <jk...@mikrozet.wroc.pl> on 2007/02/14 10:56:33 UTC
wsdl2java issues
Hello everyone
I've moved from axis1 to axis2 1.1.1 lately and here are two issues I
encountered using wsdl2java commandline tool:
1) I fail to generate neither server nor client, when WSDL contains
include statement. To be specific, the WSDL is divided into two parts:
the main one describes ports, bindings and the service and the other
one describes data types, here is some outline of the WSDLs:
main.wsdl:
....
<definitions ...>
<types>
<xs:include schemaLocation="dotNet_webServices.xsd"></xs:include>
</types>
<message> ...
<portType> ...
<binding> ...
<service> ...
</definitions>
types.wsdl
<xs:schema>
... here type descriptions go
</xs:schema>
I get the following exception:
"org.apache.axis2.schema.SchemaCompilationException: The referenced
element '...' was not found!"
Both WSDL seems to be correct, as I can generete the stuff, when
I merge the WSDLs into single file AND also - axis1.x handles the
include successfully.
2) Adb databinding fails to generate classes and fields for enums
derived from string. For a schema complex type attribute like this:
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="SUCCESS"/>
<xs:enumeration value="FAILURE"/>
</xs:restriction>
</xs:simpleType>
no field appears in the respcetive Java class generated from the complex
type having this attribute - and no class is generated from the enum
type. Fortunately xmlbeans bindings handles this perfectly - an emum
style Java class is generated and appropriate fields appear.
BTW early versions of axis1 had also problems with such enum ;)
Do the developers follow similar path ? ;)
2a) The generated adb Java class names are just ugly, like this:
xsdtypename_typex for x=1,2,3,... . This is not a
problem but the "_typex" suffixes are just disturbing.
Has anyone also met those problems ?
Regards,
J.K.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: wsdl2java issues
Posted by Michael Lambert <ma...@gmail.com>.
i cant comment to alot of what you say here but ADB is documented as
only supporting a subset of XML Schema. If you need full schema
support you need to move to XMLBeans. You may want to run your
services over WS-Interoperability tests as well; I dont think using
enumeration is recommended (though Im not sure).
On 2/14/07, Jarek Kucypera <jk...@mikrozet.wroc.pl> wrote:
> Hello everyone
>
> I've moved from axis1 to axis2 1.1.1 lately and here are two issues I
> encountered using wsdl2java commandline tool:
>
> 1) I fail to generate neither server nor client, when WSDL contains
> include statement. To be specific, the WSDL is divided into two parts:
> the main one describes ports, bindings and the service and the other
> one describes data types, here is some outline of the WSDLs:
>
> main.wsdl:
> ....
> <definitions ...>
> <types>
> <xs:include schemaLocation="dotNet_webServices.xsd"></xs:include>
> </types>
>
> <message> ...
> <portType> ...
> <binding> ...
> <service> ...
> </definitions>
>
> types.wsdl
> <xs:schema>
> ... here type descriptions go
> </xs:schema>
>
> I get the following exception:
> "org.apache.axis2.schema.SchemaCompilationException: The referenced
> element '...' was not found!"
> Both WSDL seems to be correct, as I can generete the stuff, when
> I merge the WSDLs into single file AND also - axis1.x handles the
> include successfully.
>
> 2) Adb databinding fails to generate classes and fields for enums
> derived from string. For a schema complex type attribute like this:
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:enumeration value="SUCCESS"/>
> <xs:enumeration value="FAILURE"/>
> </xs:restriction>
> </xs:simpleType>
> no field appears in the respcetive Java class generated from the complex
> type having this attribute - and no class is generated from the enum
> type. Fortunately xmlbeans bindings handles this perfectly - an emum
> style Java class is generated and appropriate fields appear.
> BTW early versions of axis1 had also problems with such enum ;)
> Do the developers follow similar path ? ;)
>
> 2a) The generated adb Java class names are just ugly, like this:
> xsdtypename_typex for x=1,2,3,... . This is not a
> problem but the "_typex" suffixes are just disturbing.
>
> Has anyone also met those problems ?
>
> Regards,
> J.K.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote.
-Ben Franklin
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: wsdl2java issues
Posted by Amila Suriarachchi <am...@gmail.com>.
>
> 2) Adb databinding fails to generate classes and fields for enums
> derived from string. For a schema complex type attribute like this:
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:enumeration value="SUCCESS"/>
> <xs:enumeration value="FAILURE"/>
> </xs:restriction>
> </xs:simpleType>
> no field appears in the respcetive Java class generated from the complex
> type having this attribute - and no class is generated from the enum
> type. Fortunately xmlbeans bindings handles this perfectly - an emum
> style Java class is generated and appropriate fields appear.
> BTW early versions of axis1 had also problems with such enum ;)
> Do the developers follow similar path ? ;)
axis2 1.1.1 does not handle enum and restrictions properly. Can you please
check with a nightly build?
if you get errors still please log a jira and attach your wsdl.
2a) The generated adb Java class names are just ugly, like this:
> xsdtypename_typex for x=1,2,3,... . This is not a
> problem but the "_typex" suffixes are just disturbing.
>
> Has anyone also met those problems ?
>
> Regards,
> J.K.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Amila Suriarachchi,
WSO2 Inc.
Re: wsdl2java issues
Posted by Anne Thomas Manes <at...@gmail.com>.
Jacek,
The <xs:include> must be a child of a <xs:schema> element. It cannot
be a direct child of the <wsdl:types> element; therefore, your main
WSDL should look something like this:
<types>
<xs:schema targetNamespace="[targetNamespace]">
<xs:include schemaLocation="dotNet_webServices.xsd"></xs:include>
</xs:schema>
</types>
Note that when using <xs:include> the included schema must have the
same targetNamespace as the including schema, or it must have no
targetNamespace. (If the namespaces are different, you must use
<xs:import> instead.)
Anne
On 2/14/07, Jarek Kucypera <jk...@mikrozet.wroc.pl> wrote:
> Hello everyone
>
> I've moved from axis1 to axis2 1.1.1 lately and here are two issues I
> encountered using wsdl2java commandline tool:
>
> 1) I fail to generate neither server nor client, when WSDL contains
> include statement. To be specific, the WSDL is divided into two parts:
> the main one describes ports, bindings and the service and the other
> one describes data types, here is some outline of the WSDLs:
>
> main.wsdl:
> ....
> <definitions ...>
> <types>
> <xs:include schemaLocation="dotNet_webServices.xsd"></xs:include>
> </types>
>
> <message> ...
> <portType> ...
> <binding> ...
> <service> ...
> </definitions>
>
> types.wsdl
> <xs:schema>
> ... here type descriptions go
> </xs:schema>
>
> I get the following exception:
> "org.apache.axis2.schema.SchemaCompilationException: The referenced
> element '...' was not found!"
> Both WSDL seems to be correct, as I can generete the stuff, when
> I merge the WSDLs into single file AND also - axis1.x handles the
> include successfully.
>
> 2) Adb databinding fails to generate classes and fields for enums
> derived from string. For a schema complex type attribute like this:
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:enumeration value="SUCCESS"/>
> <xs:enumeration value="FAILURE"/>
> </xs:restriction>
> </xs:simpleType>
> no field appears in the respcetive Java class generated from the complex
> type having this attribute - and no class is generated from the enum
> type. Fortunately xmlbeans bindings handles this perfectly - an emum
> style Java class is generated and appropriate fields appear.
> BTW early versions of axis1 had also problems with such enum ;)
> Do the developers follow similar path ? ;)
>
> 2a) The generated adb Java class names are just ugly, like this:
> xsdtypename_typex for x=1,2,3,... . This is not a
> problem but the "_typex" suffixes are just disturbing.
>
> Has anyone also met those problems ?
>
> Regards,
> J.K.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org