axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansart Jean-sebastien <jean-sebastien.mans...@etu.univ-savoie.fr>
Subject Re: AW: dynamic invocation
Date Wed, 30 Jun 2004 13:00:18 GMT
try to see what is sent with tcpmon...
if you see some characters that have nothing to do in the response of 
the server, it's maybe because of the http/1.1... if it's this change 
http/1.1 by http/1.0 into the transport.cpp file...

Steffen Lorscheider wrote:

>Me again ;)
>
>I looked at the provided example-code "Calculator.cpp" and things become
>a little clearer now. But I still can't call the WebService described in
>the O'Reilly book "Web Service Essentials" in Chapter 3. Calling it from
>Java (using ApacheSOAP) works, but using Axis C++ I get now an exception
>calling Call::checkMessage(). This exception is thrown in
>SoapDeSerializer::checkMessageBody() on the following line:
>
>  if (0 != strcmp(m_pNode->m_pchNameOrValue, pName))
>  {
>      AXISTRACE1("AXISC_NODE_VALUE_MISMATCH_EXCEPTION", CRITICAL);
>      throw AxisGenException(AXISC_NODE_VALUE_MISMATCH_EXCEPTION);    
>  }
>
>The value of m_pNode->m_pchNameOrValue is "Fault"!!!
>The value of pName is "sayHelloResponse"... (see below...)
>
>Here is my code (using Jboss with ApacheSOAP at the server):
>
>  const char* pEndpointURI 	=
>"http://localhost:8080/soap/servlet/rpcrouter";
>  const char* pParameterVal = "MyName";
>
>  // CONSTRUCTOR
>  Call *pCall = new Call ();
>  pCall->setProtocol (APTHTTP);
>  pCall->setEndpointURI (pEndpointURI);
>
>  // CALL WS-METHOD
>  if (AXIS_SUCCESS == pCall->initialize (CPP_RPC_PROVIDER,
>NORMAL_CHANNEL))
>  {
>    pCall->setTransportProperty (SOAPACTION_HEADER,
>"HelloService#sayHello");
>    pCall->setSOAPVersion (SOAP_VER_1_1);
>    pCall->setOperation ("sayHello", pEndpointURI);
>    pCall->addParameter ((void*)&pParameter, "strName", XSD_STRING);
>
>    if (AXIS_SUCCESS == pCall->invoke ())
>    {
>      if (AXIS_SUCCESS == pCall->checkMessage ("sayHelloResponse",
>pEndpointURI))
>      {
>        const char* pszReturn = pCall->getElementAsString
>("sayHelloReturn", 0);
>      }
>    }
>  }
>
>  // DESTRUCTOR
>  delete pCall;
>
>A difference to the Java-Client-Code is the method 'setTargetObjectURI
>("urn:examples:helloservice")' which is missing in C++. And I can't find
>an equivalent method...
>
>-----Urspr√ľngliche Nachricht-----
>Von: Steffen Lorscheider [mailto:sl@camos.de] 
>Gesendet: Mittwoch, 30. Juni 2004 09:21
>An: axis-c-user@ws.apache.org
>Betreff: dynamic invocation
>
>
>Hi,
>
>I want to use Apache Axis C++ for dynamic webservice-method invocation.
>I found an example how this is done using the Java-version (see below -
>also desribed in the 3rd chapter of the O'Reilly book "Web Service
>Essentials" from Ethan Cerami using ApacheSOAP), but I can't find the
>appropriate methods and classes in the C++ version...
>
>Here is the Java-code:
>Service service = new Service (); // can't find this class
>Call call = service.createCall (); // no method 'createCall' in the
>whole projet call.setEncodingStyle (...); // again no such mehtod ...
>call.addParameter (...); call.setReturnType (...); ... call.invoke(new
>Object[]); 
>
>How can this be done with the C++ version?
>Thanks in advance. I'm really stuck...
>
>Steffen
>
>
>
>
>  
>


Mime
View raw message