Great. :) . I think we need more documentation on policy based
configuration. I am hoping to write some but couldn't find some cycles to
attend to it.

thanks,
nandana

On Fri, Feb 6, 2009 at 1:56 AM, Philippe Camus <philippe.ca...@gmail.com>wrote:

> Hi Nandana,
>
> This is actually working. It is a configuration problem in my ESB. I
> thought
> I configured it to remove the SOAP security header before passing it on to
> the endpoint, but apparently not....
>
> Best regards,
>
> Philippe
>
>
> On Wed, Feb 4, 2009 at 6:58 PM, Nandana Mihindukulasooriya <
> nandana....@gmail.com> wrote:
>
> > Hi Phil,
> >      In your axis2.xml, do you have any security policies ? Or did you
> > attach a security
> > policy to the client by any means  ? As I see you are using a code
> > generated
> > stub. If the
> > WSDL had any security policies they will be automatically attached to the
> > stub. You can
> > check this for sure if you check the populateAxisService() method of the
> > generated stub.
> > When security policies are present in the policy based handlers are
> > triggered as they have
> > precedence over the rampart basic configuration.
> >     On a side note, I think it is better to use the policy based
> > configuration approach in the
> > client side too rather than using the deprecated old configuration . If
> the
> > WSDL has the security
> > policies published this becomes very easy. Please look at the tutorials,
> >
> > http://wso2.org/library/3190
> > https://wso2.org/library/3415
> >
> > thanks,
> > nandana
> >
> >
> > On Thu, Feb 5, 2009 at 3:58 AM, Philippe Camus <philippe.ca...@gmail.com
> > >wrote:
> >
> > > Hi all,
> > >
> > > I am trying to invoke a web service with a basic policy applied to it
> > > (basic
> > > sample 02 in Rampart 1.4). I am using Axis2 1.4.1 and Rampart 1.4. Here
> > is
> > > part of my client code:
> > >
> > > ConfigurationContext ctx =
> > >
> > >
> >
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("repository",
> > > "repository/conf/client.axis2.xml");
> > > MyServiceProxyStub service = new MyServiceProxyStub(ctx);
> > >
> > > My client.axis2.xml contains:
> > >
> > > <module ref="rampart" />
> > >
> > >    <parameter name="OutflowSecurity">
> > >      <action>
> > >        <items>UsernameToken Timestamp</items>
> > >        <user>john</user>
> > >
> > > <passwordCallbackClass>org.example.PWCBHandler</passwordCallbackClass>
> > >      </action>
> > >    </parameter>
> > >
> > > When trying to invoke the service, I get the following error in the
> > client:
> > >
> > > org.apache.axis2.AxisFault: No user value in the rampart configuration
> > > policy
> > >    at
> > > org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
> > >    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.send(AxisEngine.java:429)
> > >    at
> > >
> > >
> >
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> > >    at
> > >
> > >
> >
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> > >    at
> > >
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> > >    at
> > >
> > >
> >
> org.wso2.wsas.example.GameServiceProxyStub.startGame(GameServiceProxyStub.java:759)
> > >    at org.wso2.wsas.example.GameClient.main(GameClient.java:46)
> > > Caused by: org.apache.rampart.RampartException: No user value in the
> > > rampart
> > > configuration policy
> > >    at
> > >
> > >
> >
> org.apache.rampart.builder.BindingBuilder.addUsernameToken(BindingBuilder.java:198)
> > >    at
> > >
> > >
> >
> org.apache.rampart.builder.TransportBindingBuilder.build(TransportBindingBuilder.java:100)
> > >    at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:140)
> > >    at
> > > org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
> > >    ... 8 more
> > >
> > > I am really confused on how to figure this out... thanks in advance for
> > any
> > > pointer!
> > >
> > > Best regards,
> > >
> > > Phil
> > >
> >
> >
> >
> > --
> > Nandana Mihindukulasooriya
> > WSO2 inc.
> >
> > http://nandana83.blogspot.com/
> > http://www.wso2.org
> >
>



-- 
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/
http://www.wso2.org

Reply via email to