[jboss-user] [JBoss Web Services] - Re: Jboss Native - EJB based Webservice top down approach
Jason Shepherd
do-not-reply at jboss.com
Wed May 4 19:16:31 EDT 2011
Jason Shepherd [http://community.jboss.org/people/jshepher] created the discussion
"Re: Jboss Native - EJB based Webservice top down approach"
To view the discussion, visit: http://community.jboss.org/message/603548#603548
--------------------------------------------------------------
If you are top-down development of a web service, from an existing WSDL, you should use the documentation [0], to generate the webservice. Then if you are trying to deploy that webservice as a war file, you should use the webservice annotations on your web service implementation like below [1].
Some people have had trouble getting their namespaces to work without specifying the "wsdlLocation" attribute of the WebSerivce annotation. In that case you will need to place the generated WSDL in /WEB-INF/wsdl/ and reference it like this:
@WebService( name="ExampleService", targetNamespace="http://www.jboss.com/exampe/ws", wsdlLocation="/WEB-INF/wsdl/generated.wsdl")
[0] http://docs.jboss.org/jbossas/docs/Administration_And_Configuration_Guide/5/html_single/index.html#d0e1664 http://docs.jboss.org/jbossas/docs/Administration_And_Configuration_Guide/5/html_single/index.html#d0e1664
[1]
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService(name = "ExampleService", targetNamespace = " http://www.jboss.com/example/ws http://www.jboss.com/example/ws",
wsdlLocation="/WEB-INF/wsdl/generated.wsdl")
public class Echo {
@WebMethod
public String echo(
@WebParam(name = "msg")
String msg){
return msg;
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/603548#603548]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110504/afe00816/attachment.html
More information about the jboss-user
mailing list