You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Roshan Weerasuriya <ro...@opensource.lk> on 2005/01/18 09:39:11 UTC

Re: [jira] Commented: (AXISCPP-375) setPrefix() in IAttribute class does not check whether the given namespace prefix is declared or not

hi James,

>If we go for second one without getting the URI from user how we can
declare a new namespace ?
James, sometime we might have to change the API's a bit, don't worry abt
that. What is important is the namespaceURI, so actualy we can always
put a restriction to the user so that he has to set the namespaceURI
(because there is no meaning of the prefix without a namespaceURI). 

>What I feel is if the prefix is not declared then it should not set.
And shall we also declare the namespace automaticaly in this situation?
But this involves some complexity in our side in writing the code.
Or as you say, then we will have to abort the whole process, and infrom
the user the error which he has done, for ex as: "You have used a prefix
without declaring it or SOMETHING.."

Roshan

On Tue, 2005-01-18 at 14:20, James Jose wrote:
> Roshan,
>   I think first one is better.  If we go for second one without
> getting the URI from user how we can declare a new namespace ?
>   What I feel is if the prefix is not declared then it should not set.
> 
> Regards
> James
> --------------------------------------------------
> James Jose
> Messaging Clients Team, WMQDDC
> IBM Software Labs, India
> Direct: 91-80- 25094331  Ext :2331
> E-mail: jamejose@in.ibm.com
> 
> 
> 
> 
> "Roshan Weerasuriya (JIRA)"
> <ax...@ws.apache.org>
> 
> 18/01/2005 13:25
>          Please respond to
>   "Apache AXIS C Developers List"
>                To
> axis-c-dev@ws.apache.org
>                cc
> 
>           Subject
> [jira] Commented:
> (AXISCPP-375)
> setPrefix() in
> IAttribute class
> does not check
> whether the given
> namespace prefix
> is declared or
> not
> 
> 
> 
> 
>      [
> http://issues.apache.org/jira/browse/AXISCPP-375?page=comments#action_57705 ]
>     
> Roshan Weerasuriya commented on AXISCPP-375:
> --------------------------------------------
> 
> hi James,
> 
> If the namespace is not declared we have two options:
> 1) Put a restriction on user, so that he should always declare the
> namespace OR
> 2) Shall we (Axis C++) check and declare the namepace automaticaly if
> the user hasn't declare it 
> 
> Any how the 2nd approach will add a lot of complications to the
> code... But can be done
> 
> Which option do you think is better? Or any other suggestions?
> 
> > setPrefix() in IAttribute class  does not check whether the given
> namespace prefix is declared or not
> >
> -----------------------------------------------------------------------------------------------------
> >
> >          Key: AXISCPP-375
> >          URL: http://issues.apache.org/jira/browse/AXISCPP-375
> >      Project: Axis-C++
> >         Type: Bug
> >     Reporter: James Jose
> >     Assignee: Roshan Weerasuriya
> 
> >
> > IHeaderBlock
> *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.apache.com");
> > IAttribute *attr=phb->createAttribute("Name","ns2","","Axis");
> > attr->setPrefix("np");
> >  The above code will generate the following soap header.
> > <SOAP-ENV:Header><ns2:TestHeader xmlns:ns2="http://axis.apache.com"
> np:Name="Axis"></ns2:TestHeader></SOAP-ENV:Header>
> > Here the new prefix of Name is 'np' which is an undeclared one and
> so the request fails. So the API should check whether the prefix is
> declared or not before setting it.
> > createAttribute() API also sets the prefix of an Attribute. SO
> createAttribute() API should also check for this declaration.
> 
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the
> administrators:
>   http://issues.apache.org/jira/secure/Administrators.jspa
> -
> If you want more information on JIRA, or have a bug to report see:
>   http://www.atlassian.com/software/jira
> 
> 


Re: [jira] Commented: (AXISCPP-375) setPrefix() in IAttribute class does not check whether the given namespace prefix is declared or not

Posted by John Hawkins <HA...@uk.ibm.com>.
Can I ask whether we need this ? If no one is asking for it...... 

John Hawkins





Roshan Weerasuriya <ro...@opensource.lk> 
18/01/2005 09:33
Please respond to
"Apache AXIS C Developers List"


To
Apache AXIS C Developers List <ax...@ws.apache.org>
cc

Subject
Re: [jira] Commented: (AXISCPP-375) setPrefix() in      IAttribute class 
does not check whether the given namespace prefix is    declared or not






hi James,

>  Also there is no API to create a namespace declaration in
>BasicNode.Do we need one?

Yes we will need..... another JIRA issue...

Roshan

On Tue, 2005-01-18 at 15:09, James Jose wrote:
> >And shall we also declare the namespace automaticaly in this
> situation?
> 
>   User has to declare the namespace. 
> 
>   Also there is no API to create a namespace declaration in
> BasicNode.Do we need one?
> 
> 
> Regards
> James
> --------------------------------------------------
> James Jose
> Messaging Clients Team, WMQDDC
> IBM Software Labs, India
> Direct: 91-80- 25094331  Ext :2331
> E-mail: jamejose@in.ibm.com
> 
> 
> 
> 
> Roshan Weerasuriya
> <ro...@opensource.lk>
> 
> 18/01/2005 14:09
>          Please respond to
>   "Apache AXIS C Developers List"
>                To
> Apache AXIS C
> Developers List
> <ax...@ws.apache.org>
>                cc
> 
>           Subject
> Re: [jira]
> Commented:
> (AXISCPP-375)
> setPrefix() in
> IAttribute 
> class does not
> check whether the
> given namespace
> prefix is
> declared or not
> 
> 
> 
> 
> hi James,
> 
> >If we go for second one without getting the URI from user how we can
> declare a new namespace ?
> James, sometime we might have to change the API's a bit, don't worry
> abt
> that. What is important is the namespaceURI, so actualy we can always
> put a restriction to the user so that he has to set the namespaceURI
> (because there is no meaning of the prefix without a namespaceURI). 
> 
> >What I feel is if the prefix is not declared then it should not set.
> And shall we also declare the namespace automaticaly in this
> situation?
> But this involves some complexity in our side in writing the code.
> Or as you say, then we will have to abort the whole process, and
> infrom
> the user the error which he has done, for ex as: "You have used a
> prefix
> without declaring it or SOMETHING.."
> 
> Roshan
> 
> On Tue, 2005-01-18 at 14:20, James Jose wrote:
> > Roshan,
> >   I think first one is better.  If we go for second one without
> > getting the URI from user how we can declare a new namespace ?
> >   What I feel is if the prefix is not declared then it should not
> set.
> > 
> > Regards
> > James
> > --------------------------------------------------
> > James Jose
> > Messaging Clients Team, WMQDDC
> > IBM Software Labs, India
> > Direct: 91-80- 25094331  Ext :2331
> > E-mail: jamejose@in.ibm.com
> > 
> > 
> > 
> > 
> > "Roshan Weerasuriya (JIRA)"
> > <ax...@ws.apache.org>
> > 
> > 18/01/2005 13:25
> >          Please respond to
> >   "Apache AXIS C Developers List"
> >                To
> > axis-c-dev@ws.apache.org
> >                cc
> > 
> >           Subject
> > [jira] Commented:
> > (AXISCPP-375)
> > setPrefix() in
> > IAttribute class
> > does not check
> > whether the given
> > namespace prefix
> > is declared or
> > not
> > 
> > 
> > 
> > 
> >      [
> >
> 
http://issues.apache.org/jira/browse/AXISCPP-375?page=comments#action_57705 
]
> > 
> > Roshan Weerasuriya commented on AXISCPP-375:
> > --------------------------------------------
> > 
> > hi James,
> > 
> > If the namespace is not declared we have two options:
> > 1) Put a restriction on user, so that he should always declare the
> > namespace OR
> > 2) Shall we (Axis C++) check and declare the namepace automaticaly
> if
> > the user hasn't declare it 
> > 
> > Any how the 2nd approach will add a lot of complications to the
> > code... But can be done
> > 
> > Which option do you think is better? Or any other suggestions?
> > 
> > > setPrefix() in IAttribute class  does not check whether the given
> > namespace prefix is declared or not
> > >
> >
> 
-----------------------------------------------------------------------------------------------------
> > >
> > >          Key: AXISCPP-375
> > >          URL: http://issues.apache.org/jira/browse/AXISCPP-375
> > >      Project: Axis-C++
> > >         Type: Bug
> > >     Reporter: James Jose
> > >     Assignee: Roshan Weerasuriya
> > 
> > >
> > > IHeaderBlock
> >
> *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.apache.com");
> > > IAttribute *attr=phb->createAttribute("Name","ns2","","Axis");
> > > attr->setPrefix("np");
> > >  The above code will generate the following soap header.
> > > <SOAP-ENV:Header><ns2:TestHeader
> xmlns:ns2="http://axis.apache.com"
> > np:Name="Axis"></ns2:TestHeader></SOAP-ENV:Header>
> > > Here the new prefix of Name is 'np' which is an undeclared one and
> > so the request fails. So the API should check whether the prefix is
> > declared or not before setting it.
> > > createAttribute() API also sets the prefix of an Attribute. SO
> > createAttribute() API should also check for this declaration.
> > 
> > -- 
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the
> > administrators:
> >   http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > If you want more information on JIRA, or have a bug to report see:
> >   http://www.atlassian.com/software/jira
> > 
> > 
> 
> 



Re: [jira] Commented: (AXISCPP-375) setPrefix() in IAttribute class does not check whether the given namespace prefix is declared or not

Posted by Roshan Weerasuriya <ro...@opensource.lk>.
hi James,

>  Also there is no API to create a namespace declaration in
>BasicNode.Do we need one?

Yes we will need..... another JIRA issue...

Roshan

On Tue, 2005-01-18 at 15:09, James Jose wrote:
> >And shall we also declare the namespace automaticaly in this
> situation?
> 
>   User has to declare the namespace. 
> 
>   Also there is no API to create a namespace declaration in
> BasicNode.Do we need one?
> 
> 
> Regards
> James
> --------------------------------------------------
> James Jose
> Messaging Clients Team, WMQDDC
> IBM Software Labs, India
> Direct: 91-80- 25094331  Ext :2331
> E-mail: jamejose@in.ibm.com
> 
> 
> 
> 
> Roshan Weerasuriya
> <ro...@opensource.lk>
> 
> 18/01/2005 14:09
>          Please respond to
>   "Apache AXIS C Developers List"
>                To
> Apache AXIS C
> Developers List
> <ax...@ws.apache.org>
>                cc
> 
>           Subject
> Re: [jira]
> Commented:
> (AXISCPP-375)
> setPrefix() in
> IAttribute      
> class does not
> check whether the
> given namespace
> prefix is
> declared or not
> 
> 
> 
> 
> hi James,
> 
> >If we go for second one without getting the URI from user how we can
> declare a new namespace ?
> James, sometime we might have to change the API's a bit, don't worry
> abt
> that. What is important is the namespaceURI, so actualy we can always
> put a restriction to the user so that he has to set the namespaceURI
> (because there is no meaning of the prefix without a namespaceURI). 
> 
> >What I feel is if the prefix is not declared then it should not set.
> And shall we also declare the namespace automaticaly in this
> situation?
> But this involves some complexity in our side in writing the code.
> Or as you say, then we will have to abort the whole process, and
> infrom
> the user the error which he has done, for ex as: "You have used a
> prefix
> without declaring it or SOMETHING.."
> 
> Roshan
> 
> On Tue, 2005-01-18 at 14:20, James Jose wrote:
> > Roshan,
> >   I think first one is better.  If we go for second one without
> > getting the URI from user how we can declare a new namespace ?
> >   What I feel is if the prefix is not declared then it should not
> set.
> > 
> > Regards
> > James
> > --------------------------------------------------
> > James Jose
> > Messaging Clients Team, WMQDDC
> > IBM Software Labs, India
> > Direct: 91-80- 25094331  Ext :2331
> > E-mail: jamejose@in.ibm.com
> > 
> > 
> > 
> > 
> > "Roshan Weerasuriya (JIRA)"
> > <ax...@ws.apache.org>
> > 
> > 18/01/2005 13:25
> >          Please respond to
> >   "Apache AXIS C Developers List"
> >                To
> > axis-c-dev@ws.apache.org
> >                cc
> > 
> >           Subject
> > [jira] Commented:
> > (AXISCPP-375)
> > setPrefix() in
> > IAttribute class
> > does not check
> > whether the given
> > namespace prefix
> > is declared or
> > not
> > 
> > 
> > 
> > 
> >      [
> >
> http://issues.apache.org/jira/browse/AXISCPP-375?page=comments#action_57705 ]
> >     
> > Roshan Weerasuriya commented on AXISCPP-375:
> > --------------------------------------------
> > 
> > hi James,
> > 
> > If the namespace is not declared we have two options:
> > 1) Put a restriction on user, so that he should always declare the
> > namespace OR
> > 2) Shall we (Axis C++) check and declare the namepace automaticaly
> if
> > the user hasn't declare it 
> > 
> > Any how the 2nd approach will add a lot of complications to the
> > code... But can be done
> > 
> > Which option do you think is better? Or any other suggestions?
> > 
> > > setPrefix() in IAttribute class  does not check whether the given
> > namespace prefix is declared or not
> > >
> >
> -----------------------------------------------------------------------------------------------------
> > >
> > >          Key: AXISCPP-375
> > >          URL: http://issues.apache.org/jira/browse/AXISCPP-375
> > >      Project: Axis-C++
> > >         Type: Bug
> > >     Reporter: James Jose
> > >     Assignee: Roshan Weerasuriya
> > 
> > >
> > > IHeaderBlock
> >
> *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.apache.com");
> > > IAttribute *attr=phb->createAttribute("Name","ns2","","Axis");
> > > attr->setPrefix("np");
> > >  The above code will generate the following soap header.
> > > <SOAP-ENV:Header><ns2:TestHeader
> xmlns:ns2="http://axis.apache.com"
> > np:Name="Axis"></ns2:TestHeader></SOAP-ENV:Header>
> > > Here the new prefix of Name is 'np' which is an undeclared one and
> > so the request fails. So the API should check whether the prefix is
> > declared or not before setting it.
> > > createAttribute() API also sets the prefix of an Attribute. SO
> > createAttribute() API should also check for this declaration.
> > 
> > -- 
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the
> > administrators:
> >   http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > If you want more information on JIRA, or have a bug to report see:
> >   http://www.atlassian.com/software/jira
> > 
> > 
> 
> 


Re: [jira] Commented: (AXISCPP-375) setPrefix() in IAttribute class does not check whether the given namespace prefix is declared or not

Posted by James Jose <ja...@in.ibm.com>.
>And shall we also declare the namespace automaticaly in this situation?

  User has to declare the namespace. 

  Also there is no API to create a namespace declaration in BasicNode.Do 
we need one?


Regards
James
--------------------------------------------------
James Jose
Messaging Clients Team, WMQDDC
IBM Software Labs, India
Direct: 91-80- 25094331  Ext :2331
E-mail: jamejose@in.ibm.com





Roshan Weerasuriya <ro...@opensource.lk> 
18/01/2005 14:09
Please respond to
"Apache AXIS C Developers List"


To
Apache AXIS C Developers List <ax...@ws.apache.org>
cc

Subject
Re: [jira] Commented: (AXISCPP-375) setPrefix() in IAttribute   class does 
not check whether the given namespace prefix is declared or not






hi James,

>If we go for second one without getting the URI from user how we can
declare a new namespace ?
James, sometime we might have to change the API's a bit, don't worry abt
that. What is important is the namespaceURI, so actualy we can always
put a restriction to the user so that he has to set the namespaceURI
(because there is no meaning of the prefix without a namespaceURI). 

>What I feel is if the prefix is not declared then it should not set.
And shall we also declare the namespace automaticaly in this situation?
But this involves some complexity in our side in writing the code.
Or as you say, then we will have to abort the whole process, and infrom
the user the error which he has done, for ex as: "You have used a prefix
without declaring it or SOMETHING.."

Roshan

On Tue, 2005-01-18 at 14:20, James Jose wrote:
> Roshan,
>   I think first one is better.  If we go for second one without
> getting the URI from user how we can declare a new namespace ?
>   What I feel is if the prefix is not declared then it should not set.
> 
> Regards
> James
> --------------------------------------------------
> James Jose
> Messaging Clients Team, WMQDDC
> IBM Software Labs, India
> Direct: 91-80- 25094331  Ext :2331
> E-mail: jamejose@in.ibm.com
> 
> 
> 
> 
> "Roshan Weerasuriya (JIRA)"
> <ax...@ws.apache.org>
> 
> 18/01/2005 13:25
>          Please respond to
>   "Apache AXIS C Developers List"
>                To
> axis-c-dev@ws.apache.org
>                cc
> 
>           Subject
> [jira] Commented:
> (AXISCPP-375)
> setPrefix() in
> IAttribute class
> does not check
> whether the given
> namespace prefix
> is declared or
> not
> 
> 
> 
> 
>      [
> 
http://issues.apache.org/jira/browse/AXISCPP-375?page=comments#action_57705 
]
> 
> Roshan Weerasuriya commented on AXISCPP-375:
> --------------------------------------------
> 
> hi James,
> 
> If the namespace is not declared we have two options:
> 1) Put a restriction on user, so that he should always declare the
> namespace OR
> 2) Shall we (Axis C++) check and declare the namepace automaticaly if
> the user hasn't declare it 
> 
> Any how the 2nd approach will add a lot of complications to the
> code... But can be done
> 
> Which option do you think is better? Or any other suggestions?
> 
> > setPrefix() in IAttribute class  does not check whether the given
> namespace prefix is declared or not
> >
> 
-----------------------------------------------------------------------------------------------------
> >
> >          Key: AXISCPP-375
> >          URL: http://issues.apache.org/jira/browse/AXISCPP-375
> >      Project: Axis-C++
> >         Type: Bug
> >     Reporter: James Jose
> >     Assignee: Roshan Weerasuriya
> 
> >
> > IHeaderBlock
> *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.apache.com");
> > IAttribute *attr=phb->createAttribute("Name","ns2","","Axis");
> > attr->setPrefix("np");
> >  The above code will generate the following soap header.
> > <SOAP-ENV:Header><ns2:TestHeader xmlns:ns2="http://axis.apache.com"
> np:Name="Axis"></ns2:TestHeader></SOAP-ENV:Header>
> > Here the new prefix of Name is 'np' which is an undeclared one and
> so the request fails. So the API should check whether the prefix is
> declared or not before setting it.
> > createAttribute() API also sets the prefix of an Attribute. SO
> createAttribute() API should also check for this declaration.
> 
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the
> administrators:
>   http://issues.apache.org/jira/secure/Administrators.jspa
> -
> If you want more information on JIRA, or have a bug to report see:
>   http://www.atlassian.com/software/jira
> 
>