axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From susan...@opensource.lk
Subject Re: Ability to add custom headers to SOAP messeges, through the stub
Date Tue, 25 May 2004 10:58:49 GMT
> In Axis Java (or JAX-RPC) the way this is done is in two parts.
>
> Firstly the user calls stub._setProperty("name", valueObject);

Is this setting transport properties ?. Or setting SOAP headers ?.
Probably any.

>
> then a handler is defined, which is coded to understand the "name", and
> to know the SOAP Header structure. So the handler does:

So this "name" says that it is an object that should be serialized as a
SOAP header ?.

>
> value = getProperty("name");
>
> and then
>
> SOAPElement el = ..... /// create SOAPElement

So in this case isn't the object passed by stub._setProperty "valueObject"
is of derived class of SOAPElement ?

>
> headers.addElement(el);
>
> This model is nice because the application code isn't concerned with the
> XML/SOAP aspect, but has a simple API to pass data across to the handlers.

Does this mean that its a handler who decides whether the data passed
across to the handlers are serialized as SOAP headers , transport headers
or anything else ?.

>
> Would this be a good model to follow in C/C++?
>
> Paul
>
>
> Susantha Kumara wrote:
>
>>Hi all,
>>
>>I think we need some kind of re-structuring of the way that we handle
>>SOAP headers in Axis C++. May be I am wrong . Please correct me if so.
>>Following is the consideration.
>>
>>At the moment the Axis C++ code generator (WSDL2WS tool) does not
>>generate code for handling SOAP headers. Please look at the attached
>>WSDL. There some SOAP headers are described which means that our code
>>generator can handle some work for the user. I mean
>>Serializing/Deserializing SOAP headers.
>>
>>So I feel that any API functions that are used to get/set SOAP headers
>>should be in line with complex type handling APIs of Serializer and
>>Deserializer interfaces.
>>
>>For an example the WSDL2Ws tool can create a complex type (class or
>>struct) for a SOAP header and its serializer/deserializer functions. But
>>these classes/structs and the API functions that are used within these
>>serializer/deserializer functions will be different from a regular
>>complex type and its functions.
>>
>>Then any handlers or stubs will use those classes/structs/manipulation
>>functions.
>>
>>If we do not do this with code generator the handler/stub writers will
>>have to write their own serializers/deserializers.
>>
>>Instead why cant we just provide API functions to get/set the tool
>>generated complex type objects as header blocks ?. I mean functions
>>like,
>>
>>addComplexHeaderBlock(void* cmplxObj, void* szfunct, void* dszfunct,
>>......)
>>getComplexHeaderBlock(char* blockname, .....);
>>
>>Thanks
>>---
>>Susantha Kumara
>>Virtusa (pvt) Ltd.
>>Office : +94112714385
>>Mobile : +94777420453
>>
>>
>>
>>>-----Original Message-----
>>>From: Roshan Weerasuriya [mailto:roshan@opensource.lk]
>>>Sent: Thursday, May 20, 2004 11:48 AM
>>>To: Apache AXIS C Developers List
>>>Subject: Ability to add custom headers to SOAP messeges, through the
>>>
>>>
>>stub
>>
>>
>>>Hi all,
>>>
>>>I am planing to work on "lProviding an API at the client stub to
>>>
>>>
>>simply
>>
>>
>>>add
>>>headers to SOAP messege". Currently there is a mechanism in Axis C++
>>>
>>>
>>to
>>
>>
>>>add
>>>SOAP Headers through Handlers written by the user, i.e writing and
>>>configuring a Handler to add SOAP Headers. One possible way of doing
>>>
>>>
>>this
>>
>>
>>>is that:
>>>Provide a function at stub level such as setSoapHeader (SoapHeader*
>>>pSoapHeader).
>>>
>>>I would appreciate any of your ideas/comments on this matter.
>>>
>>>rgds,
>>>Roshan
>>>
>>>
>>>
>>
>>
>>
>
>
>


Mime
View raw message