I am trying to deploy webservice on mobicents 1.2 based on JBoss 5.1
but cannot get it to work.
How to reproduce problem:
1. Create annotated SSB which is also a webservice (see example below)
2. Deploy on mobicents 1.1 or 1.2 (based on JBoss 5.1)
3. Exception occurs
java.lang.ClassCastException:
org.jboss.metadata.ear.spec.EjbModuleMetaData cannot be cast to
org.jboss.metadata.ear.spec.WebModuleMetaData
Example source to reproduce problem. The same example deploys
successfully on JBoss 5.1.0.GA.
Test.java:
------ CUT HERE ---
package com.test;
import javax.jws.WebService;
@WebService
public interface Test {
String getMessage();
}
------ CUT HERE ---
TestWS.java:
------ CUT HERE ---
package com.test;
import javax.ejb.Stateless;
import javax.jws.WebService;
@WebService(name = "TestWS")
@Stateless(name = "TestService")
public class TestWS implements Test {
@Override
public String getMessage() {
return "Hello world";
}
}
------ CUT HERE ---
I would report issue but I am wondering if I am doing something wrong
here?
The web service should not be inside SLEE, it should transform
requests into SLEE events, which are fired, into SLEE, through an
Resource Adaptor or through the SleeConnection. The SleeConnection is
a simple and good choice if you don't have a concept such as a
session, that relates multiple events into one "activity".
If the SleeConnection is not "powerful" or "flexible" enough, the HTTP
Servlet RA is an example of integration between a Java EE component,
an HTTP Servlet, and a SLEE Resource Adaptor, it should not be
difficult easy to adapt to replace the HTTP Servlet with a Web
Service.
-- Eduardo
-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
http://emmartins.blogspot.com
http://www.redhat.com/solutions/telco
Thanks for your comment. I was trying to provide web service on the
SSB
(stateless session bean) - the normal way.
Basically I am trying to deploy in the same way as I would on the
basic JBoss
without mobicents. On vanilla JBoss it deploys, but on mobicents it
does not.
I think it's either bug in mobicents, or I need to specify something
in order for the
webservice to deploy successfully on mobicents.
Best regards
Marko
On Feb 8, 1:29 pm, Eduardo Martins <emmart...@gmail.com> wrote:
> An SBB can't be a Web Service, the SBB is an abstract component which
> concrete instances are generated by the SLEE container, and have a
> managed lifecycle.
>
> The web service should not be inside SLEE, it should transform
> requests into SLEE events, which are fired, into SLEE, through an
> Resource Adaptor or through the SleeConnection. The SleeConnection is
> a simple and good choice if you don't have a concept such as a
> session, that relates multiple events into one "activity".
>
> If the SleeConnection is not "powerful" or "flexible" enough, the HTTP
> Servlet RA is an example of integration between a Java EE component,
> an HTTP Servlet, and a SLEE Resource Adaptor, it should not be
> difficult easy to adapt to replace the HTTP Servlet with a Web
> Service.
>
> -- Eduardo
>
> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-http://emmartins.blogspot.comhttp://www.redhat.com/solutions/telco
-- Eduardo
-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
http://emmartins.blogspot.com
http://www.redhat.com/solutions/telco
-- Eduardo
-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
http://emmartins.blogspot.com
http://www.redhat.com/solutions/telco
On Feb 8, 2:14 pm, Eduardo Martins <emmart...@gmail.com> wrote:
> Mobicents 1.2 is Mobicents SIP Servlets 1.2 right?
>
> -- Eduardo
>
> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-http://emmartins.blogspot.comhttp://www.redhat.com/solutions/telco
>
> On Mon, Feb 8, 2010 at 1:10 PM, Eduardo Martins <emmart...@gmail.com> wrote:
> > Sorry, I saw SBB, not SSB :-)
>
> > -- Eduardo
>
> > -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
> >http://emmartins.blogspot.com
> >http://www.redhat.com/solutions/telco
>
http://docs.google.com/leaf?id=0B6SMCBr_IpVjZjZjN2IyMmYtZjc1ZS00Mzg3LThlNWYtNDM4MDcyMzZlOTll&hl=en
On Feb 8, 2:21 pm, Vladimir Ralev <vladimir.ra...@gmail.com> wrote:
> Okay then, let me try to reproduce it and I will get back to you.
>
I tested fix and confirm it's working.
The only requirement is that you have to use Java 5, because it will
not work with Java 6. I am guessing that mobicents is based on jboss
for jdk5 (not the one for jdk6).
On Feb 10, 10:12 am, Jean Deruelle <jean.derue...@gmail.com> wrote:
> Can you try this buildhttp://hudson.jboss.org/hudson/job/MobicentsSipServletsRelease/706/? The
> fix is included in it and it should work.
>
> Thanks in advance
> Best regards
> Jean
>
> On Mon, Feb 8, 2010 at 2:42 PM, Vladimir Ralev <vladimir.ra...@gmail.com>wrote:
>
> > OK thanks. This reproduces the problem. It seems to be specific to
> > EARs. Can you open an issue here
> >http://code.google.com/p/mobicents/issues/list
> > Fix is on its way.
>
> > On Mon, Feb 8, 2010 at 3:32 PM, Marko Mrvelj <mmrv...@gmail.com> wrote:
> > > Here is the link for the built ear of the source example I provided in
> > > first post:
>
> >http://docs.google.com/leaf?id=0B6SMCBr_IpVjZjZjN2IyMmYtZjc1ZS00Mzg3L...
>
> > > On Feb 8, 2:21 pm, Vladimir Ralev <vladimir.ra...@gmail.com> wrote:
> > >> Okay then, let me try to reproduce it and I will get back to you.
>
> > >> On Mon, Feb 8, 2010 at 3:16 PM, Marko Mrvelj <mmrv...@gmail.com> wrote:
> > >> > Yes, SIP Servlets 1.2.
>
> > >> > On Feb 8, 2:14 pm, Eduardo Martins <emmart...@gmail.com> wrote:
> > >> >> Mobicents 1.2 is Mobicents SIP Servlets 1.2 right?
>
> > >> >> -- Eduardo
>
> > >> >> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-http:/
> > >> >> >>> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-http:/
> > /emmartins.blogspot.comhttp://www.redhat.com/solutions/telco
>
18:09:45,200 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.UnsupportedOperationException: setProperty must be
overridden by all subclasses of SOAPMessage
at javax.xml.soap.SOAPMessage.setProperty(Unknown Source)
at
org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:87)
at
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:
215)
at
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:
193)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:
455)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:
295)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:
205)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:
131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:
85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:
96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
235)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:
190)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:
126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:
70)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:
158)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
330)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
829)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
This is known issue with JBoss and JDK-6. It does not occur on JBoss
for JDK 6.
Best regards
On Feb 12, 5:07 pm, Jean Deruelle <jean.derue...@gmail.com> wrote:
> That's correct. What is the exception if you use JDK6 because I'm using JDK
> 6 locally and it works for me.
>
> Thanks
> Jean
>