Hi Rodrigo,

Well, of the top of my head you could compile the complex types into their own library and link that library into your application.

I don't think we have any Axis specific way that we do this now though.

hope this helps,
John.




Rodrigo Ruiz <[EMAIL PROTECTED]>

01/09/2005 15:54

Please respond to
"Apache AXIS C User List"

To
[email protected]
cc
Subject
how to share types between services





Hi all,

I am new to this project, and I would like to know about how does Axis C
handles the following case:

I have about twenty web services (and counting) for which I would like
to create C++ client stubs. None of my client applications use all these
services, so I want to have a separate DLL for each service.
These services share some complex-types that they use as input or output
parameters. The WSDL definitions of these types are always identical for
all the services, because they actually are the same java class.
Some of the service methods are intended to be used in a chain, that is,
the output of one method is used as the input for another method. I
would like to be able to do this in my client code without having to
copy data between equivalent types, just as I can do in an Axis Java client.

For example, the following is a code snipplet of a java client
application that uses some services in chain:

// Service stub instances
ServiceA sa = ...;
ServiceB sb = ...;
ServiceC sc = ...;

// Remote calls
Equation eq = sa.getEquation();
for (int i = 0; i < 100; i++) {
 Sample sample = sb.getDataSample();
 double result = sc.solve(eq, sample);
 System.out.println("Result: " + result);
}

I would like to be able to, somehow, share the Equation class between
the stubs for ServiceA and ServiceC, without having to compile them into
a single library. This is, to have a ServiceA.dll and a ServiceC.dll,
but only one implementation of the Equation class, so I can use both
dlls in the same client app without link errors. Is this possible at all?

Thanks in advance,
Rodrigo Ruiz

Reply via email to