我正在使用 wsHttpBinding 构建 WCF 服务。(使用 WS-Security 和消息级别安全性)
现在我想为它构建一个 JAVA 客户端,使用..
- 地铁
- 网豆
到目前为止一切正常。我已经从 WSDL 创建了 Java 客户端。
现在每当我调用客户端代理时,我都会收到以下错误:
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.<init>(SecurityTubeBase.java:288)
at
com.sun.xml.wss.jaxws.impl.SecurityClientTube.<init>(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.<init>(Stub.java:201)
at com.sun.xml.ws.client.Stub.<init>(Stub.java:174)
at com.sun.xml.ws.client.sei.SEIStub.<init>(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)