Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 17362 invoked from network); 18 Jan 2005 09:34:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 Jan 2005 09:34:41 -0000 Received: (qmail 69751 invoked by uid 500); 18 Jan 2005 09:34:32 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 69701 invoked by uid 500); 18 Jan 2005 09:34:32 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 69663 invoked by uid 99); 18 Jan 2005 09:34:31 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.opensource.lk (HELO squid.cmb.ac.lk) (202.51.147.3) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 18 Jan 2005 01:34:29 -0800 Received: from [192.168.101.20] ([220.247.228.194]) by squid.cmb.ac.lk (8.12.9/8.12.9) with ESMTP id j0I9iO8Z048762 for ; Tue, 18 Jan 2005 15:44:44 +0600 (LKT) (envelope-from roshan@opensource.lk) Subject: Re: [jira] Commented: (AXISCPP-375) setPrefix() in IAttribute class does not check whether the given namespace prefix is declared or not From: Roshan Weerasuriya To: Apache AXIS C Developers List In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1106040834.1134.32.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 18 Jan 2005 15:33:55 +0600 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 > > > 18/01/2005 14:09 > Please respond to > "Apache AXIS C Developers List" > To > Apache AXIS C > Developers List > > 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)" > > > > > > 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. > > > xmlns:ns2="http://axis.apache.com" > > np:Name="Axis"> > > > 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 > > > > > >