Hi,

Please see my comments below:

On 11/2/07, Massimiliano Masi <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'm very frustrated: I'm developing policies for getting a SAML 2 token
> from a WS-Trust STS implemented using Rahas.
>
> I've to put it in the wsse:Security. So I created the following policy
> for the service that needs the token as is [1] (taken from the WSAS
> example).
>
> I got NPE:
>

Can you please send the request message and the response message you
receive from the STS? Seems like the NPE occurs when Axis2 tries to
handle receive the error message.

>
>
> 19:20:49,721 ERROR [AxisServlet]
> java.lang.NullPointerException
>          at
> java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:103)
>          at java.util.ResourceBundle.getObject(ResourceBundle.java:319)
>          at java.util.ResourceBundle.getString(ResourceBundle.java:285)
>          at 
> org.apache.rahas.TrustException.getMessage(TrustException.java:105)
>          at org.apache.rahas.TrustException.<init>(TrustException.java:54)
>          at org.apache.rahas.TrustException.<init>(TrustException.java:83)
>          at
> com.spirit.XUA.utils.SpiritTokenIssuer.issue(SpiritTokenIssuer.java:234)
>
> org.apache.axis2.AxisFault: java.lang.NullPointerException
>          at
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
>          at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
>          at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
>          at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>          at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>          at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>          at
> org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:127)
>          at
> com.spirit.XUA.utils.XUAAssertions.getAuthenticatedViaWSTrust(XUAAssertions.java:430)
>
>
> So, I cannot access the STS, that gives me a TrustException.
>
> If I use the following policy [2] I got this MTOM (?) exception
> client side (after getting in the right way the SAML assertion):
>
IMHO this policy is not correct.
If you simply need the SAML token added to the wsse:Security header
you should define a SignedSupportingTokens assertion with the issued
token, rather than a ProtectionToken.

Also please include axis2-mtompolicy-<version>.jar file in your
classpath as wll.

Thanks,
Ruchith

p.s. Please subscribe([EMAIL PROTECTED]) and post
rampart/rahas specific issues in [EMAIL PROTECTED] list.

>
>
>
>       [java] org.apache.axis2.AxisFault:
> org/apache/axis2/policy/model/MTOMAssertion
>       [java]    at
> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
>       [java]    at org.apache.tools.ant.taskdefs.Java.run(Java.java:747)
>       [java]    at 
> org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:201)
>       [java]    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:104)
>       [java]    at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>       [java]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       [java]    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       [java]    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       [java]    at java.lang.reflect.Method.invoke(Method.java:585)
>       [java]    at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
>       [java]    at org.apache.tools.ant.Task.perform(Task.java:348)
>       [java]    at org.apache.tools.ant.Target.execute(Target.java:357)
>       [java]    at org.apache.tools.ant.Target.performTasks(Target.java:385)
>       [java]    at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
>       [java]    at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1298)
>       [java]    at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>       [java]    at
> org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
>       [java]    at 
> org.apache.tools.ant.Project.executeTargets(Project.java:1181)
>       [java]    at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
>       [java]    at
> org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
>       [java] Caused by: org.apache.axis2.AxisFault:
> org/apache/axis2/policy/model/MTOMAssertion
>       [java]    at
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
>       [java]    at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
>       [java]    at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
>       [java]    at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>       [java]    at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>       [java]    at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>       [java]    at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>       [java]    at com.test.TestClient.main(TestClient.java:58)
>       [java]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>
>
>
>
>
>
> [1] http://www.mascanc.net/~max/sts1.xml
> [2] http://www.mascanc.net/~max/sts2.xml
>
>
>
> Thank you,
>
>
>                   Massimiliano
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
http://blog.ruchith.org
http://wso2.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to