axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Perry2 <>
Subject Re-use of generated Stub/Proxy object
Date Wed, 16 Jun 2004 14:37:54 GMT

I have a Java Web Service callled TestService running in WebSphere and used
WSDL2Ws.jar to generate the Stubs/Proxy code for the client to call the
service. In version 1.0 of AXIS C++ I was able to use a single instance of
the generated TestService class to make all the calls in my test client
instantiated in the constructor of the ClientTest class (see code snippet
below), and the instance was just re-used. This worked without problems for
the 28 different tests that I have currently have.

Since upgrading to 1.1.x this no longer works. For each method called in
the TestService class a new instance of the TestService needs to
instantiated. I haven't tried 1.2 yet. I'm using the xerces.2.2.0 parser.

Was this change in behaviour planned? What are the official rules/guidance
for Stub/Proxy re-use?

(Code snippet: brevity used for clarity)

ClientTest::ClientTest(const char *endpoint) {
      ws = new TestService(endpoint);

bool ClientTest::getInt() {
      int expected = 10;
      int intReturn = ws->getDataInt();
      return (expected == intReturn);

bool ClientTest::getLong() {
      long expected = 10;
      long longReturn = ws->getDataLong();
      return (expected == longReturn);



Andrew Perry

View raw message