axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Desselle, Alphonso J. \(Contr\)" <alphonso.desse...@ngc.com>
Subject Problems in trying to instantiate client stub object
Date Tue, 03 Apr 2007 20:12:19 GMT
I am trying to get Apace Axis for C++ (ver. 1.6b) working.  My main
goal, for now, is to get the simple calculator example
working with my web service I deployed on Tomcat.  To accomplish this, I
wrote a simple java object Calculator.java, which looks as follows.

public class Calculator {
  public int add(int i1, int i2)
  {
    return i1 + i2; 
  }


  public int subtract(int i1, int i2)
  {
    return i1 - i2;
  }
}

>From there I compiled and copied this class to my <axis homedir> under
my tomcat server.  I then renamed this file
To Calculator.jws.  

>From there I generated the wsdl using the following link from a web
browser
http://localhost:8080/axis/Calculator.jws?wsdl

I then copied and pasted the wsdl displayed in the browser to a file and
named it Calculator.wsdl

Okay all fine and dandy.  Now, for the c++ client I use the following to
generate the proxy classes.

java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws Calculator.wsdl -lc++ -sclient


Okay this generates fine and it compiles, once I put everything in the
library path. From there I wrote the following
client to call the calculator service.  

#include "Calculator.hpp"
#include<stdio.h>
int main()
 {
	 printf("Instantiating Web Service");
	 Calculator  ws( "http://localhost:8080/axis/Calculator.jws");
	 return 0;
 } 


Actually, I stripped down the client to just to the point where I am
getting the error, for I am not getting past the construction of the the
Calculator object.  Which was one of the objects generated by WSDL2Ws.

I'm crashing at the following spot

Calculator::Calculator(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE
eProtocol)
-->   :Stub(pchEndpointUri, eProtocol)
{
}

Any clues??



Mime
View raw message