axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Sanford <rsanf...@trefs.com>
Subject RE: C++ client problem
Date Thu, 01 Jul 2004 14:34:52 GMT
Is your client code hand generated or generated by WSDL? If you have hand
generated the client then there are several things you will need to look at.
I know because I hand generated and had access violations like this. Take a
look at the Calculator sample application and you can copy pretty much
line-for-line their code and adjust to suit your needs. But there are some
things that are mandatory.

1 - You must call SetProtocol before calling Initialize
2 - You must call SetTransportProperty, SetSOAPVersion, and SetOperation
before calling Invoke

Regardless of whether you are hand coding or generated you can run into
errors if your data document is too large. In my case I had a 10K document
that exceeded the internal buffer size. If you are in the position to
re-build the Axis client library file(s) then you can go into
SoapSerializer.cpp and increase INITIAL_SERIALIZE_BUFFER_SIZE to a size you
feel is sufficient for your needs.

rjsjr

-----Original Message-----
From: Titus Jakob [mailto:titus.jakob@fh-aargau.ch] 
Sent: Thursday, July 01, 2004 7:46 AM
To: axis-c-user@ws.apache.org
Subject: C++ client problem


Hi
May be you can help me.
1) I have a running web-service, handeled by Java-Axis.
2) If the client is a java-client everything works well.
3) I downloaded axis-c-1-2-alpha-win32, and created the client stubs ( see
below, AAAA)
4) the client programm (BBBB) compiles well.
5) during run time, it successfully starts the server-side but fails with
the return value at CCCC with an "access violation"...(?)
precise error message: "unhandeled exception in CClient.exe( AXISCLIENT.DLL
): 0X0000005: Access Violation 
Do you have me a hint, what to do?
Thanks in advance
Titus 
CCCC (Currency2.cpp)
if(AXIS_SUCCESS == m_pCall->checkMessage("multiplyResponse",
"http://localhost:8080/axis/Currency2.jws")) 
BBBB
#include "Currency2.h"
int main()
{
Currency2 c;
int result = -22;
result = c.multiply(46);
printf("result = %d", result);
return 0;
} 
AAAA
java -classpath %classpath%;.\wsdl2ws.jar
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws
http://localhost:8080/axis/Currency2.jws?WSDL -o./CurrencyCClient -lc++
-sclient 

Mime
View raw message