axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gavin M. Bell" <...@llnl.gov>
Subject Re: Walk with me, please... Has anyone gotten C++ (client) to Java (webservice) working?
Date Fri, 09 Sep 2005 17:50:06 GMT
Hi...

Thanks for the reply... any help would be GREATLY appreciated! :-)
I need this working ASAP for my project.  Thanks I hope this is helpful, 
this is all I have.


Here is my client and wsdl.
I did see a posting regarding multiref and have turned it off on the 
java service side.
Here is what I have been working with. 

FYI: I have a similar Java client (using axis for java) and it works 
perfectly against the Java service.

My Java Service configuration: server-config.wsdd
The global config...

 <globalConfiguration>
  <parameter name="adminPassword" value="admin"/>
  <parameter name="attachments.implementation" 
value="org.apache.axis.attachments.AttachmentsImpl"/>
  <parameter name="sendXsiTypes" value="true"/>
  <parameter name="sendMultiRefs" value="false"/>
  <parameter name="sendXMLDeclaration" value="true"/>
  <requestFlow>
   <handler type="java:org.apache.axis.handlers.JWSHandler">
    <parameter name="scope" value="session"/>
   </handler>
   <handler type="java:org.apache.axis.handlers.JWSHandler">
    <parameter name="scope" value="request"/>
    <parameter name="extension" value=".jwr"/>
   </handler>
  </requestFlow>
 </globalConfiguration>


Dushshantha Chandradasa wrote:

>Hi Gavin,
>
>Sorry for the late reply. For some reason, I didn't get your tar file
>attached with your previous mail. So I couldn't reproduce the problem
>you stated. Having your server response, I can run the client with
>MockServer to test this if I have the client. So could you please attach
>your client program and the wsdl file that you have used to generate
>codes? 
>
>Most of the C++ clients are working with Java Server side when Java
>doesn't use href/multiref. 
>
>Thanks
>Dushshantha  
>
>-----Original Message-----
>From: Gavin M. Bell [mailto:cue@llnl.gov] 
>Sent: Friday, September 09, 2005 1:24 AM
>To: axis-c-dev@ws.apache.org
>Subject: Walk with me, please... Has anyone gotten C++ (client) to Java
>(webservice) working?
>
>Hello,
>
>I have gone from attempting to use the axis-c binary distribution to the
>
>axis-c source distribution to the cvs tree that I have built myself and 
>they all lead me back to getting a "(null)" back when processing my Java
>
>web service response.  I changed the build scripts to build with '-g' 
>and have been stepping through the code.   I have stepped through enough
>
>to know that the message is getting to the axis-c client and there is 
>some amount of parsing happening, however, the end result is getting the
>
>pesky "(null)" as my ultimate return value.  I am using xerces-c-2_2_0 
>as my parser.
>Is there a know issue with axis-c 1.5 and xerces-c 2.2.0 ?
>
>Has anyone faced this issue?
>
>Thus far I have gdb'd my way into the generated stub code and the 
>problem is in this call:
>xsd__string HelloModel::request(xsd__string Value0)
>{
>   xsd__string Ret;
>   memset(&Ret,0,sizeof(xsd__string));
>   const char* pcCmplxFaultName;
>   try
>   {
>       if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER))
>           return Ret;
>   if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
>   {
>       m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
>   }
>       m_pCall->setSOAPVersion(SOAP_VER_1_1);
>       m_pCall->setOperation("request", 
>"http://localhost:1595/NaracWS/services/HelloModel");
>       applyUserPreferences();
>       m_pCall->addParameter((void*)Value0, "msg", XSD_STRING);
>       if (AXIS_SUCCESS == m_pCall->invoke())
>       {
>           if(AXIS_SUCCESS == m_pCall->checkMessage("requestResponse", 
>"http://localhost:1595/NaracWS/services/HelloModel"))
>           {
>
>//************ HELP **************************
>//********************************************
>//users list mavens... here is the issue... Ret get set to null
>//the above invoke() call is run and successfully communicates with the 
>service.
>//********************************************
>               Ret = m_pCall->getElementAsString("requestReturn", 0);
>           }
>       }
>   m_pCall->unInitialize();
>       return Ret;
>   }
>   catch(AxisException& e)
>...
>
>Digging deeper into the code I get to here: (using gdb where command)
>
>#0  0x00c2951c in XMLParserXerces::next () from 
>/home/cue/obj/bin/libaxis_xerces.so
>#1  0x00e5746e in axiscpp::SoapDeSerializer::getElement (this=0x9b8b310,
>
>pName=0x804998a "requestReturn",
>   pNamespace=0x0, pSimpleType=0xbfff8f70) at 
>/home/cue/workbench/ws-axis/c/src/soap/SoapDeSerializer.cpp:1884
>#2  0x00e57ca8 in axiscpp::SoapDeSerializer::getElementAsString 
>(this=0x9b8b310,
>   pName=0x804998a "requestReturn", pNamespace=0x0)
>   at /home/cue/workbench/ws-axis/c/src/soap/SoapDeSerializer.cpp:2214
>#3  0x00e2d7de in axiscpp::Call::getElementAsString (this=0x9b8b310, 
>pName=0x804998a "requestReturn",
>   pNamespace=0x0) at 
>/home/cue/workbench/ws-axis/c/src/engine/client/Call.cpp:500
>#4  0x080494e7 in HelloModel::request (this=0xbfff9040, Value0=0x80498aa
>
>"cpp test") at HelloModel.cpp:55
>#5  0x08048fe8 in main (argc=1, argv=0xbfff9334) at Client.cpp:56
>(gdb)
>
>So.... the next step...
>
>(gdb) step
>Single stepping until exit from function _ZN15XMLParserXerces4nextEb,
>which has no line number information.
>axiscpp::SoapDeSerializer::getElement (this=0x9b8b310, pName=0x804998a 
>"requestReturn", pNamespace=0x0,
>   pSimpleType=0xbfff8f70) at 
>/home/cue/workbench/ws-axis/c/src/soap/SoapDeSerializer.cpp:1886
>(gdb)
>
>So I can't look into the xerces library built, I am assuming since it 
>talks to xerces-c (which I have not compiled with debugging on).
>
>*Question: What is the relationship between the libaxis_xerces.so and 
>the libxerces-c.so that I built when installing xercesc???  Could this 
>be where the ball is being dropped???
>
>I have also attached the tcp monitor trace showing the request and 
>response SOAP messages.
>
>HELP PLEASE, I DON'T KNOW WHAT ELSE TO DO. IT DOESN'T LOOK LIKE IT IS 
>ANY CODE THAT I HAVE WRITTEN!  HELP... :-\
>
>  
>

-- 


------
   Gavin M. Bell
   Computer Science Research Scientist
   Computing Applications and Research Dept.
   Lawrence Livermore National Labs
   L-103
   cue@llnl.gov
-------

"I'm trying real hard to be the shepherd."
				-Samuel Jackson (Pulp Fiction)


Mime
View raw message