Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Ganymede Bottom-up webservice
Ganymede Bottom-up webservice [message #219789] Fri, 29 August 2008 11:20 Go to next message
vijay is currently offline vijay
Messages: 22
Registered: July 2009
Junior Member
Hi,

I tryed to create a web service using bottom up approach i.e

i have a java class with annotations


package examples.webservices.hello_world;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

/**
* This is a webservice class exposing a method called greet which takes a
* input parameter and greets the parameter with hello.
*
* @author ankit
*/

/*
* @WebService indicates that this is webservice interface and the name
* indicates the webservice name.
*/
@WebService(name = "Hello")
/*
* @SOAPBinding indicates binding information of soap messages. Here we have
* document-literal style of webservice and the parameter style is wrapped.
*/
@SOAPBinding
(
style = SOAPBinding.Style.DOCUMENT,
use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
)

public class Hello
{
/**
* This method takes a input parameter and appends "Hello" to it and
* returns the same.
*
* @param name
* @return
*/
@WebMethod
public String greet( @WebParam(name = "name")
String name )
{
return "Hello" + name;
}

}

using this class in context menu i get a option to create web service.

If i use the jboss4.0 as the option it creates the ear fine.

but if i use upper version like 4.2 it creates the ear without
META-INF/application.xml file

hence the jboss server throws
org.jboss.deployment.DeploymentException: No META-INF/application.xml found
at org.jboss.deployment.EARDeployer.init(EARDeployer.java:146)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872 )
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:8 09)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:7 82)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflecte dDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(Abstract Interceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invo ke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBea nInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.j ava:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:21 0)
at $Proxy9.deploy(Unknown Source)
at
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URL DeploymentScanner.java:421)
at
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDe ploymentScanner.java:634)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$Scann erThread.doScan(AbstractDeploymentScanner.java:263)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner.start Service(AbstractDeploymentScanner.java:336)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(Serv iceMBeanSupport.java:289)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle( ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflecte dDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBea nInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.j ava:659)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(Servi ceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.j ava:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflecte dDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBea nInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.j ava:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:21 0)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:10 25)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:8 19)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:7 82)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:7 66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflecte dDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(Abstract Interceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invo ke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBea nInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.j ava:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:21 0)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:4 82)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362 )
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Unknown Source)


this happens only with jboss 4.2 server adapter.

is this a issue or am i doing anything wrong
Re: Ganymede Bottom-up webservice [message #219861 is a reply to message #219789] Mon, 01 September 2008 04:07 Go to previous message
vijay is currently offline vijay
Messages: 22
Registered: July 2009
Junior Member
Vijay wrote:

> Hi,

> I tryed to create a web service using bottom up approach i.e

> i have a java class with annotations


> package examples.webservices.hello_world;

> import javax.jws.WebMethod;
> import javax.jws.WebParam;
> import javax.jws.WebService;
> import javax.jws.soap.SOAPBinding;

> /**
> * This is a webservice class exposing a method called greet which takes a
> * input parameter and greets the parameter with hello.
> *
> * @author ankit
> */

> /*
> * @WebService indicates that this is webservice interface and the name
> * indicates the webservice name.
> */
> @WebService(name = "Hello")
> /*
> * @SOAPBinding indicates binding information of soap messages. Here we have
> * document-literal style of webservice and the parameter style is wrapped.
> */
> @SOAPBinding
> (
> style = SOAPBinding.Style.DOCUMENT,
> use = SOAPBinding.Use.LITERAL,
> parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
> )

> public class Hello
> {
> /**
> * This method takes a input parameter and appends "Hello" to it and
> * returns the same.
> *
> * @param name
> * @return
> */
> @WebMethod
> public String greet( @WebParam(name = "name")
> String name )
> {
> return "Hello" + name;
> }

> }

> using this class in context menu i get a option to create web service.

> If i use the jboss4.0 as the option it creates the ear fine.

> but if i use upper version like 4.2 it creates the ear without
> META-INF/application.xml file

> hence the jboss server throws
> org.jboss.deployment.DeploymentException: No META-INF/application.xml found
> at org.jboss.deployment.EARDeployer.init(EARDeployer.java:146)
> at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872 )
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:8 09)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:7 82)
> at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
>
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflecte dDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at
>
org.jboss.mx.interceptor.AbstractInterceptor.invoke(Abstract Interceptor.java:133)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at
>
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invo ke(ModelMBeanOperationInterceptor.java:142)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at
>
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBea nInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.j ava:659)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:21 0)
> at $Proxy9.deploy(Unknown Source)
> at
>
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URL DeploymentScanner.java:421)
> at
>
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDe ploymentScanner.java:634)
> at
>
org.jboss.deployment.scanner.AbstractDeploymentScanner$Scann erThread.doScan(AbstractDeploymentScanner.java:263)
> at
>
org.jboss.deployment.scanner.AbstractDeploymentScanner.start Service(AbstractDeploymentScanner.java:336)
> at
>
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(Serv iceMBeanSupport.java:289)
> at
>
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle( ServiceMBeanSupport.java:245)
> at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
>
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflecte dDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
> at
>
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBea nInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.j ava:659)
> at
>
org.jboss.system.ServiceController$ServiceProxy.invoke(Servi ceController.java:978)
> at $Proxy0.start(Unknown Source)
> at org.jboss.system.ServiceController.start(ServiceController.j ava:417)
> at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
>
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflecte dDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
> at
>
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBea nInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.j ava:659)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:21 0)
> at $Proxy4.start(Unknown Source)
> at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
> at org.jboss.deployment.MainDeployer.start(MainDeployer.java:10 25)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:8 19)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:7 82)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:7 66)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
>
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Reflecte dDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at
>
org.jboss.mx.interceptor.AbstractInterceptor.invoke(Abstract Interceptor.java:133)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at
>
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invo ke(ModelMBeanOperationInterceptor.java:142)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at
>
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBea nInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.j ava:659)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:21 0)
> at $Proxy5.deploy(Unknown Source)
> at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:4 82)
> at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362 )
> at org.jboss.Main.boot(Main.java:200)
> at org.jboss.Main$1.run(Main.java:508)
> at java.lang.Thread.run(Unknown Source)


> this happens only with jboss 4.2 server adapter.

> is this a issue or am i doing anything wrong

Do i need to update my eclipse...
Previous Topic:J2EE Module Dependencies and build problems
Next Topic:Javascript Debugging
Goto Forum:
  


Current Time: Sun Oct 26 04:34:14 GMT 2014

Powered by FUDForum. Page generated in 0.01549 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software