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 "Ockleford Paul (NHS CONNECTING FOR HEALTH)" <pa...@nhs.net> on 2012/12/17 10:47:55 UTC

Deploying web services with annotations within existing web app

Hi,

I  have now bought Apache Axis 2 web services 2nd edition by Deepal Jayasinghe and I still cannot really get any of the simple examples to work properly. I am looking for some help now with just simple examples and trying to deploy a service within my web app using annotations.

I don't understand why every example demonstrates using the axis web app which isn't what I want to do. I have created the most basic of POJO services (below) and in my tomcat logs it says the service has deployed but whenI try to browse to the wsdl I get the following error:

javax.servlet.ServletException: File "/axis2-web/listSingleService.jsp" not found


import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;

@WebService(targetNamespace = "http://sample.org/helloWorld", name = "HelloWorld")
public class HelloWorld {
    @WebMethod(action = "urn:sayHello", operationName = "sayHello")
    public String sayHello(@WebParam(partName = "name") String name){
        return "Hello " + name;
    }
}

Can somebody please tell me what I am doing wrong because this example is so basic and claims to have been deployed so why cant axis generate the wsdl??

********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.

Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients
NHSmail provides an email address for your career in the NHS and can be accessed anywhere

********************************************************************************************************************

Re: Deploying web services with annotations within existing web app

Posted by Deepal jayasinghe <de...@gmail.com>.
This is probably due to a problem in the web-app (jsp) not your service.
Why don't you try to list the services and see whether you can see your
services there (not using listSingleService.jsp) ?. If you can see your
service there, then click the link to get more information.

Deepal
>
> Hi,
>
>  
>
> I  have now bought Apache Axis 2 web services 2^nd edition by Deepal
> Jayasinghe and I still cannot really get any of the simple examples to
> work properly. I am looking for some help now with just simple
> examples and trying to deploy a service within my web app using
> annotations.
>
>  
>
> I don't understand why every example demonstrates using the axis web
> app which isn't what I want to do. I have created the most basic of
> POJO services (below) and in my tomcat logs it says the service has
> deployed but whenI try to browse to the wsdl I get the following error:
>
>  
>
> javax.servlet.ServletException: File
> "/axis2-web/listSingleService.jsp" not found
>
>  
>
>  
>
> import javax.jws.WebService;
>
> import javax.jws.WebMethod;
>
> import javax.jws.WebParam;
>
>  
>
> @WebService(targetNamespace = "http://sample.org/helloWorld", name =
> "HelloWorld")
>
> public class HelloWorld {
>
>     @WebMethod(action = "urn:sayHello", operationName = "sayHello")
>
>     public String sayHello(@WebParam(partName = "name") String name){
>
>         return "Hello " + name;
>
>     }
>
> }
>
>  
>
> Can somebody please tell me what I am doing wrong because this example
> is so basic and claims to have been deployed so why cant axis generate
> the wsdl??
>
>
> ********************************************************************************************************************
>
> This message may contain confidential information. If you are not the
> intended recipient please inform the
> sender that you have received the message in error before deleting it.
> Please do not disclose, copy or distribute information in this e-mail
> or take any action in reliance on its contents:
> to do so is strictly prohibited and may be unlawful.
>
> Thank you for your co-operation.
>
> NHSmail is the secure email and directory service available for all
> NHS staff in England and Scotland
> NHSmail is approved for exchanging patient data and other sensitive
> information with NHSmail and GSi recipients
> NHSmail provides an email address for your career in the NHS and can
> be accessed anywhere
>
> ********************************************************************************************************************