Bonjour,
J'ai une application qui fonctionnait via une vieille version de cxf mais là je n'arrive pas à faire fonctionner un WebService externe (alors que l'autre qui ne passe donc pas par un proxy fonctionne, d'où ma suspicion sur la partie proxy, qui de toute façon ne me plaît pas en étant écrite en dur dans applicationContext.xml).
mais c'est peut-être du à autre chose, je ne trouve aucune info sur Internet sur Could not find an appropriate Transport Binding to invoke.
Et puis avec un mauvais proxy j'ai "Connection timed out: connect" donc là c'est déjà mieux comme message d'erreur...enfin je ne sais pas quoi...
Ma configuration
Dans mon fichier de ApplicationContext.xml, j'ai
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <http-conf:conduit name="{http://api.valo.modules.externalProvider}MyExternalClientPortTypePort.http-conduit"> <http-conf:client Connection="Keep-Alive" ProxyServer="myProxyName" ProxyServerPort="80" AllowChunking="false" ReceiveTimeout="180000" ConnectionTimeout="70000" /> </http-conf:conduit> <bean id="myService" class="com.his.application.service.impl.MyService"> <property name="externalProviderService" ref="externalProviderService" /> </bean>
Et dans mon service externalProviderService.java, j'ai :
Vient enfin l'appel des fonctions (le code n'a pas changé) :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 public externalProviderService() { super(); externalProvideUrl = ApplicationContext.getInstance().getExternalProviderURL(); externalProvideWS = (MyExternalClientPortType) createWS(externalProvideUrl ,MyExternalClientPortType.class); } protected Object createWS( String url, Class theClass){ Map<String, Object> outProps = new HashMap<String, Object>(); outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.NO_SECURITY); WSS4JOutInterceptor interceptor = new WSS4JOutInterceptor(outProps); JaxWsProxyFactoryBean serviceFactory = new JaxWsProxyFactoryBean(); serviceFactory.getOutInterceptors().add(interceptor); serviceFactory.setServiceClass(theClass); serviceFactory.setAddress(url); serviceFactory.setBindingId(SoapBindingFactory.SOAP_12_BINDING); return serviceFactory.create(); }
Could not find an appropriate Transport Binding to invoke.
Merci.
Partager