try to use the tcpmon and see the response you get. thanks, Amila.
On Wed, Sep 2, 2009 at 7:15 AM, Maruko <[email protected]> wrote: > > Hi all, > > i wrote my first Web service using apache axis2(Eclipse Plugin), a simple > operation > int addition (int a , int b) > my problem is when i create the client, i obtain : > org.apache.axis2.AxisFault: For input string: "a" > at > > org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486) > at > > org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343) > at > > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389) > at > > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) > at > org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) > at > org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528) > at > org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508) > at > sample.yahooservices.RESTSearch.AXIOMClient.main(AXIOMClient.java:83) > > i think i've done some mistakes when i wrote the Client > > package sample.yahooservices.RESTSearch; > import org.apache.axiom.om.OMAbstractFactory; > import org.apache.axiom.om.OMElement; > import org.apache.axiom.om.OMFactory; > import org.apache.axiom.om.OMNamespace; > import org.apache.axis2.AxisFault; > import org.apache.axis2.Constants; > import org.apache.axis2.addressing.EndpointReference; > import org.apache.axis2.client.Options; > import org.apache.axis2.client.ServiceClient; > > public class AXIOMClient { > private static String EPR = > "http://localhost:8080/axis2/services/calculer"; > private static String NS = "http://test"; > > public static OMElement calculerPayload(int a ,int b) { > OMFactory fac = OMAbstractFactory.getOMFactory(); > OMNamespace omNs = fac.createOMNamespace(NS, "calculer"); > OMElement method = fac.createOMElement("addition", omNs); > System.out.println("er1"); > OMElement value = fac.createOMElement("a", omNs); > OMElement value2 = fac.createOMElement("b", omNs); > value.addChild(fac.createOMText(value,"a")); > value2.addChild(fac.createOMText(value2,"b")); > method.addChild(value); > method.addChild(value2); > return method; > } > > please if any one can help me ; i really need your help > > Thank you in advance > -- > View this message in context: > http://www.nabble.com/Problem-when-invoking-a-Web-service-tp25250386p25250386.html > Sent from the Axis - User mailing list archive at Nabble.com. > > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
