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 "Pantvaidya, Vishwajit" <vp...@selectica.com> on 2007/08/23 01:59:16 UTC

[Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?

does any one has sample for receiving MTOM attachment using axis2

Posted by Yo...@mizuhocbus.com.
Hi 

Does any one has sample for receiving MTOM attachment using axis2  with 
file caching.

MTOM sample in axis2 does not work in reverse for me . Though  It sends 
MTOM attachment correctly does not receive mtom attachment with file 
caching. It fails when I enable file caching . Without file caching it 
works perfect.( i.e sending and receiving attachment).


Thanks
Yogesh Dhake 
======================================================================================================
This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that you have received this transmittal and any attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank (USA), Mizuho Securities USA Inc. or any other affiliates of Mizuho Financial Group (”Mizuho”). Mizuho accepts no responsibility for the accuracy or completeness of any information herein contained.
E-Mail received by or sent from officer of Mizuho Securities USA Inc. (which is a registered U.S. broker-dealer and the entity through which Mizuho generally conducts its investment banking, capital markets, and securities business in the United States) is electronically archived and recorded and is subject to review and monitoring by and/or disclosure to persons other than the recipient, including (but not limited to) Mizuho Securities USA Inc. supervisory personnel.  Such communications may be produced to regulatory authorities or others with legal rights to the information.

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
Hi Amila,

Let me know if I am doing anything wrong here or if I need to change anything.


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

I also tried using jaxb hoping that it would directly map to java types - found 2 problems there.
1. axis2 does not support unwrapping for jaxb - why is that?
2. for the same wsdl, I emailed you, it created an interface as follows:
public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
);
But it did not create the class for the complex types com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. Am I doing anything wrong here or is there a problem with the axis2 jaxb support?


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

For this wsdl - it creates interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (
org.apache.xmlbeans.XmlString sessiontoken,
org.apache.xmlbeans.XmlString trackingnumber,
org.apache.xmlbeans.XmlInt version
);

So the unwrapping here is okay - but I need java.lang,String params instead of xmlbeans.XmlString. I know that XmlString contains a string finally - but I do not really need that additional wrapper.
Is this happening because of the bindings functionality introduced in axis2?
Is it possible in axis2 to do wsdl2java using only POJO types?


________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Friday, September 28, 2007 2:58 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String


On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives error "error: invalid.document.type: Document is not a wsdl file".



But coming back to original problem - the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?



Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the -uw option - hoping it will unwrap those. But now I get error



org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element

this means you  have a  choice or all type in your complex type. unwrapping works with the document literal type services. if you can send your wsdl I can check.


org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java:370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)



Any idea what this is about? Is -uw option the right one? What is difference between that and -u? It is not very clear from the wsdl2java reference.

-u let you generate seperate classes.


- Vish.

________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.

On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by robert lazarski <ro...@gmail.com>.
On 10/1/07, Pantvaidya, Vishwajit <vp...@selectica.com> wrote:
>
>
> But unwrapping does not work with jaxme/jaxbri/ADB.
>

AFAIK the latest axis2, unwrapping only works with jibx. Search the
archives for jibx and dennis, as he's commented a lot on that.

HTH,
Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
Thanks Gennady and Bob Lazarski for your help and pointers.

My thoughts - Axis1 was tightly tied to JAX-RPC which determined the mapping from xml types to java. Even with the flexible databinding in axis2, some backward compatibility of axis1 code could have been maintained had the support to jaxme/jaxbri been complete (with unwrapping and all that). But probably that was not one of the design goals for axis2.


- Vish.

________________________________
From: Gennady Shumakher [mailto:Gennady@backflipsoftware.com]
Sent: Tuesday, October 02, 2007 12:57 AM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Hi Vish,
I faced the similar issues during evaluation of migration of our project from axis1 to axis2. As far I understand the issue here is that wsdl2java generation frameworks and databinding techniques don't have the strict unification of the way the code is generated. So even switching from one data binding to another would cause the need of code modifications since the generated complex data types are exposed in completely different API manner. (ADB - new SomeType(); XmlBeans - SomeType.Factory.newInstance()).
To switch easily between data binding methods the one could consider code2wsdl path.

Regarding the options you mentioned according to 1.3 documentation jaxme and jaxbri are in experimental phase.

Gennady

________________________________
From: Pantvaidya, Vishwajit [mailto:vpantvai@selectica.com]
Sent: Monday, October 01, 2007 23:32
To: 'axis-user@ws.apache.org'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String
Actually I do see that the complex types are getting generated - but the "-f" option seems to be working erratically, because of which those types got generated with a "src" folder at the topmost level.
But unwrapping does not work with jaxme/jaxbri/ADB.

My takeaway from this exercise: Axis2 wsdl2java cannot generate same code like axis1 even if wsdl remains same and irrespective of the value of the "-d" wsdl2java option. Just migrating to axis2 forces people to use xmlbeans, adb, etc, and make change in the webservice implementation to handle, for example, xmlbeans.XmlString instead of java.lang.String.

So my options are to:

 1.  use jaxme/jaxbri with wrapper classes even for simple webservice operations like login, etc
 2.  use xmlbeans and change my axis1 implementation to handle XmlString instead of java String.

Any suggestions/thoughts/corrections?


________________________________
From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Hi Amila,

Let me know if I am doing anything wrong here or if I need to change anything.


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

I also tried using jaxb hoping that it would directly map to java types - found 2 problems there.
1. axis2 does not support unwrapping for jaxb - why is that?
2. for the same wsdl, I emailed you, it created an interface as follows:
public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
);
But it did not create the class for the complex types com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. Am I doing anything wrong here or is there a problem with the axis2 jaxb support?


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

For this wsdl - it creates interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (
org.apache.xmlbeans.XmlString sessiontoken,
org.apache.xmlbeans.XmlString trackingnumber,
org.apache.xmlbeans.XmlInt version
);

So the unwrapping here is okay - but I need java.lang,String params instead of xmlbeans.XmlString. I know that XmlString contains a string finally - but I do not really need that additional wrapper.
Is this happening because of the bindings functionality introduced in axis2?
Is it possible in axis2 to do wsdl2java using only POJO types?


________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Friday, September 28, 2007 2:58 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String


On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives error "error: invalid.document.type: Document is not a wsdl file".



But coming back to original problem - the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?



Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the -uw option - hoping it will unwrap those. But now I get error



org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element

this means you  have a  choice or all type in your complex type. unwrapping works with the document literal type services. if you can send your wsdl I can check.


org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java:370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)



Any idea what this is about? Is -uw option the right one? What is difference between that and -u? It is not very clear from the wsdl2java reference.

-u let you generate seperate classes.


- Vish.

________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.

On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by Gennady Shumakher <Ge...@backflipsoftware.com>.
Hi Vish,
I faced the similar issues during evaluation of migration of our project
from axis1 to axis2. As far I understand the issue here is that
wsdl2java generation frameworks and databinding techniques don't have
the strict unification of the way the code is generated. So even
switching from one data binding to another would cause the need of code
modifications since the generated complex data types are exposed in
completely different API manner. (ADB - new SomeType(); XmlBeans -
SomeType.Factory.newInstance()).
To switch easily between data binding methods the one could consider
code2wsdl path.
 
Regarding the options you mentioned according to 1.3 documentation jaxme
and jaxbri are in experimental phase.
 
Gennady
 
________________________________

From: Pantvaidya, Vishwajit [mailto:vpantvai@selectica.com] 
Sent: Monday, October 01, 2007 23:32
To: 'axis-user@ws.apache.org'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with
xmlbeans.XmlString instead of java.lang.String



Actually I do see that the complex types are getting generated - but the
"-f" option seems to be working erratically, because of which those
types got generated with a "src" folder at the topmost level.

But unwrapping does not work with jaxme/jaxbri/ADB.

 

My takeaway from this exercise: Axis2 wsdl2java cannot generate same
code like axis1 even if wsdl remains same and irrespective of the value
of the "-d" wsdl2java option. Just migrating to axis2 forces people to
use xmlbeans, adb, etc, and make change in the webservice implementation
to handle, for example, xmlbeans.XmlString instead of java.lang.String.

 

So my options are to:

1.	use jaxme/jaxbri with wrapper classes even for simple webservice
operations like login, etc 
2.	use xmlbeans and change my axis1 implementation to handle
XmlString instead of java String. 

 

Any suggestions/thoughts/corrections?

 

 

________________________________

From: Pantvaidya, Vishwajit 
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with
xmlbeans.XmlString instead of java.lang.String

 

Hi Amila,

 

Let me know if I am doing anything wrong here or if I need to change
anything.

 

 

- Vish.

 

________________________________

From: Pantvaidya, Vishwajit 
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with
xmlbeans.XmlString instead of java.lang.String

 

I also tried using jaxb hoping that it would directly map to java types
- found 2 problems there.

1. axis2 does not support unwrapping for jaxb - why is that?

2. for the same wsdl, I emailed you, it created an interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (

com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement

);

But it did not create the class for the complex types
com.selectica.ws.ecm.wsdlgen.UploadRequestElement and
OperationStatusElement. Am I doing anything wrong here or is there a
problem with the axis2 jaxb support?

 

 

- Vish.

 

________________________________

From: Pantvaidya, Vishwajit 
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with
xmlbeans.XmlString instead of java.lang.String

 

For this wsdl - it creates interface as follows:

 

public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument
Upload (

org.apache.xmlbeans.XmlString sessiontoken,

org.apache.xmlbeans.XmlString trackingnumber,

org.apache.xmlbeans.XmlInt version

);

 

So the unwrapping here is okay - but I need java.lang,String params
instead of xmlbeans.XmlString. I know that XmlString contains a string
finally - but I do not really need that additional wrapper.

Is this happening because of the bindings functionality introduced in
axis2?

Is it possible in axis2 to do wsdl2java using only POJO types?

 

 

________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com] 
Sent: Friday, September 28, 2007 2:58 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with
xmlbeans.XmlString instead of java.lang.String

 

 

On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com> wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) -
it gives error "error: invalid.document.type: Document is not a wsdl
file".

 

But coming back to original problem - the wsdl used to process fine with
axis1 resulting in interface with parameters of java types. Hasn't that
been retained in axis2?

 

Tried wsdl2java with ADB to see if that gives me what I want. That also
completed fine - but resulting classes had all complex type params with
generated types. So I tried the -uw option - hoping it will unwrap
those. But now I get error

 

org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported
Schema format for unwrapping! found unknown type but expected Element


this means you  have a  choice or all type in your complex type.
unwrapping works with the document literal type services. if you can
send your wsdl I can check. 

	 

	
org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.process
XMLSchemaSequence(SchemaUnwrapperExtension.java:370),
org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleA
llCasesOfComplexTypes(SchemaUnwrapperExtension.java:198),
org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSch
ema(SchemaUnwrapperExtension.java:143),
org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(
SchemaUnwrapperExtension.java:94),
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:218)

	 

	Any idea what this is about? Is -uw option the right one? What
is difference between that and -u? It is not very clear from the
wsdl2java reference.


-u let you generate seperate classes.

	 

	- Vish.

	
________________________________


	From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com] 
	Sent: Wednesday, August 22, 2007 8:56 PM
	To: axis-user@ws.apache.org
	Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface
with xmlbeans.XmlString instead of java.lang.String

	 

	can you generate the code using xmlbeans scomp command and see
what is the type?
	anyway I think XmlString contanins a string inside it.
	
	Amila.

	On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>
wrote:

	I think I saw someone with same problem but cannot locate that
message. My axis2 1.3 wsdl2java with xmlbeans is completing
successfully. But the generated interface has methods with parameters of
type xmlbeans.XmlString instead of java.lang.String. My expectation was
it would map primitives to java datatypes and create xmlbeans for
complex types. Is this not the case? Do I need to switch to ADB to get
params with java types?

	
	
	
	-- 
	Amila Suriarachchi,
	WSO2 Inc. 




-- 
Amila Suriarachchi,
WSO2 Inc. 


RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
Actually I do see that the complex types are getting generated - but the "-f" option seems to be working erratically, because of which those types got generated with a "src" folder at the topmost level.
But unwrapping does not work with jaxme/jaxbri/ADB.

My takeaway from this exercise: Axis2 wsdl2java cannot generate same code like axis1 even if wsdl remains same and irrespective of the value of the "-d" wsdl2java option. Just migrating to axis2 forces people to use xmlbeans, adb, etc, and make change in the webservice implementation to handle, for example, xmlbeans.XmlString instead of java.lang.String.

So my options are to:

 1.  use jaxme/jaxbri with wrapper classes even for simple webservice operations like login, etc
 2.  use xmlbeans and change my axis1 implementation to handle XmlString instead of java String.

Any suggestions/thoughts/corrections?


________________________________
From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Hi Amila,

Let me know if I am doing anything wrong here or if I need to change anything.


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

I also tried using jaxb hoping that it would directly map to java types - found 2 problems there.
1. axis2 does not support unwrapping for jaxb - why is that?
2. for the same wsdl, I emailed you, it created an interface as follows:
public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
);
But it did not create the class for the complex types com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. Am I doing anything wrong here or is there a problem with the axis2 jaxb support?


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

For this wsdl - it creates interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (
org.apache.xmlbeans.XmlString sessiontoken,
org.apache.xmlbeans.XmlString trackingnumber,
org.apache.xmlbeans.XmlInt version
);

So the unwrapping here is okay - but I need java.lang,String params instead of xmlbeans.XmlString. I know that XmlString contains a string finally - but I do not really need that additional wrapper.
Is this happening because of the bindings functionality introduced in axis2?
Is it possible in axis2 to do wsdl2java using only POJO types?


________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Friday, September 28, 2007 2:58 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String


On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives error "error: invalid.document.type: Document is not a wsdl file".



But coming back to original problem - the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?



Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the -uw option - hoping it will unwrap those. But now I get error



org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element

this means you  have a  choice or all type in your complex type. unwrapping works with the document literal type services. if you can send your wsdl I can check.


org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java:370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)



Any idea what this is about? Is -uw option the right one? What is difference between that and -u? It is not very clear from the wsdl2java reference.

-u let you generate seperate classes.


- Vish.

________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.

On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
Hi Amila,

By the way, (as mentioned at the beginning of this thread), I am on Axis2 1.3.

The ant task I am using has the following options
"-o ... -l java -ss -sd -d ... -ssi -f -uri ... -ns2p ...".
(for the -d option, I have tried adb/xmlbeans/jaxbri/jaxme)

If you are able to generate classes correctly, can you send me a zip of those?


Thanks,

Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 2:32 PM
To: 'axis-user@ws.apache.org'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Actually I do see that the complex types are getting generated - but the "-f" option seems to be working erratically, because of which those types got generated with a "src" folder at the topmost level.
But unwrapping does not work with jaxme/jaxbri/ADB.

My takeaway from this exercise: Axis2 wsdl2java cannot generate same code like axis1 even if wsdl remains same and irrespective of the value of the "-d" wsdl2java option. Just migrating to axis2 forces people to use xmlbeans, adb, etc, and make change in the webservice implementation to handle, for example, xmlbeans.XmlString instead of java.lang.String.

So my options are to:

 1.  use jaxme/jaxbri with wrapper classes even for simple webservice operations like login, etc
 2.  use xmlbeans and change my axis1 implementation to handle XmlString instead of java String.

Any suggestions/thoughts/corrections?


________________________________
From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Hi Amila,

Let me know if I am doing anything wrong here or if I need to change anything.


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

I also tried using jaxb hoping that it would directly map to java types - found 2 problems there.
1. axis2 does not support unwrapping for jaxb - why is that?
2. for the same wsdl, I emailed you, it created an interface as follows:
public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
);
But it did not create the class for the complex types com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. Am I doing anything wrong here or is there a problem with the axis2 jaxb support?


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

For this wsdl - it creates interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (
org.apache.xmlbeans.XmlString sessiontoken,
org.apache.xmlbeans.XmlString trackingnumber,
org.apache.xmlbeans.XmlInt version
);

So the unwrapping here is okay - but I need java.lang,String params instead of xmlbeans.XmlString. I know that XmlString contains a string finally - but I do not really need that additional wrapper.
Is this happening because of the bindings functionality introduced in axis2?
Is it possible in axis2 to do wsdl2java using only POJO types?


________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Friday, September 28, 2007 2:58 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String


On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives error "error: invalid.document.type: Document is not a wsdl file".



But coming back to original problem - the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?



Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the -uw option - hoping it will unwrap those. But now I get error



org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element

this means you  have a  choice or all type in your complex type. unwrapping works with the document literal type services. if you can send your wsdl I can check.


org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java:370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)



Any idea what this is about? Is -uw option the right one? What is difference between that and -u? It is not very clear from the wsdl2java reference.

-u let you generate seperate classes.


- Vish.

________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.

On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
But then why is it not accepting the unwrapping flag for the default ADB binding for me. I thought the AXIS2_HOME setting was proposed as a solution for that.


________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Tuesday, October 16, 2007 9:12 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String


On 10/17/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

Hi Amila.



Thanks, but one problem in this - my wsdl2java will run within the framework of an Ant-based build system which will not have access to a complete Axis2 installation i.e. so what would I set AXIS2_HOME to? Is it not possible to just copy relevant jars into my build lib folder and get the wsdl2java working?

this should be fine.


- Vish.



________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Thursday, October 04, 2007 11:23 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



some times your AXIS2_HOME may have point to a different location.

Make sure your follow these steps.
1. Get an Axis2 1.3 release or a Nightly build.
2. unpack it and set the axis2 home properly.
3. generate the code with wsdl2java.sh tool with the options I gave

if this passes then may be a problem with the maven plugin.

Amila.

On 10/5/07, Pantvaidya, Vishwajit < vpantvai@selectica.com<ma...@selectica.com>> wrote:

Thanks Amila - indeed looks like you are able to get the java output I desire. But when I try my wsdl2java ant task with the same options, it gives the exception "org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element". The moment I comment out the "-uw" flag - it generates the code without unwrapping. So it is accepting the unwrapping flag for the default adb binding.



How were you able to get this to work - it does seem both of us are on axis2 1.3.





- Vish.





________________________________

From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Thursday, October 04, 2007 1:15 AM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



here is an out put I got with these options

-uri SelecticaECM.wsdl -ss -sd -g -uw

Amila.

On 10/4/07, Pantvaidya, Vishwajit < vpantvai@selectica.com<ma...@selectica.com>> wrote:

Hi Amila,



Am I doing anything wrong in the jaxme/jaxbri options? Or is it not working because their implementation is on a trial basis?

If jaxme/jaxbri won't work - I was thinking of proceeding with xmlbeans.



Ultimately I need to deal with MTOM attachments - so do I need to choose any particular databinding? The MTOM guide talks about ADB - does that mean that if I use xmlbeans, I cannot exchange attachments via MTOM?





- Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Tuesday, October 02, 2007 9:42 AM
To: 'axis-user@ws.apache.org<ma...@ws.apache.org>'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



Hi Amila,



By the way, (as mentioned at the beginning of this thread), I am on Axis2 1.3.



The ant task I am using has the following options

"-o ... -l java -ss -sd -d ... -ssi -f -uri ... -ns2p ...".

(for the -d option, I have tried adb/xmlbeans/jaxbri/jaxme)



If you are able to generate classes correctly, can you send me a zip of those?





Thanks,



Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 2:32 PM
To: 'axis-user@ws.apache.org<ma...@ws.apache.org>'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



Actually I do see that the complex types are getting generated - but the "-f" option seems to be working erratically, because of which those types got generated with a "src" folder at the topmost level.

But unwrapping does not work with jaxme/jaxbri/ADB.



My takeaway from this exercise: Axis2 wsdl2java cannot generate same code like axis1 even if wsdl remains same and irrespective of the value of the "-d" wsdl2java option. Just migrating to axis2 forces people to use xmlbeans, adb, etc, and make change in the webservice implementation to handle, for example, xmlbeans.XmlString instead of java.lang.String.



So my options are to:

 1.  use jaxme/jaxbri with wrapper classes even for simple webservice operations like login, etc
 2.  use xmlbeans and change my axis1 implementation to handle XmlString instead of java String.



Any suggestions/thoughts/corrections?





________________________________

From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>

Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



Hi Amila,



Let me know if I am doing anything wrong here or if I need to change anything.





- Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



I also tried using jaxb hoping that it would directly map to java types - found 2 problems there.

1. axis2 does not support unwrapping for jaxb - why is that?

2. for the same wsdl, I emailed you, it created an interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (

com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement

);

But it did not create the class for the complex types com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. Am I doing anything wrong here or is there a problem with the axis2 jaxb support?





- Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



For this wsdl - it creates interface as follows:



public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (

org.apache.xmlbeans.XmlString sessiontoken,

org.apache.xmlbeans.XmlString trackingnumber,

org.apache.xmlbeans.XmlInt version

);



So the unwrapping here is okay - but I need java.lang,String params instead of xmlbeans.XmlString. I know that XmlString contains a string finally - but I do not really need that additional wrapper.

Is this happening because of the bindings functionality introduced in axis2?

Is it possible in axis2 to do wsdl2java using only POJO types?





________________________________

From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Friday, September 28, 2007 2:58 AM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String





On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives error "error: invalid.document.type: Document is not a wsdl file".



But coming back to original problem - the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?



Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the -uw option - hoping it will unwrap those. But now I get error



org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element

this means you  have a  choice or all type in your complex type. unwrapping works with the document literal type services. if you can send your wsdl I can check.



org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java :370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)



Any idea what this is about? Is -uw option the right one? What is difference between that and -u? It is not very clear from the wsdl2java reference.

-u let you generate seperate classes.



- Vish.

________________________________

From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.

On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by Amila Suriarachchi <am...@gmail.com>.
On 10/17/07, Pantvaidya, Vishwajit <vp...@selectica.com> wrote:
>
>  Hi Amila.
>
>
>
> Thanks, but one problem in this - my wsdl2java will run within the
> framework of an Ant-based build system which will not have access to a
> complete Axis2 installation i.e. so what would I set AXIS2_HOME to? Is it
> not possible to just copy relevant jars into my build lib folder and get the
> wsdl2java working?
>

this should be fine.

- Vish.
>
>
>   ------------------------------
>
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* Thursday, October 04, 2007 11:23 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> some times your AXIS2_HOME may have point to a different location.
>
> Make sure your follow these steps.
> 1. Get an Axis2 1.3 release or a Nightly build.
> 2. unpack it and set the axis2 home properly.
> 3. generate the code with wsdl2java.sh tool with the options I gave
>
> if this passes then may be a problem with the maven plugin.
>
> Amila.
>
> On 10/5/07, *Pantvaidya, Vishwajit** *<vp...@selectica.com> wrote:
>
> Thanks Amila – indeed looks like you are able to get the java output I
> desire. But when I try my wsdl2java ant task with the same options, it gives
> the exception "org.apache.axis2.wsdl.codegen.CodeGenerationException:
> Unsupported Schema format for unwrapping! found unknown type but expected
> Element". The moment I comment out the "-uw" flag – it generates the code
> without unwrapping. So it is accepting the unwrapping flag for the default
> adb binding.
>
>
>
> How were you able to get this to work – it does seem both of us are on
> axis2 1.3.
>
>
>
>
>
> - Vish.
>
>
>
>
>   ------------------------------
>
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* Thursday, October 04, 2007 1:15 AM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> here is an out put I got with these options
>
> -uri SelecticaECM.wsdl -ss -sd -g -uw
>
> Amila.
>
> On 10/4/07, *Pantvaidya, Vishwajit* < vpantvai@selectica.com> wrote:
>
> Hi Amila,
>
>
>
> Am I doing anything wrong in the jaxme/jaxbri options? Or is it not
> working because their implementation is on a trial basis?
>
> If jaxme/jaxbri won't work - I was thinking of proceeding with xmlbeans.
>
>
>
> Ultimately I need to deal with MTOM attachments – so do I need to choose
> any particular databinding? The MTOM guide talks about ADB – does that mean
> that if I use xmlbeans, I cannot exchange attachments via MTOM?
>
>
>
>
>
> - Vish.
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Tuesday, October 02, 2007 9:42 AM
> *To:* 'axis-user@ws.apache.org'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> Hi Amila,
>
>
>
> By the way, (as mentioned at the beginning of this thread), I am on Axis2
> 1.3.
>
>
>
> The ant task I am using has the following options
>
> "-o … –l java –ss –sd –d … –ssi –f –uri … -ns2p …".
>
> (for the –d option, I have tried adb/xmlbeans/jaxbri/jaxme)
>
>
>
> If you are able to generate classes correctly, can you send me a zip of
> those?
>
>
>
>
>
> Thanks,
>
>
>
> Vish.
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Monday, October 01, 2007 2:32 PM
> *To:* 'axis-user@ws.apache.org'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> Actually I do see that the complex types are getting generated – but the
> "-f" option seems to be working erratically, because of which those types
> got generated with a "src" folder at the topmost level.
>
> But unwrapping does not work with jaxme/jaxbri/ADB.
>
>
>
> My takeaway from this exercise: Axis2 wsdl2java cannot generate same code
> like axis1 even if wsdl remains same and irrespective of the value of the
> "-d" wsdl2java option. Just migrating to axis2 forces people to use
> xmlbeans, adb, etc, and make change in the webservice implementation to
> handle, for example, xmlbeans.XmlString instead of java.lang.String.
>
>
>
> So my options are to:
>
>    1. use jaxme/jaxbri with wrapper classes even for simple webservice
>    operations like login, etc
>    2. use xmlbeans and change my axis1 implementation to handle
>    XmlString instead of java String.
>
>
>
> Any suggestions/thoughts/corrections?
>
>
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Monday, October 01, 2007 12:01 PM
> *To:* axis-user@ws.apache.org
>
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> Hi Amila,
>
>
>
> Let me know if I am doing anything wrong here or if I need to change
> anything.
>
>
>
>
>
> - Vish.
>
>
>    ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Friday, September 28, 2007 5:24 PM
> *To:* 'Amila Suriarachchi'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> I also tried using jaxb hoping that it would directly map to java types –
> found 2 problems there.
>
> 1. axis2 does not support unwrapping for jaxb – why is that?
>
> 2. for the same wsdl, I emailed you, it created an interface as follows:
>
> public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
>
> com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
>
> );
>
> But it did not create the class for the complex types
> com.selectica.ws.ecm.wsdlgen.UploadRequestElement and
> OperationStatusElement. Am I doing anything wrong here or is there a problem
> with the axis2 jaxb support?
>
>
>
>
>
> - Vish.
>
>
>    ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Friday, September 28, 2007 1:29 PM
> *To:* 'Amila Suriarachchi'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> For this wsdl – it creates interface as follows:
>
>
>
> public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload
> (
>
> org.apache.xmlbeans.XmlString sessiontoken,
>
> org.apache.xmlbeans.XmlString trackingnumber,
>
> org.apache.xmlbeans.XmlInt version
>
> );
>
>
>
> So the unwrapping here is okay – but I need java.lang,String params
> instead of xmlbeans.XmlString. I know that XmlString contains a string
> finally – but I do not really need that additional wrapper.
>
> Is this happening because of the bindings functionality introduced in
> axis2?
>
> Is it possible in axis2 to do wsdl2java using only POJO types?
>
>
>
>
>    ------------------------------
>
> *From:* Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com]
> *Sent:* Friday, September 28, 2007 2:58 AM
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
>
>
> On 8/23/07, *Pantvaidya, Vishwajit* <vp...@selectica.com> wrote:
>
> Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) – it
> gives error "error: invalid.document.type: Document is not a wsdl file".
>
>
>
> But coming back to original problem – the wsdl used to process fine with
> axis1 resulting in interface with parameters of java types. Hasn't that been
> retained in axis2?
>
>
>
> Tried wsdl2java with ADB to see if that gives me what I want. That also
> completed fine - but resulting classes had all complex type params with
> generated types. So I tried the –uw option – hoping it will unwrap those.
> But now I get error
>
>
>
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema
> format for unwrapping! found unknown type but expected Element
>
>
> this means you  have a  choice or all type in your complex type.
> unwrapping works with the document literal type services. if you can send
> your wsdl I can check.
>
>
>
>
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence
> (SchemaUnwrapperExtension.java :370),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes
> (SchemaUnwrapperExtension.java:198),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema
> (SchemaUnwrapperExtension.java:143),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(
> SchemaUnwrapperExtension.java:94),
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
> CodeGenerationEngine.java:218)
>
>
>
> Any idea what this is about? Is –uw option the right one? What is
> difference between that and –u? It is not very clear from the wsdl2java
> reference.
>
>
> -u let you generate seperate classes.
>
>
>
> - Vish.
>   ------------------------------
>
> *From:* Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com]
> *Sent:* Wednesday, August 22, 2007 8:56 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> can you generate the code using xmlbeans scomp command and see what is the
> type?
> anyway I think XmlString contanins a string inside it.
>
> Amila.
>
> On 8/23/07, *Pantvaidya, Vishwajit* <vp...@selectica.com> wrote:
>
> I think I saw someone with same problem but cannot locate that message. My
> axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the
> generated interface has methods with parameters of type xmlbeans.XmlStringinstead of
> java.lang.String. My expectation was it would map primitives to java
> datatypes and create xmlbeans for complex types. Is this not the case? Do I
> need to switch to ADB to get params with java types?
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>



-- 
Amila Suriarachchi,
WSO2 Inc.

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by M N <mn...@yahoo.com>.
Yes copy the lib files into the ANT classpath and you should be fine.

"Pantvaidya, Vishwajit" <vp...@selectica.com> wrote:        v\:* {behavior:url(#default#VML);}  o\:* {behavior:url(#default#VML);}  w\:* {behavior:url(#default#VML);}  .shape {behavior:url(#default#VML);}        st1\:*{behavior:url(#default#ieooui) }                Hi Amila.
   
  Thanks, but one problem in this - my wsdl2java will run within the framework of an Ant-based build system which will not have access to a complete Axis2 installation i.e. so what would I set AXIS2_HOME to? Is it not possible to just copy relevant jars into my build lib folder and get the wsdl2java working?
   
   
  - Vish.
   
        
---------------------------------
  
  From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com] 
Sent: Thursday, October 04, 2007 11:23 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

   
  some times your AXIS2_HOME may have point to a different location.

Make sure your follow these steps.
1. Get an Axis2 1.3 release or a Nightly build.
2. unpack it and set the axis2 home properly.
3. generate the code with wsdl2java.sh tool with the options I gave 

if this passes then may be a problem with the maven plugin.

Amila.
    On 10/5/07, Pantvaidya, Vishwajit <vp...@selectica.com> wrote:
      Thanks Amila – indeed looks like you are able to get the java output I desire. But when I try my wsdl2java ant task with the same options, it gives the exception "org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element". The moment I comment out the "-uw" flag – it generates the code without unwrapping. So it is accepting the unwrapping flag for the default adb binding.
   
  How were you able to get this to work – it does seem both of us are on axis2 1.3.
   
   
  - Vish.
   
   
        
---------------------------------
  
  From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com] 
Sent: Thursday, October 04, 2007 1:15 AM
    
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String


     
  here is an out put I got with these options

-uri SelecticaECM.wsdl -ss -sd -g -uw

Amila.
    On 10/4/07, Pantvaidya, Vishwajit < vpantvai@selectica.com> wrote:
      Hi Amila,
   
  Am I doing anything wrong in the jaxme/jaxbri options? Or is it not working because their implementation is on a trial basis?
  If jaxme/jaxbri won't work - I was thinking of proceeding with xmlbeans.
   
  Ultimately I need to deal with MTOM attachments – so do I need to choose any particular databinding? The MTOM guide talks about ADB – does that mean that if I use xmlbeans, I cannot exchange attachments via MTOM?
   
   
  - Vish.
   
        
---------------------------------
  
  From: Pantvaidya, Vishwajit 
Sent: Tuesday, October 02, 2007 9:42 AM
To: 'axis-user@ws.apache.org'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

   
  Hi Amila,
   
  By the way, (as mentioned at the beginning of this thread), I am on Axis2 1.3.
   
  The ant task I am using has the following options 
  "-o … –l java –ss –sd –d … –ssi –f –uri … -ns2p …".
  (for the –d option, I have tried adb/xmlbeans/jaxbri/jaxme)
   
  If you are able to generate classes correctly, can you send me a zip of those?
   
   
  Thanks,
   
  Vish.
   
        
---------------------------------
  
  From: Pantvaidya, Vishwajit 
Sent: Monday, October 01, 2007 2:32 PM
To: 'axis-user@ws.apache.org'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

   
  Actually I do see that the complex types are getting generated – but the "-f" option seems to be working erratically, because of which those types got generated with a "src" folder at the topmost level.
  But unwrapping does not work with jaxme/jaxbri/ADB.
   
  My takeaway from this exercise: Axis2 wsdl2java cannot generate same code like axis1 even if wsdl remains same and irrespective of the value of the "-d" wsdl2java option. Just migrating to axis2 forces people to use xmlbeans, adb, etc, and make change in the webservice implementation to handle, for example, xmlbeans.XmlString instead of java.lang.String.
   
  So my options are to:
    
   use jaxme/jaxbri with wrapper classes even for simple webservice operations like login, etc  
   use xmlbeans and change my axis1 implementation to handle XmlString instead of java String.
   
  Any suggestions/thoughts/corrections?
   
   
        
---------------------------------
  
  From: Pantvaidya, Vishwajit 
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org
    Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String


     
  Hi Amila,
   
  Let me know if I am doing anything wrong here or if I need to change anything.
   
   
  - Vish.
   

          
---------------------------------
  
  From: Pantvaidya, Vishwajit 
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

   
  I also tried using jaxb hoping that it would directly map to java types – found 2 problems there.
  1. axis2 does not support unwrapping for jaxb – why is that?
  2. for the same wsdl, I emailed you, it created an interface as follows:
  public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
  com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
  );
  But it did not create the class for the complex types com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. Am I doing anything wrong here or is there a problem with the axis2 jaxb support?
   
   
  - Vish.
   

          
---------------------------------
  
  From: Pantvaidya, Vishwajit 
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

   
  For this wsdl – it creates interface as follows:
   
  public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (
  org.apache.xmlbeans.XmlString sessiontoken,
  org.apache.xmlbeans.XmlString trackingnumber,
  org.apache.xmlbeans.XmlInt version
  );
   
  So the unwrapping here is okay – but I need java.lang,String params instead of xmlbeans.XmlString. I know that XmlString contains a string finally – but I do not really need that additional wrapper.
  Is this happening because of the bindings functionality introduced in axis2?
  Is it possible in axis2 to do wsdl2java using only POJO types?
   
   

          
---------------------------------
  
  From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com] 
Sent: Friday, September 28, 2007 2:58 AM
    To: axis-user@ws.apache.org 
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String


     
   
    On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com> wrote:
      Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) – it gives error "error: invalid.document.type: Document is not a wsdl file".
   
  But coming back to original problem – the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?
   
  Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the –uw option – hoping it will unwrap those. But now I get error
   
  org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element


    
this means you  have a  choice or all type in your complex type. unwrapping works with the document literal type services. if you can send your wsdl I can check. 

     
      org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java :370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)
   
  Any idea what this is about? Is –uw option the right one? What is difference between that and –u? It is not very clear from the wsdl2java reference.


    
-u let you generate seperate classes.

     
      - Vish.
        
---------------------------------
  
  From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com] 
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

     
  can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.
    On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com> wrote:
      I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



  


-- 
Amila Suriarachchi,
WSO2 Inc. 





  


-- 
Amila Suriarachchi,
WSO2 Inc. 











  


-- 
Amila Suriarachchi,
WSO2 Inc. 





  


-- 
Amila Suriarachchi,
WSO2 Inc. 




       
---------------------------------
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us.

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
Hi Amila.

Thanks, but one problem in this - my wsdl2java will run within the framework of an Ant-based build system which will not have access to a complete Axis2 installation i.e. so what would I set AXIS2_HOME to? Is it not possible to just copy relevant jars into my build lib folder and get the wsdl2java working?


- Vish.

________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Thursday, October 04, 2007 11:23 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

some times your AXIS2_HOME may have point to a different location.

Make sure your follow these steps.
1. Get an Axis2 1.3 release or a Nightly build.
2. unpack it and set the axis2 home properly.
3. generate the code with wsdl2java.sh tool with the options I gave

if this passes then may be a problem with the maven plugin.

Amila.
On 10/5/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

Thanks Amila - indeed looks like you are able to get the java output I desire. But when I try my wsdl2java ant task with the same options, it gives the exception "org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element". The moment I comment out the "-uw" flag - it generates the code without unwrapping. So it is accepting the unwrapping flag for the default adb binding.



How were you able to get this to work - it does seem both of us are on axis2 1.3.





- Vish.





________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Thursday, October 04, 2007 1:15 AM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



here is an out put I got with these options

-uri SelecticaECM.wsdl -ss -sd -g -uw

Amila.

On 10/4/07, Pantvaidya, Vishwajit < vpantvai@selectica.com<ma...@selectica.com>> wrote:

Hi Amila,



Am I doing anything wrong in the jaxme/jaxbri options? Or is it not working because their implementation is on a trial basis?

If jaxme/jaxbri won't work - I was thinking of proceeding with xmlbeans.



Ultimately I need to deal with MTOM attachments - so do I need to choose any particular databinding? The MTOM guide talks about ADB - does that mean that if I use xmlbeans, I cannot exchange attachments via MTOM?





- Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Tuesday, October 02, 2007 9:42 AM
To: 'axis-user@ws.apache.org<ma...@ws.apache.org>'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



Hi Amila,



By the way, (as mentioned at the beginning of this thread), I am on Axis2 1.3.



The ant task I am using has the following options

"-o ... -l java -ss -sd -d ... -ssi -f -uri ... -ns2p ...".

(for the -d option, I have tried adb/xmlbeans/jaxbri/jaxme)



If you are able to generate classes correctly, can you send me a zip of those?





Thanks,



Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 2:32 PM
To: 'axis-user@ws.apache.org<ma...@ws.apache.org>'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



Actually I do see that the complex types are getting generated - but the "-f" option seems to be working erratically, because of which those types got generated with a "src" folder at the topmost level.

But unwrapping does not work with jaxme/jaxbri/ADB.



My takeaway from this exercise: Axis2 wsdl2java cannot generate same code like axis1 even if wsdl remains same and irrespective of the value of the "-d" wsdl2java option. Just migrating to axis2 forces people to use xmlbeans, adb, etc, and make change in the webservice implementation to handle, for example, xmlbeans.XmlString instead of java.lang.String.



So my options are to:

 1.  use jaxme/jaxbri with wrapper classes even for simple webservice operations like login, etc
 2.  use xmlbeans and change my axis1 implementation to handle XmlString instead of java String.



Any suggestions/thoughts/corrections?





________________________________

From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>

Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



Hi Amila,



Let me know if I am doing anything wrong here or if I need to change anything.





- Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



I also tried using jaxb hoping that it would directly map to java types - found 2 problems there.

1. axis2 does not support unwrapping for jaxb - why is that?

2. for the same wsdl, I emailed you, it created an interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (

com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement

);

But it did not create the class for the complex types com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. Am I doing anything wrong here or is there a problem with the axis2 jaxb support?





- Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



For this wsdl - it creates interface as follows:



public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (

org.apache.xmlbeans.XmlString sessiontoken,

org.apache.xmlbeans.XmlString trackingnumber,

org.apache.xmlbeans.XmlInt version

);



So the unwrapping here is okay - but I need java.lang,String params instead of xmlbeans.XmlString. I know that XmlString contains a string finally - but I do not really need that additional wrapper.

Is this happening because of the bindings functionality introduced in axis2?

Is it possible in axis2 to do wsdl2java using only POJO types?





________________________________

From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Friday, September 28, 2007 2:58 AM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String





On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives error "error: invalid.document.type: Document is not a wsdl file".



But coming back to original problem - the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?



Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the -uw option - hoping it will unwrap those. But now I get error



org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element

this means you  have a  choice or all type in your complex type. unwrapping works with the document literal type services. if you can send your wsdl I can check.



org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java :370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)



Any idea what this is about? Is -uw option the right one? What is difference between that and -u? It is not very clear from the wsdl2java reference.

-u let you generate seperate classes.



- Vish.

________________________________

From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.

On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by Amila Suriarachchi <am...@gmail.com>.
some times your AXIS2_HOME may have point to a different location.

Make sure your follow these steps.
1. Get an Axis2 1.3 release or a Nightly build.
2. unpack it and set the axis2 home properly.
3. generate the code with wsdl2java.sh tool with the options I gave

if this passes then may be a problem with the maven plugin.

Amila.

On 10/5/07, Pantvaidya, Vishwajit <vp...@selectica.com> wrote:
>
>  Thanks Amila – indeed looks like you are able to get the java output I
> desire. But when I try my wsdl2java ant task with the same options, it gives
> the exception "org.apache.axis2.wsdl.codegen.CodeGenerationException:
> Unsupported Schema format for unwrapping! found unknown type but expected
> Element". The moment I comment out the "-uw" flag – it generates the code
> without unwrapping. So it is accepting the unwrapping flag for the default
> adb binding.
>
>
>
> How were you able to get this to work – it does seem both of us are on
> axis2 1.3.
>
>
>
>
>
> - Vish.
>
>
>
>
>   ------------------------------
>
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* Thursday, October 04, 2007 1:15 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> here is an out put I got with these options
>
> -uri SelecticaECM.wsdl -ss -sd -g -uw
>
> Amila.
>
> On 10/4/07, *Pantvaidya, Vishwajit* < vpantvai@selectica.com> wrote:
>
> Hi Amila,
>
>
>
> Am I doing anything wrong in the jaxme/jaxbri options? Or is it not
> working because their implementation is on a trial basis?
>
> If jaxme/jaxbri won't work - I was thinking of proceeding with xmlbeans.
>
>
>
> Ultimately I need to deal with MTOM attachments – so do I need to choose
> any particular databinding? The MTOM guide talks about ADB – does that mean
> that if I use xmlbeans, I cannot exchange attachments via MTOM?
>
>
>
>
>
> - Vish.
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Tuesday, October 02, 2007 9:42 AM
> *To:* 'axis-user@ws.apache.org'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> Hi Amila,
>
>
>
> By the way, (as mentioned at the beginning of this thread), I am on Axis2
> 1.3.
>
>
>
> The ant task I am using has the following options
>
> "-o … –l java –ss –sd –d … –ssi –f –uri … -ns2p …".
>
> (for the –d option, I have tried adb/xmlbeans/jaxbri/jaxme)
>
>
>
> If you are able to generate classes correctly, can you send me a zip of
> those?
>
>
>
>
>
> Thanks,
>
>
>
> Vish.
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Monday, October 01, 2007 2:32 PM
> *To:* 'axis-user@ws.apache.org'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> Actually I do see that the complex types are getting generated – but the
> "-f" option seems to be working erratically, because of which those types
> got generated with a "src" folder at the topmost level.
>
> But unwrapping does not work with jaxme/jaxbri/ADB.
>
>
>
> My takeaway from this exercise: Axis2 wsdl2java cannot generate same code
> like axis1 even if wsdl remains same and irrespective of the value of the
> "-d" wsdl2java option. Just migrating to axis2 forces people to use
> xmlbeans, adb, etc, and make change in the webservice implementation to
> handle, for example, xmlbeans.XmlString instead of java.lang.String.
>
>
>
> So my options are to:
>
>    1. use jaxme/jaxbri with wrapper classes even for simple webservice
>    operations like login, etc
>    2. use xmlbeans and change my axis1 implementation to handle
>    XmlString instead of java String.
>
>
>
> Any suggestions/thoughts/corrections?
>
>
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Monday, October 01, 2007 12:01 PM
> *To:* axis-user@ws.apache.org
>
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> Hi Amila,
>
>
>
> Let me know if I am doing anything wrong here or if I need to change
> anything.
>
>
>
>
>
> - Vish.
>
>
>    ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Friday, September 28, 2007 5:24 PM
> *To:* 'Amila Suriarachchi'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> I also tried using jaxb hoping that it would directly map to java types –
> found 2 problems there.
>
> 1. axis2 does not support unwrapping for jaxb – why is that?
>
> 2. for the same wsdl, I emailed you, it created an interface as follows:
>
> public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
>
> com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
>
> );
>
> But it did not create the class for the complex types
> com.selectica.ws.ecm.wsdlgen.UploadRequestElement and
> OperationStatusElement. Am I doing anything wrong here or is there a problem
> with the axis2 jaxb support?
>
>
>
>
>
> - Vish.
>
>
>    ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Friday, September 28, 2007 1:29 PM
> *To:* 'Amila Suriarachchi'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> For this wsdl – it creates interface as follows:
>
>
>
> public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload
> (
>
> org.apache.xmlbeans.XmlString sessiontoken,
>
> org.apache.xmlbeans.XmlString trackingnumber,
>
> org.apache.xmlbeans.XmlInt version
>
> );
>
>
>
> So the unwrapping here is okay – but I need java.lang,String params
> instead of xmlbeans.XmlString. I know that XmlString contains a string
> finally – but I do not really need that additional wrapper.
>
> Is this happening because of the bindings functionality introduced in
> axis2?
>
> Is it possible in axis2 to do wsdl2java using only POJO types?
>
>
>
>
>    ------------------------------
>
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* Friday, September 28, 2007 2:58 AM
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
>
>
> On 8/23/07, *Pantvaidya, Vishwajit* <vp...@selectica.com> wrote:
>
> Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) – it
> gives error "error: invalid.document.type: Document is not a wsdl file".
>
>
>
> But coming back to original problem – the wsdl used to process fine with
> axis1 resulting in interface with parameters of java types. Hasn't that been
> retained in axis2?
>
>
>
> Tried wsdl2java with ADB to see if that gives me what I want. That also
> completed fine - but resulting classes had all complex type params with
> generated types. So I tried the –uw option – hoping it will unwrap those.
> But now I get error
>
>
>
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema
> format for unwrapping! found unknown type but expected Element
>
>
> this means you  have a  choice or all type in your complex type.
> unwrapping works with the document literal type services. if you can send
> your wsdl I can check.
>
>
>
>
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence
> (SchemaUnwrapperExtension.java :370),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes
> (SchemaUnwrapperExtension.java:198),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema
> (SchemaUnwrapperExtension.java:143),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(
> SchemaUnwrapperExtension.java:94),
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
> CodeGenerationEngine.java:218)
>
>
>
> Any idea what this is about? Is –uw option the right one? What is
> difference between that and –u? It is not very clear from the wsdl2java
> reference.
>
>
> -u let you generate seperate classes.
>
>
>
> - Vish.
>   ------------------------------
>
> *From:* Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com]
> *Sent:* Wednesday, August 22, 2007 8:56 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> can you generate the code using xmlbeans scomp command and see what is the
> type?
> anyway I think XmlString contanins a string inside it.
>
> Amila.
>
> On 8/23/07, *Pantvaidya, Vishwajit* <vp...@selectica.com> wrote:
>
> I think I saw someone with same problem but cannot locate that message. My
> axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the
> generated interface has methods with parameters of type xmlbeans.XmlStringinstead of
> java.lang.String. My expectation was it would map primitives to java
> datatypes and create xmlbeans for complex types. Is this not the case? Do I
> need to switch to ADB to get params with java types?
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>



-- 
Amila Suriarachchi,
WSO2 Inc.

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
Thanks Amila - indeed looks like you are able to get the java output I desire. But when I try my wsdl2java ant task with the same options, it gives the exception "org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element". The moment I comment out the "-uw" flag - it generates the code without unwrapping. So it is accepting the unwrapping flag for the default adb binding.

How were you able to get this to work - it does seem both of us are on axis2 1.3.


- Vish.


________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Thursday, October 04, 2007 1:15 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

here is an out put I got with these options

-uri SelecticaECM.wsdl -ss -sd -g -uw

Amila.
On 10/4/07, Pantvaidya, Vishwajit < vpantvai@selectica.com<ma...@selectica.com>> wrote:

Hi Amila,



Am I doing anything wrong in the jaxme/jaxbri options? Or is it not working because their implementation is on a trial basis?

If jaxme/jaxbri won't work - I was thinking of proceeding with xmlbeans.



Ultimately I need to deal with MTOM attachments - so do I need to choose any particular databinding? The MTOM guide talks about ADB - does that mean that if I use xmlbeans, I cannot exchange attachments via MTOM?





- Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Tuesday, October 02, 2007 9:42 AM
To: 'axis-user@ws.apache.org<ma...@ws.apache.org>'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



Hi Amila,



By the way, (as mentioned at the beginning of this thread), I am on Axis2 1.3.



The ant task I am using has the following options

"-o ... -l java -ss -sd -d ... -ssi -f -uri ... -ns2p ...".

(for the -d option, I have tried adb/xmlbeans/jaxbri/jaxme)



If you are able to generate classes correctly, can you send me a zip of those?





Thanks,



Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 2:32 PM
To: 'axis-user@ws.apache.org<ma...@ws.apache.org>'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



Actually I do see that the complex types are getting generated - but the "-f" option seems to be working erratically, because of which those types got generated with a "src" folder at the topmost level.

But unwrapping does not work with jaxme/jaxbri/ADB.



My takeaway from this exercise: Axis2 wsdl2java cannot generate same code like axis1 even if wsdl remains same and irrespective of the value of the "-d" wsdl2java option. Just migrating to axis2 forces people to use xmlbeans, adb, etc, and make change in the webservice implementation to handle, for example, xmlbeans.XmlString instead of java.lang.String.



So my options are to:

 1.  use jaxme/jaxbri with wrapper classes even for simple webservice operations like login, etc
 2.  use xmlbeans and change my axis1 implementation to handle XmlString instead of java String.



Any suggestions/thoughts/corrections?





________________________________

From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



Hi Amila,



Let me know if I am doing anything wrong here or if I need to change anything.





- Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



I also tried using jaxb hoping that it would directly map to java types - found 2 problems there.

1. axis2 does not support unwrapping for jaxb - why is that?

2. for the same wsdl, I emailed you, it created an interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (

com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement

);

But it did not create the class for the complex types com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. Am I doing anything wrong here or is there a problem with the axis2 jaxb support?





- Vish.



________________________________

From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



For this wsdl - it creates interface as follows:



public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (

org.apache.xmlbeans.XmlString sessiontoken,

org.apache.xmlbeans.XmlString trackingnumber,

org.apache.xmlbeans.XmlInt version

);



So the unwrapping here is okay - but I need java.lang,String params instead of xmlbeans.XmlString. I know that XmlString contains a string finally - but I do not really need that additional wrapper.

Is this happening because of the bindings functionality introduced in axis2?

Is it possible in axis2 to do wsdl2java using only POJO types?





________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Friday, September 28, 2007 2:58 AM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String





On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives error "error: invalid.document.type: Document is not a wsdl file".



But coming back to original problem - the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?



Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the -uw option - hoping it will unwrap those. But now I get error



org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element

this means you  have a  choice or all type in your complex type. unwrapping works with the document literal type services. if you can send your wsdl I can check.



org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java :370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)



Any idea what this is about? Is -uw option the right one? What is difference between that and -u? It is not very clear from the wsdl2java reference.

-u let you generate seperate classes.



- Vish.

________________________________

From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.

On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by Amila Suriarachchi <am...@gmail.com>.
here is an out put I got with these options

-uri SelecticaECM.wsdl -ss -sd -g -uw

Amila.

On 10/4/07, Pantvaidya, Vishwajit <vp...@selectica.com> wrote:
>
>  Hi Amila,
>
>
>
> Am I doing anything wrong in the jaxme/jaxbri options? Or is it not
> working because their implementation is on a trial basis?
>
> If jaxme/jaxbri won't work - I was thinking of proceeding with xmlbeans.
>
>
>
> Ultimately I need to deal with MTOM attachments – so do I need to choose
> any particular databinding? The MTOM guide talks about ADB – does that mean
> that if I use xmlbeans, I cannot exchange attachments via MTOM?
>
>
>
>
>
> - Vish.
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Tuesday, October 02, 2007 9:42 AM
> *To:* 'axis-user@ws.apache.org'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> Hi Amila,
>
>
>
> By the way, (as mentioned at the beginning of this thread), I am on Axis2
> 1.3.
>
>
>
> The ant task I am using has the following options
>
> "-o … –l java –ss –sd –d … –ssi –f –uri … -ns2p …".
>
> (for the –d option, I have tried adb/xmlbeans/jaxbri/jaxme)
>
>
>
> If you are able to generate classes correctly, can you send me a zip of
> those?
>
>
>
>
>
> Thanks,
>
>
>
> Vish.
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Monday, October 01, 2007 2:32 PM
> *To:* 'axis-user@ws.apache.org'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> Actually I do see that the complex types are getting generated – but the
> "-f" option seems to be working erratically, because of which those types
> got generated with a "src" folder at the topmost level.
>
> But unwrapping does not work with jaxme/jaxbri/ADB.
>
>
>
> My takeaway from this exercise: Axis2 wsdl2java cannot generate same code
> like axis1 even if wsdl remains same and irrespective of the value of the
> "-d" wsdl2java option. Just migrating to axis2 forces people to use
> xmlbeans, adb, etc, and make change in the webservice implementation to
> handle, for example, xmlbeans.XmlString instead of java.lang.String.
>
>
>
> So my options are to:
>
>    1. use jaxme/jaxbri with wrapper classes even for simple webservice
>    operations like login, etc
>    2. use xmlbeans and change my axis1 implementation to handle
>    XmlString instead of java String.
>
>
>
> Any suggestions/thoughts/corrections?
>
>
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Monday, October 01, 2007 12:01 PM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> Hi Amila,
>
>
>
> Let me know if I am doing anything wrong here or if I need to change
> anything.
>
>
>
>
>
> - Vish.
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Friday, September 28, 2007 5:24 PM
> *To:* 'Amila Suriarachchi'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> I also tried using jaxb hoping that it would directly map to java types –
> found 2 problems there.
>
> 1. axis2 does not support unwrapping for jaxb – why is that?
>
> 2. for the same wsdl, I emailed you, it created an interface as follows:
>
> public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
>
> com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
>
> );
>
> But it did not create the class for the complex types
> com.selectica.ws.ecm.wsdlgen.UploadRequestElement and
> OperationStatusElement. Am I doing anything wrong here or is there a problem
> with the axis2 jaxb support?
>
>
>
>
>
> - Vish.
>
>
>   ------------------------------
>
> *From:* Pantvaidya, Vishwajit
> *Sent:* Friday, September 28, 2007 1:29 PM
> *To:* 'Amila Suriarachchi'
> *Subject:* RE: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> For this wsdl – it creates interface as follows:
>
>
>
> public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload
> (
>
> org.apache.xmlbeans.XmlString sessiontoken,
>
> org.apache.xmlbeans.XmlString trackingnumber,
>
> org.apache.xmlbeans.XmlInt version
>
> );
>
>
>
> So the unwrapping here is okay – but I need java.lang,String params
> instead of xmlbeans.XmlString. I know that XmlString contains a string
> finally – but I do not really need that additional wrapper.
>
> Is this happening because of the bindings functionality introduced in
> axis2?
>
> Is it possible in axis2 to do wsdl2java using only POJO types?
>
>
>
>
>   ------------------------------
>
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* Friday, September 28, 2007 2:58 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
>
>
> On 8/23/07, *Pantvaidya, Vishwajit* <vp...@selectica.com> wrote:
>
> Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) – it
> gives error "error: invalid.document.type: Document is not a wsdl file".
>
>
>
> But coming back to original problem – the wsdl used to process fine with
> axis1 resulting in interface with parameters of java types. Hasn't that been
> retained in axis2?
>
>
>
> Tried wsdl2java with ADB to see if that gives me what I want. That also
> completed fine - but resulting classes had all complex type params with
> generated types. So I tried the –uw option – hoping it will unwrap those.
> But now I get error
>
>
>
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema
> format for unwrapping! found unknown type but expected Element
>
>
> this means you  have a  choice or all type in your complex type.
> unwrapping works with the document literal type services. if you can send
> your wsdl I can check.
>
>
>
>
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence
> (SchemaUnwrapperExtension.java:370),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes
> (SchemaUnwrapperExtension.java:198),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema
> (SchemaUnwrapperExtension.java:143),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(
> SchemaUnwrapperExtension.java:94),
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
> CodeGenerationEngine.java:218)
>
>
>
> Any idea what this is about? Is –uw option the right one? What is
> difference between that and –u? It is not very clear from the wsdl2java
> reference.
>
>
> -u let you generate seperate classes.
>
>
>
> - Vish.
>   ------------------------------
>
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* Wednesday, August 22, 2007 8:56 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> can you generate the code using xmlbeans scomp command and see what is the
> type?
> anyway I think XmlString contanins a string inside it.
>
> Amila.
>
> On 8/23/07, *Pantvaidya, Vishwajit* <vp...@selectica.com> wrote:
>
> I think I saw someone with same problem but cannot locate that message. My
> axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the
> generated interface has methods with parameters of type xmlbeans.XmlStringinstead of
> java.lang.String. My expectation was it would map primitives to java
> datatypes and create xmlbeans for complex types. Is this not the case? Do I
> need to switch to ADB to get params with java types?
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>



-- 
Amila Suriarachchi,
WSO2 Inc.

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
Hi Amila,

Am I doing anything wrong in the jaxme/jaxbri options? Or is it not working because their implementation is on a trial basis?
If jaxme/jaxbri won't work - I was thinking of proceeding with xmlbeans.

Ultimately I need to deal with MTOM attachments - so do I need to choose any particular databinding? The MTOM guide talks about ADB - does that mean that if I use xmlbeans, I cannot exchange attachments via MTOM?


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Tuesday, October 02, 2007 9:42 AM
To: 'axis-user@ws.apache.org'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Hi Amila,

By the way, (as mentioned at the beginning of this thread), I am on Axis2 1.3.

The ant task I am using has the following options
"-o ... -l java -ss -sd -d ... -ssi -f -uri ... -ns2p ...".
(for the -d option, I have tried adb/xmlbeans/jaxbri/jaxme)

If you are able to generate classes correctly, can you send me a zip of those?


Thanks,

Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 2:32 PM
To: 'axis-user@ws.apache.org'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Actually I do see that the complex types are getting generated - but the "-f" option seems to be working erratically, because of which those types got generated with a "src" folder at the topmost level.
But unwrapping does not work with jaxme/jaxbri/ADB.

My takeaway from this exercise: Axis2 wsdl2java cannot generate same code like axis1 even if wsdl remains same and irrespective of the value of the "-d" wsdl2java option. Just migrating to axis2 forces people to use xmlbeans, adb, etc, and make change in the webservice implementation to handle, for example, xmlbeans.XmlString instead of java.lang.String.

So my options are to:

 1.  use jaxme/jaxbri with wrapper classes even for simple webservice operations like login, etc
 2.  use xmlbeans and change my axis1 implementation to handle XmlString instead of java String.

Any suggestions/thoughts/corrections?


________________________________
From: Pantvaidya, Vishwajit
Sent: Monday, October 01, 2007 12:01 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Hi Amila,

Let me know if I am doing anything wrong here or if I need to change anything.


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 5:24 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

I also tried using jaxb hoping that it would directly map to java types - found 2 problems there.
1. axis2 does not support unwrapping for jaxb - why is that?
2. for the same wsdl, I emailed you, it created an interface as follows:
public com.selectica.ws.ecm.wsdlgen.OperationStatusElement Upload (
com.selectica.ws.ecm.wsdlgen.UploadRequestElement uploadRequestElement
);
But it did not create the class for the complex types com.selectica.ws.ecm.wsdlgen.UploadRequestElement and OperationStatusElement. Am I doing anything wrong here or is there a problem with the axis2 jaxb support?


- Vish.

________________________________
From: Pantvaidya, Vishwajit
Sent: Friday, September 28, 2007 1:29 PM
To: 'Amila Suriarachchi'
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

For this wsdl - it creates interface as follows:

public com.selectica.ws.ecm.wsdlgen.OperationStatusElementDocument Upload (
org.apache.xmlbeans.XmlString sessiontoken,
org.apache.xmlbeans.XmlString trackingnumber,
org.apache.xmlbeans.XmlInt version
);

So the unwrapping here is okay - but I need java.lang,String params instead of xmlbeans.XmlString. I know that XmlString contains a string finally - but I do not really need that additional wrapper.
Is this happening because of the bindings functionality introduced in axis2?
Is it possible in axis2 to do wsdl2java using only POJO types?


________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Friday, September 28, 2007 2:58 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String


On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives error "error: invalid.document.type: Document is not a wsdl file".



But coming back to original problem - the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?



Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the -uw option - hoping it will unwrap those. But now I get error



org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element

this means you  have a  choice or all type in your complex type. unwrapping works with the document literal type services. if you can send your wsdl I can check.


org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java:370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)



Any idea what this is about? Is -uw option the right one? What is difference between that and -u? It is not very clear from the wsdl2java reference.

-u let you generate seperate classes.


- Vish.

________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com<ma...@gmail.com>]
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String



can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.

On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



--
Amila Suriarachchi,
WSO2 Inc.



--
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by Amila Suriarachchi <am...@gmail.com>.
On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com> wrote:
>
>  Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) – it
> gives error "error: invalid.document.type: Document is not a wsdl file".
>
>
>
> But coming back to original problem – the wsdl used to process fine with
> axis1 resulting in interface with parameters of java types. Hasn't that been
> retained in axis2?
>
>
>
> Tried wsdl2java with ADB to see if that gives me what I want. That also
> completed fine - but resulting classes had all complex type params with
> generated types. So I tried the –uw option – hoping it will unwrap those.
> But now I get error
>
>
>
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema
> format for unwrapping! found unknown type but expected Element
>

this means you  have a  choice or all type in your complex type. unwrapping
works with the document literal type services. if you can send your wsdl I
can check.

org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence
> (SchemaUnwrapperExtension.java:370),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes
> (SchemaUnwrapperExtension.java:198),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema
> (SchemaUnwrapperExtension.java:143),
> org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(
> SchemaUnwrapperExtension.java:94),
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
> CodeGenerationEngine.java:218)
>
>
>
> Any idea what this is about? Is –uw option the right one? What is
> difference between that and –u? It is not very clear from the wsdl2java
> reference.
>

-u let you generate seperate classes.

- Vish.
>   ------------------------------
>
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* Wednesday, August 22, 2007 8:56 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [Axis2]wsdl2java with xmlbeans creates interface with
> xmlbeans.XmlString instead of java.lang.String
>
>
>
> can you generate the code using xmlbeans scomp command and see what is the
> type?
> anyway I think XmlString contanins a string inside it.
>
> Amila.
>
> On 8/23/07, *Pantvaidya, Vishwajit* <vp...@selectica.com> wrote:
>
> I think I saw someone with same problem but cannot locate that message. My
> axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the
> generated interface has methods with parameters of type xmlbeans.XmlStringinstead of
> java.lang.String. My expectation was it would map primitives to java
> datatypes and create xmlbeans for complex types. Is this not the case? Do I
> need to switch to ADB to get params with java types?
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>



-- 
Amila Suriarachchi,
WSO2 Inc.

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
This is still not working for me in axis2 (it worked in axis1)

With "-d xmlbeans -uw" - the generated methods have org.apache.xmlbeans.XmlString instead of java.lang.String for a string parameter
With "-d adb" (it does not let me specify "-uw") - generated methods have complex types (since it does not let me specify unwrapping here thru' the -uw option)

How can I run wsdl2java so that the resultant web service interface methods use java.lang.String instead of xmlbeans.XmlString?



________________________________
From: Pantvaidya, Vishwajit [mailto:vpantvai@selectica.com]
Sent: Wednesday, August 22, 2007 9:19 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives error "error: invalid.document.type: Document is not a wsdl file".

But coming back to original problem - the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?

Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the -uw option - hoping it will unwrap those. But now I get error

org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element

org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java:370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)

Any idea what this is about? Is -uw option the right one? What is difference between that and -u? It is not very clear from the wsdl2java reference.


- Vish.
________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.
On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



--
Amila Suriarachchi,
WSO2 Inc.

RE: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
Tried scomp with xmlbeans 2.2.0 (same version as bundled with axis2) - it gives error "error: invalid.document.type: Document is not a wsdl file".

But coming back to original problem - the wsdl used to process fine with axis1 resulting in interface with parameters of java types. Hasn't that been retained in axis2?

Tried wsdl2java with ADB to see if that gives me what I want. That also completed fine - but resulting classes had all complex type params with generated types. So I tried the -uw option - hoping it will unwrap those. But now I get error

org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema format for unwrapping! found unknown type but expected Element

org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java:370), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:198), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:143), org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:94), org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)

Any idea what this is about? Is -uw option the right one? What is difference between that and -u? It is not very clear from the wsdl2java reference.


- Vish.
________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Wednesday, August 22, 2007 8:56 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

can you generate the code using xmlbeans scomp command and see what is the type?
anyway I think XmlString contanins a string inside it.

Amila.
On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

I think I saw someone with same problem but cannot locate that message. My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the generated interface has methods with parameters of type xmlbeans.XmlString instead of java.lang.String. My expectation was it would map primitives to java datatypes and create xmlbeans for complex types. Is this not the case? Do I need to switch to ADB to get params with java types?



--
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2]wsdl2java with xmlbeans creates interface with xmlbeans.XmlString instead of java.lang.String

Posted by Amila Suriarachchi <am...@gmail.com>.
can you generate the code using xmlbeans scomp command and see what is the
type?
anyway I think XmlString contanins a string inside it.

Amila.

On 8/23/07, Pantvaidya, Vishwajit <vp...@selectica.com> wrote:
>
>  I think I saw someone with same problem but cannot locate that message.
> My axis2 1.3 wsdl2java with xmlbeans is completing successfully. But the
> generated interface has methods with parameters of type xmlbeans.XmlStringinstead of
> java.lang.String. My expectation was it would map primitives to java
> datatypes and create xmlbeans for complex types. Is this not the case? Do I
> need to switch to ADB to get params with java types?
>



-- 
Amila Suriarachchi,
WSO2 Inc.