axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sagara Gunathunga <sagara.gunathu...@gmail.com>
Subject Re: How to write Web Service client for WSDL 2.0?
Date Sun, 01 May 2011 15:45:57 GMT
On Sun, Apr 24, 2011 at 2:41 AM, Ping Liu <pingpinganan@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


Mime
View raw message