JBoss EJB unable to invoke webservices by using their class implementation
douglasoviche Nov 10, 2010 6:11 PMHi there guys,
I am a JEE Architect in Rome Italy and I was engaged to design, architect and deploy a distributed enterprise system based on EJB, JPA and Webservices.
The webservice architecture is based on CXF WS and the entire system must be must be deployed on jboss-5.1.0.GA.
I've used Maven to generate my webservices and they have been created properly by using "wsdl2java".
All webservice endpoints are deployed on different providers machines so that if one wants to make use of these services
that one has to implement its own package by using the WSDLs made available by these different providers.
So, as I mentioned already we've decide to generate the whole services by using "wsdl2java" in our pom.xml configuration and pointing at
the WSDL files location. Every single service has been created perfectly.
Well, basicly, I have a SessionBean that tries to invoke the webservice by using its class implementation, when the ejb tries to invoke the webservice I am obtaining the following error:
00:00:31,296 INFO [STDOUT] Invoking otaHotelRateAmountNotifRequest...
00:00:34,000 ERROR [STDERR] com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/plain Supported ones are: [text/xml]
00:00:34,000 ERROR [STDERR] at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:291)
00:00:34,000 ERROR [STDERR] at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
00:00:34,000 ERROR [STDERR] at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
00:00:34,015 ERROR [STDERR] at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:171)
00:00:34,015 ERROR [STDERR] at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:86)
00:00:34,015 ERROR [STDERR] at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
00:00:34,015 ERROR [STDERR] at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
00:00:34,015 ERROR [STDERR] at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
00:00:34,015 ERROR [STDERR] at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
00:00:34,031 ERROR [STDERR] at com.sun.xml.ws.client.Stub.process(Stub.java:248)
00:00:34,031 ERROR [STDERR] at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
00:00:34,031 ERROR [STDERR] at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
00:00:34,031 ERROR [STDERR] at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
00:00:34,031 ERROR [STDERR] at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
00:00:34,031 ERROR [STDERR] at $Proxy326.otaHotelRateAmountNotifRequest(Unknown Source)
00:00:34,031 ERROR [STDERR] at com.venere.xhi.OTAHotelRateAmountNotifPortTypeImpl.otaHotelRateAmountNotifRequest(OTAHotelRateAmountNotifPortTypeIm
00:00:34,031 ERROR [STDERR] at com.fhp.enterprise.venere.OTAHotelRateAmountNotifBeanSessionFacade.executeOtaRateAmountRequest(OTAHotelRateAmountNo
00:00:34,031 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
00:00:34,031 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
00:00:34,031 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
00:00:34,031 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
00:00:34,031 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
00:00:34,031 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
00:00:34,031 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
00:00:34,031 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
00:00:34,046 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
00:00:34,046 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
00:00:34,046 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
00:00:34,046 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
00:00:34,046 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
00:00:34,046 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
00:00:34,062 ERROR [STDERR] at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
00:00:34,062 ERROR [STDERR] at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
00:00:34,062 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
00:00:34,062 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
00:00:34,062 ERROR [STDERR] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
00:00:34,062 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:1029)
00:00:34,093 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
00:00:34,109 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
00:00:34,109 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
00:00:34,109 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
00:00:34,109 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
00:00:34,109 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
00:00:34,109 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
00:00:34,125 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
00:00:34,125 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
00:00:34,125 ERROR [STDERR] at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
00:00:34,125 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
00:00:34,125 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
00:00:34,125 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
00:00:34,140 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:551)
00:00:34,140 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
00:00:34,140 ERROR [LogInterceptor] RuntimeException in method: public abstract void com.fhp.enterprise.venere.OTAHotelRateAmountNotifSessionFacadeRem
java.lang.RuntimeException: com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/plain Supported ones are: [text/xml]
at com.venere.xhi.OTAHotelRateAmountNotifPortTypeImpl.otaHotelRateAmountNotifRequest(OTAHotelRateAmountNotifPortTypeImpl.java:56)
at com.fhp.enterprise.venere.OTAHotelRateAmountNotifBeanSessionFacade.executeOtaRateAmountRequest(OTAHotelRateAmountNotifBeanSessionFacade.jav
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
at org.jboss.ejb.Container.invoke(Container.java:1029)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:551)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
Caused by: com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/plain Supported ones are: [text/xml]
at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:291)
at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:171)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:86)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.client.Stub.process(Stub.java:248)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
at $Proxy326.otaHotelRateAmountNotifRequest(Unknown Source)
at com.venere.xhi.OTAHotelRateAmountNotifPortTypeImpl.otaHotelRateAmountNotifRequest(OTAHotelRateAmountNotifPortTypeImpl.java:49)
... 36 more
00:00:34,281 ERROR [ServerThread] WorkerThread#0[127.0.0.1:3785] failed
java.io.NotSerializableException: com.sun.xml.ws.util.localization.LocalizableMessage
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)
at java.lang.Throwable.writeObject(Throwable.java:648)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObjectVersion2_2(JavaSerializationManager.java:120)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObject(JavaSerializationManager.java:95)
at org.jboss.remoting.marshal.serializable.SerializableMarshaller.write(SerializableMarshaller.java:120)
at org.jboss.invocation.unified.marshall.InvocationMarshaller.write(InvocationMarshaller.java:75)
at org.jboss.remoting.transport.socket.ServerThread.versionedWrite(ServerThread.java:1006)
at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:783)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:551)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
Does any one of you have come across this error before?
Thanks in advance PALs
Douglas