Axis2 erreur : org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement
Bonjour,
Je travaille sur la partie client d'un web service. J'ai généré les classes (stubs) côté client à partir de wsdl de web service.
J'ai essayé le code suivant :
Code:
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
|
BasicConfigurator.configure();
String axis2xml = "..\\axis2-1.5\\conf\\axis2.xml";//"D:\\workspace_evasionConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, axis2xml);
System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true");
System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "debug");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "debug");
WSStub callWS = new WSStub(configContext, https://urlWS");
WSStub.Operation process = new Operation ();
process.setAmount(20);
process.setValue("Hello");
try {
OperationResponse res1 = callWS.pperation(process);
logger.debug(res1);
logger.debug("la réponse est value : " + res1.get_return().getTransaction().getId());
}catch (AxisFault e) {// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} |
Et j'ai obtenu le message d'erreur suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement return
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at monPack.WSStub.fromOM(WSStub.java:11127)
at monPack.WSStub.processTransaction(WSStub.java:475)
at monPack.TestCC.main(TestCC.java:60)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement return
at monPack.WSStubStub$TAPITransactionResult$Factory.parse(WSStub.java:4449)
at monPack.WSStubStub$ProcessTransactionResponse$Factory.parse(WSStubStub.java:7297)
at monPack.WSStubStub.fromOM(WSStubStub.java:11093)
... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement return
at monPack.WSStubStub$TAPITransactionResult$Factory.parse(WSStubStub.java:4419)
... 4 more |
Merci.