Bonjour,
Après avoir généré mon client soap avec Axis2 (dernière version du plugin eclipse téléchargé sur le site de axis2 et le binaire Axis2 version 1.5.4) j'ai un message d'erreur que j'arrive pas à interpréter :
Le code de mon client ressemble à ça. Create request renvoie une string demandé par le webservice :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 org.apache.axis2.AxisFault at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at com.galileo.webservices.XmlSelectStub.submitXml(XmlSelectStub.java:624) at com.galileo.expstub.TestStub.main(TestStub.java:76)
Merci de votre aide.
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 public static void main(String[] args) throws Exception { try { // Instance of axis2 stub ( generate with wsdl2 ) XmlSelectStub xss = new XmlSelectStub(); //Options of client service Options options = xss._getServiceClient().getOptions(); HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setPreemptiveAuthentication(true); auth.setPassword(PASSWORD); auth.setUsername(USER_NAME); options.setProperty(HTTPConstants.AUTHENTICATE,auth); // Definition of SubmitXml method (request,filter,profile) com.galileo.webservices.SubmitXml Sbxml = new SubmitXml(); String toto = CreateRequest(); Request_type0 req = new Request_type0(); req.setExtraElement(AXIOMUtil.stringToOM(toto)); Sbxml.setRequest(req); Filter_type0 flt = new Filter_type0(); flt.setExtraElement(AXIOMUtil.stringToOM("<_/>")); Sbxml.setFilter(flt); Sbxml.setProfile(APOLLO_HAP); System.out.println(Sbxml.getProfile()+"\n"+Sbxml.getFilter().getExtraElement()+"\n"+Sbxml.getRequest().getExtraElement()); // Execution method SubmitXml SubmitXmlResponse titi = xss.submitXml(Sbxml); //System.out.println(subxres.toString()); } catch (AxisFault axisFault) { axisFault.printStackTrace(); } catch (XMLStreamException e) { // TODO Auto-generated catch block e.printStackTrace(); System.out.println(e.toString()); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
Partager