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 Alex Holmes <ic...@yahoo.com> on 2005/09/18 00:51:53 UTC
WSDL2Java client codegen ignores xml:lang type extension
Hi all,
I'm trying to import the UDDI v2 inquiry WSDL:
http://uddi.org/wsdl/inquire_v2.wsdl
which in turn imports its own model:
http://uddi.org/schema/uddi_v2.xsd
The WSDL2Java tool generates the beans, but ignores the xml:lang
extension on the name type:
<xsd:complexType name="name">
<xsd:simpleContent>
<xsd:extension base="string">
<xsd:attribute ref="xml:lang" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
The Name class generated only has 1 attribute, name. xml:lang
is imported as http://www.w3.org/2001/xml.xsd, which is
resolvable. I'm attaching this generated class.
Has anyone else encountered this, and is there a fix?
Many thanks,
Alex
Re: WSDL2Java client codegen ignores xml:lang type extension
Posted by Davanum Srinivas <da...@gmail.com>.
i think xsd:attributes are getting ignored for some reason. you will
need to check the wsdl2java code generation stuff
(org.apache.axis.wsdl.*) look for the code snippet that generates code
that you find in Name.java.
thanks,
dims
On 9/19/05, Alex Holmes <ic...@yahoo.com> wrote:
> After some research online, I generated my beans using
> Castor, and linked the Castor serializers to the Axis
> generated API's. The Castor bean had an attribute for
> the lang in the Name class, but it doesn't get populated
> when reading from a UDDI server, even when there's
> content (I enabled Axis debug and verified the response XML had
> the attribute).
>
> Does anyone have any suggestions as to what I can do
> to get this attribute working with Castor/Axis? Or
> just with Axis? I don't mind hacking the code, if
> someone can point me to the general area where I can
> patch it up.
>
> Many thanks in advance,
> Alex
>
> --- Alex Holmes <ic...@yahoo.com> wrote:
>
> > Hi all,
> >
> > I'm trying to import the UDDI v2 inquiry WSDL:
> >
> > http://uddi.org/wsdl/inquire_v2.wsdl
> >
> > which in turn imports its own model:
> >
> > http://uddi.org/schema/uddi_v2.xsd
> >
> > The WSDL2Java tool generates the beans, but ignores the xml:lang
> > extension on the name type:
> >
> > <xsd:complexType name="name">
> > <xsd:simpleContent>
> > <xsd:extension base="string">
> > <xsd:attribute ref="xml:lang" use="optional"/>
> > </xsd:extension>
> > </xsd:simpleContent>
> > </xsd:complexType>
> >
> > The Name class generated only has 1 attribute, name. xml:lang
> > is imported as http://www.w3.org/2001/xml.xsd, which is
> > resolvable. I'm attaching this generated class.
> >
> > Has anyone else encountered this, and is there a fix?
> >
> > Many thanks,
> > Alex
>
>
--
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform
Re: WSDL2Java client codegen ignores xml:lang type extension
Posted by Alex Holmes <ic...@yahoo.com>.
After some research online, I generated my beans using
Castor, and linked the Castor serializers to the Axis
generated API's. The Castor bean had an attribute for
the lang in the Name class, but it doesn't get populated
when reading from a UDDI server, even when there's
content (I enabled Axis debug and verified the response XML had
the attribute).
Does anyone have any suggestions as to what I can do
to get this attribute working with Castor/Axis? Or
just with Axis? I don't mind hacking the code, if
someone can point me to the general area where I can
patch it up.
Many thanks in advance,
Alex
--- Alex Holmes <ic...@yahoo.com> wrote:
> Hi all,
>
> I'm trying to import the UDDI v2 inquiry WSDL:
>
> http://uddi.org/wsdl/inquire_v2.wsdl
>
> which in turn imports its own model:
>
> http://uddi.org/schema/uddi_v2.xsd
>
> The WSDL2Java tool generates the beans, but ignores the xml:lang
> extension on the name type:
>
> <xsd:complexType name="name">
> <xsd:simpleContent>
> <xsd:extension base="string">
> <xsd:attribute ref="xml:lang" use="optional"/>
> </xsd:extension>
> </xsd:simpleContent>
> </xsd:complexType>
>
> The Name class generated only has 1 attribute, name. xml:lang
> is imported as http://www.w3.org/2001/xml.xsd, which is
> resolvable. I'm attaching this generated class.
>
> Has anyone else encountered this, and is there a fix?
>
> Many thanks,
> Alex