axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: Axis java2wsdl fails WebSphere validator
Date Thu, 30 Mar 2006 13:25:14 GMT
It's not the WSDL that's wrong, it's the schema. You must add an
<xsd:import> after line 03. In order to reference an element or type from
another namespace, you must both declare the namespace and import it. (I'm
assuming that you purposefully left out a bunch of namespace declarations in
the <wsdl:definitions> element to save space.)

01. <wsdl:definitions targetNamespace="a.b.c" xmlns:tns2="x.y.z">
02. <wsdl:types>
03. <schema elementFormDefault="qualified" targetNamespace="a.b.c">
03.5 <import namespace="x.y.z"/>
04. <element name="fault" type="tns2:MyFault"/>
05. </schema>
06. <schema elementFormDefault="qualified" targetNamespace="x.y.z">
07. <complexType name="MyFault">
08.   ... definition here ...
09. </complexType>
10. </schema>
11. </wsdl:types>

On 3/30/06, Jarmo Doc <jarmod@hotmail.com> wrote:
>
> Can you recommend an easily-downloadable validator?  The WSDL's not
> publicly
> available so web-sites that offer to validate based upon a URL won't work
> for me.
>
> I've run the WSDL through various XML validators and they all report fine.
> I don't have a WSDL validator though and haven't been able to locate
> anything good.  There is one at the pocketsoap site but it seems to
> require
> you to download half a dozen other things and then tweak a bunch of
> scripts
> which is not exactly what I'd call convenient.
>
> PS the WSDL is very large, and proprietary, so I doubt I'll be able to
> upload the whole thing.
>
>
> >From: Dies Koper <dies@jp.fujitsu.com>
> >Reply-To: axis-user@ws.apache.org
> >To: axis-user@ws.apache.org
> >Subject: Re: Axis java2wsdl fails WebSphere validator
> >Date: Thu, 30 Mar 2006 10:58:35 +0900
> >
> >Have you tried running it through a validating parser?
> >Please try and post the result.
> >#I could try if you post the whole WSDL before I go home tonight.
> >
> >Regards,
> >Dies
> >
> >Jarmo Doc wrote:
> > > My WSDL document, generated directly from Java via Axis 1.3 java2wsdl,
> > > is structured something like this:
> > >
> > > 01. <wsdl:definitions targetNamespace="a.b.c" xmlns:tns2="x.y.z">
> > > 02. <wsdl:types>
> > > 03. <schema elementFormDefault="qualified" targetNamespace="a.b.c">
> > > 04. <element name="fault" type="tns2:MyFault"/>
> > > 05. </schema>
> > > 06. <schema elementFormDefault="qualified" targetNamespace="x.y.z">
> > > 07. <complexType name="MyFault">
> > > 08.   ... definition here ...
> > > 09. </complexType>
> > > 10. </schema>
> > > 11. </wsdl:types>
> > >
> > > This WSDL appears to be quite acceptable to Axis' wsdl2java and to the
> > > gSOAP equivalent.  However, WebSphere's wsdl2java does not like it.
> > > Specifically it complains that tns2:MyFault on line 04 cannot be
> >resolved.
> > >
> > > So, a few questions:
> > >
> > > 1. is the type definition for MyFault on line 07 correct?  I had
> assumed
> > > that it was implicitly in namespace x.y.z because that is the
> > > targetNamespace of the enclosing schema (line 06) and hence does not
> > > need to be explicitly decorated with tns2.
> > >
> > > 2. Generally, is it valid to reference MyFault in schema #2 from
> schema
> > > #1 in this way?
> > >
> > > 3. Any idea if this is a bug in WebSphere wsdl2java or in Axis
> >java2wsdl?
> > >
> > > Thanks.
> >
> >
>
> _________________________________________________________________
> On the road to retirement? Check out MSN Life Events for advice on how to
> get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
>
>

Mime
View raw message