axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <>
Subject Re: Design Architecture
Date Tue, 25 Jan 2005 09:07:59 GMT
Cool :-)

Where is this doc going to go ?

John Hawkins

"Rangika Mendis" <> 
25/01/2005 08:17
Please respond to
"Apache AXIS C Developers List"

"Apache AXIS C Developers List" <>

Design Architecture

ws-attachments - Server Side
Purpose - 
To handle Attachments at server side.
A sample has been currently written to echo attachments  to the client.
The overall architecture is as follows:
When Axis C++ server side receives a SOAP message with attachment(s)  it 
has to extract and store it. This is done inside the 
Apache module. It extracts the attachments and stores  inside a map. Then 
at any time if a webservice requests for a particular 
attachment, the transport (in this case the Apache2 module) will be able 
to provide it by taking it from its map. Also if a webservice 
needs to send an attachment back, it needs  support to add them to the 
Serializer. This functionality is also provided.
The details given below explain the functionalities that are needed to 
deal with attachments (Currently we have focused on echoing 
attachments to the client.)
1. Apache2Transport - 
The following methods will be called by getBytes() once it receives the 
incoming message with base64 encoded attachments.
extract_Attachment(pBuffer) - 
Extracts the attachments from the pBuffer which has the incoming 
message.This will extract the attachments one by one and will 
store them in a map.The mime headers will also be extracted one by one & 
will be stored in a vector.
extract_SOAPMimeHeaders(pBuffer) - 
Extracts the SOAPMimeHeaders from the pBuffer and will store them in a 
char pointer.This method is required to send the 
response to the client.
extract_Soap(pBuffer) - 
Extracts the soap Message from the pBuffer.The soap part is extracted 
because the deserializer fails when it receives data in 
MIME format. It can only handle data in XML format.
The above 3 methods are implemented in the AttachmentHelper class.
2. The wrapper of the webservice calls the:-
getElementAsString() in the deserializer to get the ID of the required web 
service. Then it will get the Attachment through the 
DeSerializer and will send the attachment/s to the webservice to process 
Currently we are expecting the attachment id to be as an element value, 
but we noticed in Axis Java that it is sent as an Attribute.
Axis Java TCP monitor request - 
   <source href="cid:CB74148662CBBC03C85CAC8C456F9548"
Client TCP monitor request (which we used)- 
 <ns1:EchoAttachment soapenv:encodingStyle="" 
 <id xsi:type="xsd:string">000001233</id> 

3. After receiving the processed attachment/s the wrapper will pass the Id 
and the attachment/s to the addAttachment() of  the 
SoapSerializer. We added the following main methods to the SoapSerializer.
addAttachment(const AxisChar* achId, ISoapAttachment* pAttach) - 
This will add the attachment(s) to the attachment map in the Serializer.
addAttachmentHeader(const AxisChar* achId, const AxisChar* achHeaderName, 
const AxisChar* achHeaderValue) - 
This will add the name & the value of the mime headers to the relavent 
Attachment.This in turn will store the mime headers in a 
addAttachmentBody(const AxisChar* achId, xsd__base64Binary *pAttchBody) - 
This will set the body of the given attachment id.
Comments regarding this are welcome.
Nithya & Rangika

View raw message