Bonjour.

J'ai développé un petit webservice en java en local, lequel fonctionne correctement. Il prend en entrée deux chaines de caractères et retourne en sortie leur concaténation plus un petit préfixe ajouté en dur par le serveur. Je l'ai testé par d'autres moyens que Delphi et il fonctionne. Exemple : J'envoie "bonjour " et "bill" et je reçois "Traitement serveur : Bonjour bill".

J'ai ensuite crée une nouvelle application en delphi et utilisé l'importateur WSDL pour me connecter au webservice. J'ai laissé coché l'option "Uwind des paramètres litéraux" sans savoir à quoi ça correspond. Je le précise car j'en ai beaucoup entendu parler dans mes recherches avant de poster ici.

A l'execution tout semble fonctionner sauf que le serveur ne reçoit pas mes paramètres. Par exemple, J'envoie "bonjour " et "bill" et je reçois "Traitement serveur : nullnull".

Je ne comprends vraiment pas où est le problème. Voici mon WSDL.

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
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.1-hudson-28-. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.1-hudson-28-. -->
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.test.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.test.org/" name="LeWebServiceService">
	<types>
		<xs:schema xmlns:tns="http://ws.test.org/" version="1.0" targetNamespace="http://ws.test.org/">
		<!--
		<xsd:import namespace="http://ws.test.org/" schemaLocation="http://localhost:8080/TestWeb/LeWebServiceService?xsd=1" />
		-->
			<xs:element name="concat" type="tns:concat"/>
			<xs:element name="concatResponse" type="tns:concatResponse"/>
			<xs:complexType name="concat">
				<xs:sequence>
					<xs:element name="p1" type="xs:string" minOccurs="0"/>
					<xs:element name="p2" type="xs:string" minOccurs="0"/>
				</xs:sequence>
			</xs:complexType>
			<xs:complexType name="concatResponse">
				<xs:sequence>
					<xs:element name="return" type="xs:string" minOccurs="0"/>
				</xs:sequence>
			</xs:complexType>
		</xs:schema>
	</types>
	<message name="concat">
		<part name="parameters" element="tns:concat" />
	</message>
	<message name="concatResponse">
		<part name="parameters" element="tns:concatResponse" />
	</message>
	<portType name="LeWebService">
		<operation name="concat">
			<input wsam:Action="http://ws.test.org/LeWebService/concatRequest" message="tns:concat" />
			<output wsam:Action="http://ws.test.org/LeWebService/concatResponse" message="tns:concatResponse" />
		</operation>
	</portType>
	<binding name="LeWebServicePortBinding" type="tns:LeWebService">
		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
		<operation name="concat">
			<soap:operation soapAction=""/>
			<input>
				<soap:body use="literal"/>
			</input>
			<output>
				<soap:body use="literal"/>
			</output>
		</operation>
	</binding>
	<service name="LeWebServiceService">
		<port name="LeWebServicePort" binding="tns:LeWebServicePortBinding">
			<soap:address location="http://localhost:8080/TestWeb/LeWebServiceService" />
		</port>
	</service>
</definitions>
Quelqu'un a-t-il déjà rencontré ce problème et pourrai m'aider ?
Merci.

Jean-Baptiste.