[jbossws-users] [JBossWS] - Generate WSDL (From JBoss Eclipse IDE or Command line)

grdzeli_kaci do-not-reply at jboss.com
Tue May 1 11:24:42 EDT 2007


hi all,
i am newbie on this, 
i need help.
i have documentation about Jboss Web Services and i am trying to run one small example  (This is Thomas Diesler's example)
here is example from doc:
1. Remote Interface :
 
  | import javax.ejb.Remote;
  | public interface EJB3RemoteInterface {
  | 	String echo(String input);
  | }
  | 
2. Implementation


  | import javax.annotation.Resource;
  | import javax.ejb.Remote;
  | import javax.ejb.SessionContext;
  | import javax.ejb.Stateless;
  | import javax.jws.WebMethod;
  | import javax.jws.WebService;
  | import javax.jws.soap.SOAPBinding;
  | import org.jboss.annotation.ejb.RemoteBinding;
  | import org.jboss.ws.annotation.WebContext;
  | 
  | /**
  |  * Test the JSR-181 javax.jws.WebService annotation on an EJB3 endpoint.
  |  * 
  |  * Uses the wsdlLocation attribute.
  |  * 
  |  * @author Thomas.Diesler at jboss.org
  |  * @since 29-Apr-2005
  |  */
  | @WebService(
  | 		name = "EndpointInterface", 
  | 		targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", 
  | 		serviceName = "TestService", 
  | 		wsdlLocation = "META-INF/wsdl/TestService.wsdl")		
  | @WebContext(contextRoot = "/jaxws-samples-webservice02-ejb3", urlPattern = "/*")
  | @SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
  | @Remote(EJB3RemoteInterface.class)
  | @RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
  | @Stateless
  | public class EJB3Bean02 implements EJB3RemoteInterface {
  | 	@Resource
  | 	SessionContext sessionContext;
  | 	@WebMethod
  | 	public String echo(String input) {
  | 		System.out.println("Reseive = " + input);
  | 		return input + " - Reseived";
  | 	}
  | }
  | 
3. soapui-project.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <con:soapui-project name="CustomerCare" soapui-version="SNAPSHOT" xmlns:con="http://eviware.com/soapui/config">
  | 	<con:settings>
  | 		<con:setting id="Output Classes Directory">/CustomerCare/bin</con:setting>
  | 		<con:setting id="Output Source Directory">src</con:setting>
  | 		<con:setting id="JBossWS wstools">/home/paatal/InstalledPrograms/jbossws-1.2.1.GA/install/bin</con:setting>
  | 		<con:setting id="Add JBossWS JAR">true</con:setting>
  | 		<con:setting id="com.eviware.soapui.jbosside.jbosswsNature">true</con:setting>
  | 	</con:settings>
  | </con:soapui-project>
  | 

i add JbossWs Nature For My Project from right click on project  and add JBossWS -> Add JBossWS Nature,
I want generate WSDL from this class (EJB3Bean02) 
after all i tried to generate wsdl  from right click on this class and JBossWS -> Publish as web service, enter some parameters and than click generate but i got an error like this :



  | 
  | Running JBossWS wstools for [CustomerCare]
  | directory: /home/paatal/InstalledPrograms/Temp/Workshop_Studio_3.2_589/workspace/CustomerCare
  | command: sh -c .//home/paatal/InstalledPrograms/jbossws-1.2.1.GA/install/bin/wstools.sh -cp bin -config /tmp/wstools-config52642.xml -dest /home/paatal/InstalledPrograms/Temp/Workshop_Studio_3.2_589/workspace/CustomerCare/src
  | -cp: .//home/paatal/InstalledPrograms/jbossws-1.2.1.GA/install/bin/wstools.sh: No such file or directory
  | 

There is Incorrect path (There is two backslash - > ".//" i don't know why :( ) Is This JBoss Eclipse IDE Bug or maybe i have something incorrect

i configure my JBossWS Instalation Directory From Window -> Preferances -> JBoss Eclipse IDE -> Integrated Tools  and set classpath for JBossWS wstools : "/home/paatal/InstalledPrograms/jbossws-1.2.1.GA/install/bin"

am i right ? can anybody help me on it ???


after all i tried to generate wsdl from command line without JBoss Eclipse IDE 


  | paatal at paatal:~/InstalledPrograms/jbossws-1.2.1.GA/install/bin> ./wstools.sh -cp bin -config /tmp/wstools-config52642.xml -dest /home/paatal/InstalledPrograms/Temp/Workshop_Studio_3.2_589/workspace/CustomerCare/src
  | 

but i got another error like This :

  | Exception in thread "main" java.lang.NoClassDefFoundError: javax/jws/soap/SOAPBinding$ParameterStyle
  |         at org.jboss.ws.tools.helpers.ToolsHelper.handleJavaToWSDLGeneration(ToolsHelper.java:105)
  |         at org.jboss.ws.tools.WSTools.process(WSTools.java:133)
  |         at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
  |         at org.jboss.ws.tools.WSTools.generate(WSTools.java:119)
  |         at org.jboss.ws.tools.WSTools.main(WSTools.java:58)
  | 

did i something incorrect ?
can anybody help me ?

Regards,
Paata.


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

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



More information about the jbossws-users mailing list