You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Bo...@sita.aero on 2007/01/14 08:13:47 UTC

my java client cannot talk to axis c++ web service Calculator, please help.

Hi,

I am new to axic c++. I just installed axis-c-1.6b-Linux-trace-bin a few
days ago. I can successfully run the "Calculator" demo with both client and
server
in C++. I also successfully used "java org.apache.axis.wsdl.WSDL2Java
${AXISCPP}/deploy/wsdls/calculator.wsdl " to generate java stubs. When I
tried to use java client to talk to c++ service, I have the following
problem
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
 faultSubcode:
 faultString: Webservice failed
 faultActor: server name:listen port
 faultNode:
 faultDetail:
        {}appSpecific:AxisEngineException:Web Service failed

Webservice failed
        at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
        at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
        at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
        at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
        at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
        at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at
localhost.axis.Calculator.CalculatorSoapBindingStub.add(CalculatorSoapBindingStub.java:144)
        at localhost.axis.Calculator.TestClient.<init>(TestClient.java:20)
        at localhost.axis.Calculator.TestClient.main(TestClient.java:45)

Here is the code to call the service

                               Calculator_ServiceLocator locator = new
Calculator_ServiceLocator();


locator.setCalculatorEndpointAddress("http://localhost:80/axis/Calculator");

                            Calculator_PortType service =
locator.getCalculator();

                  int result = service.add(2,3);


Thanks and regards,

Bob Luo



This document is strictly confidential and intended only for use by the addressee unless otherwise stated.  If you are not the intended recipient, please notify the sender immediately and delete it from your system.



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org