Bonjour,
Voici le WSDL :
... et la classe User est la suivante :
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 <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://Serveur" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://Serveur" xmlns:intf="http://Serveur" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)--> <wsdl:types> <schema elementFormDefault="qualified" targetNamespace="http://Serveur" xmlns="http://www.w3.org/2001/XMLSchema"> <element name="getPrivilege"> <complexType> <sequence> <element name="nom" type="xsd:string"/> <element name="password" type="xsd:string"/> </sequence> </complexType> </element> <element name="getPrivilegeResponse"> <complexType> <sequence> <element name="getPrivilegeReturn" type="impl:User"/> </sequence> </complexType> </element> <complexType name="User"> <sequence> <element name="nom" type="string"></element> <element name="password" type="string"></element> <element name="privilege" type="int"></element> </sequence> </complexType> </schema> </wsdl:types> <wsdl:message name="getPrivilegeResponse"> <wsdl:part element="impl:getPrivilegeResponse" name="parameters"/> </wsdl:message> <wsdl:message name="getPrivilegeRequest"> <wsdl:part element="impl:getPrivilege" name="parameters"/> </wsdl:message> <wsdl:portType name="Identification"> <wsdl:operation name="getPrivilege"> <wsdl:input message="impl:getPrivilegeRequest" name="getPrivilegeRequest"/> <wsdl:output message="impl:getPrivilegeResponse" name="getPrivilegeResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="IdentificationSoapBinding" type="impl:Identification"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="getPrivilege"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getPrivilegeRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="getPrivilegeResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="IdentificationService"> <wsdl:port binding="impl:IdentificationSoapBinding" name="Identification"> <wsdlsoap:address location="http://localhost:8080/ws/services/Identification"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
Mais quand j'utilise le service j'obtiens l'erreur suivante :
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 package Type; import java.io.Serializable; public class User implements Serializable{ private static final long serialVersionUID = 1L; private String nom = null; private String password = null; private Integer privilege = null; public User (String nom, String password, Integer privilege) { this.nom = nom; this.password = password; this.privilege = privilege; } // accesseurs get et set }
Pourquoi je n'arrive pas à accéder à l'objet User ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 GRAVE: java.io.IOException: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: No serializer found for class Type.User in registry org.apache.axis.encoding.TypeMappingDelegate@78bc3b faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class Type.User in registry org.apache.axis.encoding.TypeMappingDelegate@78bc3b
A+
Partager