Re: [Axis2] WSDL2Java client code creation [Fwd: [jira] Created: (AXIS2-494) Axis2 creates invalid WSDL from java service]

2006-03-16 Thread Sebastian J. Schultheiss
We have now created a JIRA entry for the problem we encountered. We'll wait for
0.95 to be released and check it out again then. Thanks for your help, everyone.

 Original Message 
Subject: [jira] Created: (AXIS2-494) Axis2 creates invalid WSDL from java 
service
Date: Wed, 15 Mar 2006 18:37:00 + (GMT)
From: Rincewind Wizard (JIRA) <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]

Axis2 creates invalid WSDL from java service


 Key: AXIS2-494
 URL: http://issues.apache.org/jira/browse/AXIS2-494
 Project: Apache Axis 2.0 (Axis2)
Type: Bug
  Components: wsdl
Versions: 0.94
 Environment: GNU Linux, Tomcat 5.5.15, JRE 1.5.0-b64, Axis2 WAR distribution 
0.94
Reporter: Rincewind Wizard


WSDL created is not pretty-printed, and invalid WSDL.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



Re: [Axis2] WSDL2Java client code creation

2006-03-14 Thread Ajith Ranabahu
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  definition:
> > >
> > >   ns1:elementFormDefault="qualified"
> > >   ns0:attributeFormDefault="unqualified"
> > >
> > > As well as all the attributes within the rest of the schema, e.g., this:
> > >
> > > 
> > >   
> > > 
> > >xmlns:ns1="http://www.w3.org/2001/XMLSchema "
> > > ns0:name="param0" ns1:type="xs:anyType"/>
> > > 
> > >   
> > > 
> > >
> > > Should be:
> > >
> > > 
> > >   
> > > 
> > >   
> > > 
> > >   
> > > 
> > >
> > > 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  definitions. e.g.; this:
> > >
> > > http://www.org.apache.axis2"/>
> > >
> > > should be this:
> > >
> > > 
> > >
> > > (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

Re: [Axis2] WSDL2Java client code creation

2006-03-14 Thread Anne Thomas Manes
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 wasgenerated by AXIS itself. After uploading the class we downloaded the WSDL andwithout 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!-- SebiAnne 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  definition:
>>   ns1:elementFormDefault="qualified">   ns0:attributeFormDefault="unqualified">> As well as all the attributes within the rest of the schema, e.g., this:>
> >   > >   http://www.w3.org/2001/XMLSchema
"> ns0:name="param0" ns1:type="xs:anyType"/>> >   > >> Should be:>
> >   > >   > 
>   > >> 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  definitions. e.g.; this:>> 
http://www.org.apache.axis2"/>>> should be this:>> >> (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>>



Re: [Axis2] WSDL2Java client code creation

2006-03-14 Thread Sebastian J. Schultheiss
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  definition:
> 
>   ns1:elementFormDefault="qualified"
>   ns0:attributeFormDefault="unqualified"
> 
> As well as all the attributes within the rest of the schema, e.g., this:
> 
> 
>   
> 
>   http://www.w3.org/2001/XMLSchema";
> ns0:name="param0" ns1:type="xs:anyType"/>
> 
>   
> 
> 
> Should be:
> 
> 
>   
> 
>   
> 
>   
> 
> 
> 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  definitions. e.g.; this:
> 
> http://www.org.apache.axis2"/>
> 
> should be this:
> 
> 
> 
> (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
>>>
>>>
>>>
> 


Re: [Axis2] WSDL2Java client code creation

2006-03-14 Thread Anne Thomas Manes
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  definition:
  ns1:elementFormDefault="qualified"   ns0:attributeFormDefault="unqualified"As well as all the attributes within the rest of the schema, e.g., this:
        http://www.w3.org/2001/XMLSchema
"        ns0:name="param0" ns1:type="xs:anyType"/>      Should be:

  
    
  
    
  
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  definitions. 
e.g.; this:http://www.org.apache.axis2"/>should be this:
(You use the namespace attribute only when using "rpc" style.)AnneOn 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 liketo create the client from the WSDL.Axis has created the attached WSDL from our service, but WSDL2Java fails whencalled like this:
---axis2/bin# WSDL2Java -uri ..\samples\MyService.wsdl -o ..\samples\src -porg.apache.axis2-with this error:--Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDLTypes Schema does not define a targetNamespace in file:../samples/at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.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(CodeGenerationEngine.java:80)... 2 moreIf 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




Re: [Axis2] WSDL2Java client code creation

2006-03-14 Thread robert lazarski
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 liketo create the client from the WSDL.Axis has created the attached WSDL from our service, but WSDL2Java fails whencalled like this:
---axis2/bin# WSDL2Java -uri ..\samples\MyService.wsdl -o ..\samples\src -porg.apache.axis2-with this error:--Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDLTypes Schema does not define a targetNamespace in file:../samples/at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.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(CodeGenerationEngine.java:80)... 2 moreIf 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


[Axis2] WSDL2Java client code creation

2006-03-14 Thread Sebastian J. Schultheiss
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
http://org.apache.axis2/xsd"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:tns="http://org.apache.axis2/"; 
targetNamespace="http://org.apache.axis2/";>http://www.w3.org/2001/XMLSchema"; 
xmlns:ns2="http://www.w3.org/2001/XMLSchema"; 
xmlns:ns0="http://www.w3.org/2001/XMLSchema"; 
xmlns:ns1="http://org.apache.axis2/xsd"; ns1:elementFormDefault="qualified" 
ns0:attributeFormDefault="unqualified" 
ns2:targetNamespace="http://org.apache.axis2/xsd";>



http://www.w3.org/2001/XMLSchema"; ns0:name="param0" 
ns1:type="xs:anyType"/>






http://www.w3.org/2001/XMLSchema"; ns0:name="return" 
ns1:type="xs:anyType"/>






http://www.w3.org/2001/XMLSchema"; ns0:name="param0" 
ns1:type="xs:anyType"/>






http://www.w3.org/2001/XMLSchema"; ns0:name="param0" 
ns1:type="xs:string"/>
http://www.w3.org/2001/XMLSchema"; ns0:name="param1" 
ns1:type="xs:int"/>
http://www.w3.org/2001/XMLSchema"; ns0:name="param2" 
ns1:type="xs:double"/>






http://www.w3.org/2001/XMLSchema"; ns0:name="return" 
ns1:type="xs:anyType"/>






http://www.w3.org/2001/XMLSchema"; ns0:name="param0" 
ns1:type="xs:anyType"/>



http://schemas.xmlsoap.org/soap/http"; 
style="document"/>http://www.org.apache.axis2"/>http://www.org.apache.axis2"/>http://www.org.apache.axis2"/>http://www.org.apache.axis2"/>http://www.org.apache.axis2"/>http://www.org.apache.axis2"/>http://localhost/axis2/services/MyService"/>