[JBossWS] - Recomended way to build server and client with maven?
by sverker
Hi,
I think this should be a FAQ as it's asked many times in the forum but I can't find any answers.
What is the recommended way to build server and client side of a webservice for jbossws with maven2?
To partly answer my own question, on the where I build my webservice with annotated classes, I added the following dependency to get it to work:
| <dependency>
| <groupId>org.jboss.ws</groupId>
| <artifactId>jbossws-framework</artifactId>
| <version>3.0.4.GA</version>
| <scope>provided</scope>
| </dependency>
|
However, I have not found a clear answer on how to generate the client side stub. I found two possible solutions:
* Use the jaxws:wsimport maven goal. This use the wsimport tool from Sun RI. Is this method fully functional with JbossWS?
* Use the wsconsume ant task with maven-antrun-plugin. Should work fine but is not a very "elegant" solution.
Which is the best way, or is there another recommended way?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199718#4199718
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199718
16 years
[JBossWS] - J2EE Webservice and C lang -
by RajaRamana
Hi,
I am looking for help to provide a service between J2EE and C lang.
1. I have created the following Web Service in J2EE
/*
* @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;
}
}
2. Configured in web.xml
<servlet-name>Hello</servlet-name>
<servlet-class>com.carrefour.cmt.central.webservice.Hello</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>Hello</servlet-name>
<url-pattern>/Hello</url-pattern>
</servlet-mapping>
3. Started Jboss421. After that it created a wsdl file in DATA folder.
4 Now i want to write a Client to consume the service in 'C' LANG .
Please Assist me.
Thanks and Reg,
Raja
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199536#4199536
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199536
16 years
[JBossWS] - java.lang.ClassCastException: org.jboss.ws.core.jaxws.spi.Se
by rodosa
Hello!
I've a problem. I've two jboss. Jboss 4.0.5 and Jboss jBPM 3.2.3. The Jboss 4.0.5 access to jBPM web services but .... when the session beans of jBPM try to access to WS of JBoss 4.0.4, the following exception it's thown:
| 01:11:30,437 ERROR [STDERR] java.lang.ClassCastException: org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl cannot be cast to javax.xml.ws.spi.ServiceDelegate21
| 01:11:30,437 ERROR [STDERR] at javax.xml.ws.Service.<init>(Service.java:82)
| 01:11:30,437 ERROR [STDERR] at com.ideit.modules.cmmi.requirements.session.ProductWS_Service.<init>(ProductWS_Service.java:40)
| 01:11:30,437 ERROR [STDERR] at com.ideit.modules.cmmi.jbpm.requirements.session.JbpmSessionBean.createInstance(JbpmSessionBean.java:140)
| 01:11:30,437 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 01:11:30,453 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 01:11:30,453 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 01:11:30,453 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
| 01:11:30,453 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| 01:11:30,453 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| 01:11:30,468 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 01:11:30,468 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 01:11:30,468 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 01:11:30,468 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| 01:11:30,468 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 01:11:30,468 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 01:11:30,468 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| 01:11:30,468 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 01:11:30,468 ERROR [STDERR] at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:103)
| 01:11:30,468 ERROR [STDERR] at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220)
| 01:11:30,468 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:408)
| 01:11:30,468 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
| 01:11:30,468 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
| 01:11:30,468 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
| 01:11:30,468 ERROR [STDERR] at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| 01:11:30,468 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| 01:11:30,468 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| 01:11:30,468 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 01:11:30,468 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 01:11:30,468 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 01:11:30,468 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| 01:11:30,468 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| 01:11:30,468 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| 01:11:30,468 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| 01:11:30,468 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| 01:11:30,468 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| 01:11:30,468 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| 01:11:30,468 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| 01:11:30,468 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| 01:11:30,468 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| 01:11:30,468 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| 01:11:30,468 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| 01:11:30,468 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| 01:11:30,468 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
|
I build a junit class that acces to the WS deployed in jboss 4.0.5, and this work. I suposse that it could be a problem of libraries but I don't know how to fix it. Could someone help me??
Thank you very much
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199436#4199436
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199436
16 years