Re: Rampart error (Incoming message does not contain required Security header)

2009-07-17 Thread Chinmoy Chakraborty
Hi Nandana,

Following is my 'OutflowSecurity' entry in client side axis2.xml.


 
 UsernameToken
 bob

 
labware.web.ws.control.PWCBHandler
   PasswordText
   


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 wrote:

> 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 
> 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@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 
>>> 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:

 http://www.abc.com/webservice";>
 Service description for ABS
 >>> schemaNamespace="http://www.abc.com/webservice"/
 >
 ABS
 true
 
 >>> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
 
 
 
 
 UsernameToken

 web.ws.control.PWCBHandler
 
 
 
  
   UsernameToken

   web.ws.control.PWCBHandler
  
 
 

 Any idea?

 Chinmoy

>>>
>>>
>>>
>>> --
>>> Nandana Mihindukulasooriya
>>> WSO2 inc.
>>>
>>> http://nandana83.blogspot.com/
>>> http://www.wso2.org
>>>
>>
>>
>


	
	
	
	
	UsernameToken
	bob
	labware.web.ws.control.PWCBHandler
			PasswordText
  	
 
	
true
t

Re: Rampart error (Incoming message does not contain required Security header)

2009-07-16 Thread Chinmoy Chakraborty
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 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@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 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:
>>>
>>> http://www.abc.com/webservice";>
>>> Service description for ABS
>>> >> schemaNamespace="http://www.abc.com/webservice"/
>>> >
>>> ABS
>>> true
>>> 
>>> >> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>> 
>>> 
>>> 
>>> 
>>> UsernameToken
>>> web.ws.control.PWCBHandler
>>> 
>>> 
>>> 
>>>  
>>>   UsernameToken
>>>
>>>   web.ws.control.PWCBHandler
>>>  
>>> 
>>> 
>>>
>>> Any idea?
>>>
>>> Chinmoy
>>>
>>
>>
>>
>> --
>> Nandana Mihindukulasooriya
>> WSO2 inc.
>>
>> http://nandana83.blogspot.com/
>> http://www.wso2.org
>>
>
>


Re: Rampart error (Incoming message does not contain required Security header)

2009-07-16 Thread Chinmoy Chakraborty
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 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:
>>
>> http://www.abc.com/webservice";>
>> Service description for ABS
>> > schemaNamespace="http://www.abc.com/webservice"/
>> >
>> ABS
>> true
>> 
>> > class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>> 
>> 
>> 
>> 
>> UsernameToken
>> web.ws.control.PWCBHandler
>> 
>> 
>> 
>>  
>>   UsernameToken
>>
>>   web.ws.control.PWCBHandler
>>  
>> 
>> 
>>
>> Any idea?
>>
>> Chinmoy
>>
>
>
>
> --
> Nandana Mihindukulasooriya
> WSO2 inc.
>
> http://nandana83.blogspot.com/
> http://www.wso2.org
>


	
	
	
	
	UsernameToken
	system
	labware.web.ws.control.PWCBHandler
  	

	
true
true




HTTP/1.0


   

 





































































Re: Rampart error (Incoming message does not contain required Security header)

2009-07-15 Thread Nandana Mihindukulasooriya
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 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:
>
> http://www.abc.com/webservice";>
> Service description for ABS
>  schemaNamespace="http://www.abc.com/webservice"/
> >
> ABS
> true
> 
>  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
> 
> 
> 
> 
> UsernameToken
> web.ws.control.PWCBHandler
> 
> 
> 
>  
>   UsernameToken
>   web.ws.control.PWCBHandler
>  
> 
> 
>
> 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)

2009-07-15 Thread Chinmoy Chakraborty
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:

http://www.abc.com/webservice";>
Service description for ABS
http://www.abc.com/webservice"/
>
ABS
true






UsernameToken
web.ws.control.PWCBHandler



 
  UsernameToken
  web.ws.control.PWCBHandler
 



Any idea?

Chinmoy