You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by "Gavin M. Bell" <cu...@llnl.gov> on 2005/09/08 20:25:24 UTC
Walk with me, please... Has anyone gotten C++ (client) to Java (web
service) 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)