You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Ping Liu <pi...@gmail.com> on 2011/04/27 07:34:33 UTC

[Axis2] Axis2 Quick Start Guide for WSDL 2.0?

Like Axis2 QuickStart Guide

        http://axis.apache.org/axis2/java/core/docs/quickstartguide.html
(this is for WSDL 1.1)

But does anybody know where and whether there is a similar guide for WSDL
2.0?

In particular, I am trying to write a service client like ADB client (
http://axis.apache.org/axis2/java/core/docs/quickstartguide.html#clientadb)
but need to make it call the service that renders WSDL 2.0 instead of WSDL
1.1.

Thanks!

Ping

Re: [Axis2] Axis2 Quick Start Guide for WSDL 2.0?

Posted by Ping Liu <pi...@gmail.com>.
Hi Sagara,

Please let me add some specific example to my previous e-mail explanation.
Let's see this comparison.

In Axis2 QuickStart Guide (ADBClient.java),

StockQuoteServiceStub stub =
                new StockQuoteServiceStub
                ("http://localhost:8080/axis2/services/StockQuoteService");

It certainly works.

In browser, the WSDL can be viewed as either

http://localhost:8080/axis2/services/StockQuoteService?wsdl

or

http://localhost:8080/axis2/services/StockQuoteService?wsdl20


QuickStart Guide generated server code and client code based on *WSDL
1.1*format.


But in my case, if I have

StockQuoteServiceWSDL20Stub stub =
                new StockQuoteServiceWSDL20Stub

("http://localhost:8080/axis2/services/StockQuoteServiceWSDL20");

it would fail.

In browser, the WSDL can be viewed as

http://localhost:8080/axis2/services/StockQuoteServiceWSDL20?wsdl20

however

http://localhost:8080/axis2/services/StockQuoteServiceWSDL20?wsdl

would fail and give error.

The error message is

*[java] org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
Operation not found is
http://localhost:8080/axis2/services/StockQuoteServiceWSDL20 and the WSA
Action = null. If this EPR was previously reachable, please contact the
server administrator.*

StockQuoteServiceWSDL20 generates service code and client code based on *WSDL
2.0* format.

Thanks!

Ping


On Sun, May 1, 2011 at 11:52 PM, Ping Liu <pi...@gmail.com> wrote:

> Hi Sagara,
>
> Thanks for your message!
>
> I probably didn't describe my question in more clear way.  Now please allow
> me to reiterate the question.
>
> Yes, by adding arguments to WSDL2JAVA tool, I was able to successfully
> generate both server side Java code and client side Java code (skeleton,
> stub...) based on the given WSDL (which is in WSDL 2.0 format).  My goal is
> to verify whether these generated Java code actually work correctly.
>
> To do so, I try to write a service client just like the ADBClient described
> in QuickStart Guide in Axis2 website at
> http://axis.apache.org/axis2/java/core/docs/quickstartguide.html#clientadb.
> Then I can have the server running locally and have the client send request
> to the server and receive response from the server.
>
> However, the ADBClient in Axis2 QuickStart Guide is for WSDL 1.1 while I
> have to write a client that will deal with WSDL 2.0.  This is where I am
> stuck.  I can follow the QuickStart Guide to write a client for WSDL 1.1.
> But I don't know how to write a client for WSDL 2.0.
>
> In summary, I need help on how to write a client for WSDL 2.0.  I have
> skeleton, stub generated but don't know how to write a correct service
> client to use the stub and therefore test whether the generated skeleton,
> stub, etc really work.
>
> Thanks Sagara!
>
> Ping
>
>
>
>
> On Sun, May 1, 2011 at 8:31 AM, Sagara Gunathunga <
> sagara.gunathunga@gmail.com> wrote:
>
>> On Wed, Apr 27, 2011 at 11:04 AM, Ping Liu <pi...@gmail.com>
>> wrote:
>> >
>> > Like Axis2 QuickStart Guide
>> >
>> >
>> http://axis.apache.org/axis2/java/core/docs/quickstartguide.html
>> > (this is for WSDL 1.1)
>> >
>> > But does anybody know where and whether there is a similar guide for
>> WSDL
>> > 2.0?
>> >
>> > In particular, I am trying to write a service client like ADB client
>> > (
>> http://axis.apache.org/axis2/java/core/docs/quickstartguide.html#clientadb
>> )
>> > but need to make it call the service that renders WSDL 2.0 instead of
>> WSDL
>> > 1.1.
>>
>> I don't think such guide exists also note that above mentioned quick
>> start guide is not specific for any WSDL version. In order to works
>> with WSDL 2.0 you need to add few options according to the tool you
>> used. In briefly following are the 3 use cases you need to add extra
>> options to works with WSDL 2.0.
>>
>> 1.)  Generate dynamic WSDL 2.0 document  form any given service -
>>
>> Add "wsdl2" end of the WSDL request URL.
>>  e.g - http://localhost:8080/axis2/SimpleService?wsdl2
>>
>>
>> 2.) Generate server side java codes from given WSDL 2.0 document
>> (contract first) or  generate client side java codes from any given
>> WSDL 2.0 document -
>>
>> Add -wv 2.0 option to the WSDL2JAVA tool , WSDL2JAVA Maven plugin and
>> Ant Task also support for this option.
>>
>>
>> 3.) Generate WSDL 2.0 documents from java artifacts -
>>
>> Add -wv 2.0 option to the JAVA2WSDL tool
>>
>>
>>
>> All of above options are mentioned in the relevant pages of user guide.
>>
>> Thanks !
>>
>>
>>
>> >
>> > Thanks!
>> >
>> > Ping
>> >
>> >
>>
>>
>>
>> --
>> Sagara Gunathunga
>>
>> Blog - http://ssagara.blogspot.com
>> Web - http://people.apache.org/~sagara/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>>
>

Re: [Axis2] Axis2 Quick Start Guide for WSDL 2.0?

Posted by Ping Liu <pi...@gmail.com>.
Hi Sagara,

Thanks for your message!

I probably didn't describe my question in more clear way.  Now please allow
me to reiterate the question.

Yes, by adding arguments to WSDL2JAVA tool, I was able to successfully
generate both server side Java code and client side Java code (skeleton,
stub...) based on the given WSDL (which is in WSDL 2.0 format).  My goal is
to verify whether these generated Java code actually work correctly.

To do so, I try to write a service client just like the ADBClient described
in QuickStart Guide in Axis2 website at
http://axis.apache.org/axis2/java/core/docs/quickstartguide.html#clientadb.
Then I can have the server running locally and have the client send request
to the server and receive response from the server.

However, the ADBClient in Axis2 QuickStart Guide is for WSDL 1.1 while I
have to write a client that will deal with WSDL 2.0.  This is where I am
stuck.  I can follow the QuickStart Guide to write a client for WSDL 1.1.
But I don't know how to write a client for WSDL 2.0.

In summary, I need help on how to write a client for WSDL 2.0.  I have
skeleton, stub generated but don't know how to write a correct service
client to use the stub and therefore test whether the generated skeleton,
stub, etc really work.

Thanks Sagara!

Ping



On Sun, May 1, 2011 at 8:31 AM, Sagara Gunathunga <
sagara.gunathunga@gmail.com> wrote:

> On Wed, Apr 27, 2011 at 11:04 AM, Ping Liu <pi...@gmail.com> wrote:
> >
> > Like Axis2 QuickStart Guide
> >
> >         http://axis.apache.org/axis2/java/core/docs/quickstartguide.html
> > (this is for WSDL 1.1)
> >
> > But does anybody know where and whether there is a similar guide for WSDL
> > 2.0?
> >
> > In particular, I am trying to write a service client like ADB client
> > (
> http://axis.apache.org/axis2/java/core/docs/quickstartguide.html#clientadb
> )
> > but need to make it call the service that renders WSDL 2.0 instead of
> WSDL
> > 1.1.
>
> I don't think such guide exists also note that above mentioned quick
> start guide is not specific for any WSDL version. In order to works
> with WSDL 2.0 you need to add few options according to the tool you
> used. In briefly following are the 3 use cases you need to add extra
> options to works with WSDL 2.0.
>
> 1.)  Generate dynamic WSDL 2.0 document  form any given service -
>
> Add "wsdl2" end of the WSDL request URL.
>  e.g - http://localhost:8080/axis2/SimpleService?wsdl2
>
>
> 2.) Generate server side java codes from given WSDL 2.0 document
> (contract first) or  generate client side java codes from any given
> WSDL 2.0 document -
>
> Add -wv 2.0 option to the WSDL2JAVA tool , WSDL2JAVA Maven plugin and
> Ant Task also support for this option.
>
>
> 3.) Generate WSDL 2.0 documents from java artifacts -
>
> Add -wv 2.0 option to the JAVA2WSDL tool
>
>
>
> All of above options are mentioned in the relevant pages of user guide.
>
> Thanks !
>
>
>
> >
> > Thanks!
> >
> > Ping
> >
> >
>
>
>
> --
> Sagara Gunathunga
>
> Blog - http://ssagara.blogspot.com
> Web - http://people.apache.org/~sagara/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: [Axis2] Axis2 Quick Start Guide for WSDL 2.0?

Posted by Sagara Gunathunga <sa...@gmail.com>.
On Wed, Apr 27, 2011 at 11:04 AM, Ping Liu <pi...@gmail.com> wrote:
>
> Like Axis2 QuickStart Guide
>
>         http://axis.apache.org/axis2/java/core/docs/quickstartguide.html
> (this is for WSDL 1.1)
>
> But does anybody know where and whether there is a similar guide for WSDL
> 2.0?
>
> In particular, I am trying to write a service client like ADB client
> (http://axis.apache.org/axis2/java/core/docs/quickstartguide.html#clientadb)
> but need to make it call the service that renders WSDL 2.0 instead of WSDL
> 1.1.

I don't think such guide exists also note that above mentioned quick
start guide is not specific for any WSDL version. In order to works
with WSDL 2.0 you need to add few options according to the tool you
used. In briefly following are the 3 use cases you need to add extra
options to works with WSDL 2.0.

1.)  Generate dynamic WSDL 2.0 document  form any given service -

Add "wsdl2" end of the WSDL request URL.
 e.g - http://localhost:8080/axis2/SimpleService?wsdl2


2.) Generate server side java codes from given WSDL 2.0 document
(contract first) or  generate client side java codes from any given
WSDL 2.0 document -

Add -wv 2.0 option to the WSDL2JAVA tool , WSDL2JAVA Maven plugin and
Ant Task also support for this option.


3.) Generate WSDL 2.0 documents from java artifacts -

Add -wv 2.0 option to the JAVA2WSDL tool



All of above options are mentioned in the relevant pages of user guide.

Thanks !



>
> Thanks!
>
> Ping
>
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://people.apache.org/~sagara/

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