axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <>
Subject Re: Setting HTTP headers from C++ stubs
Date Tue, 20 Apr 2004 14:12:22 GMT
If you look at Java, it uses direct simple API calls for simple things as setHTTPHeader. I
think if we are to use handlers it would make a simple tasks such as set HTTP heders more
difficult. Also users will have the extra burden of setting up handlers even for simple tasks.
But for setting custom SOAP headers, Handlers would be a good idea.
Therefor I think we have to draw a line and define what are to be supported with handlers
and what are not to be supported by handlers.
For setHTTPHeader I would still preffer the way that I have suggested, rhather than handlers.
But for complex SOAP headers such as security related ones, lets use handlers.
Samisa... wrote:
+1. This should be the way I think


> Good short-term answer Samisa - how about we move to a handler model on
> the
> client side to enable Transport handlers to be registered which could do
> this in a more generic way? I believe there is a model for this already in
> Java Axis? But I'm not familiar with it yet.
> John Hawkins,
> Tel:
> Internal: (7) 24-7131
> External: (+44 ) (0) 1962 817131
> Mailpoint 188,
> Hursley Park,
> Winchester,
> UK.
> SO21 2JN
> Samisa Abeysinghe
> >> To
> Apache AXIS C Developers List
> 20/04/2004 11:22 
> cc
> Please respond to Subject
> "Apache AXIS C Setting HTTP headers from C++ stubs
> Developers List"
> Hi All,
> I tried to set HTTP headers from the C++ stub and fond that it is not
> supported in current
> Axis C++.
> Hence I tried to write a stub to set HTTP headers from the stub. I
> used
> the interop base
> sample.
> I crated a new class called ServiceStub and inherited
> InteropTestPortType class from this (by
> the way, can we change InteropTestPortType classname to a more meaningful
> name)
> I think it is good to have a base class for the stubs (as in Axis
> Java). One can use the
> ServiceStub class that I have written as the base class. This makes life
> easier when it comes to
> extending stub functionality.
> Also When I wanted to set the HTTP headers, I found that the existing
> API does not have a
> mechanism to do so. Hence I added a setHTTPHeader methods to both Call and
> AxisTransport classes.
> ( I made the assumtion that the transport is always HTTP, which is
> reasonable for current Axis C++
> codebase, However need to change this to support new transports)
> I have attached my code here. And I think it is very important to
> allow
> flexibility on client
> side and the consept of inheriting stub from a base class like ServiceStub
> is very important.
> Also I tried to adhere to the suggested coding convention when I was
> writing ServiceStub
> class.
> I tested this code with both C++ and Java Axis servers and it worked.
> Only setHTTPHeaders work for the moment. The other methods such as
> setEndPointUrl could
> Please add this concept to Axis C++.
> Also we could build on this to achieve setting various properties from
> client stub.
> Thanks,
> Samisa...
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25
> attached file: base.tar.gz)

Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25
View raw message