Hi
(It's my first post, I was trying to find something about my problem but I
couldn't )
I have some problem with deploy my Jax WS Web service.
I'm trying to do this using top-down method - wsconsume. When I generate java classes
from WSDL which I have written before, I get one which is the interface.
How should I implement it ?
How should I write the web.xml ? which class name should I write inside
<servlet-class> </servlet-class> tags ?
If i write the generated class name, how jax-ws knows where (in which java class) is
implementing class ?
If I write the class name inside, which impelements generated interface, I can't
deploy the web service. (maybe I do something wrong?)
part of Service class generated by Jax-WS:
| // [...]
| @WebService(name = "XXXService", targetNamespace =
"http://xxx.com/XXX/ws")
| public interface XXXService {
|
|
| /**
| *
| * @param in
| * @return
| * returns int
| * @throws Method1FaultMsg
| */
| @WebMethod
| @WebResult(name = "out", targetNamespace = "")
| @RequestWrapper(localName = "method1", targetNamespace =
"http://xxx.com/XXX/ws", className = "com.xxx.xxx.ws.Method1")
| @ResponseWrapper(localName = "method1Response", targetNamespace =
"http://xxx.com/xxx/ws", className =
"com.xxx.xxx.ws.Method1Response")
| public int method1(
| @WebParam(name = "in", targetNamespace = "")
| int in)
| throws Method1FaultMsg
| ;
| // [...]
|
|
My implementation class:
|
| public class XXXServiceImpl implements com.xxx.xxx.ws.XXXService {
|
|
| @WebMethod
| @WebResult(name = "out", targetNamespace = "")
| @RequestWrapper(localName = "method1", targetNamespace =
"http://xxx.com/xxx/ws", className = "com.xxx.xxx.ws.Method1")
| @ResponseWrapper(localName = "method1Response", targetNamespace =
"http://xxx.com/xxx/ws", className =
"com.xxx.xxx.ws.Method1Response")
| public int method1(int in) throws Method1FaultMsg
| {
| try
| {
| return in*2;
| }
| catch(Exception e)
| {
| new Method1FaultMsg("Server Exception", new ServerException(), e);
| }
| return in;
| }
|
|
Any tips?
Anyway, sorry for my English :/
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4248099#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...