axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Yves Baudy <jy.ba...@free.fr>
Subject Re: SOAP Header manipulation & Handler API
Date Tue, 02 Mar 2004 18:39:13 GMT
Hi Roshan

For a good understanding of what I want to explain look at this URL.

http://www-106.ibm.com/developerworks/webservices/library/ws-tipjax1.html#IDAHACIC

In the WSDL sample in the binding section (in bold) we say that the 
request_header part must be send in the header section. So the SOAP 
request must look like this (an example):

<?xml version='1.0' encoding='utf-8' ?>
    <SOAP-ENV:Envelope ...>
       <SOAP-ENV:Header>
          <ns1:quote_timestamp xmlns:ns1="http://soapheader.ibm.com">
             <date>2004-03-02T18:22:52Z</date>
          </ns1:quote_timestamp>
       </SOAP-ENV:Header>
       <SOAP-ENV:Body>
          <ns1:getLastSellPrice xmlns:ns1="http://soapheader.ibm.com">
             <ticker>Token</ticker>
          </ns1:getLastSellPrice>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

What I want to say is that I didn't find a way in the current CVS code 
to deal with this. I propose to define a specific HeaderBlock and it 
could be initiated like this :


/*
  * This method wrap the service methodgetLastSellPrice
  */
float StockService::getLastSellPrice(xsd__string Value0,
	xsd__dateTime  HeaderValue0)
{
float Ret;
if (AXIS_SUCCESS != m_pCall->Initialize(CPP_DOC_PROVIDER)) return Ret;
m_pCall->SetTransportProperty(SOAPACTION_HEADER , "");
m_pCall->SetSOAPVersion(SOAP_VER_1_1);
m_pCall->SetOperation("getLastSellPrice", "http://soapheader.ibm.com");

/* Serialize the quote_timestamp here */
HeaderParamBlock* pParamHeaderBlock =
   (HeaderParamBlock*)m_pCall->
     createHeaderParamBlock("quote_timestamp", "", 				 
"http://soapheader.ibm.com");
pParamHeaderBlock->
  AddParameter((void*)&HeaderValue0, "date", XSD_DATETIME);

m_pCall->AddParameter((void*)&Value0, "ticker", XSD_STRING);
...
}

But in that case we need to duplicate the API of the Call.h interface in 
this class. So I suggest to look for another design but my time is very 
limited.

Regards,

Jean-Yves


 >hi Jean-Yves,
 >
 > >But I didn't find any APIs for passing or receiving parameters from 
 >this WSDL binding file
 >
 >Can you just explain a bit more this scenario. i.e What you mean here, 
 >with little bit detail.
 >Currently I am trying to figure out what you mean exactly. So your 
help >to clarify this issue a bit more is greatly appreciated.
 >
 >rgds,
 >roshan

Mime
View raw message