axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Sullivan <not...@gmail.com>
Subject Re: Having trouble interfacing with WCF
Date Thu, 04 Aug 2011 20:06:24 GMT
Okay, so, I think I may have gotten it to work now.  It's weird because, at
first, I could have sworn I tried this many times and it did not work.
Suddenly it's working.  I think what I did differently is include the
rampart JAR files in the classpath while I run the client.  This works for
axis2-1.6.0 and rampart-1.6.0.

After this, I went back to my original list of protocols and tried them
out.  Looks like I can now get "WSS SOAP Message Security UsernameToken
Profile 1.0" (which I think just uses HTTPS with Basic auth for the
UsernameToken) to work.  This might be good enough, but in case it's
not...I'd like to still debug this.  For the other protocols, I'm getting
new errors, mostly NullPointerExceptions

After attempting to configure the service for the other protocols, and
trying them all out again, I'm observing most of them giving me this error:

Exception in thread "main" java.lang.NullPointerException
>         at
> org.apache.rampart.util.RampartUtil.setEncryptionUser(RampartUtil.java:1258)
>         at
> org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuilder(BindingBuilder.java:227)
>         at
> org.apache.rampart.builder.SymmetricBindingBuilder.setupEncryptedKey(SymmetricBindingBuilder.java:705)
>         at
> org.apache.rampart.builder.SymmetricBindingBuilder.doSignBeforeEncrypt(SymmetricBindingBuilder.java:422)
>         at
> org.apache.rampart.builder.SymmetricBindingBuilder.build(SymmetricBindingBuilder.java:85)
>         at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:144)
>         at
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
>         at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
>         at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
>         at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>         at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>         at
> org.tempuri.MagicEightBallServiceStub.getAdvice(MagicEightBallServiceStub.java:189)
>         at
> org.tempuri.MagicEightBallServiceCGClient.main(MagicEightBallServiceCGClient.java:37)
>

Also, "WSS SOAP Message Security X.509 Certificate Token Profile 1.0" gives
me:

Exception in thread "main" java.lang.NullPointerException
>         at
> org.apache.rampart.builder.BindingBuilder.getSignatureBuilder(BindingBuilder.java:281)
>         at
> org.apache.rampart.builder.BindingBuilder.getSignatureBuilder(BindingBuilder.java:255)
>         at
> org.apache.rampart.builder.AsymmetricBindingBuilder.doSignature(AsymmetricBindingBuilder.java:717)
>         at
> org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:414)
>         at
> org.apache.rampart.builder.AsymmetricBindingBuilder.build(AsymmetricBindingBuilder.java:90)
>         at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:147)
>         at
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
>         at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
>         at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
>         at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>         at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>         at
> org.tempuri.MagicEightBallServiceStub.getAdvice(MagicEightBallServiceStub.java:186)
>         at
> org.tempuri.MagicEightBallServiceCGClient.main(MagicEightBallServiceCGClient.java:37)
>

And just a plain wsHttpBinding  now gives me this error:

Exception in thread "main" org.apache.axis2.AxisFault: Error in obtaining a
> token
>         at
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:76)
>         at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
>         at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
>         at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>         at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>         at
> org.tempuri.MagicEightBallServiceStub.getAdvice(MagicEightBallServiceStub.java:189)
>         at
> org.tempuri.MagicEightBallServiceCGClient.main(MagicEightBallServiceCGClient.java:37)
> Caused by: org.apache.rampart.RampartException: Error in obtaining a token
>         at
> org.apache.rampart.util.RampartUtil.getToken(RampartUtil.java:779)
>         at
> org.apache.rampart.util.RampartUtil.getSecConvToken(RampartUtil.java:633)
>         at
> org.apache.rampart.builder.SymmetricBindingBuilder.initializeTokens(SymmetricBindingBuilder.java:878)
>         at
> org.apache.rampart.builder.SymmetricBindingBuilder.build(SymmetricBindingBuilder.java:78)
>         at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:144)
>         at
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
>         ... 9 more
> Caused by: java.lang.NullPointerException
>         at
> org.apache.neethi.AbstractPolicyOperator.normalizeOperator(AbstractPolicyOperator.java:97)
>         at
> org.apache.neethi.AbstractPolicyOperator.normalize(AbstractPolicyOperator.java:73)
>         at org.apache.neethi.Policy.normalize(Policy.java:64)
>         at org.apache.neethi.Policy.normalize(Policy.java:49)
>         at org.apache.neethi.Policy$PolicyIterator.<init>(Policy.java:200)
>         at org.apache.neethi.Policy.getAlternatives(Policy.java:193)
>         at
> org.apache.rahas.client.STSClient.processPolicy(STSClient.java:616)
>         at
> org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:147)
>         at
> org.apache.rampart.util.RampartUtil.getToken(RampartUtil.java:766)
>

Any idea why these NullPointerExceptions are happening? I'm still using the
original code I posted earlier in this thread.

-- 
Jay Sullivan

Mime
View raw message