J'ai un problème avec de l'authentification et Spring, en effet, quand j'appel l'adresse où mon fichier wsdl se trouve, j'ai besoin de faire une authentification.
Lorsque j'effectue celle-ci via mon fichier XML, j'ai toujours un code HTTP 401 (Unauthorized Access).
J'ai donc voulu observer mon flux envoyé via l'API TCPMon http://tcpmon.dev.java.net
Et, du coup, j'obtiens un 404, page introuvable !!!!![]()
Mon applicationContext.xml :
L'appli :
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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="consultWebService" class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean"> <property name="serviceInterface"> <value>com.socgen.bva.cdn.consultationimagevaleur.IConsultationImageValeur</value> </property> <!-- <property name="portInterface"> <value>com.socgen.bva.cdn.consultationimagevaleur.ConsultationImageValeur.RemoteConsultationImageValeur</value> </property> --> <property name="wsdlDocumentUrl"> <value> http://localhost:8080/***/consultationImageValeurCDN.wsdl </value> </property> <property name="namespaceUri"> <value> http://***/ConsultationImageValeur/ </value> </property> <property name="serviceName"> <value>ConsultationImageValeur</value> </property> <property name="portName"> <value>IConsultationImageValeur</value> </property> <property name="username"> <value>***</value> </property> <property name="password"> <value>***</value> </property> </bean> </beans>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 try { BeanFactory factory = new XmlBeanFactory(new FileSystemResource("src/ApplicationContext.xml")); service=(ConsultationImageValeur)factory.getBean("consultWebService"); sortie = service.getValeur(param); } catch (Exception e) { e.printStackTrace(); }








Répondre avec citation
Partager