Skip to main content

SignedEncryptedSupportingTokensProcessor encryptToken NullPointerException

4 replies [Last post]
Anonymous

Hi,

I'm having trouble calling a web service with the attached WSDL. When the
SAML Token is set to be encrypted-only or signed-only everything works
great, but when it's set to encrypted & signed I get an exception, is there
a way I can debug this further? I've tried looking into the source code
myself but couldn't work out what it might be.

Exception in thread "main" java.lang.NullPointerException
at
com.sun.xml.ws.security.impl.policyconv.SignedEncryptedSupportingTokensProcessor.encryptToken(SignedEncryptedSupportingTokensProcessor.java:70)
at
com.sun.xml.ws.security.impl.policyconv.SupportingTokensProcessor.process(SupportingTokensProcessor.java:153)
at
com.sun.xml.ws.security.impl.policyconv.BindingProcessor.processSupportingTokens(BindingProcessor.java:360)
at
com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.processNonBindingAssertions(XWSSPolicyGenerator.java:282)
at
com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:219)
at
com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:160)
at
com.sun.xml.wss.jaxws.impl.SecurityTubeBase.constructPolicyHolder(SecurityTubeBase.java:1339)
at
com.sun.xml.wss.jaxws.impl.SecurityClientTube.addOutgoingProtocolPolicy(SecurityClientTube.java:717)
at
com.sun.xml.wss.jaxws.impl.SecurityTubeBase.buildProtocolPolicy(SecurityTubeBase.java:1305)
at
com.sun.xml.wss.jaxws.impl.SecurityTubeBase.collectPolicies(SecurityTubeBase.java:774)
at
com.sun.xml.wss.jaxws.impl.SecurityTubeBase.(SecurityTubeBase.java:274)
at
com.sun.xml.wss.jaxws.impl.SecurityClientTube.(SecurityClientTube.java:152)
at
com.sun.xml.wss.provider.wsit.SecurityTubeFactory.createTube(SecurityTubeFactory.java:285)
at com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:84)
at
com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAssembler.createClient(TubelineAssemblerFactoryImpl.java:130)
at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:314)
at com.sun.xml.ws.client.Stub.(Stub.java:286)
at com.sun.xml.ws.client.Stub.(Stub.java:230)
at
com.sun.xml.ws.client.dispatch.DispatchImpl.(DispatchImpl.java:163)
at
com.sun.xml.ws.client.dispatch.DispatchImpl.(DispatchImpl.java:152)
...

Thanks,
James

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Glen Mazza

This blog article might help:
http://www.jroller.com/gmazza/entry/eclipse_debug_web_services

Glen

On 08/23/2012 09:42 AM, James Carter wrote:
> Hi,
>
> I'm having trouble calling a web service with the attached WSDL. When
> the SAML Token is set to be encrypted-only or signed-only everything
> works great, but when it's set to encrypted & signed I get an
> exception, is there a way I can debug this further? I've tried looking
> into the source code myself but couldn't work out what it might be.
>
> Exception in thread "main" java.lang.NullPointerException
> at
> com.sun.xml.ws.security.impl.policyconv.SignedEncryptedSupportingTokensProcessor.encryptToken(SignedEncryptedSupportingTokensProcessor.java:70)
> at
> com.sun.xml.ws.security.impl.policyconv.SupportingTokensProcessor.process(SupportingTokensProcessor.java:153)
> at
> com.sun.xml.ws.security.impl.policyconv.BindingProcessor.processSupportingTokens(BindingProcessor.java:360)
> at
> com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.processNonBindingAssertions(XWSSPolicyGenerator.java:282)
> at
> com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:219)
> at
> com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:160)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.constructPolicyHolder(SecurityTubeBase.java:1339)
> at
> com.sun.xml.wss.jaxws.impl.SecurityClientTube.addOutgoingProtocolPolicy(SecurityClientTube.java:717)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.buildProtocolPolicy(SecurityTubeBase.java:1305)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.collectPolicies(SecurityTubeBase.java:774)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.(SecurityTubeBase.java:274)
> at
> com.sun.xml.wss.jaxws.impl.SecurityClientTube.(SecurityClientTube.java:152)
> at
> com.sun.xml.wss.provider.wsit.SecurityTubeFactory.createTube(SecurityTubeFactory.java:285)
> at
> com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:84)
> at
> com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAssembler.createClient(TubelineAssemblerFactoryImpl.java:130)
> at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:314)
> at com.sun.xml.ws.client.Stub.(Stub.java:286)
> at com.sun.xml.ws.client.Stub.(Stub.java:230)
> at
> com.sun.xml.ws.client.dispatch.DispatchImpl.(DispatchImpl.java:163)
> at
> com.sun.xml.ws.client.dispatch.DispatchImpl.(DispatchImpl.java:152)
> ...
>
> Thanks,
> James

James Carter

Thanks, this information is really useful - appreciate the quick responses
too.

James

On 23 August 2012 21:33, Glen Mazza wrote:

> This blog article might help:
> http://www.jroller.com/gmazza/entry/eclipse_debug_web_services
>
> Glen
>
>
> On 08/23/2012 09:42 AM, James Carter wrote:
>
> Hi,
>
> I'm having trouble calling a web service with the attached WSDL. When the
> SAML Token is set to be encrypted-only or signed-only everything works
> great, but when it's set to encrypted & signed I get an exception, is there
> a way I can debug this further? I've tried looking into the source code
> myself but couldn't work out what it might be.
>
> Exception in thread "main" java.lang.NullPointerException
> at
> com.sun.xml.ws.security.impl.policyconv.SignedEncryptedSupportingTokensProcessor.encryptToken(SignedEncryptedSupportingTokensProcessor.java:70)
> at
> com.sun.xml.ws.security.impl.policyconv.SupportingTokensProcessor.process(SupportingTokensProcessor.java:153)
> at
> com.sun.xml.ws.security.impl.policyconv.BindingProcessor.processSupportingTokens(BindingProcessor.java:360)
> at
> com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.processNonBindingAssertions(XWSSPolicyGenerator.java:282)
> at
> com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:219)
> at
> com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:160)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.constructPolicyHolder(SecurityTubeBase.java:1339)
> at
> com.sun.xml.wss.jaxws.impl.SecurityClientTube.addOutgoingProtocolPolicy(SecurityClientTube.java:717)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.buildProtocolPolicy(SecurityTubeBase.java:1305)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.collectPolicies(SecurityTubeBase.java:774)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.(SecurityTubeBase.java:274)
> at
> com.sun.xml.wss.jaxws.impl.SecurityClientTube.(SecurityClientTube.java:152)
> at
> com.sun.xml.wss.provider.wsit.SecurityTubeFactory.createTube(SecurityTubeFactory.java:285)
> at com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:84)
> at
> com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAssembler.createClient(TubelineAssemblerFactoryImpl.java:130)
> at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:314)
> at com.sun.xml.ws.client.Stub.(Stub.java:286)
> at com.sun.xml.ws.client.Stub.(Stub.java:230)
> at
> com.sun.xml.ws.client.dispatch.DispatchImpl.(DispatchImpl.java:163)
> at
> com.sun.xml.ws.client.dispatch.DispatchImpl.(DispatchImpl.java:152)
> ...
>
> Thanks,
> James
>
>
>

robg

Hi,

I'm new to metro, and trying to build a client to a WCF service. I used
netbeans + metro to generate the base classes for the client from the WSDL
without a problem, but get the following error at the second line of the
client program when calling the method from the service that provides the
basic parts of the service.

InvestmentServiceV1 service = new InvestmentServiceV1();
IInvestmentServiceV1 is =
service.getPhoenixWcfFrontEndServicesInvestmentServiceV1();

java.lang.NullPointerException
at
com.sun.xml.ws.security.impl.policyconv.BindingProcessor.requireSC(BindingProcessor.java:330)
at
com.sun.xml.ws.security.impl.policyconv.BindingProcessor.addPrimaryTargets(BindingProcessor.java:310)
at
com.sun.xml.ws.security.impl.policyconv.SymmetricBindingProcessor.process(SymmetricBindingProcessor.java:154)
at
com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:200)
at
com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:157)
at
com.sun.xml.wss.jaxws.impl.SecurityTubeBase.constructPolicyHolder(SecurityTubeBase.java:1233)
at
com.sun.xml.wss.jaxws.impl.SecurityClientTube.addIncomingProtocolPolicy(SecurityClientTube.java:683)
at
com.sun.xml.wss.jaxws.impl.SecurityTubeBase.buildProtocolPolicy(SecurityTubeBase.java:1206)
at
com.sun.xml.wss.jaxws.impl.SecurityTubeBase.collectPolicies(SecurityTubeBase.java:735)
at
com.sun.xml.wss.jaxws.impl.SecurityTubeBase.(SecurityTubeBase.java:288)
at
com.sun.xml.wss.jaxws.impl.SecurityClientTube.(SecurityClientTube.java:144)
at
com.sun.xml.wss.provider.wsit.SecurityTubeFactory.createTube(SecurityTubeFactory.java:227)
at com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:77)
at
com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAssembler.createClient(TubelineAssemblerFactoryImpl.java:121)
at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:224)
at com.sun.xml.ws.client.Stub.(Stub.java:201)
at com.sun.xml.ws.client.Stub.(Stub.java:174)
at com.sun.xml.ws.client.sei.SEIStub.(SEIStub.java:81)
at
com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:602)
at
com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:344)
at
com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:326)
at
com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:308)
at javax.xml.ws.Service.getPort(Service.java:134)
at
org.tempuri.InvestmentServiceV1.getPhoenixWcfFrontEndServicesInvestmentServiceV1(InvestmentServiceV1.java:72)
at myclient.MyClient.main(MyClient.java:52)

If anyone can tell me what it means & how it might be fixed, that would be
great. Thanks. RobG

jdg6688
Offline
Joined: 2005-11-02
Points: 0

In the policy in wsdl, there is only an "InitiatorSignatureToken". So no
token is specified for encryption.
You need to have an Recipient(Encryption)Token specified in the wsdl to
go with token/message encryption).

Thanks!

Jiandong

On 8/23/2012 6:42 AM, James Carter wrote:
> Hi,
>
> I'm having trouble calling a web service with the attached WSDL. When
> the SAML Token is set to be encrypted-only or signed-only everything
> works great, but when it's set to encrypted & signed I get an
> exception, is there a way I can debug this further? I've tried looking
> into the source code myself but couldn't work out what it might be.
>
> Exception in thread "main" java.lang.NullPointerException
> at
> com.sun.xml.ws.security.impl.policyconv.SignedEncryptedSupportingTokensProcessor.encryptToken(SignedEncryptedSupportingTokensProcessor.java:70)
> at
> com.sun.xml.ws.security.impl.policyconv.SupportingTokensProcessor.process(SupportingTokensProcessor.java:153)
> at
> com.sun.xml.ws.security.impl.policyconv.BindingProcessor.processSupportingTokens(BindingProcessor.java:360)
> at
> com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.processNonBindingAssertions(XWSSPolicyGenerator.java:282)
> at
> com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:219)
> at
> com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:160)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.constructPolicyHolder(SecurityTubeBase.java:1339)
> at
> com.sun.xml.wss.jaxws.impl.SecurityClientTube.addOutgoingProtocolPolicy(SecurityClientTube.java:717)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.buildProtocolPolicy(SecurityTubeBase.java:1305)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.collectPolicies(SecurityTubeBase.java:774)
> at
> com.sun.xml.wss.jaxws.impl.SecurityTubeBase.(SecurityTubeBase.java:274)
> at
> com.sun.xml.wss.jaxws.impl.SecurityClientTube.(SecurityClientTube.java:152)
> at
> com.sun.xml.wss.provider.wsit.SecurityTubeFactory.createTube(SecurityTubeFactory.java:285)
> at
> com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:84)
> at
> com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAssembler.createClient(TubelineAssemblerFactoryImpl.java:130)
> at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:314)
> at com.sun.xml.ws.client.Stub.(Stub.java:286)
> at com.sun.xml.ws.client.Stub.(Stub.java:230)
> at
> com.sun.xml.ws.client.dispatch.DispatchImpl.(DispatchImpl.java:163)
> at
> com.sun.xml.ws.client.dispatch.DispatchImpl.(DispatchImpl.java:152)
> ...
>
> Thanks,
> James