WSO2WSAS sts-sample

antonio.benvenuti's picture
Hello I'm a newbie and therefore started running the samples supplied with the binary distribution of wso2wsas. When I run the sts-sample as described in the documentation, everything seems to work correctly. I have tried to make the response token check fail and therefore changed line 89 of this sample: options.setProperty(RampartMessageData.SCT_ID, responseToken.getId()); with the following: options.setProperty(RampartMessageData.SCT_ID, "1234567890"); Differently as expected, the sample continued to work!!! So reading from other examples and posts, I tried with the following code: options.setProperty(RampartMessageData.KEY_CUSTOM_ISSUED_TOKEN, responseToken.getId()); but in this case I get the following exception: Exception in thread "main" java.lang.NullPointerException at org.apache.rampart.builder.BindingBuilder.doSymmSignature(BindingBuilder.java:656) at org.apache.rampart.builder.SymmetricBindingBuilder.doSignBeforeEncrypt(SymmetricBindingBuilder.java:512) at org.apache.rampart.builder.SymmetricBindingBuilder.build(SymmetricBindingBuilder.java:97) at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:144) at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64) at org.apache.axis2.engine.Phase.invoke(Phase.java:318) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:256) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:421) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:549) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:525) at org.wso2.wsas.sample.sts.client.Client.main(Client.java:95) My question are: 1. What am I doing wrong in this sample? 2. Is the request to the epr in this sample not supposed to check the token id? If yes, why does my request with token "1234567890" succeed? 3. As found in other samples is the "KEY_CUSTOM_ISSUED_TOKEN" the correct request parameter for my needs? Thanks Antonio Benvenuti
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)