axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Perry2 <PERR...@uk.ibm.com>
Subject Re: setUri() API - Usage
Date Tue, 11 Jan 2005 11:20:13 GMT




A small note about AxisString. I thought a while ago that STL stuff, i.e.
string, wasn't going to be in the public API, or is AxisString the same as
AxisChar*?

Regards

Andrew Perry
IBM C/C++ Web Services Client
perryan@uk.ibm.com
Mail Point 127
IBM UK Laboratories. Hursley Park, Winchester, Hants. SO21 2JN
Tel. Internal 249828  External + 44 (0)1962 819828
Fax. + 44(0)1962 818080

Adrian Dick/UK/IBM@IBMGB wrote on 11/01/2005 10:21:25:

>
>
>
>
> Roshan Weerasuriya <roshan@opensource.lk> wrote on 11/01/2005 09:47:59:
> >
>
> > So what I propose is to introduce a new class as a palce holder for
> > namespaces (i.e actualy for namespace declarations). eg:
> > class Namespace
> > {
> > public:
> >         void setURI(AxisString asURI);
> >         void setPrefix(AxisString asPrefix);
> >         Namespace(AxisString asPrefix, AxisString asURI);
> >         Namespace();
> >         virtual ~Namespace();
> >
>
> > private:
> >         AxisString m_asPrefix;
> >         AxisString m_asURI;
> >
>
> > };
> >
>
> > And it will have its corrosponding INamespce interface as well.
> >
>
> > so the code would look like:
> > IHeaderBlock
> > *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.com");
> > INamespace *namesp=phb->createNamespaceDecl("np","http://apache.com");
> > namesp->setUri("new_uri");
> >
>
> > Please provide any of your ideas.
> >
>
> > Roshan
> >
>
> I agree with the INamespace and Namespace structure.  When it comes to
> implementation, I believe the best aproach is for Namespace to
encapsulate
> an Attribute, such that Attribute::setValue is exposed as setURI while
> Attribute::setURI is made unavailable.  Rather than duplicating the
> implementation of the Attribute methods.
>
> So Namespace would look more like:
> class Namespace
> {
> public:
>         void setURI(AxisString asURI)
> ->          { m_Attribute.setValue(asURI) };
>         void setPrefix(AxisString asPrefix)
> ->          { m_Attribute.setPrefix(asPrefix) };
>         Namespace(AxisString asPrefix, AxisString asURI);
>         Namespace();
>         virtual ~Namespace();
>
> private:
> ->        Attribute m_Attribute();
>
> };
>
>
> Regards,
> Adrian
>


Mime
View raw message