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 Steve Cohen <sc...@javactivity.org> on 2008/09/30 17:16:14 UTC

WSDL2Java behavior

running command line WSDL2Java, (axis2 1.4.1) with following options

-o {root of my source tree} -t -d adb -u -ssi -wv 1.1 -or -Ejavaversion 
1.5 -uri {my wsdl}


I find the following source code generation pattern:
In reasonable packages under source, it generates data classes from the 
WSDL, say   com.whatever.City1.java
com.whatever.State1.java

But it also generates (in the default package)
City0.java
State0.java

What could be causing it to generate these extra classes in the default 
package and is there anything I can or should do about it.

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


Re: WSDL2Java behavior

Posted by keith chapman <ke...@gmail.com>.
You might wanna use the -uw option (Unwrap) which generates better method
signatures for you.

Thanks,
Keith.

On Wed, Oct 1, 2008 at 9:59 PM, Steve Cohen <sc...@javactivity.org> wrote:

> Any luck in figuring out why this WSDL generates such gnarly code?  It is a
> real pain to work with all these nested objects that WSDL2Java created for
> me.  What should be simple setters and getters are a nightmare.
>
>
>
> Steve Cohen wrote:
>
>> I'm not sure.  I now see that each xxx_type1 class uses the xxx_type0.
>>
>> In any case, the WSDL in question is available here:
>>
>> https://duoshare.com/dsWS/services/PostML/wsdl
>>
>>
>> Martin Gainty wrote:
>>
>>> Good Morning Mr Cohen
>>>
>>> there appears to be a double definition for City and State entities
>>> can you display the WSDL so we can reproduce here?
>>>
>>> thanks
>>> Martin
>>> ______________________________________________
>>> Disclaimer and confidentiality note
>>> Everything in this e-mail and any attachments relates to the official
>>> business of Sender. This transmission is of a confidential nature and Sender
>>> does not endorse distribution to any party other than intended recipient.
>>> Sender does not necessarily endorse content contained within this
>>> transmission.
>>>
>>>
>>> > Date: Tue, 30 Sep 2008 10:16:14 -0500
>>> > From: scohen@javactivity.org
>>> > To: axis-user@ws.apache.org
>>> > Subject: WSDL2Java behavior
>>> >
>>> > running command line WSDL2Java, (axis2 1.4.1) with following options
>>> >
>>> > -o {root of my source tree} -t -d adb -u -ssi -wv 1.1 -or -Ejavaversion
>>> > 1.5 -uri {my wsdl}
>>> >
>>> >
>>> > I find the following source code generation pattern:
>>> > In reasonable packages under source, it generates data classes from the
>>> > WSDL, say com.whatever.City1.java
>>> > com.whatever.State1.java
>>> >
>>> > But it also generates (in the default package)
>>> > City0.java
>>> > State0.java
>>> >
>>> > What could be causing it to generate these extra classes in the default
>>> > package and is there anything I can or should do about it.
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> > For additional commands, e-mail: axis-user-help@ws.apache.org
>>> >
>>>
>>> ------------------------------------------------------------------------
>>> Stay up to date on your PC, the Web, and your mobile phone with Windows
>>> Live. See Now <
>>> http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Re: WSDL2Java behavior

Posted by Steve Cohen <sc...@javactivity.org>.
Any luck in figuring out why this WSDL generates such gnarly code?  It 
is a real pain to work with all these nested objects that WSDL2Java 
created for me.  What should be simple setters and getters are a nightmare.


Steve Cohen wrote:
> I'm not sure.  I now see that each xxx_type1 class uses the xxx_type0.
>
> In any case, the WSDL in question is available here:
>
> https://duoshare.com/dsWS/services/PostML/wsdl
>
>
> Martin Gainty wrote:
>> Good Morning Mr Cohen
>>
>> there appears to be a double definition for City and State entities
>> can you display the WSDL so we can reproduce here?
>>
>> thanks
>> Martin
>> ______________________________________________
>> Disclaimer and confidentiality note
>> Everything in this e-mail and any attachments relates to the official 
>> business of Sender. This transmission is of a confidential nature and 
>> Sender does not endorse distribution to any party other than intended 
>> recipient. Sender does not necessarily endorse content contained 
>> within this transmission.
>>
>>
>> > Date: Tue, 30 Sep 2008 10:16:14 -0500
>> > From: scohen@javactivity.org
>> > To: axis-user@ws.apache.org
>> > Subject: WSDL2Java behavior
>> >
>> > running command line WSDL2Java, (axis2 1.4.1) with following options
>> >
>> > -o {root of my source tree} -t -d adb -u -ssi -wv 1.1 -or 
>> -Ejavaversion
>> > 1.5 -uri {my wsdl}
>> >
>> >
>> > I find the following source code generation pattern:
>> > In reasonable packages under source, it generates data classes from 
>> the
>> > WSDL, say com.whatever.City1.java
>> > com.whatever.State1.java
>> >
>> > But it also generates (in the default package)
>> > City0.java
>> > State0.java
>> >
>> > What could be causing it to generate these extra classes in the 
>> default
>> > package and is there anything I can or should do about it.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> > For additional commands, e-mail: axis-user-help@ws.apache.org
>> >
>>
>> ------------------------------------------------------------------------
>> Stay up to date on your PC, the Web, and your mobile phone with 
>> Windows Live. See Now 
>> <http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>


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


Re: WSDL2Java behavior

Posted by Steve Cohen <sc...@javactivity.org>.
I'm not sure.  I now see that each xxx_type1 class uses the xxx_type0.

In any case, the WSDL in question is available here:

https://duoshare.com/dsWS/services/PostML/wsdl


Martin Gainty wrote:
> Good Morning Mr Cohen
>
> there appears to be a double definition for City and State entities
> can you display the WSDL so we can reproduce here?
>
> thanks
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official 
> business of Sender. This transmission is of a confidential nature and 
> Sender does not endorse distribution to any party other than intended 
> recipient. Sender does not necessarily endorse content contained 
> within this transmission.
>
>
> > Date: Tue, 30 Sep 2008 10:16:14 -0500
> > From: scohen@javactivity.org
> > To: axis-user@ws.apache.org
> > Subject: WSDL2Java behavior
> >
> > running command line WSDL2Java, (axis2 1.4.1) with following options
> >
> > -o {root of my source tree} -t -d adb -u -ssi -wv 1.1 -or -Ejavaversion
> > 1.5 -uri {my wsdl}
> >
> >
> > I find the following source code generation pattern:
> > In reasonable packages under source, it generates data classes from the
> > WSDL, say com.whatever.City1.java
> > com.whatever.State1.java
> >
> > But it also generates (in the default package)
> > City0.java
> > State0.java
> >
> > What could be causing it to generate these extra classes in the default
> > package and is there anything I can or should do about it.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
>
> ------------------------------------------------------------------------
> Stay up to date on your PC, the Web, and your mobile phone with 
> Windows Live. See Now 
> <http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/>


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


RE: WSDL2Java behavior

Posted by Martin Gainty <mg...@hotmail.com>.
Good Morning Mr Cohen

there appears to be a double definition for City and State entities
can you display the WSDL so we can reproduce here?

thanks
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> Date: Tue, 30 Sep 2008 10:16:14 -0500
> From: scohen@javactivity.org
> To: axis-user@ws.apache.org
> Subject: WSDL2Java behavior
> 
> running command line WSDL2Java, (axis2 1.4.1) with following options
> 
> -o {root of my source tree} -t -d adb -u -ssi -wv 1.1 -or -Ejavaversion 
> 1.5 -uri {my wsdl}
> 
> 
> I find the following source code generation pattern:
> In reasonable packages under source, it generates data classes from the 
> WSDL, say   com.whatever.City1.java
> com.whatever.State1.java
> 
> But it also generates (in the default package)
> City0.java
> State0.java
> 
> What could be causing it to generate these extra classes in the default 
> package and is there anything I can or should do about it.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 

_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/

Re: WSDL2Java behavior

Posted by don t <do...@verizonwireless.com>.
Hi, this seems to occur when the WSDL has XML schema restrictions and you
then run wsdl2java with the default ADB binding. It seems the type1 classes
are wrappers that enforce the XML schema restrictions in the setters. 

One way to work around this is create your own Java beans and use JiBX data
binding. However there is significant amount of work and learning when using
a different data binding.


Steve Cohen wrote:
> 
> running command line WSDL2Java, (axis2 1.4.1) with following options
> 
> -o {root of my source tree} -t -d adb -u -ssi -wv 1.1 -or -Ejavaversion 
> 1.5 -uri {my wsdl}
> 
> 
> I find the following source code generation pattern:
> In reasonable packages under source, it generates data classes from the 
> WSDL, say   com.whatever.City1.java
> com.whatever.State1.java
> 
> But it also generates (in the default package)
> City0.java
> State0.java
> 
> What could be causing it to generate these extra classes in the default 
> package and is there anything I can or should do about it.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/WSDL2Java-behavior-tp19744185p19771435.html
Sent from the Axis - User mailing list archive at Nabble.com.


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