Re: Rampart error (Incoming message does not contain required Security header)
Hi Nandana, Following is my 'OutflowSecurity' entry in client side axis2.xml. parameter name=OutflowSecurity action itemsUsernameToken/items userbob/user passwordCallbackClasslabware.web.ws.control.PWCBHandler/passwordCallbackClass passwordTypePasswordText/passwordType /action /parameter Is this OK for policy based WS-Security enabled service call? Please find attached axis2.xml. Chinmoy On Thu, Jul 16, 2009 at 7:06 PM, Chinmoy Chakraborty cch...@gmail.comwrote: Hi Nandana, Now it works. The problem was the param 'InFlow' and some others are case sensitive. I edited them and it worked. Thanks. Chinmoy On Thu, Jul 16, 2009 at 5:19 PM, Chinmoy Chakraborty cch...@gmail.comwrote: Hi Nandana, Thanks a lot for the reply. Now I am getting following error: org.apache.axis2.deployment.DeploymentException: The Dispatch phase is not found on the global InFlow phase of the axis2.xml file. Make sure the phase is within the axis2.xml file. at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:158) at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:133) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184) My client code is: try { ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(D:/Codes/weblims3/exploded/WEB-INF, D:/Codes/weblims3/axis2.xml); } catch (AxisFault axisFault) { axisFault.printStackTrace(); } The error is happening in the previous line. What does it meant by Repository Path? Please find attached axis2.xml. Chinmoy On Thu, Jul 16, 2009 at 9:27 AM, Nandana Mihindukulasooriya nandana@gmail.com wrote: Hi Chinmoy, As it seems, you don't have the OutflowSecurity parameter defined in the client side. So basically you need to have a client side axis2 with that parameter and then create a ConfigurationContext out of it. Rampart basic sample 01 shows how to do this [1],[2]. But you won't be able to pass username/password through options when you use parameter based configuration. Is there a possibility for you to use policy based configuration. If so, please look at following tutorial [2]. regards, Nandana [1] - https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/client.axis2.xml [2] - https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/Client.java [3] - https://www.wso2.org/library/3190 On Wed, Jul 15, 2009 at 5:45 PM, Chinmoy Chakraborty cch...@gmail.comwrote: Hi, I am getting following error while trying to invoke a WS-Security enabled client request: org.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not contain required Security header at org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:221) at org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:86) at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72) at org.apache.axis2.engine.Phase.invoke(Phase.java:317) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) I am missing something I know but not sure what. Following is my client code: ServiceClient client = new ServiceClient(); Options options = new Options(); options.setAction(invoke); options.setUserName(system); options.setPassword(manager); options.setTo(new EndpointReference(wsServerUrl + services/ABS)); client.setOptions(options); client.engageModule(rampart); OMElement response = client.sendReceive(getPayload(args)); Following is my services.xml: service name=ABS targetNamespace=http://www.abc.com/webservice; descriptionService description for ABS/description schema schemaNamespace=http://www.abc.com/webservice/http://www.abc.com/webservice%22/ parameter name=ServiceClassABS/parameter parameter name = disasbleRESTtrue/parameter operation name=invoke messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /operation module ref=soapmonitor/ module ref=rampart / parameter name = InflowSecurityaction itemsUsernameToken/items passwordCallbackClassweb.ws.control.PWCBHandler/passwordCallbackClass /action /parameter parameter name=OutflowSecurity action itemsUsernameToken/items passwordCallbackClassweb.ws.control.PWCBHandler/passwordCallbackClass /action /parameter /service Any idea? Chinmoy -- Nandana Mihindukulasooriya WSO2 inc. http://nandana83.blogspot.com/
Re: Rampart error (Incoming message does not contain required Security header)
Hi Nandana, Thanks a lot for the reply. Now I am getting following error: org.apache.axis2.deployment.DeploymentException: The Dispatch phase is not found on the global InFlow phase of the axis2.xml file. Make sure the phase is within the axis2.xml file. at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:158) at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:133) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184) My client code is: try { ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(D:/Codes/weblims3/exploded/WEB-INF, D:/Codes/weblims3/axis2.xml); } catch (AxisFault axisFault) { axisFault.printStackTrace(); } The error is happening in the previous line. What does it meant by Repository Path? Please find attached axis2.xml. Chinmoy On Thu, Jul 16, 2009 at 9:27 AM, Nandana Mihindukulasooriya nandana@gmail.com wrote: Hi Chinmoy, As it seems, you don't have the OutflowSecurity parameter defined in the client side. So basically you need to have a client side axis2 with that parameter and then create a ConfigurationContext out of it. Rampart basic sample 01 shows how to do this [1],[2]. But you won't be able to pass username/password through options when you use parameter based configuration. Is there a possibility for you to use policy based configuration. If so, please look at following tutorial [2]. regards, Nandana [1] - https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/client.axis2.xml [2] - https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/Client.java [3] - https://www.wso2.org/library/3190 On Wed, Jul 15, 2009 at 5:45 PM, Chinmoy Chakraborty cch...@gmail.comwrote: Hi, I am getting following error while trying to invoke a WS-Security enabled client request: org.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not contain required Security header at org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:221) at org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:86) at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72) at org.apache.axis2.engine.Phase.invoke(Phase.java:317) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) I am missing something I know but not sure what. Following is my client code: ServiceClient client = new ServiceClient(); Options options = new Options(); options.setAction(invoke); options.setUserName(system); options.setPassword(manager); options.setTo(new EndpointReference(wsServerUrl + services/ABS)); client.setOptions(options); client.engageModule(rampart); OMElement response = client.sendReceive(getPayload(args)); Following is my services.xml: service name=ABS targetNamespace=http://www.abc.com/webservice; descriptionService description for ABS/description schema schemaNamespace=http://www.abc.com/webservice/http://www.abc.com/webservice%22/ parameter name=ServiceClassABS/parameter parameter name = disasbleRESTtrue/parameter operation name=invoke messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /operation module ref=soapmonitor/ module ref=rampart / parameter name = InflowSecurityaction itemsUsernameToken/items passwordCallbackClassweb.ws.control.PWCBHandler/passwordCallbackClass /action /parameter parameter name=OutflowSecurity action itemsUsernameToken/items passwordCallbackClassweb.ws.control.PWCBHandler/passwordCallbackClass /action /parameter /service Any idea? Chinmoy -- Nandana Mihindukulasooriya WSO2 inc. http://nandana83.blogspot.com/ http://www.wso2.org axisconfig name=AxisJava2.0 module ref=rampart / parameter name=OutflowSecurity action itemsUsernameToken/items usersystem/user passwordCallbackClasslabware.web.ws.control.PWCBHandler/passwordCallbackClass /action /parameter parameter name=hotdeployment locked=falsetrue/parameter parameter name=hotupdate locked=falsetrue/parameter messageReceiver mep=INOUT class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ transportSender name=http class=org.apache.axis2.transport.http.CommonsHTTPTransportSender parameter name=PROTOCOL locked=falseHTTP/1.0/parameter /transportSender phaseOrder type=inflow !-- System pre defined phases -- phase
Re: Rampart error (Incoming message does not contain required Security header)
Hi Nandana, Now it works. The problem was the param 'InFlow' and some others are case sensitive. I edited them and it worked. Thanks. Chinmoy On Thu, Jul 16, 2009 at 5:19 PM, Chinmoy Chakraborty cch...@gmail.comwrote: Hi Nandana, Thanks a lot for the reply. Now I am getting following error: org.apache.axis2.deployment.DeploymentException: The Dispatch phase is not found on the global InFlow phase of the axis2.xml file. Make sure the phase is within the axis2.xml file. at org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:158) at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:133) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184) My client code is: try { ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(D:/Codes/weblims3/exploded/WEB-INF, D:/Codes/weblims3/axis2.xml); } catch (AxisFault axisFault) { axisFault.printStackTrace(); } The error is happening in the previous line. What does it meant by Repository Path? Please find attached axis2.xml. Chinmoy On Thu, Jul 16, 2009 at 9:27 AM, Nandana Mihindukulasooriya nandana@gmail.com wrote: Hi Chinmoy, As it seems, you don't have the OutflowSecurity parameter defined in the client side. So basically you need to have a client side axis2 with that parameter and then create a ConfigurationContext out of it. Rampart basic sample 01 shows how to do this [1],[2]. But you won't be able to pass username/password through options when you use parameter based configuration. Is there a possibility for you to use policy based configuration. If so, please look at following tutorial [2]. regards, Nandana [1] - https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/client.axis2.xml [2] - https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/Client.java [3] - https://www.wso2.org/library/3190 On Wed, Jul 15, 2009 at 5:45 PM, Chinmoy Chakraborty cch...@gmail.comwrote: Hi, I am getting following error while trying to invoke a WS-Security enabled client request: org.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not contain required Security header at org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:221) at org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:86) at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72) at org.apache.axis2.engine.Phase.invoke(Phase.java:317) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) I am missing something I know but not sure what. Following is my client code: ServiceClient client = new ServiceClient(); Options options = new Options(); options.setAction(invoke); options.setUserName(system); options.setPassword(manager); options.setTo(new EndpointReference(wsServerUrl + services/ABS)); client.setOptions(options); client.engageModule(rampart); OMElement response = client.sendReceive(getPayload(args)); Following is my services.xml: service name=ABS targetNamespace=http://www.abc.com/webservice; descriptionService description for ABS/description schema schemaNamespace=http://www.abc.com/webservice/http://www.abc.com/webservice%22/ parameter name=ServiceClassABS/parameter parameter name = disasbleRESTtrue/parameter operation name=invoke messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /operation module ref=soapmonitor/ module ref=rampart / parameter name = InflowSecurityaction itemsUsernameToken/items passwordCallbackClassweb.ws.control.PWCBHandler/passwordCallbackClass /action /parameter parameter name=OutflowSecurity action itemsUsernameToken/items passwordCallbackClassweb.ws.control.PWCBHandler/passwordCallbackClass /action /parameter /service Any idea? Chinmoy -- Nandana Mihindukulasooriya WSO2 inc. http://nandana83.blogspot.com/ http://www.wso2.org
Rampart error (Incoming message does not contain required Security header)
Hi, I am getting following error while trying to invoke a WS-Security enabled client request: org.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not contain required Security header at org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:221) at org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:86) at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72) at org.apache.axis2.engine.Phase.invoke(Phase.java:317) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) I am missing something I know but not sure what. Following is my client code: ServiceClient client = new ServiceClient(); Options options = new Options(); options.setAction(invoke); options.setUserName(system); options.setPassword(manager); options.setTo(new EndpointReference(wsServerUrl + services/ABS)); client.setOptions(options); client.engageModule(rampart); OMElement response = client.sendReceive(getPayload(args)); Following is my services.xml: service name=ABS targetNamespace=http://www.abc.com/webservice; descriptionService description for ABS/description schema schemaNamespace=http://www.abc.com/webservice/http://www.abc.com/webservice%22/ parameter name=ServiceClassABS/parameter parameter name = disasbleRESTtrue/parameter operation name=invoke messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /operation module ref=soapmonitor/ module ref=rampart / parameter name = InflowSecurityaction itemsUsernameToken/items passwordCallbackClassweb.ws.control.PWCBHandler/passwordCallbackClass /action /parameter parameter name=OutflowSecurity action itemsUsernameToken/items passwordCallbackClassweb.ws.control.PWCBHandler/passwordCallbackClass /action /parameter /service Any idea? Chinmoy
Re: Rampart error (Incoming message does not contain required Security header)
Hi Chinmoy, As it seems, you don't have the OutflowSecurity parameter defined in the client side. So basically you need to have a client side axis2 with that parameter and then create a ConfigurationContext out of it. Rampart basic sample 01 shows how to do this [1],[2]. But you won't be able to pass username/password through options when you use parameter based configuration. Is there a possibility for you to use policy based configuration. If so, please look at following tutorial [2]. regards, Nandana [1] - https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/client.axis2.xml [2] - https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/Client.java [3] - https://www.wso2.org/library/3190 On Wed, Jul 15, 2009 at 5:45 PM, Chinmoy Chakraborty cch...@gmail.comwrote: Hi, I am getting following error while trying to invoke a WS-Security enabled client request: org.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not contain required Security header at org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:221) at org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:86) at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72) at org.apache.axis2.engine.Phase.invoke(Phase.java:317) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) I am missing something I know but not sure what. Following is my client code: ServiceClient client = new ServiceClient(); Options options = new Options(); options.setAction(invoke); options.setUserName(system); options.setPassword(manager); options.setTo(new EndpointReference(wsServerUrl + services/ABS)); client.setOptions(options); client.engageModule(rampart); OMElement response = client.sendReceive(getPayload(args)); Following is my services.xml: service name=ABS targetNamespace=http://www.abc.com/webservice; descriptionService description for ABS/description schema schemaNamespace=http://www.abc.com/webservice/http://www.abc.com/webservice%22/ parameter name=ServiceClassABS/parameter parameter name = disasbleRESTtrue/parameter operation name=invoke messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /operation module ref=soapmonitor/ module ref=rampart / parameter name = InflowSecurityaction itemsUsernameToken/items passwordCallbackClassweb.ws.control.PWCBHandler/passwordCallbackClass /action /parameter parameter name=OutflowSecurity action itemsUsernameToken/items passwordCallbackClassweb.ws.control.PWCBHandler/passwordCallbackClass /action /parameter /service Any idea? Chinmoy -- Nandana Mihindukulasooriya WSO2 inc. http://nandana83.blogspot.com/ http://www.wso2.org