Re: [Axis2] wsdl2java problems with wsdl that has fault elements

2007-11-12 Thread Amila Suriarachchi
On Nov 9, 2007 11:31 PM, Pantvaidya, Vishwajit <[EMAIL PROTECTED]> wrote:
> Hi Amila,
>
> Thanks - at the end of a long day, I just added the fault name to the 
> soap:fault instead of the wsdl:fault. I corrected that and the error is gone. 
> So I did not take the new nightly build with your fix. Just out of interest 
> though - if I provide a name for the soap:fault as you have mentioned, what 
> does that translate to in the code?

according to the basic profile you should add both. (i.e wsdl:fault
name and soap:fault name). this has nothing to do with the generated
code. Exception class name is created using the wsdl:message name.

amila.

>
>
> >-Original Message-
> >From: Amila Suriarachchi [mailto:[EMAIL PROTECTED]
> >Sent: Thursday, November 08, 2007 10:31 PM
> >To: axis-user@ws.apache.org
>
> >Subject: Re: [Axis2] wsdl2java problems with wsdl that has fault elements
> >
> >hi,
> >
> >you have not specified the name of the wsdl:fault element.
> >it should be something like this
> >
> >
> >
> >
> >
> >I added proper exceptions to throw for this case.
> >
> >Amila.
> >
> >On Nov 9, 2007 8:40 AM, Pantvaidya, Vishwajit <[EMAIL PROTECTED]>
> >wrote:
> >> I added the fault specifications in the binding as well and now I get
> >"Error parsing WSDL". Here is the stack trace. I am also attaching wsdl.
> >>
> >>  [java] at
> >org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEng
> >ine.java:160)
> >>  [java] at
> >org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
> >>  [java] at
> >org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> >>  [java] Caused by: org.apache.axis2.AxisFault
> >>  [java] at
> >org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> >>  [java] at
> >org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSD
> >L11ToAxisServiceBuilder.java:367)
> >>  [java] at
> >org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServ
> >ices(WSDL11ToAllAxisServicesBuilder.java:109)
> >>  [java] at
> >org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEng
> >ine.java:154)
> >>  [java] ... 2 more
> >>  [java] Caused by: java.lang.NullPointerException
> >>  [java] at
> >org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBinding(WSD
> >L11ToAxisServiceBuilder.java:693)
> >>  [java] at
> >org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoint(WS
> >DL11ToAxisServiceBuilder.java:508)
> >>  [java] at
> >org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(W
> >SDL11ToAxisServiceBuilder.java:459)
> >>  [java] at
> >org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSD
> >L11ToAxisServiceBuilder.java:337)
> >>
> >> >-Original Message-
> >> >From: Pantvaidya, Vishwajit [mailto:[EMAIL PROTECTED]
> >> >Sent: Wednesday, November 07, 2007 7:20 PM
> >> >To: axis-user@ws.apache.org
> >> >Subject: RE: [Axis2] 1.3 wsdl2java generates code with missing methods
> >> >
> >> >I looked into the code generate and the missing methods issue is fixed.
> >> >Thanks for the fix.
> >> >
> >> >Now I added a wsdl:fault specification in the wsdl - and I get the
> >> >exception:
> >> >
> >> > [java] Caused by: java.lang.RuntimeException: Element QName is null
> >> >for ECMServiceExceptionMessage!
> >> > [java] at
> >>
> >>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
> >.
> >> >getFaultParamElements(AxisServiceBasedMultiLanguageEmitter.java:2795)
> >> > [java] at
> >>
> >>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
> >.
> >> >getFaultElement(AxisServiceBasedMultiLanguageEmitter.java:2714)
> >> > [java] at
> >>
> >>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
> >.
> >> >generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2237)
> >> > [java] at
> >>
> >>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
> >.
> >> >loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2119)
> >

RE: [Axis2] wsdl2java problems with wsdl that has fault elements

2007-11-09 Thread Pantvaidya, Vishwajit
Hi Amila,

Thanks - at the end of a long day, I just added the fault name to the 
soap:fault instead of the wsdl:fault. I corrected that and the error is gone. 
So I did not take the new nightly build with your fix. Just out of interest 
though - if I provide a name for the soap:fault as you have mentioned, what 
does that translate to in the code?


>-Original Message-
>From: Amila Suriarachchi [mailto:[EMAIL PROTECTED]
>Sent: Thursday, November 08, 2007 10:31 PM
>To: axis-user@ws.apache.org
>Subject: Re: [Axis2] wsdl2java problems with wsdl that has fault elements
>
>hi,
>
>you have not specified the name of the wsdl:fault element.
>it should be something like this
>
>
>
>
>
>I added proper exceptions to throw for this case.
>
>Amila.
>
>On Nov 9, 2007 8:40 AM, Pantvaidya, Vishwajit <[EMAIL PROTECTED]>
>wrote:
>> I added the fault specifications in the binding as well and now I get
>"Error parsing WSDL". Here is the stack trace. I am also attaching wsdl.
>>
>>  [java] at
>org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEng
>ine.java:160)
>>  [java] at
>org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>>  [java] at
>org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
>>  [java] Caused by: org.apache.axis2.AxisFault
>>  [java] at
>org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>>  [java] at
>org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSD
>L11ToAxisServiceBuilder.java:367)
>>  [java] at
>org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServ
>ices(WSDL11ToAllAxisServicesBuilder.java:109)
>>  [java] at
>org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEng
>ine.java:154)
>>  [java] ... 2 more
>>  [java] Caused by: java.lang.NullPointerException
>>  [java] at
>org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBinding(WSD
>L11ToAxisServiceBuilder.java:693)
>>  [java] at
>org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoint(WS
>DL11ToAxisServiceBuilder.java:508)
>>  [java] at
>org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(W
>SDL11ToAxisServiceBuilder.java:459)
>>  [java] at
>org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSD
>L11ToAxisServiceBuilder.java:337)
>>
>> >-Original Message-
>> >From: Pantvaidya, Vishwajit [mailto:[EMAIL PROTECTED]
>> >Sent: Wednesday, November 07, 2007 7:20 PM
>> >To: axis-user@ws.apache.org
>> >Subject: RE: [Axis2] 1.3 wsdl2java generates code with missing methods
>> >
>> >I looked into the code generate and the missing methods issue is fixed.
>> >Thanks for the fix.
>> >
>> >Now I added a wsdl:fault specification in the wsdl - and I get the
>> >exception:
>> >
>> > [java] Caused by: java.lang.RuntimeException: Element QName is null
>> >for ECMServiceExceptionMessage!
>> > [java] at
>>
>>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
>.
>> >getFaultParamElements(AxisServiceBasedMultiLanguageEmitter.java:2795)
>> > [java] at
>>
>>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
>.
>> >getFaultElement(AxisServiceBasedMultiLanguageEmitter.java:2714)
>> > [java] at
>>
>>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
>.
>> >generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2237)
>> > [java] at
>>
>>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
>.
>> >loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2119)
>> > [java] at
>>
>>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
>.
>>
>>createDOMDocumentForSkeletonInterface(AxisServiceBasedMultiLanguageEmitter
>.
>> >java:2076)
>> > [java] at
>>
>>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
>.
>> >writeSkeletonInterface(AxisServiceBasedMultiLanguageEmitter.java:1985)
>> > [java] at
>>
>>org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
>.
>> >emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1311)
>> >
>> >Seems like this was a bug earlier in Axis2 - has that reappeared again
&

Re: [Axis2] wsdl2java problems with wsdl that has fault elements

2007-11-08 Thread Amila Suriarachchi
hi,

you have not specified the name of the wsdl:fault element.
it should be something like this





I added proper exceptions to throw for this case.

Amila.

On Nov 9, 2007 8:40 AM, Pantvaidya, Vishwajit <[EMAIL PROTECTED]> wrote:
> I added the fault specifications in the binding as well and now I get "Error 
> parsing WSDL". Here is the stack trace. I am also attaching wsdl.
>
>  [java] at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:160)
>  [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>  [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
>  [java] Caused by: org.apache.axis2.AxisFault
>  [java] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>  [java] at 
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:367)
>  [java] at 
> org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:109)
>  [java] at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:154)
>  [java] ... 2 more
>  [java] Caused by: java.lang.NullPointerException
>  [java] at 
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBinding(WSDL11ToAxisServiceBuilder.java:693)
>  [java] at 
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoint(WSDL11ToAxisServiceBuilder.java:508)
>  [java] at 
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(WSDL11ToAxisServiceBuilder.java:459)
>  [java] at 
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:337)
>
> >-Original Message-
> >From: Pantvaidya, Vishwajit [mailto:[EMAIL PROTECTED]
> >Sent: Wednesday, November 07, 2007 7:20 PM
> >To: axis-user@ws.apache.org
> >Subject: RE: [Axis2] 1.3 wsdl2java generates code with missing methods
> >
> >I looked into the code generate and the missing methods issue is fixed.
> >Thanks for the fix.
> >
> >Now I added a wsdl:fault specification in the wsdl - and I get the
> >exception:
> >
> > [java] Caused by: java.lang.RuntimeException: Element QName is null
> >for ECMServiceExceptionMessage!
> > [java] at
> >org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.
> >getFaultParamElements(AxisServiceBasedMultiLanguageEmitter.java:2795)
> > [java] at
> >org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.
> >getFaultElement(AxisServiceBasedMultiLanguageEmitter.java:2714)
> > [java] at
> >org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.
> >generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2237)
> > [java] at
> >org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.
> >loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2119)
> > [java] at
> >org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.
> >createDOMDocumentForSkeletonInterface(AxisServiceBasedMultiLanguageEmitter.
> >java:2076)
> > [java] at
> >org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.
> >writeSkeletonInterface(AxisServiceBasedMultiLanguageEmitter.java:1985)
> > [java] at
> >org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.
> >emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1311)
> >
> >Seems like this was a bug earlier in Axis2 - has that reappeared again in
> >this nightly build?
> >A more basic question I have asked earlier - Axis1 used to generate
> >skeleton interface methods that threw java.lang.RemoteException by default
> >- that no longer happens in Axis2. Is that a bug or by design? If that ia a
> >bug and can be fixed - I no longer have to define a custom fault in wsdl.
> >
> >
> >Please let me know.
> >
> >
> >Thanks,
> >
> >Vish.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



-- 
Amila Suriarachchi,
WSO2 Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [axis2] wsdl2java problems

2007-01-29 Thread Alan Birtles
Yes i am using ADB, I have worked round it by writing a new wsdl and  
using strings instead of the enumerations then modifying the generated  
code. I have rasised a JIRA here:  
https://issues.apache.org/jira/browse/AXIS2-2053

Quoting Ajith Ranabahu <[EMAIL PROTECTED]>:


Hi,
Is this using ADB ? I guess we have limitations in handling simple
types and simple type extensions. Would it be possible to use a more
capable databinding (say XMLBeans) and try it out ?

In anycase please log a Jira as well.

Ajith

On 1/29/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote:

Please log a jira

On 1/29/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]>
wrote:


Using wsdl2java on the attached wsdl produces some incorrect results.
The xml that i would expect the generated code to produce is in
expected.xml the code it actually produces is in actual.xml. The
element name for element1 is incorrect, element2 should contain the
string directly instead of having it as a child node, element2 is also
missing the attribute that it should have.
There seems to be problems with wsdl2java's handling of enumerations
in anything other than the most basic cases




-

To unsubscribe, e-mail:

[EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]







--
Amila Suriarachchi,
WSO2 Inc.



--
Ajith Ranabahu

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [axis2] wsdl2java problems

2007-01-29 Thread Ajith Ranabahu

Hi,
Is this using ADB ? I guess we have limitations in handling simple
types and simple type extensions. Would it be possible to use a more
capable databinding (say XMLBeans) and try it out ?

In anycase please log a Jira as well.

Ajith

On 1/29/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote:

Please log a jira

On 1/29/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]>
wrote:
>
> Using wsdl2java on the attached wsdl produces some incorrect results.
> The xml that i would expect the generated code to produce is in
> expected.xml the code it actually produces is in actual.xml. The
> element name for element1 is incorrect, element2 should contain the
> string directly instead of having it as a child node, element2 is also
> missing the attribute that it should have.
> There seems to be problems with wsdl2java's handling of enumerations
> in anything other than the most basic cases
>
>
>
-
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



--
Amila Suriarachchi,
WSO2 Inc.



--
Ajith Ranabahu

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [axis2] wsdl2java problems

2007-01-29 Thread Amila Suriarachchi

Please log a jira

On 1/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Using wsdl2java on the attached wsdl produces some incorrect results.
The xml that i would expect the generated code to produce is in
expected.xml the code it actually produces is in actual.xml. The
element name for element1 is incorrect, element2 should contain the
string directly instead of having it as a child node, element2 is also
missing the attribute that it should have.
There seems to be problems with wsdl2java's handling of enumerations
in anything other than the most basic cases


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Amila Suriarachchi,
WSO2 Inc.


Re: [axis2] wsdl2java problems

2007-01-29 Thread Alan Birtles

Attached is the corrected wsdl

Quoting Anne Thomas Manes <[EMAIL PROTECTED]>:


There are namespace errors in your WSDL. You have not declared a
namespace for your WSDL targetNamespace; therefore you have no way to
reference any of your WSDL elements. Perhaps you meant to use the same
targetNamespace for both your WSDL and schema?

It's always a good idea to validate a WSDL before running wsdl2java on it.

Anne

On 1/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Using wsdl2java on the attached wsdl produces some incorrect results.
The xml that i would expect the generated code to produce is in
expected.xml the code it actually produces is in actual.xml. The
element name for element1 is incorrect, element2 should contain the
string directly instead of having it as a child node, element2 is also
missing the attribute that it should have.
There seems to be problems with wsdl2java's handling of enumerations
in anything other than the most basic cases


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





test.wsdl
Description: application/xml
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: [axis2] wsdl2java problems

2007-01-29 Thread Anne Thomas Manes

There are namespace errors in your WSDL. You have not declared a
namespace for your WSDL targetNamespace; therefore you have no way to
reference any of your WSDL elements. Perhaps you meant to use the same
targetNamespace for both your WSDL and schema?

It's always a good idea to validate a WSDL before running wsdl2java on it.

Anne

On 1/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Using wsdl2java on the attached wsdl produces some incorrect results.
The xml that i would expect the generated code to produce is in
expected.xml the code it actually produces is in actual.xml. The
element name for element1 is incorrect, element2 should contain the
string directly instead of having it as a child node, element2 is also
missing the attribute that it should have.
There seems to be problems with wsdl2java's handling of enumerations
in anything other than the most basic cases


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[axis2] wsdl2java problems

2007-01-29 Thread mailinglists
Using wsdl2java on the attached wsdl produces some incorrect results.  
The xml that i would expect the generated code to produce is in  
expected.xml the code it actually produces is in actual.xml. The  
element name for element1 is incorrect, element2 should contain the  
string directly instead of having it as a child node, element2 is also  
missing the attribute that it should have.
There seems to be problems with wsdl2java's handling of enumerations  
in anything other than the most basic cases


test.wsdl
Description: application/xml

	String1
	String3

	String1
	
		String3
	

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]