Apache CXF Exception: java.lang.RuntimeException: impossible de trouver le conduit de l'initiateur pour l'adresse
Je veux appeler un .net web service SOAP à partir de java. .net Service a ws-security module et je l'ai utilisé apache CXF pour la définition du nom d'utilisateur et le mot de passe (et peut-être plus tard X. 509 certificate). Le code que j'ai utilisé est:
ITaxOrganService wsHttpBindingITaxOrganService = new TaxOrganService().getWSHttpBindingITaxOrganService();
Endpoint endpoint = ClientProxy.getClient(wsHttpBindingITaxOrganService).getEndpoint();
Map<String,Object> outProps = new HashMap<>();
outProps.put(WSHandlerConstants.ACTION,WSHandlerConstants.USERNAME_TOKEN);
outProps.put(WSHandlerConstants.USER,"*****");
outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
outProps.put(WSHandlerConstants.PW_CALLBACK_CLASS, ShahrdariPasswordCallback.class.getName());
WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
endpoint.getOutInterceptors().add(wssOut);
PermissionPrintDS permissionPrintDS = wsHttpBindingITaxOrganService.providePermissionInfoByPermNo(10000198);
mais java lever une exception sur la dernière ligne:
Caused by: java.lang.RuntimeException: Could not find conduit initiator for address: http://urbanservices.iri/Services/xxyzService/xxyzService.svc and transport: http://schemas.xmlsoap.org/soap/http
at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:224) ~[cxf-rt-bindings-soap-3.1.0.jar:3.1.0]
at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:229) ~[cxf-rt-bindings-soap-3.1.0.jar:3.1.0]
at org.apache.cxf.endpoint.AbstractConduitSelector.createConduit(AbstractConduitSelector.java:145) ~[cxf-core-3.1.0.jar:3.1.0]
at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:107) ~[cxf-core-3.1.0.jar:3.1.0]
at org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:63) ~[cxf-core-3.1.0.jar:3.1.0]
at org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:853) ~[cxf-core-3.1.0.jar:3.1.0]
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:511) ~[cxf-core-3.1.0.jar:3.1.0]
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425) ~[cxf-core-3.1.0.jar:3.1.0]
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326) ~[cxf-core-3.1.0.jar:3.1.0]
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279) ~[cxf-core-3.1.0.jar:3.1.0]
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) ~[cxf-rt-frontend-simple-3.1.0.jar:3.1.0]
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) ~[cxf-rt-frontend-jaxws-3.1.0.jar:3.1.0]
at com.sun.proxy.$Proxy144.providePermissionInfoByPermNo(Unknown Source) ~[na:na]
Que puis-je faire?
Jetez un oeil à cette SORTE de post, qui décrit votre problème. Depuis l'ajout de transport POT n'a pas de résoudre votre problème, vous pouvez vous concentrer sur les autres propositions
OriginalL'auteur youhans | 2015-05-17
Vous devez vous connecter pour publier un commentaire.
J'ai eu le même problème dans mon projet java.
Tout d'abord, j'ai eu seulement la suite de CXF de la dépendance dans mon pom.xml:
Par la suite, j'ai ajouté les deux CXF dépendances:
Le plein pom.xml:
Cette configuration contribué à mon projet de travailler correctement.
OriginalL'auteur Youness Marhrani