Bonjour,

je souhaite configurer un WSDL avec une opération qui peut retourner 1 objet parmi une liste de 2 objets (315 et 316).

On m'a parlé de configurer un xsd:choice dans le wsdl mais je ne connais pas la syntaxe exacte.


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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
 
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
	xmlns:hl7="urn:hl7-org:v3" xmlns:ihe="urn:ihe:iti:pam:2007"
	xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
	xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="PAMConsumer"
	targetNamespace="urn:ihe:iti:pam:2007">
	<types>
 
		<xsd:schema elementFormDefault="qualified" targetNamespace="urn:ihe:iti:pam:2007">
 
			<xsd:element name="PRPA_IN201311_responseUV02_Message">
				<xsd:complexType>
					<xsd:choice>
						<xsd:sequence>
							<xsd:element ref="PRPA_IN201312UV02_Message" />
							<xsd:element ref="PRPA_IN201313UV02_Message" />
						</xsd:sequence>
 
					</xsd:choice>
				</xsd:complexType>
			</xsd:element>
 
			<xsd:element name="PRPA_IN201314_responseUV02_Message">
				<xsd:complexType>
					<xsd:choice>
 
						<xsd:sequence>
							<xsd:element ref="PRPA_IN201315UV02_Message" />
							<xsd:element ref="PRPA_IN201316UV02_Message" />
						</xsd:sequence>
 
 
					</xsd:choice>
				</xsd:complexType>
			</xsd:element>
 
			<xsd:import namespace="urn:hl7-org:v3"
				schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201314UV02.xsd" />
			<xsd:import namespace="urn:hl7-org:v3"
				schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201315UV02.xsd" />
			<xsd:import namespace="urn:hl7-org:v3"
				schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201316UV02.xsd" />
		</xsd:schema>
 
	</types>
 
 
	<message name="PRPA_IN201314UV02_Message">
		<part element="hl7:PRPA_IN201314UV02" name="body" />
	</message>
 
	<message name="PRPA_IN201314_responseUV02_Message">
		<part element="hl7:PRPA_IN201314_responseUV02" name="body" />
	</message>
 
 
	<message name="PRPA_IN201315UV02_Message">
		<part element="hl7:PRPA_IN201315UV02" name="body" />
	</message>
 
 
	<message name="PRPA_IN201316UV02_Message">
		<part element="hl7:PRPA_IN201316UV02" name="body" />
	</message>
 
 
 
	<portType name="PAMConsumer_PortType">
 
 
 
		<operation name="PAMConsumer_PRPA_IN201314UV02">
			<input message="ihe:PRPA_IN201314UV02_Message" wsaw:Action="urn:hl7-org:v3:PRPA_IN201314UV02" />
			<output message="ihe:PRPA_IN201314_responseUV02_Message"
				wsaw:Action="urn:hl7-org:v3:PRPA_IN201314_responseUV02" />
		</operation>
 
	</portType>
 
	<binding name="PAMConsumer_Binding_Soap12" type="ihe:PAMConsumer_PortType">
		<soap12:binding style="document"
			transport="http://schemas.xmlsoap.org/soap/http" />
 
		<operation name="PAMConsumer_PRPA_IN201314UV02">
			<soap12:operation soapAction="urn:hl7-org:v3:PRPA_IN201314UV02" />
			<input>
				<soap12:body use="literal" />
			</input>
			<output>
				<soap12:body use="literal" />
			</output>
		</operation>
 
	</binding>
	<service name="PAMConsumer_Service">
		<port binding="ihe:PAMConsumer_Binding_Soap12" name="PAMConsumer_Port_Soap12">
						<soap12:address location="https://spirit6:8443/XDS3/registry" />
		</port>
	</service>
</definitions>


Et voici l'erreur après la commande wsdl2java :

Part <body> in Message PRPA_IN201314_responseUV02_Message referenced type PRPA_IN201314_responseUV02_Message can not be dfound in the schemas.

Merci