You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ping Liu <pi...@gmail.com> on 2011/04/23 23:11:18 UTC

How to write Web Service client for WSDL 2.0?

Hi,

I got the following error when writing a testing Web Service client.

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

The service itself is generated by WSDL 2.0 and the WSDL can be viewed
successfully at

http://localhost:8080/axis2/services/reservationService?wsdl2

However, if don't explicitly spell out wsdl2, that is if using
http://localhost:8080/axis2/services/reservationService, I'll get the same
error shown in the web page like this.

*<soapenv:Reason>
<soapenv:Text xml:lang="en-US">
The endpoint reference (EPR) for the Operation not found is
/axis2/services/reservationService and the WSA Action = null. If this EPR
was previously reachable, please contact the server administrator.
</soapenv:Text>
</soapenv:Reason>*

In the testing client class, I am using

ReservationServiceStub stub = new ReservationServiceStub("
http://localhost:8080/axis2/services/reservationService");

I guess I have to set something for this ReservationServiceStub so that the
stub will know to look for wsdl2 instead.

Could anybody let me know how or point me to some helpful resource like
tutorial etc?

Thanks!

Ping

Re: How to write Web Service client for WSDL 2.0?

Posted by Sagara Gunathunga <sa...@gmail.com>.
On Sun, Apr 24, 2011 at 2:41 AM, Ping Liu <pi...@gmail.com> wrote:
> Hi,
>
> I got the following error when writing a testing Web Service client.
>
>      [java] org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
> Ope
> ration not found is http://localhost:8080/axis2/services/reservationService
> and
> the WSA Action = null. If this EPR was previously reachable, please contact
> the
> server administrator.
>
> The service itself is generated by WSDL 2.0 and the WSDL can be viewed
> successfully at
>
> http://localhost:8080/axis2/services/reservationService?wsdl2
>
> However, if don't explicitly spell out wsdl2, that is if using
> http://localhost:8080/axis2/services/reservationService, I'll get the same
> error shown in the web page like this.
>
> <soapenv:Reason>
> <soapenv:Text xml:lang="en-US">
> The endpoint reference (EPR) for the Operation not found is
> /axis2/services/reservationService and the WSA Action = null. If this EPR
> was previously reachable, please contact the server administrator.
> </soapenv:Text>
> </soapenv:Reason>
>
> In the testing client class, I am using
>
> ReservationServiceStub stub = new
> ReservationServiceStub("http://localhost:8080/axis2/services/reservationService");
>
> I guess I have to set something for this ReservationServiceStub so that the
> stub will know to look for wsdl2 instead.

It is important to differentiate use of WSDL and messaging protocols
( SOAP) in context of web service. Primarily WSDL used to describe
your service . You can use a tool like WSDL2JAVA to generate Java
codes from any WSDL document then the stub is responsible for
marshaling/unmarshalling  SOAP messages and invoke the real service
for you.  Once you invoke a service, both the stub and the service
don't have any run time association with WSDL.

Can you write steps that you have followed so far ?

Thanks !


> Could anybody let me know how or point me to some helpful resource like
> tutorial etc?
>
> 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] Re: How to write Web Service client for WSDL 2.0?

Posted by Ping Liu <pi...@gmail.com>.
Hey Suresh,
Your guess is correct -- it is set to "true"!

Sagara,
I am attaching the services.xml.  It was also generated during the wsdl2java
execution.  Please let me know if there is anything else to be configured
besides the useOriginalwsdl parameter setting that Suresh mentioned below.

Thanks!

Ping


On Thu, May 5, 2011 at 9:56 PM, suresh attanayake <
suresh.attanayake@gmail.com> wrote:

> Hi Ping Lu,
>
> Please check your serives.xml of the scenario 2 service. Check if the
> following parameter in the services.xml has the value "true".
>
> "<parameter name="useOriginalwsdl">true</parameter>"
>
> It seems by default Axis2 makes the value "true" for the generated services
> using wsdl2. if you set the value to "false", then you can see both wsdl and
> wsdl2.
>
> Suresh..!
>
>
>
> On Thu, May 5, 2011 at 10:30 PM, Ping Liu <pi...@gmail.com> wrote:
>
>> Hi Suresh,
>>
>> Thanks for your response!
>>
>> Could you help confirm this?  The two scenarios are
>>
>> Scenario 1
>>
>>       - use WSDL 1.1 document to generate code
>>       - generate
>>                both service side code including skeleton...
>>                and client side code including stub...
>>       - deploy the service to local Tomcat/Axis2
>>       - in browser,
>>                http://localhost:8080/axis2/services/xxxWSDL11?wsdl     =>
>> will display WSDL 1.1 definition of the service
>>                http://localhost:8080/axis2/services/xxxWSDL11?wsdl2
>> => will display WSDL 2.0 definition of the service
>>
>>
>> Scenario 2
>>
>>       - use WSDL 2.0 document to generate code
>>       - generate
>>                both service side code including skeleton...
>>                and client side code including stub...
>>       - deploy the service to local Tomcat/Axis2
>>       - in browser,
>>                http://localhost:8080/axis2/services/xxxWSDL20?wsdl     =>
>> currently *failed *but SHOULD display WSDL 1.1 definition of the service
>>                http://localhost:8080/axis2/services/xxxWSDL20?wsdl2
>> => will display WSDL 2.0 definition of the service
>>
>>
>> Scenario 1 works for both ?wsdl and ?wsdl2 and a good example can be
>> quoted from Axis2 QuickStart Guide ADB based service and client.
>>
>> Scenario 2 is what I am currently encountering when I try to verify my fix
>> to AXIS2-4170.  In this scenario, code is generated from WSDL 2.0 document.
>> ?wsdl2 works fine.  But ?wsdl does not.  My question is: "Is ?wsdl supposed
>> to work as well?  Regardless whether 1.1 or 2.0 of WSDL document is used to
>> generate code, the resulted service should respond both ?wsdl and ?wsdl2
>> correctly?"
>>
>> My guess is that perhaps service generated from WSDL 2.0 does not persist
>> backward support to WSDL 1.1.  If so, it will be a correct that ?wsdl gives
>> the error result.
>>
>> Could you help answer my question and confirm my guess is wrong?
>>
>> Thanks Suresh!
>>
>> Ping
>>
>>
>>
>>
>> On Thu, May 5, 2011 at 12:34 AM, suresh attanayake <
>> suresh.attanayake@gmail.com> wrote:
>>
>>> Hi,
>>> Since you have mentioned "However, if don't explicitly spell out wsdl2,
>>> that is if using http://localhost:8080/axis2/services/reservationService,
>>> I'll *get the same error shown in the web page* like this.", I believe
>>> the fault is in the service side and it has nothing to do with the stub your
>>> using.
>>>
>>> suresh..
>>>
>>>
>>> On Sun, Apr 24, 2011 at 2:59 AM, Ping Liu <pi...@gmail.com>wrote:
>>>
>>>> Sorry, this question is intended for Axis2.
>>>>
>>>>
>>>> Hi,
>>>>>
>>>>> I got the following error when writing a testing Web Service client.
>>>>>
>>>>> *     [java] org.apache.axis2.AxisFault: The endpoint reference (EPR)
>>>>> for the Ope
>>>>> ration not found is
>>>>> http://localhost:8080/axis2/services/reservationService and
>>>>> the WSA Action = null. If this EPR was previously reachable, please
>>>>> contact the
>>>>> server administrator.*
>>>>>
>>>>> The service itself is generated by WSDL 2.0 and the WSDL can be viewed
>>>>> successfully at
>>>>>
>>>>> http://localhost:8080/axis2/services/reservationService?wsdl2
>>>>>
>>>>> However, if don't explicitly spell out wsdl2, that is if using
>>>>> http://localhost:8080/axis2/services/reservationService, I'll get the
>>>>> same error shown in the web page like this.
>>>>>
>>>>> *<soapenv:Reason>
>>>>> <soapenv:Text xml:lang="en-US">
>>>>> The endpoint reference (EPR) for the Operation not found is
>>>>> /axis2/services/reservationService and the WSA Action = null. If this EPR
>>>>> was previously reachable, please contact the server administrator.
>>>>> </soapenv:Text>
>>>>> </soapenv:Reason>*
>>>>>
>>>>> In the testing client class, I am using
>>>>>
>>>>> ReservationServiceStub stub = new ReservationServiceStub("
>>>>> http://localhost:8080/axis2/services/reservationService");
>>>>>
>>>>> I guess I have to set something for this ReservationServiceStub so that
>>>>> the stub will know to look for wsdl2 instead.
>>>>>
>>>>> Could anybody let me know how or point me to some helpful resource like
>>>>> tutorial etc?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Ping
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: [Axis2] Re: How to write Web Service client for WSDL 2.0?

Posted by suresh attanayake <su...@gmail.com>.
Hi Ping Lu,

Please check your serives.xml of the scenario 2 service. Check if the
following parameter in the services.xml has the value "true".

"<parameter name="useOriginalwsdl">true</parameter>"

It seems by default Axis2 makes the value "true" for the generated services
using wsdl2. if you set the value to "false", then you can see both wsdl and
wsdl2.

Suresh..!



On Thu, May 5, 2011 at 10:30 PM, Ping Liu <pi...@gmail.com> wrote:

> Hi Suresh,
>
> Thanks for your response!
>
> Could you help confirm this?  The two scenarios are
>
> Scenario 1
>
>       - use WSDL 1.1 document to generate code
>       - generate
>                both service side code including skeleton...
>                and client side code including stub...
>       - deploy the service to local Tomcat/Axis2
>       - in browser,
>                http://localhost:8080/axis2/services/xxxWSDL11?wsdl     =>
> will display WSDL 1.1 definition of the service
>                http://localhost:8080/axis2/services/xxxWSDL11?wsdl2     =>
> will display WSDL 2.0 definition of the service
>
>
> Scenario 2
>
>       - use WSDL 2.0 document to generate code
>       - generate
>                both service side code including skeleton...
>                and client side code including stub...
>       - deploy the service to local Tomcat/Axis2
>       - in browser,
>                http://localhost:8080/axis2/services/xxxWSDL20?wsdl     =>
> currently *failed *but SHOULD display WSDL 1.1 definition of the service
>                http://localhost:8080/axis2/services/xxxWSDL20?wsdl2     =>
> will display WSDL 2.0 definition of the service
>
>
> Scenario 1 works for both ?wsdl and ?wsdl2 and a good example can be quoted
> from Axis2 QuickStart Guide ADB based service and client.
>
> Scenario 2 is what I am currently encountering when I try to verify my fix
> to AXIS2-4170.  In this scenario, code is generated from WSDL 2.0 document.
> ?wsdl2 works fine.  But ?wsdl does not.  My question is: "Is ?wsdl supposed
> to work as well?  Regardless whether 1.1 or 2.0 of WSDL document is used to
> generate code, the resulted service should respond both ?wsdl and ?wsdl2
> correctly?"
>
> My guess is that perhaps service generated from WSDL 2.0 does not persist
> backward support to WSDL 1.1.  If so, it will be a correct that ?wsdl gives
> the error result.
>
> Could you help answer my question and confirm my guess is wrong?
>
> Thanks Suresh!
>
> Ping
>
>
>
>
> On Thu, May 5, 2011 at 12:34 AM, suresh attanayake <
> suresh.attanayake@gmail.com> wrote:
>
>> Hi,
>> Since you have mentioned "However, if don't explicitly spell out wsdl2,
>> that is if using http://localhost:8080/axis2/services/reservationService,
>> I'll *get the same error shown in the web page* like this.", I believe
>> the fault is in the service side and it has nothing to do with the stub your
>> using.
>>
>> suresh..
>>
>>
>> On Sun, Apr 24, 2011 at 2:59 AM, Ping Liu <pi...@gmail.com> wrote:
>>
>>> Sorry, this question is intended for Axis2.
>>>
>>>
>>> Hi,
>>>>
>>>> I got the following error when writing a testing Web Service client.
>>>>
>>>> *     [java] org.apache.axis2.AxisFault: The endpoint reference (EPR)
>>>> for the Ope
>>>> ration not found is
>>>> http://localhost:8080/axis2/services/reservationService and
>>>> the WSA Action = null. If this EPR was previously reachable, please
>>>> contact the
>>>> server administrator.*
>>>>
>>>> The service itself is generated by WSDL 2.0 and the WSDL can be viewed
>>>> successfully at
>>>>
>>>> http://localhost:8080/axis2/services/reservationService?wsdl2
>>>>
>>>> However, if don't explicitly spell out wsdl2, that is if using
>>>> http://localhost:8080/axis2/services/reservationService, I'll get the
>>>> same error shown in the web page like this.
>>>>
>>>> *<soapenv:Reason>
>>>> <soapenv:Text xml:lang="en-US">
>>>> The endpoint reference (EPR) for the Operation not found is
>>>> /axis2/services/reservationService and the WSA Action = null. If this EPR
>>>> was previously reachable, please contact the server administrator.
>>>> </soapenv:Text>
>>>> </soapenv:Reason>*
>>>>
>>>> In the testing client class, I am using
>>>>
>>>> ReservationServiceStub stub = new ReservationServiceStub("
>>>> http://localhost:8080/axis2/services/reservationService");
>>>>
>>>> I guess I have to set something for this ReservationServiceStub so that
>>>> the stub will know to look for wsdl2 instead.
>>>>
>>>> Could anybody let me know how or point me to some helpful resource like
>>>> tutorial etc?
>>>>
>>>> Thanks!
>>>>
>>>> Ping
>>>>
>>>>
>>>
>>
>

Re: [Axis2] Re: How to write Web Service client for WSDL 2.0?

Posted by Sagara Gunathunga <sa...@gmail.com>.
Ping , can you provide service.xml contents for both scenarios ?

Thanks !

On Thu, May 5, 2011 at 10:30 PM, Ping Liu <pi...@gmail.com> wrote:
> Hi Suresh,
>
> Thanks for your response!
>
> Could you help confirm this?  The two scenarios are
>
> Scenario 1
>
>       - use WSDL 1.1 document to generate code
>       - generate
>                both service side code including skeleton...
>                and client side code including stub...
>       - deploy the service to local Tomcat/Axis2
>       - in browser,
>                http://localhost:8080/axis2/services/xxxWSDL11?wsdl     =>
> will display WSDL 1.1 definition of the service
>                http://localhost:8080/axis2/services/xxxWSDL11?wsdl2     =>
> will display WSDL 2.0 definition of the service
>
>
> Scenario 2
>
>       - use WSDL 2.0 document to generate code
>       - generate
>                both service side code including skeleton...
>                and client side code including stub...
>       - deploy the service to local Tomcat/Axis2
>       - in browser,
>                http://localhost:8080/axis2/services/xxxWSDL20?wsdl     =>
> currently failed but SHOULD display WSDL 1.1 definition of the service
>                http://localhost:8080/axis2/services/xxxWSDL20?wsdl2     =>
> will display WSDL 2.0 definition of the service
>
>
> Scenario 1 works for both ?wsdl and ?wsdl2 and a good example can be quoted
> from Axis2 QuickStart Guide ADB based service and client.
>
> Scenario 2 is what I am currently encountering when I try to verify my fix
> to AXIS2-4170.  In this scenario, code is generated from WSDL 2.0 document.
> ?wsdl2 works fine.  But ?wsdl does not.  My question is: "Is ?wsdl supposed
> to work as well?  Regardless whether 1.1 or 2.0 of WSDL document is used to
> generate code, the resulted service should respond both ?wsdl and ?wsdl2
> correctly?"
>
> My guess is that perhaps service generated from WSDL 2.0 does not persist
> backward support to WSDL 1.1.  If so, it will be a correct that ?wsdl gives
> the error result.
>
> Could you help answer my question and confirm my guess is wrong?
>
> Thanks Suresh!
>
> Ping
>
>
>
> On Thu, May 5, 2011 at 12:34 AM, suresh attanayake
> <su...@gmail.com> wrote:
>>
>> Hi,
>> Since you have mentioned "However, if don't explicitly spell out wsdl2,
>> that is if using http://localhost:8080/axis2/services/reservationService,
>> I'll get the same error shown in the web page like this.", I believe the
>> fault is in the service side and it has nothing to do with the stub your
>> using.
>>
>> suresh..
>>
>> On Sun, Apr 24, 2011 at 2:59 AM, Ping Liu <pi...@gmail.com> wrote:
>>>
>>> Sorry, this question is intended for Axis2.
>>>
>>>> Hi,
>>>>
>>>> I got the following error when writing a testing Web Service client.
>>>>
>>>>      [java] org.apache.axis2.AxisFault: The endpoint reference (EPR) for
>>>> the Ope
>>>> ration not found is
>>>> http://localhost:8080/axis2/services/reservationService and
>>>> the WSA Action = null. If this EPR was previously reachable, please
>>>> contact the
>>>> server administrator.
>>>>
>>>> The service itself is generated by WSDL 2.0 and the WSDL can be viewed
>>>> successfully at
>>>>
>>>> http://localhost:8080/axis2/services/reservationService?wsdl2
>>>>
>>>> However, if don't explicitly spell out wsdl2, that is if using
>>>> http://localhost:8080/axis2/services/reservationService, I'll get the same
>>>> error shown in the web page like this.
>>>>
>>>> <soapenv:Reason>
>>>> <soapenv:Text xml:lang="en-US">
>>>> The endpoint reference (EPR) for the Operation not found is
>>>> /axis2/services/reservationService and the WSA Action = null. If this EPR
>>>> was previously reachable, please contact the server administrator.
>>>> </soapenv:Text>
>>>> </soapenv:Reason>
>>>>
>>>> In the testing client class, I am using
>>>>
>>>> ReservationServiceStub stub = new
>>>> ReservationServiceStub("http://localhost:8080/axis2/services/reservationService");
>>>>
>>>> I guess I have to set something for this ReservationServiceStub so that
>>>> the stub will know to look for wsdl2 instead.
>>>>
>>>> Could anybody let me know how or point me to some helpful resource like
>>>> tutorial etc?
>>>>
>>>> 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] Re: How to write Web Service client for WSDL 2.0?

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

Thanks for your response!

Could you help confirm this?  The two scenarios are

Scenario 1

      - use WSDL 1.1 document to generate code
      - generate
               both service side code including skeleton...
               and client side code including stub...
      - deploy the service to local Tomcat/Axis2
      - in browser,
               http://localhost:8080/axis2/services/xxxWSDL11?wsdl     =>
will display WSDL 1.1 definition of the service
               http://localhost:8080/axis2/services/xxxWSDL11?wsdl2     =>
will display WSDL 2.0 definition of the service


Scenario 2

      - use WSDL 2.0 document to generate code
      - generate
               both service side code including skeleton...
               and client side code including stub...
      - deploy the service to local Tomcat/Axis2
      - in browser,
               http://localhost:8080/axis2/services/xxxWSDL20?wsdl     =>
currently *failed *but SHOULD display WSDL 1.1 definition of the service
               http://localhost:8080/axis2/services/xxxWSDL20?wsdl2     =>
will display WSDL 2.0 definition of the service


Scenario 1 works for both ?wsdl and ?wsdl2 and a good example can be quoted
from Axis2 QuickStart Guide ADB based service and client.

Scenario 2 is what I am currently encountering when I try to verify my fix
to AXIS2-4170.  In this scenario, code is generated from WSDL 2.0 document.
?wsdl2 works fine.  But ?wsdl does not.  My question is: "Is ?wsdl supposed
to work as well?  Regardless whether 1.1 or 2.0 of WSDL document is used to
generate code, the resulted service should respond both ?wsdl and ?wsdl2
correctly?"

My guess is that perhaps service generated from WSDL 2.0 does not persist
backward support to WSDL 1.1.  If so, it will be a correct that ?wsdl gives
the error result.

Could you help answer my question and confirm my guess is wrong?

Thanks Suresh!

Ping



On Thu, May 5, 2011 at 12:34 AM, suresh attanayake <
suresh.attanayake@gmail.com> wrote:

> Hi,
> Since you have mentioned "However, if don't explicitly spell out wsdl2,
> that is if using http://localhost:8080/axis2/services/reservationService,
> I'll *get the same error shown in the web page* like this.", I believe the
> fault is in the service side and it has nothing to do with the stub your
> using.
>
> suresh..
>
>
> On Sun, Apr 24, 2011 at 2:59 AM, Ping Liu <pi...@gmail.com> wrote:
>
>> Sorry, this question is intended for Axis2.
>>
>>
>> Hi,
>>>
>>> I got the following error when writing a testing Web Service client.
>>>
>>> *     [java] org.apache.axis2.AxisFault: The endpoint reference (EPR)
>>> for the Ope
>>> ration not found is
>>> http://localhost:8080/axis2/services/reservationService and
>>> the WSA Action = null. If this EPR was previously reachable, please
>>> contact the
>>> server administrator.*
>>>
>>> The service itself is generated by WSDL 2.0 and the WSDL can be viewed
>>> successfully at
>>>
>>> http://localhost:8080/axis2/services/reservationService?wsdl2
>>>
>>> However, if don't explicitly spell out wsdl2, that is if using
>>> http://localhost:8080/axis2/services/reservationService, I'll get the
>>> same error shown in the web page like this.
>>>
>>> *<soapenv:Reason>
>>> <soapenv:Text xml:lang="en-US">
>>> The endpoint reference (EPR) for the Operation not found is
>>> /axis2/services/reservationService and the WSA Action = null. If this EPR
>>> was previously reachable, please contact the server administrator.
>>> </soapenv:Text>
>>> </soapenv:Reason>*
>>>
>>> In the testing client class, I am using
>>>
>>> ReservationServiceStub stub = new ReservationServiceStub("
>>> http://localhost:8080/axis2/services/reservationService");
>>>
>>> I guess I have to set something for this ReservationServiceStub so that
>>> the stub will know to look for wsdl2 instead.
>>>
>>> Could anybody let me know how or point me to some helpful resource like
>>> tutorial etc?
>>>
>>> Thanks!
>>>
>>> Ping
>>>
>>>
>>
>

Re: [Axis2] Re: How to write Web Service client for WSDL 2.0?

Posted by suresh attanayake <su...@gmail.com>.
Hi,
Since you have mentioned "However, if don't explicitly spell out wsdl2, that
is if using http://localhost:8080/axis2/services/reservationService, I'll *get
the same error shown in the web page* like this.", I believe the fault is in
the service side and it has nothing to do with the stub your using.

suresh..

On Sun, Apr 24, 2011 at 2:59 AM, Ping Liu <pi...@gmail.com> wrote:

> Sorry, this question is intended for Axis2.
>
>
> Hi,
>>
>> I got the following error when writing a testing Web Service client.
>>
>> *     [java] org.apache.axis2.AxisFault: The endpoint reference (EPR) for
>> the Ope
>> ration not found is
>> http://localhost:8080/axis2/services/reservationService and
>> the WSA Action = null. If this EPR was previously reachable, please
>> contact the
>> server administrator.*
>>
>> The service itself is generated by WSDL 2.0 and the WSDL can be viewed
>> successfully at
>>
>> http://localhost:8080/axis2/services/reservationService?wsdl2
>>
>> However, if don't explicitly spell out wsdl2, that is if using
>> http://localhost:8080/axis2/services/reservationService, I'll get the
>> same error shown in the web page like this.
>>
>> *<soapenv:Reason>
>> <soapenv:Text xml:lang="en-US">
>> The endpoint reference (EPR) for the Operation not found is
>> /axis2/services/reservationService and the WSA Action = null. If this EPR
>> was previously reachable, please contact the server administrator.
>> </soapenv:Text>
>> </soapenv:Reason>*
>>
>> In the testing client class, I am using
>>
>> ReservationServiceStub stub = new ReservationServiceStub("
>> http://localhost:8080/axis2/services/reservationService");
>>
>> I guess I have to set something for this ReservationServiceStub so that
>> the stub will know to look for wsdl2 instead.
>>
>> Could anybody let me know how or point me to some helpful resource like
>> tutorial etc?
>>
>> Thanks!
>>
>> Ping
>>
>>
>

[Axis2] Re: How to write Web Service client for WSDL 2.0?

Posted by Ping Liu <pi...@gmail.com>.
Sorry, this question is intended for Axis2.

Hi,
>
> I got the following error when writing a testing Web Service client.
>
> *     [java] org.apache.axis2.AxisFault: The endpoint reference (EPR) for
> the Ope
> ration not found is
> http://localhost:8080/axis2/services/reservationService and
> the WSA Action = null. If this EPR was previously reachable, please contact
> the
> server administrator.*
>
> The service itself is generated by WSDL 2.0 and the WSDL can be viewed
> successfully at
>
> http://localhost:8080/axis2/services/reservationService?wsdl2
>
> However, if don't explicitly spell out wsdl2, that is if using
> http://localhost:8080/axis2/services/reservationService, I'll get the same
> error shown in the web page like this.
>
> *<soapenv:Reason>
> <soapenv:Text xml:lang="en-US">
> The endpoint reference (EPR) for the Operation not found is
> /axis2/services/reservationService and the WSA Action = null. If this EPR
> was previously reachable, please contact the server administrator.
> </soapenv:Text>
> </soapenv:Reason>*
>
> In the testing client class, I am using
>
> ReservationServiceStub stub = new ReservationServiceStub("
> http://localhost:8080/axis2/services/reservationService");
>
> I guess I have to set something for this ReservationServiceStub so that the
> stub will know to look for wsdl2 instead.
>
> Could anybody let me know how or point me to some helpful resource like
> tutorial etc?
>
> Thanks!
>
> Ping
>
>