axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chinmoy Chakraborty <cch...@gmail.com>
Subject Re: Rampart error (Incoming message does not contain required Security header)
Date Thu, 16 Jul 2009 13:36:41 GMT
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 <cchinu@gmail.com>wrote:

> 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.cse@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 <cchinu@gmail.com>wrote:
>>
>>> 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">
>>> <description>Service description for ABS</description>
>>> <schema schemaNamespace="http://www.abc.com/webservice"/<http://www.abc.com/webservice%22/>
>>> >
>>> <parameter name="ServiceClass">ABS</parameter>
>>> <parameter name = "disasbleREST">true</parameter>
>>> <operation name="invoke">
>>> <messageReceiver
>>> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>> </operation>
>>> <module ref="soapmonitor"/>
>>> <module ref="rampart" />
>>> <parameter name = "InflowSecurity"><action>
>>> <items>UsernameToken</items>
>>> <passwordCallbackClass>web.ws.control.PWCBHandler</passwordCallbackClass>
>>> </action>
>>> </parameter>
>>> <parameter name="OutflowSecurity">
>>>  <action>
>>>   <items>UsernameToken</items>
>>>
>>>   <passwordCallbackClass>web.ws.control.PWCBHandler</passwordCallbackClass>
>>>  </action>
>>> </parameter>
>>> </service>
>>>
>>> Any idea?
>>>
>>> Chinmoy
>>>
>>
>>
>>
>> --
>> Nandana Mihindukulasooriya
>> WSO2 inc.
>>
>> http://nandana83.blogspot.com/
>> http://www.wso2.org
>>
>
>

Mime
View raw message