Hi all,
This prefix in targetNamepace attribute issue was reported to us
earlier but we could not recreate it. My guess is that it arises in a
particular JDK/OS combination and we need to recreate it so that we
can fix it. Details of your environment would be very helpful to us in
doing so.
BTW thanks Anne for pointing out the issues. We'll fix the WSDL
generation bugs soon (if they are still there) and logging a Jira
issue would be helpful in keeping track of it.

Ajith

On 3/15/06, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> If Axis2 generated that WSDL, then you should log a bug in Jira -- make sure
> you're using the latest build, though. I recall a bug like this in 0.94,
> which I'm pretty sure has been fixed now.
>
> Anne
>
>
>  On 3/14/06, Sebastian J. Schultheiss <[EMAIL PROTECTED]> wrote:
> > Hi Anne!
> >
> > Thanks a lot for your comments. We just used the WSDL of our class that
> was
> > generated by AXIS itself. After uploading the class we downloaded the WSDL
> and
> > without modifying it in any way we wanted to use it as input for the
> WSDL2Java
> > client code creation tool. We weren't aware that AXIS creates faulty
> WSDLs.
> > We'll check out the corrections you suggested and get back tomorrow.
> >
> > Thanks again!
> >
> > -- Sebi
> >
> > Anne Thomas Manes wrote:
> > > The targetNamespace problem is caused by the fact that you specified:
> > >
> > > ns2:targetNamespace="http://org.apache.axis2/xsd";
> > >
> > > Rather than:
> > >
> > > targetNamespace="http://org.apache.axis2/xsd";
> > >
> > > Schema attributes must not be namespace qualified.(I also strongly
> recommend
> > > that you get in the habit of using more descriptive namespaces -- use a
> name
> > > that indicates the nature of the service, and preferably unique to your
> > > organization.)
> > > Likewise you need to remove the namespace prefix from the following
> > > attributes in the <schema> definition:
> > >
> > >   ns1:elementFormDefault="qualified"
> > >   ns0:attributeFormDefault="unqualified"
> > >
> > > As well as all the attributes within the rest of the schema, e.g., this:
> > >
> > > <xs:element ns0:name="echoRequest">
> > >   <xs:complexType>
> > >     <xs:sequence>
> > >       <xs:element
> xmlns:ns1="http://www.w3.org/2001/XMLSchema "
> > >         ns0:name="param0" ns1:type="xs:anyType"/>
> > >     </xs:sequence>
> > >   </xs:complexType>
> > > </xs:element>
> > >
> > > Should be:
> > >
> > > <xs:element name="echoRequest">
> > >   <xs:complexType>
> > >     <xs:sequence>
> > >       <xs:element name="param0" type="xs:anyType"/>
> > >     </xs:sequence>
> > >   </xs:complexType>
> > > </xs:element>
> > >
> > > By the way, You find things work much better when you use defined types
> > > rather than "xs:anyType".
> > >
> > > Based on a quick glance through the rest of the WSDL, I didn't see any
> > > glaring errors, except that you must remove the namespace attributes
> from
> > > the <soap:body> definitions. e.g.; this:
> > >
> > > <soap:body use="literal" namespace=" http://www.org.apache.axis2"/>
> > >
> > > should be this:
> > >
> > > <soap:body use="literal"/>
> > >
> > > (You use the namespace attribute only when using "rpc" style.)
> > >
> > > Anne
> > >
> > > On 3/14/06, robert lazarski <[EMAIL PROTECTED]> wrote:
> > >> The attached file is neither vaild xml or valid wsdl. Try using an xml
> > >> editor - I use kxmleditor on linux - and get the file to at least load.
> From
> > >> there - try getting the wsdl to validate via an wsdl validator (can't
> > >> recommend one at the moment, sorry).
> > >>
> > >> HTH,
> > >> Robert
> > >> http://www.braziloutsource.com/
> > >>
> > >>
> > >> On 3/14/06, Sebastian J. Schultheiss < [EMAIL PROTECTED]> wrote:
> > >>> Hi all,
> > >>>
> > >>> we are playing around with the samples from the tutorial... we have
> > >>> extended the
> > >>> MyService to take a comlpexType (a string, an int and a double) and
> > >>> would like
> > >>> to create the client from the WSDL.
> > >>>
> > >>> Axis has created the attached WSDL from our service, but WSDL2Java
> fails
> > >>> when
> > >>> called like this:
> > >>> ---------------
> > >>> axis2/bin# WSDL2Java -uri ..\samples\MyService.wsdl -o ..\samples\src
> -p
> > >>> org.apache.axis2
> > >>> -----------------
> > >>>
> > >>> with this error:
> > >>> --------------------------
> > >>> Exception in thread "main"
> > >>> org.apache.axis2.wsdl.codegen.CodeGenerationException
> > >>> :
> org.apache.axis2.wsdl.codegen.CodeGenerationException :
> Invalid WSDL:
> > >>> The WSDL
> > >>> Types Schema does not define a targetNamespace in file:../samples/
> > >>>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate
> > >>> (CodeGener
> > >>> ationEngine.java:118)
> > >>>         at
> org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:31)
> > >>>         at
> org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java :21)
> > >>> Caused by:
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> > >>> Invalid WSDL:
> > >>> The WSDL Types Schema does not define a targetNamespace in
> > >>> file:../samples/
> > >>>         at
> > >>>
> org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension.engage
> > >>> (WSDLValidatorExtension.java:70)
> > >>>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate
> > >>> (CodeGener
> > >>> ationEngine.java:80)
> > >>>         ... 2 more
> > >>>
> > >>>
> > >>> If we try to enter anything else in the targetNamespace attribute in
> the
> > >>> WSDL,
> > >>> it gives us a NullPointerException instead.
> > >>>
> > >>> Any clues?
> > >>>
> > >>> Thanks a lot in advance!
> > >>>
> > >>> -- Sebi
> > >>>
> > >>>
> > >>>
> > >
> >
>
>


--
Ajith Ranabahu

Reply via email to