2
Apache CXFクライアントでWSセキュリティを使用しようとしています。 WSS4Jインターセプタを追加できるように、クライアントエンドポイントを確保する必要があります。プロキシインスタンスCXF ClientProxy getClient "プロキシインスタンスではありません"
コードではない:私はClientProxy.getClient()
を呼び出すときにしかし、私は次のメッセージをIllegalArgumentException
を取得
MailingService_ServiceLocator serviceLocator = new MailingService_ServiceLocator();
MailingService_PortType port = serviceLocator.getMailingServicePort();
Client client = ClientProxy.getClient(port); // throws exception
...
// Create client interceptor
AuthenticationInterceptor authenticationInterceptor =
new AuthenticationInterceptor(schemaNS, outprops, organizationName, null);
client.getEndpoint().getOutInterceptors().add(authenticationInterceptor);
をトレース:
java.lang.IllegalArgumentException: not a proxy instance
at java.lang.reflect.Proxy.getInvocationHandler(Unknown Source)
at org.apache.cxf.frontend.ClientProxy.getClient(ClientProxy.java:93)