axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roshan Weerasuriya <ros...@opensource.lk>
Subject RE : Improving Hanlder writing api
Date Wed, 25 Feb 2004 13:41:41 GMT
hi Jean,

The code is not commited yet to CVS. I have a problem which troubles me, 
but which I still unable to sort out. The new code (i.e proposed examples 
below) works well in Debug build. But the code doesn't work at Release 
build. i.e

(For a good understnding of this code block look at the bottom of this mail)
.......
IHeaderBlock* pIHeaderBlock= 
pIHandlerSoapDeSerializer->GetHeaderBlock("reservation", 
"http://travelcompany.example.org/reservation");
if (pIHeaderBlock != NULL) {
         BasicNode* pBasicNode= pIHeaderBlock->getFirstChild();
         ..........

In Release build the execution flow doesn't enter to 
the  pIHeaderBlock->getFirstChild();. The if block is evaluated as true. 
But it doesn't enter to the pIHeaderBlock->getFirstChild() method. (I have 
put a log to see whether it enters to this method, but the execution flow 
doesn't enter to it.) But without a single change in the Debug build it 
works fine. Well so I still can't commit it. I also use the lates CVS 
update. Also the SOAP request which I use contains the SOAP Header in the 
expected manner.

Your ideas will be greately appreciated in this problem.

rgds,
roshan

At 09:36 AM 2/25/2004 +0000, you wrote:
>Hi Roshan
>
>Thanks for your reply. I will be very usefull for me. But is your code 
>committed in CVS ? If yes in which brand because I don't find it in the 
>HEAD branch.
>
>Regards,
>
>Jean-Yves
At 09:09 AM 2/25/2004 +0600, you wrote:
>hi all,
>
>The changes include:
>
>Adding following methods to the following classes.
>
>The following let the handler writer access the Header Block and traverse 
>through it to get the relavent info.
>
>- SoapDeSerializer, IHandlerSoapDeSerializer : let the handler writer get 
>the HeaderBlock by providing the local name and namespace uri
>- SoapHeader : let the handler writer get the HeaderBlock by providing the 
>local name and namespace uri
>- IHeaderBlock:
>         BasicNode* getFirstChild()=0;
>         BasicNode* getLastChild() =0;
>         BasicNode* getChild(int iChildPosition) =0;
>
>- HeaderBlock :
>         BasicNode* getFirstChild(),
>         BasicNode* getLastChild(),
>         BasicNode* getChild(int iChildPosition) // get the child by 
> giving the positon
>         getNoOfChildren() // get the no of available children
>- BasicNode :
>         //The following let the handler writer traverse throuhg the children
>         int getNoOfChildren();
>         BasicNode* getFirstChild();
>         BasicNode* getLastChild();
>         BasicNode* getChild(int iChildPosition);
>
>- ComplexElement:
>         int getNoOfChildren();
>         BasicNode* getChild(int iChildPosition);
>         BasicNode* getLastChild();
>         BasicNode* getFirstChild();
>         NODE_TYPE getNodeType();
>
>- CharacterElement:
>         const AxisChar* getValue();
>
>Also some of the following methods are to be used for various other 
>activities such as when creating header blocks by handlers and client apps.
>
>- IHeaderBlock:
>         BasicNode* createChild(NODE_TYPE eNODE_TYPE,  AxisChar 
> *pachLocalName, AxisChar *pachPrefix, AxisChar *pachUri, AxisChar* pachValue);
>         BasicNode* createImmediateChild(NODE_TYPE eNODE_TYPE, AxisChar 
> *pachLocalName, AxisChar *pachPrefix, AxisChar *pachUri, AxisChar* pachValue);
>         Attribute* createStdAttribute(HEADER_BLOCK_STD_ATTR_TYPE 
> eStdAttrType, SOAP_VERSION eSOAP_VERSION);
>         Attribute* createAttribute(const AxisChar* localname, const 
> AxisChar* prefix, const AxisChar* uri, const AxisChar* value);
>         Attribute* createAttribute(const AxisChar *localname, const 
> AxisChar *prefix, const AxisChar *value);
>
>A eg code sample from a client who will add a soap header to the soap 
>reqest is as following.
>
>         .....
>         //-----------Adding SOAP Header-----------
>         IHeaderBlock* pIHeaderBlock = 
> m_pCall->createHeaderBlock("reservation", "m", 
> "http://travelcompany.example.org/reservation");
>
>         pIHeaderBlock->createStdAttribute(ROLE_NEXT, SOAP_VER_1_2);
>         pIHeaderBlock->createStdAttribute(MUST_UNDERSTAND_TRUE, 
> SOAP_VER_1_2);
>
>         BasicNode* pBasicNode = 
> pIHeaderBlock->createImmediateChild(ELEMENT_NODE, "reference", "m", "", "");
>         BasicNode* pBasicNode2 = 
> pIHeaderBlock->createChild(CHARACTER_NODE, "", "", "", 
> "uuid:093a2da1-q345-739r-ba5d-pqff98fe8j7d");
>         pBasicNode->addChild(pBasicNode2);
>
>         BasicNode* pBasicNode3 = 
> pIHeaderBlock->createImmediateChild(ELEMENT_NODE, "dateAndTime", "m", "", "");
>         BasicNode* pBasicNode4 = 
> pIHeaderBlock->createChild(CHARACTER_NODE, "", "", "", 
> "2001-11-29T13:20:00.000-05:00");
>         pBasicNode3->addChild(pBasicNode4);
>         //-----------End of Adding SOAP Header-----------
>         .....
>
>
>A eg code sample from a handler written to process a header is as following.
>
>IHeaderBlock* pIHeaderBlock= 
>pIHandlerSoapDeSerializer->GetHeaderBlock("reservation", 
>"http://travelcompany.example.org/reservation");
>if (pIHeaderBlock != NULL) {
>         BasicNode* pBasicNode= pIHeaderBlock->getFirstChild();
>         BasicNode* pBasicNode2= pBasicNode->getFirstChild();
>
>         const AxisChar* pachHeaderValue;
>         const AxisChar* pachHeaderValue2;
>
>         if((pBasicNode2->getNodeType()) == CHARACTER_NODE) {
>                 pachHeaderValue= pBasicNode2->getValue();
>         }
>
>         BasicNode* pBasicNode3= pIHeaderBlock->getLastChild();
>         BasicNode* pBasicNode4 =pBasicNode3->getFirstChild();
>         if((pBasicNode4->getNodeType()) == CHARACTER_NODE) {
>                 pachHeaderValue2= pBasicNode4->getValue();
>         }
>
>         .....
>}
>
>If you need any further clarification please come back.
>
>rgds,
>roshan
>
>At 02:15 PM 2/24/2004 +0600, you wrote:
>>hi Jean,
>>
>> >I think you are talking about processing messages "à la" JAX-RPC 
>> message handler ?
>>This is baiscaly to support hanlder writers, to support processing soap 
>>headers.
>>
>> >I yes when the client side messaging handling is planned ?
>>The client side handlers are also to be supported in the near future.
>>
>>rgds,
>>roshan
>>
>>
>>At 01:41 PM 2/23/2004 +0000, you wrote:
>>>Hi Roshan,
>>>
>>>I think you are talking about processing messages "à la" JAX-RPC message 
>>>handler ?
>>>
>>>I yes when the client side messaging handling is planned ?
>>>
>>>After a quick look on the code it seem to be only for the server side by 
>>>now (server.wsdd).
>>>
>>>For the API looking at JAX-RPC seem to be a good starting point...
>>>
>>>Regards,
>>>
>>>Jean-Yves
>>>
>>>
>>> >hi all,
>>> >
>>> >I have been working on improving the handler writing api, 
>>> since >currently it doesn't have much support on handler writing.
>>> >I would like to get your comments if any in this regard.
>>> >
>>> >rgds,
>>> >roshan
>>
>>
>
>
>


Mime
View raw message