[Security & JAAS/JBoss] - Re: How to authenticate to the JBoss server without FORM aut
by Marcos_APS
"ragavgomatam" wrote : Yes..Try it..This should do a Jaas Log out for you
ragavgomatam, I've tried with the code:
| HttpSession session =
| (HttpSession) FacesContext.getCurrentInstance().
| getExternalContext().getSession(false);
| session.invalidate();
|
but unfortunately it doesn't work because at this point in the web life cycle when the web container calls the method marked with the @PreDestroy annotation to do the cleanup, FacesContext.getCurrentInstance() returns null. So, I get the following exception:
| 2008-08-12 08:26:37,343 ERROR [org.jboss.web.jsf.integration.injection.JBossInjectionProvider] PreDestroy failed on managed bean.
| java.lang.reflect.InvocationTargetException
| 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.apache.catalina.util.DefaultAnnotationProcessor.preDestroy(DefaultAnnotationProcessor.java:112)
| at org.jboss.web.jsf.integration.injection.JBossInjectionProvider.invokePreDestroy(JBossInjectionProvider.java:80)
| at com.sun.faces.mgbean.BeanBuilder.destroy(BeanBuilder.java:120)
| at com.sun.faces.mgbean.BeanManager.destroy(BeanManager.java:248)
| at com.sun.faces.application.WebappLifecycleListener.handleAttributeEvent(WebappLifecycleListener.java:265)
| at com.sun.faces.application.WebappLifecycleListener.sessionDestroyed(WebappLifecycleListener.java:133)
| at com.sun.faces.config.ConfigureListener.sessionDestroyed(ConfigureListener.java:296)
| at org.apache.catalina.session.StandardSession.expire(StandardSession.java:702)
| at org.apache.catalina.session.StandardSession.expire(StandardSession.java:660)
| at org.apache.catalina.session.StandardManager.stop(StandardManager.java:676)
| at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4523)
| at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1163)
| at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4617)
| 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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.web.tomcat.service.TomcatDeployer.performUndeployInternal(TomcatDeployer.java:461)
| at org.jboss.web.tomcat.service.TomcatDeployer.performUndeploy(TomcatDeployer.java:432)
| at org.jboss.web.AbstractWebDeployer.stop(AbstractWebDeployer.java:422)
| at org.jboss.web.WebModule.stopModule(WebModule.java:100)
| at org.jboss.web.WebModule.stopService(WebModule.java:66)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
| 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(ReflectedDispatcher.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(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.stop(Unknown Source)
| at org.jboss.system.ServiceController.stop(ServiceController.java:508)
| 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(ReflectedDispatcher.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(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy44.stop(Unknown Source)
| at org.jboss.web.AbstractWebContainer.stop(AbstractWebContainer.java:498)
| 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(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.wsf.container.jboss42.DeployerInterceptor.stop(DeployerInterceptor.java:98)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.stop(SubDeployerInterceptorSupport.java:196)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:99)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy45.stop(Unknown Source)
| at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
| at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
| at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
| at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
| 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(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.undeploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:450)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:604)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| Caused by: java.lang.NullPointerException
| at br.urca.www.biblioteca.dados.ejb.AutenticacaoEJB.logout(AutenticacaoEJB.java:34)
| at br.urca.www.biblioteca.web.PesquisaAcervo.finalizar(PesquisaAcervo.java:60)
| ... 96 more
| 2008-08-12 08:26:37,343 ERROR [org.jboss.web.jsf.integration.injection.JBossInjectionProvider] PreDestroy failed on managed bean.
| java.lang.reflect.InvocationTargetException
| 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.apache.catalina.util.DefaultAnnotationProcessor.preDestroy(DefaultAnnotationProcessor.java:112)
| at org.jboss.web.jsf.integration.injection.JBossInjectionProvider.invokePreDestroy(JBossInjectionProvider.java:80)
| at com.sun.faces.mgbean.BeanBuilder.destroy(BeanBuilder.java:120)
| at com.sun.faces.mgbean.BeanManager.destroy(BeanManager.java:248)
| at com.sun.faces.application.WebappLifecycleListener.handleAttributeEvent(WebappLifecycleListener.java:265)
| at com.sun.faces.application.WebappLifecycleListener.attributeRemoved(WebappLifecycleListener.java:189)
| at com.sun.faces.config.ConfigureListener.attributeRemoved(ConfigureListener.java:333)
| at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1670)
| at org.apache.catalina.session.StandardSession.expire(StandardSession.java:756)
| at org.apache.catalina.session.StandardSession.expire(StandardSession.java:660)
| at org.apache.catalina.session.StandardManager.stop(StandardManager.java:676)
| at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4523)
| at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1163)
| at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4617)
| 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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.web.tomcat.service.TomcatDeployer.performUndeployInternal(TomcatDeployer.java:461)
| at org.jboss.web.tomcat.service.TomcatDeployer.performUndeploy(TomcatDeployer.java:432)
| at org.jboss.web.AbstractWebDeployer.stop(AbstractWebDeployer.java:422)
| at org.jboss.web.WebModule.stopModule(WebModule.java:100)
| at org.jboss.web.WebModule.stopService(WebModule.java:66)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
| 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(ReflectedDispatcher.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(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.stop(Unknown Source)
| at org.jboss.system.ServiceController.stop(ServiceController.java:508)
| 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(ReflectedDispatcher.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(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy44.stop(Unknown Source)
| at org.jboss.web.AbstractWebContainer.stop(AbstractWebContainer.java:498)
| 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(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.wsf.container.jboss42.DeployerInterceptor.stop(DeployerInterceptor.java:98)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.stop(SubDeployerInterceptorSupport.java:196)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:99)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy45.stop(Unknown Source)
| at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
| at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
| at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
| at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
| 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(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.undeploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:450)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:604)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| Caused by: java.lang.NullPointerException
| at br.urca.www.biblioteca.dados.ejb.AutenticacaoEJB.logout(AutenticacaoEJB.java:34)
| at br.urca.www.biblioteca.web.PesquisaAcervo.finalizar(PesquisaAcervo.java:60)
|
I placed System.out.println calls and I saw that really FacesContext.getCurrentInstance() is returning null at this point. In my application there's not a logout button or whatever for the user to logout. All this is happening when I'm redeploying the application to the server, and the server is in the process of shutting down the old application that was running.
This application that I'm developing doesn't have to have any security restrictions. I mean, everyone could access it and I don't need to secure my EJBs restricting access to some roles. So, I was wondering as I'm able to make EJB calls without authentication (as was shown previously), wouldn't be ok to just proceed like this? I think that when I don't provide an authenticated user to JBoss, it is using something like this behind the scenes automatically for me (correct me if I'm wrong), if not I wouldn't be able to make method calls. So, if JBoss releases the resources it allocates when the session expires, it would be ok for me. So, what do you have to tell me about this? How JBoss behave in this case? Is this a good approach for me to follow? If not, what would be another place for me to do the logout from the WebAutentication facility?
Thank you.
Marcos
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170053#4170053
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170053
17 years, 11 months
[JBossWS] - WS-RM violates both <ExactlyOnce/> and <InOrder/> ?
by karypid
I have a web service with WS-RM enabled. Here is the WSDL as published by JBoss, with the associated policy in bold fonts:
<definitions name="StationsService" targetNamespace="http://www.armoniq.com/StationsService/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.armoniq.com/StationsService/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| <types>
| <xs:schema targetNamespace="http://www.armoniq.com/StationsService/" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
| <xs:element name="echo">
| <xs:complexType>
| <xs:sequence>
| <xs:element name="in" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| <xs:element name="echoResponse">
| <xs:complexType>
| <xs:sequence>
| <xs:element name="out" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| </xs:schema>
| </types>
| <message name="StationsServicePortType_echoResponse">
| <part element="tns:echoResponse" name="echoResponse"/>
| </message>
| <message name="StationsServicePortType_echo">
| <part element="tns:echo" name="echo"/>
| </message>
| <portType name="StationsServicePortType">
| <operation name="echo" parameterOrder="echo">
| <input message="tns:StationsServicePortType_echo"/>
| <output message="tns:StationsServicePortType_echoResponse"/>
| </operation>
| </portType>
| <binding name="StationsServicePortTypeBinding" type="tns:StationsServicePortType">
| <wsp:PolicyReference URI="#exactly_one_in_order_rm_delivery"/>
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| <operation name="echo">
| <soap:operation soapAction="http://www.armoniq.com/StationsService/echo"/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
| </binding>
| <service name="StationsService">
| <port binding="tns:StationsServicePortTypeBinding" name="StationsServicePort">
| <soap:address location="http://localhost:8080/eessi.ear-eessi.ws.mta/StationsServiceImpl"/>
| </port>
| </service>
| <wsp:Policy wsu:Id="exactly_one_in_order_rm_delivery" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
| <wsp:All>
| <wsrmp:DeliveryAssurance xmlns:wsrmp="http://docs.oasis-open.org/ws-rx/wsrmp/200702">
| <wsp:Policy>
| <wsp:ExactlyOne>
| <wsp:All>
| <wsrmp:ExactlyOnce/>
| <wsrmp:InOrder/>
| </wsp:All>
| </wsp:ExactlyOne>
| </wsp:Policy>
| </wsrmp:DeliveryAssurance>
| </wsp:All>
| </wsp:Policy>
| </definitions>
When starting up, JBoss logs that that the service is running properly with the appropriate JAX-WS handlers for WS-ReliableMessaging:
HandlerMetaDataJAXWS:
| type=POST
| name=WSAddressing Handler
| class=class org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler
| params=[]
| protocols=##SOAP11_HTTP
| services=null
| ports=null
|
| HandlerMetaDataJAXWS:
| type=POST
| name=WSRM Handler
| class=class org.jboss.ws.extensions.wsrm.jaxws.RMServerHandler
| params=[]
| protocols=##SOAP11_HTTP
| services=null
| ports=null
| 2008-08-12 14:16:20,081 DEBUG [org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl] RMDeploymentAspect:Start
| 2008-08-12 14:16:20,081 DEBUG [org.jboss.wsf.framework.DefaultSPIProvider] provide SPI 'class org.jboss.wsf.spi.management.ServerConfigFactory'
| 2008-08-12 14:16:20,081 DEBUG [org.jboss.wsf.framework.DefaultSPIProvider] class org.jboss.wsf.spi.management.ServerConfigFactory Implementation: org.jboss.wsf.framework.management.ServerConfigFactoryImpl@187b08d
| 2008-08-12 14:16:20,112 INFO [org.jboss.ws.extensions.wsrm.server.RMDeploymentAspect] WS-RM invocation handler associated with endpoint http://localhost:8080/eessi.ear-eessi.ws.mta/StationsServiceImpl
| 2008-08-12 14:16:20,112 DEBUG [org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl] PublishContractDeploymentAspect:Start
| 2008-08-12 14:16:20,112 DEBUG [org.jboss.wsf.framework.DefaultSPIProvider] provide SPI 'class org.jboss.wsf.spi.management.ServerConfigFactory'
| 2008-08-12 14:16:20,112 DEBUG [org.jboss.wsf.framework.DefaultSPIProvider] class org.jboss.wsf.spi.management.ServerConfigFactory Implementation: org.jboss.wsf.framework.management.ServerConfigFactoryImpl@7720d7
| 2008-08-12 14:16:20,112 DEBUG [org.jboss.wsf.stack.jbws.WSDLFilePublisher] Publish WSDL file: file:/D:/Programs/jboss/as0/jboss-4.2.3.GA/server/default/tmp/jbossws/StationsService13926.wsdl
| 2008-08-12 14:16:20,112 INFO [org.jboss.wsf.stack.jbws.WSDLFilePublisher] WSDL published to: file:/D:/Programs/jboss/as0/jboss-4.2.3.GA/server/default/data/wsdl/eessi.ear.ear/eessi.ws.mta.jar/StationsService13926.wsdl
I then try to send two messages from a simple Java client using asynchronous invocation:
public void wsrmTest() throws InterruptedException, ExecutionException,
| MalformedURLException {
| final int MAX_PACKETS = 2;
| Response<EchoResponse> response = null;
|
| QName serviceName = new QName(
| "http://www.armoniq.com/StationsService/", "StationsService");
| URL wsdlURL = new URL(
| "http://localhost:8080/eessi.ear-eessi.ws.mta/StationsServiceImpl?wsdl");
| StationsService ss = new StationsService(wsdlURL, serviceName);
| ssp = ss.getStationsServicePort();
| ((StubExt) ssp).setConfigName("Standard Anonymous WSRM Client",
| "META-INF/wsrm-jaxws-client-config.xml");
|
| for (int i = 0; i < MAX_PACKETS; i++)
| response = ssp.echoAsync("PACKET " + i);
| System.out.println("Sent out all my packets asynchronously...");
|
| System.out.println("Last response: " + response.get());
| Thread.sleep((MAX_PACKETS + 1) * 2000);
| System.out.println("All packets should have returned...");
| ((RMProvider) ssp).closeSequence();
| }
When running, JBoss throws this exception:
2008-08-12 14:21:18,039 DEBUG [org.jboss.ws.extensions.wsrm.server.RMServerSequence] Inbound Sequence: urn:uuid:5074e327-2f26-424f-a744-47836a765fd, received message no. 1
| 2008-08-12 14:21:18,055 DEBUG [org.jboss.ws.extensions.wsrm.server.RMInvocationHandler] Invoking method: echo
| 2008-08-12 14:21:18,055 DEBUG [org.jboss.ws.core.EndpointInvocation] getRequestPayload
| 2008-08-12 14:21:18,055 DEBUG [org.jboss.ws.core.EndpointInvocation] getRequestParamValue: {http://www.armoniq.com/StationsService/}echo
| 2008-08-12 14:21:18,055 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] -----------------------------------
| 2008-08-12 14:21:18,055 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] Transitioning from XML_VALID to OBJECT_VALID
| 2008-08-12 14:21:18,055 DEBUG [org.jboss.ws.core.soap.XMLContent] getObjectValue [xmlType={http://www.armoniq.com/StationsService/}echo,javaType=class com.armoniq.stationsservice.Echo]
| 2008-08-12 14:21:18,055 DEBUG [org.jboss.ws.core.jaxws.JAXBDeserializer] deserialize: [xmlName={http://www.armoniq.com/StationsService/}echo,xmlType={http://www...]
| 2008-08-12 14:21:18,055 DEBUG [org.jboss.ws.core.jaxws.handler.MessageContextJAXWS] Begin response processing
| 2008-08-12 14:21:18,055 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@54c2b8 (Thread http-localhost%2F127.0.0.1-8080-5)
| 2008-08-12 14:21:18,055 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@1ce4608 (Thread http-localhost%2F127.0.0.1-8080-5)
| 2008-08-12 14:21:18,055 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
| org.jboss.ws.extensions.wsrm.RMFault: The value of wsrm:Identifier is not a known Sequence identifier.
| at org.jboss.ws.extensions.wsrm.server.RMInvocationHandler.getUnknownSequenceFault(RMInvocationHandler.java:297)
| at org.jboss.ws.extensions.wsrm.server.RMInvocationHandler.prepareResponseContext(RMInvocationHandler.java:242)
| at org.jboss.ws.extensions.wsrm.server.RMInvocationHandler.invoke(RMInvocationHandler.java:306)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| 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:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| 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:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Unknown Source)
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] Cannot obtain fault meta data for: class org.jboss.ws.extensions.wsrm.RMFault
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: PRE
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: ENDPOINT
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] callFaultHandlerChain: POST
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Enter: handleOutBoundFault
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler] handleFault
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.extensions.wsrm.jaxws.RMServerHandler] handling fault message
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.extensions.wsrm.jaxws.RMServerHandler] SequenceFault WSRM message was serialized to payload
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] Exit: handleOutBoundFault with status: true
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] closeHandlerChain
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] close
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] closeHandlerChain
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] close
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS] closeHandlerChain
| 2008-08-12 14:21:18,071 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] close
If I don't use the asynchronous invocation, my client works just fine. Any idea what I am doing wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170051#4170051
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170051
17 years, 11 months
[JBoss Portal] - Portlet 2.0 serveResource ..... question ?
by ericmacau
Hello,
I want to load the static resources from the JAR, and portlet 2.0 has a new feature .....
public void serveResource(ResourceRequest request, ResourceResponse response)
Anyway, if I want to load a CSS from JAR, but in the CSS, it has some background image, how can I do that? For example, in the CSS :
#logoName {
background-image: url( images/logo.gif );
background-repeat: no-repeat;
float: left;
width: 250px;
height: 25px;
z-index: 2;
position: absolute;
left: 20px;
top: 10px;
}
In above styles, I have a image logo.gif in the CSS file. But in the serveResource(..) method, I just need to load the CSS file and output it to the page. But it cannot load the logo.gif.
How can it load automatically or I have to load it by manually?
Best regards,
Eric
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170038#4170038
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170038
17 years, 11 months