[jboss-user] [JBossWS] - Re: @WebMethod @WebParam: no effect on generated wsdl.

msell do-not-reply at jboss.com
Mon Aug 7 18:18:29 EDT 2006


I'm having good luck with the following style in JBoss-5:

@Stateless
  | 
  | @WebService (name = "TestInterface", 
  | 			serviceName = "TestService",
  | 			targetNamespace = "urn:TestService/wsdl")
  | 			
  | @PortComponent (contextRoot = Constants.WEBSERVICE_DOCLITERAL_URLROOTCONTEXT,
  | 			urlPattern = "/TestService")
  | 
  | @SOAPBinding (style = SOAPBinding.Style.DOCUMENT,
  | 			use = SOAPBinding.Use.LITERAL,
  | 			parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
  | 			
  | public class TestBean implements TestInterface {
  | 
  | 
  | 	/**
  | 	 * Returns the provided String
  | 	 * @param sessionID A valid session ID
  | 	 * @param input String value to return
  | 	 * @return The input value
  | 	 */
  |     @WebMethod(operationName = "echoString", action = "urn:EchoString")
  |     @WebResult(name = "echoStringResult")
  |     @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
  | 	public String echoString(
  | 				@WebParam(name = "sessionID") String sessionID,
  | 				@WebParam(name = "input") String input)
  |     {
  | 		
  | 		return input;
  | 
  | 	}
  | 
  | }
  | 


The variable "Constants.WEBSERVICE_DOCLITERAL_URLROOTCONTEXT" in my case can be set to something like:

"/test"

... which means the WSDL URL would be:

"http://serveraddress:8080/test/TestService?wsdl"


Hope this helps!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963673#3963673

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963673



More information about the jboss-user mailing list