I am taking my first steps in the JAX-WS world and am using Glassfish 4.
I just tried rebuilding JavaEA7 Oracle Jax-WS examples and have the following web service:
@WebService
public class Hello {
@WebMethod
public String sayHello(String name) {
System.out.println("Webservice sayHello called...");
return "Hello " + name;
}
}
No more. I deployed it on a glass shawl, I can use a tester, I see WSDL - excellent.
Now I wrote a client that should be called by the JSF2 view. Here goes the bean:
@Named
@RequestScoped
public class HelloServiceClient {
@WebServiceRef(wsdlLocation="http://localhost:8080/HelloService/HelloService?WSDL")
private HelloService service;
public String callHello() {
Hello helloPort = service.getHelloPort();
return helloPort.sayHello(" JSF2 View!");
}
public String callWSSayHello(String name) {
Hello helloPort = service.getHelloPort();
return helloPort.sayHello(name);
}
}
There is also a minimalist look, just calling the callHello () method and displaying the result.
I deployed this application on the same Glassfish server and received the following error:
java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: : : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: Laufzeitdeskriptor konnte nicht geparst werden: javax.xml.ws.WebServiceException: Laufzeitdeskriptor "/WEB-INF/sun-jaxws.xml" fehlt. . Server.log . .
, sun-jaxws - , .
- - , IDE - ?