How to remove individual Attributes?

I have some name-value pairs in an instance of Attributes().
Within the Attributes there are several name-value pairs I want to remove.
But I cannot seem to be able to remove them!
Attributes myAttributes = new Attributes();
//myAttributes filled using
myAttributes.putValue("name", "value");
//if "date" is one of the attribute names; I want to discard it from myAttributes;
myAttributes.remove("date");
//This does not seem to work as if "date" was inclusive then the below still returns the stored date
myAttributes.getValue("date");
Simon

it means that "date" was one of the names in the loaded name-value pairs loaded into myAttributes

Similar Messages

  • Fedlet: How to remove SPNameQualifier attribute from Authnrequest message

    Hi all,
    Hopefully someone on this forum is able to give me some hints how to proceed.
    I'm trying to understand how SAML2 works, and how (if I get it working with sample application) I can integrate it with our existing application.
    SP: Fedlet (Running on Weblogic 10.3)
    IDP: Shibboleth (Running on Weblogic 10.3)
    Both are running on the same server, but in different domains (and obviously with different ports).
    Fedlet is installed, and has the IDP meta data file loaded. When I go to the fedletsample application, I get the 3 hyperlinks (Of which "Run Identity Provider initiated Single Sign-On" is a broken link). Clicking on the "Run Fedlet (SP) initiated Single Sign-On using HTTP POST binding" brings me to the IDP login page.
    My IDP is using the embedded LDAP server from Weblogic. I enter the UID and Password, and (if details are entered correct), I'm redirected to the SP site again. Unfortunately at the SP site (The fedlet app) the message states "Single Sign On failed.".
    From reading the log file at the IDP, I understand that my user is successfully authenticated, however IDP (Shibboleth) is unable to process "SPNameQualifer"
    The log states a lot but I think the issue is related to an unknown attribute in the NameIDPolicy element:
    My NameIDPolicy in the AuthnRequest looks like this
    =====
         <samlp:NameIDPolicy
              AllowCreate="true"
              Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
              SPNameQualifier="fedletsp"
              xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"/>
    =====
    If I look up the details in the IDP log I see this
    ======
    - Starting to unmarshall DOM element {urn:oasis:names:tc:SAML:2.0:protocol}NameIDPolicy
    - Targeted QName checking is not available for this unmarshaller, DOM Element {urn:oasis:names:tc:SAML:2.0:protocol}NameIDPolicy was not verified
    - Building XMLObject for {urn:oasis:names:tc:SAML:2.0:protocol}NameIDPolicy
    - Unmarshalling attributes of DOM Element {urn:oasis:names:tc:SAML:2.0:protocol}NameIDPolicy
    - Pre-processing attribute AllowCreate
    - Attribute AllowCreate is neither a schema type nor namespace, calling processAttribute()
    - Pre-processing attribute Format
    - Attribute Format is neither a schema type nor namespace, calling processAttribute()
    - Pre-processing attribute SPNameQualifier
    - Attribute SPNameQualifier is neither a schema type nor namespace, calling processAttribute()
    - Pre-processing attribute {http://www.w3.org/2000/xmlns/}samlp
    - {http://www.w3.org/2000/xmlns/}samlp is a namespace declaration, adding it to the list of namespaces on the XMLObject
    - Unmarshalling other child nodes of DOM Element {urn:oasis:names:tc:SAML:2.0:protocol}NameIDPolicy
    - Unmarshalling child elements of XMLObject {urn:oasis:names:tc:SAML:2.0:protocol}AuthnRequest
    - Unmarshalling child element {urn:oasis:names:tc:SAML:2.0:protocol}RequestedAuthnContextwith unmarshaller org.opensaml.saml2.core.impl.RequestedAuthnContextUnmarshaller
    ======
    From topics I found using google, I understood that this attribute is not required, and that I should "suppres" it from the request.
    Now here come my question, how do you suppress this? I assume I would need to add some information to the idp-extended.xml file that indicates to exclude this attribute (SPNameQualifer) from the authrequest. But unfortunately I'm unable to find this infomation.
    Any help, tips are appreciated. I'm sure somewhere this information is stored, but I'm unable to find it.
    Many thanks
    Peter Daalder
    Edited by: user11240309 on 13-apr-2011 1:29

    I would like to perform similar action too.
    Anyone know how to remove the "standalone" attribute?
    Thanks.

  • How to remove elements/attributes from XML using Xpath in XSLT ??

    Hello ,
    Is there anyway or method of Xpath from which I can delete the elements and attributes from XML at runtime ??
    Like I have such XML and I have to remove per attribute highlighted below
    <person per="and">
    <e:emp a="ir" b="ad" >
    </e:emp>
    </person>
    And want a result like this
    <person>
    <e:emp a="ir" b="ad" >
    </e:emp>
    </person>
    Thanks

    To achieve this you can use the bpelx:remove function: http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#CIHJBJFD
    your assign will look like:
    <bpel:assign>
    <bpelx:remove>
    <target variable="person" query="/person/@per" />
    </bpelx:remove>
    </bpel:assign>
    Regards,
    Melvin

  • How to remove an attribute in Context when session is invalidated?

    I set a attribute in the context when i login to my application. When i logoff from my application, i remove the attribute from the context.
    But if i close my browser or encounter some error, then the session is not invalidated. The container waits till the session gets timed out and then it invalidates the session. But the attribute that i had set to the context is still there. The next time i login, i check whether the attribute is still available in context. It is.
    Scenario : Assume that i have a application and if i open some thing eg: model, then i update the attribute "read only" flag in the context as "true", so that no one can edit the model on which i am working on.
    When some other user logs in and tries to edit my model, he will get an error stating that the model is read only. Now if i log off, then i update the read only flag as false, so that some body can edit the same.
    But if i close my browser or if i encounter some error, then i am not making the read only flag as false. So even if i am not worling, still the read only flag is set to true in the context. So no one else can work on the model.
    My question is, is there a way to edit the context attribute, when i abruptly close my browser window? Is there a way to handle the dangling session objects and invalidate them immediately?

    Use the HttpSessionListener to determine when the session is destroyed and remove the attribute then. Be aware that aplication attributes are shared by all sessions and can cause problems in a multi-user environment.

  • How to remove xmlns attribute from XML tag?

    Hello!
    I have a XMLType document:
    --- P R O B L E M # 1 ---
    <?xml version="1.0" encoding="windows-1257" ?>
    <RESPONSE xmlns="http://testserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://testserver response.xsd">
    <DATA REQUEST_ID="111">
    <ENTITY name="PACKAGE_001">
    <ATTRIBUTE name="PERS_ID" value="1111" />
    <ATTRIBUTE name="FIRST_NAME" value="OLGA" />
    <ATTRIBUTE name="SURNAME" value="NOVIKOVA" />
    </ENTITY>
    </DATA>
    </RESPONSE>
    I very need to remove from RESPONSE tag all addition information. Result I need is:
    <?xml version="1.0" encoding="windows-1257" ?>
    <RESPONSE>
    <DATA REQUEST_ID="111">
    <ENTITY name="PACKAGE_001">
    <ATTRIBUTE name="PERS_ID" value="1111" />
    <ATTRIBUTE name="FIRST_NAME" value="OLGA" />
    <ATTRIBUTE name="SURNAME" value="NOVIKOVA" />
    </ENTITY>
    </DATA>
    </RESPONSE>
    What can I do in this situation? My Oracle version is 9.2.
    --- P R O B L E M # 2 ---
    How I can create from source XML this one:
    <?xml version="1.0" encoding="windows-1257" ?>
    <MY_RESPONSE>
    <RESPONSE xmlns="http://testserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://testserver response.xsd">
    <DATA REQUEST_ID="111">
    <ENTITY name="PACKAGE_001">
    <ATTRIBUTE name="PERS_ID" value="1111" />
    <ATTRIBUTE name="FIRST_NAME" value="OLGA" />
    <ATTRIBUTE name="SURNAME" value="NOVIKOVA" />
    </ENTITY>
    </DATA>
    </RESPONSE>
    </MY_RESPONSE>
    Thanks for your answers!
    Flu

    Maybe the problem#1 can be solved with a simple pl/sql using REPLACE statement. start with the <RESPONSE and look for the end > and get the entire string and replace that with only <RESPONSE> or maybe you can achieve this using xmldom to delete the attributes as part of the element.
    PRoblem#2 can be solved in this way.
    select xmlelement("MY_RESPONSE",
    xmltype('<RESPONSE xmlns="http://testserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://testserver response.xsd">
    <DATA REQUEST_ID="111">
    <ENTITY name="PACKAGE_001">
    <ATTRIBUTE name="PERS_ID" value="1111" />
    <ATTRIBUTE name="FIRST_NAME" value="OLGA" />
    <ATTRIBUTE name="SURNAME" value="NOVIKOVA" />
    </ENTITY>
    </DATA>
    </RESPONSE>')).GetClobVal()
    from dual
    /

  • How to delete duplicate attribute in on premise server for office 365 dir sync tool

    Hi,
    Please anyone help to how to remove duplicate attribute in on premise server for office 365 dir sync tool .
    While running the dirsync tool iam getting the below error : 
    "Unable to update this object because the following attributes associated with this object have values that may already be associated with another object in your local directory services: [ProxyAddresses smtp:[email protected],SMTP:[email protected];].
     Correct or remove the duplicate values in your local directory.  Please refer to http://support.microsoft.com/kb/2647098 for more information on identifying objects with duplicate attribute value"
    Still i am troubleshooting to reslove this problem . I have run the ID Fix tool there i could see some 10 duplicate errors . Next what should i do , please anyone help me to find it
    Thanks.....

    Hi,
    Please anyone help to how to remove duplicate attribute in on premise server for office 365 dir sync tool .
    While running the dirsync tool iam getting the below error : 
    "Unable to update this object because the following attributes associated with this object have values that may already be associated with another object in your local directory services: [ProxyAddresses smtp:[email protected],SMTP:[email protected];].
     Correct or remove the duplicate values in your local directory.  Please refer to http://support.microsoft.com/kb/2647098 for more information on identifying objects with duplicate attribute value"
    Still i am troubleshooting to reslove this problem . I have run the ID Fix tool there i could see some 10 duplicate errors . Next what should i do , please anyone help me to find it
    Thanks.....

  • How to remove soapenv:actor and soapenv:mustUnderstand

    Hi,
    I need help with removing actor and mustUnderstand from SoapHeader. It will be great if any one can help me with this.
    I build a SOAP Header using JAX-RPC
    SOAPMessageContext soapMsgCtx = (SOAPMessageContext)context;
    SOAPMessage soapMsg = soapMsgCtx.getMessage();
    SOAPPart soapPart = soapMsg.getSOAPPart();
    SOAPEnvelope soapEnv = soapPart.getEnvelope();
    SOAPHeader soapHeader = soapEnv.getHeader();
    Name userCredTag = soapEnv.createName("PPSoapHeader","", URI);
    SOAPHeaderElement hdrEl = soapHeader.addHeaderElement(userCredTag);
    This prints -
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
    <PPSoapHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns="http://schemas.microsoft......."/>
    I want to get Rid of "soapenv:actor" and soapenv:mustUnderstand="0"
    How can I do this.
    Thanks
    Sameer

    I only ask because the spec specifies that mustUnderstand=0 must be accepted by a SOAP node:
    http://www.w3.org/TR/2003/REC-soap12-part1-20030624/#soapmu
    Unfortunately, I can't help you with your problem, I don't use JWSDP, and looking at the SAAJ API it's not immediately obvious how to remove those attributes.

  • How can I remove individual songs from my iphone 5?

    How can I remove individual songs from my iphone 5? Right now, all 2013 songs are syncing. I thought that unchecking the songs in the main itunes playlist would remove them form all devices. Apparently this does not work. Under the uphone 5 sync menu there are no selections for individual songs... only groups of songs. Am I missing something?

    I just create a playlist and sync only this playlist.
    Then just add/remove from this playlist and sync.
    Unchecking songs does other thing such as not playing them in iTunes, not syncing them to other devices and not applying changes

  • How to implement for coherence*web to remove an attribute of a specific sessionid?

    Hi,
    Customer using coherence*web 3.6 wants to remove an attribute in NamedCache with a specific jsessionid.
    If it is possible, please let me know how to implement it.
    Thanks in advance,
    YH

    Hi sangee,
    you could get what you want to do by using a Java Server Page instead of both a HTML page and a Servlet.
    I should code something like this:
    <%Strung color="yourColor"%>
    <html><head><title></title></head>
    <body bgcolor="<%=color%>
    </body>
    </html>

  • How to remove the standalone="yes" attribute in the xml declaration?

    Hi,
    I am using JAXB 2.0 to generate XML files. Can anyone tell me how to remove the standalone="yes" attribute in the xml declaration? Thanks in advance.
    -Joey

    Just open the file with your favorite text program and type away. If you get a permissions problem (file is locked by...) then just stop tomcat and open/edit/save the file and restart tomcat.
    I also think that the admin context that comes with tomcat might allow you to modify/add/edit your users (not sure though)

  • How to remove the XML attribute value in Indesign file by javascript

    Hi all,
    How to remove the XML attribute value in Indesign file.

    Try this,
    if(elm.xmlElements[i].xmlAttributes[j].name == "aid:pstyle" || elm.xmlElements[i].xmlAttributes[j].name == "aid:cstyle")
    Vandy

  • How to remove  an marketing attribute assigned  to an Business partner

    Hi guys,
              Can some one tell me how to remove the assignment of an marketing attribute for an Business partner..(i dont want to delete the marketing attribute)
    Which function module should i use to remove the assignment..
    Regards,
    Sundar

    Sundar,
    Goto transaction CRMD_PROF_BP. Search for the attribute set you want to delete. Double click on it and in the next screen enter the business partner number and click on delete assignment button on the tool bar.
    An alternative method for mass deletion:
    Use TCode: CRMD_MKT_TOOLS. In there, select Deletion of an attribute for all BP Assignments
    Reward ipoints if this helps.
    Regards
    Anirudh

  • Please help with how to remove attribute

    Hi to all,
    I am having some serious problems with removeAttribute (or more like remove anything). I want to remove an attribute from an element, but it just doesn't seem to work no matter what I do.
    The following is an example of the xml:
    <diffgr:diffgram xmlns:diffgr="urn:pgwc-gov-za:diffgram">
    <DataInstance>
    <ROW diffgr:id="3240DEAFE594482B86B3A31E77A13975" diffgr:hasChanges="inserted">
    <VALUE>VALUE 1</VALUE>
    </ROW>
    </DataInstance>
    </diffgr:diffgram>
    I want to remove the diffgr:hasChanges attribute. I have searched high and low and can't find an example of how to do this. Could someone give me a quick example?
    Thanks,
    DayneO

    You can make use of DELETEXML
    scott@mydb> create table sun_xml(xmlcol xmltype);
    Table created.
    scott@mydb> insert into sun_xml
      2  values(xmltype('<diffgr:diffgram xmlns:diffgr="urn:pgwc-gov-za:diffgram">
      3  <DataInstance>
      4  <ROW diffgr:id="3240DEAFE594482B86B3A31E77A13975" diffgr:hasChanges="inserted">
      5  <VALUE>VALUE 1</VALUE>
      6  </ROW>
      7  </DataInstance>
      8  </diffgr:diffgram>'));
    1 row created.
    scott@mydb> update sun_xml
      2  set xmlcol = deletexml(xmlcol,'//DataInstance/ROW/@diffgr:hasChanges','xmlns:diffgr="urn:pgwc-gov-za:diffgram"');
    1 row updated.
    scott@mydb> select * from sun_xml;
    XMLCOL
    <diffgr:diffgram xmlns:diffgr="urn:pgwc-gov-za:diffgram">
      <DataInstance>
        <ROW diffgr:id="3240DEAFE594482B86B3A31E77A13975">
          <VALUE>VALUE 1</VALUE>
        </ROW>
      </DataInstance>
    </diffgr:diffgram>

  • How do I remove individual photos from the ipad without changing the photo album in my lap top where the photo album is stored??

    How do I remove individual photos from the ipad2 without affecting the photo album in my lap top where the photo album resides?

    You don't.
    To remove a photo from your iPad that is located in a photo album on your computer selected to be transferred to your iPad under the Photos tab for your iPad sync preferences with iTunes, the only way to remove the photo from your iPad is by removing if from the album on your computer followed by a sync.

  • How to remove/ignore the element using SAXParser

    hello all,
    I want to parse the text content in string from the existed xml file. but had problem with the parser. Does anyone have good idea, how to remove or ignore the <link> tag in tag <text>?
    IS: the output is only the rest of part text behind <link style="blue" src="www.test.com" />.
    Wanted: the whole text in <text> tags. like "Reach more customers by creating targeted micro-sites using test's multi-store retailing functionality."
    Given below is my code :
    <?xml version="1.0"?>
    <test xmlns="http://www.test.com/test">
    <title>test title</title>
    <text>Reach more customers by creating targeted micro-sites using test's<link style="blue" src="www.test.com" /> multi-store retailing functionality.</text>
    </test>java code using SAXParser
      public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
      public void endElement(String uri, String localName, String qName) throws SAXException {
        if (qName.equals("text")) {
          System.out.println("content: " + text);
      public void characters(char[] ch, int start, int length) throws SAXException {
        String str = new String(ch, start, length);
        if (str.length() > 0)
          text = text == null ? str : text + str;
    ...Edited by: lauehuang on Sep 9, 2008 4:37 AM

    i think u can't modify the xml file using SAX
    SAX is only for reading XML
    for any modifications in xml file u have to use DOM parser....
    correct me if i m wrong....
    Thanks & Regs
    Ravi

Maybe you are looking for

  • Ouverture de fichier PDF avec Acrobat X Pro/Adobe Reader

    Bonjour, J'ai un petit problème : Depuis que j'ai installé Acrobat X Pro, tout mes fichiers PDF veulent s'ouvrir avec ce logiciel. Le problème est qu'il ne démarre pas, parfois j'ai de la chance et 1-2 minutes plus tard il se lance Quand je lance Acr

  • "SharePoint Designer cannot display the item" error when edit workflow

    Hi I create workflow for sharepoint list in version 2007. Then upgrade sharepoint form version 2007 to 2010. Now when I want to edit this workflow, get this error: "SharePoint Designer cannot display the item. What you can try: Click the Refresh butt

  • How can I put a selected picture in multiple places in slideshow

    As the heading states: how can I put a selected picture in multiple places in slideshow There is a slideshow with 50 pics. I want to use one of these pics in several places, in the front, middle, middle end and then the end. How can I place this pic

  • Photoshop CS6 CC liquify just has blank grey screen.

    hi i am currently on a trial for CS6 CC version on Windows 8 but every time i try to liquify an image all that happens is a blank grey screen. The weird thing is i can click and edit the area of the grey screen and if i click OK to finish the liquify

  • LED light/indicator implementation help

    Programmers, Please help me with this.  If someone can help me get this to work then the driver will be complete.  The attached .vi has some LED lights being controlled by buttons.  The only problem right now is that, when I click on the "SET" button