axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Susantha Kumara" <susan...@opensource.lk>
Subject How to avoid possible namespace prefix conflicts in serialized SOAP Messages
Date Mon, 14 Jun 2004 04:32:20 GMT
Hi All,
 
I see that some of the functions that are used to create objects that
construct the SOAP message are given prefixes. See following,
 
SoapSerializer::createHeaderBlock
Stub::createSOAPHeaderBlock
Stub::setSOAPMethodAttribute
HeaderBlock::createAttribute
HeaderBlock::createChild
...
 
When we (a Stub or Handler) create any object (SoapEnvelope, SoapBody,
SoapMethod, SoapHeader, HeaderBlock etc) we should allow the Serializer
to decide the prefixes for any namespace URI. Otherwise there is a
possibility of prefix collisions in the serialized SOAP message. But if
you always use SoapSerializer::getNamespacePrefix function to get a
prefix for your namespace URI, this problem can be avoided.
 
So the ideal way to deal with this situation is to change the above
methods to pass only the namespace URI and inside each of those
functions it should ask the Serializer for the prefix. But this needs a
considerable changes in the code of the above classes and some other
related classes. 
 
So as a temporary measure I expose the
SoapSerializer::getNamespacePrefix function through Stub/Call class
interfaces and Handler API and the Client applications/Handlers should
use it to avoid any prefix conflicts in the serialized SOAP message.
 
---
Susantha Kumara
Virtusa (pvt) Ltd.
Office : +94112714385
Mobile : +94777420453
 

Mime
View raw message