CreateElementNS adds empty XMLNS to lower tags

Hi im working on sending a soap message
I get the soap message part made but have to add in a default namespace to one of the tags, so I create a new elementNS add the child node of the tag it will replace and then do replacechild to swap the old node with the new node that has the xmlns.
I then add another node within that node.
SOAPBody body = soapMessage.getSOAPBody();
               Node soapXML = body.getFirstChild().getFirstChild();
               String nodeName = body.getFirstChild().getNodeName();
               Element actionElement = soapMessage.getSOAPPart().createElementNS("http://Dealogic.com/DAAPI", nodeName);
               actionElement.appendChild(soapXML);
               body.replaceChild(actionElement, body.getFirstChild());
               SOAPElement sSKIDNode = (SOAPElement)soapMessage.getSOAPPart().createElementNS(null, DEALAXIS_SSKID);
               sSKIDNode.addTextNode(sSKID);
               ((SOAPElement)body.getFirstChild()).addChildElement(sSKIDNode);
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<InvestorUpload xmlns="http://Dealogic.com/DAAPI">
<xmlInvestor xmlns="">
<INVESTOR></INVESTOR>
</xmlInvestor>
<sSKID xmlns=""></sSKID>
</InvestorUpload>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
before the swap the xmlInvestor and sSKID tags do not havd xmlns but after they have the xmlns="" that you can see. these later present a problem when sending to the web service.
Is there a way in that i can stp this happening
chers

<xmlInvestor xmlns="">
So you want that element to be in the "http://Dealogic.com/DAAPI" namespace? Then you must say so when you create it, by calling the right method. It appears that you are copying it from a node that is not in any namespace, and the result is what you see: it is not in any namespace.

Similar Messages

  • Add "ns1:" to an xml tag in a PLSQL

    Hi Friends,
    in the below xml
    i use DomNode approach to create the core XML
    and use the below query
    SELECT XMLSERIALIZE ( DOCUMENT xmlroot  
                                  (XMLELEMENT ( 
                                   "ns1:DeriveCoverageRequest", 
                                   xmlattributes ( 
                                      'urn:xyz:ccw:config:common:data' AS "xmlns", 
                                      'urn:xyz:ccw:config:msa:data' AS "xmlns:ns1"), 
                                   l_xmltype)  
                                   ,version '1.0" encoding="UTF-8' ,STANDALONE YES 
                                   AS CLOB) 
                                   into l_value
    and the XML look like
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ns1:DeriveCoverageRequest xmlns="urn:xyz:ccw:config:common:data" xmlns:ns1="urn:xyz:ccw:config:msa:data">
      <majorLine> --
        <lineId>47285</lineId>
        <itemName>xyz15454</itemName>
        <quantity>5</quantity>
        <minorLine>
          <lineId>47293</lineId>
          <itemName>15454-CC-FTA</itemName>
          <quantity>5</quantity>
          <itemPath>xyz15454:15454-</itemPath>  
        </minorLine>
      </majorLine>
    </ns1:DeriveCoverageRequest>
    from dual;
    now i need to add ns1: with the majorLine tag so it should be like
    <ns1:majorLine>
    </ns1:majorLine>
    Code for creating this majorLine is
      l_major_line_node :=
          DBMS_XMLDOM.
           appendChild (
             l_root_node,
             DBMS_XMLDOM.
              makeNode (DBMS_XMLDOM.createElement (l_domdoc, 'majorLine')));
    and i modified like
      l_major_line_node :=
          DBMS_XMLDOM.
           appendChild (
             l_root_node,
             DBMS_XMLDOM.
              makeNode (DBMS_XMLDOM.createElement (l_domdoc, 'ns1:majorLine')));
    but it did not work. could you please suggest some idea on this

    Hi Odie,
    Actually 95% we are good , but one issue
    In the out put XML am getting  like
    <ns1:majorLine xmlns:ns1="urn:xyz:ccw:config:msa:data">
    but the required is
    <ns1:majorLine> only ,
    how to remove the extra info ? I tried like commenting the 
    dbms_xmldom.setattribute(l_major_line_elem, 'xmlns:ns1', 'urn:xyz:ccw:config:msa:data');
    but got some error and tried like putting empty quotes in the place of third parameter
    and
    one more final thing is
    i need to add line id as
    <ns1:majorLine lineID = "1234">
    You helped almost everything, am very grateful to you . Only one more Please..

  • Want to add a jsp inside pager tag library

    Hi,
    I want to add pagination in my web center application, for This I am using pager tag lib
    But I am not able to add jsp page inside *<pg:index >* tag
    I tried it with different ways: e.g.
    A. <jsp:include page="/WEB-INF/jsp/altavista.jsp" flush="true"/>
    b> <f:subview id="subview1">
    <jsp:include page="inc.jsp" />
    </f:subview>
    When I add JSP  inside <pg:index > tag and run my jsp i am getting noting in my UI and also not seeing any error in console.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:pe="http://xmlns.oracle.com/adf/pageeditor"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:tr="http://myfaces.apache.org/trinidad"
    xmlns:pg="http://jsptags.com/tags/navigation/pager"
    xmlns:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:pageTemplate viewId="/oracle/webcenter/portalapp/pagetemplates/nowTemplate.jspx"
    id="pt1">
    <f:facet name="content">
    <af:group id="g1">
    <af:panelGroupLayout id="pgl1">
    <div class="line topMargin20">
    <div class="unit size1of4">
    <div class="mod mod-sectionTitle">
    <span>Search Results</span>
    </div>
    </div>
    <!-- /unit -->
    <div class="unit size3of4 lastUnit"></div>
    <!-- /unit -->
    </div>
    <!-- /line -->
    <div>
    <pg:pager items="${backingBeanScope.searchClient.searchResults.totalResults}"
    maxPageItems="${backingBeanScope.searchClient.searchResults.maxPageItems}"
    maxIndexPages="${backingBeanScope.searchClient.searchResults.maxIndexPages}"
    isOffset="${backingBeanScope.searchClient.searchResults.isOffset}"
    export="offset,currentPageNumber=pageNumber"
    scope="request">
    <pg:param name="maxPageItems"/>
    <pg:param name="maxIndexPages"/>
    <input type="hidden" name="pager.offset" value="${backingBeanScope.searchClient.searchResults.isOffset}"></input>
    *<pg:index >*
    *</pg:index>*
    <c:forEach items="${backingBeanScope.searchClient.searchResults.results}"
    var="result">
    </c:forEach>
    </pg:pager>
    </div>
    </af:panelGroupLayout>
    </af:group>
    </f:facet>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_oracle_webcenter_portalapp_pages_untitled1-->
    </jsp:root>

    PeterBreis0807 wrote:
    Are you having trouble with tabs in a list?
    You haven't said so.
    In lists you have to use option tab, otherwise it just changes the list level.
    Peter
    I guess what you were hoping but you missed the point.
    Yvan KOENIG (VALLAURIS, France) vendredi 20 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k
    My iDisk is : http://public.me.com/koenigyvan

  • How to add empty folder in a jar file ?

    Well
    I know how to add files in a jar file but I cannot add empty folder.
    I would like to do this so that when I get back the jar file I can have all the structure of the save main folder.
    I also test that it is possible to do that on line with the "jar" command.
    Does any of you know how to do this programacticaly ?
    Thanks in advance

         JarOutputStream jos = // ...
         jos.putNextEntry(new JarEntry("directory/"));
         jos.closeEntry();
         jos.finish();
         jos.close();on the command line:
    jar -tf <your_jar_file.jar>

  • How to add empty rows in table in smart form

    how to add empty rows in table in smart form?
    plz help me regarding this
    send me ur queries to [email protected]

    You will need to add some extra rows to the internal table that your table is displaying.  Use a program node to append additional rows with a key but no argument.
    Alternaively a template may me more suitable for your requirement than a table.
    Finally, please do not include you e-mail address in your question.  Your question and the answers provided to it are for the benefit of everyone in the Community.
    Regards,
    Nick

  • How to add src, alt and title tags to a PS generated Web Photo Gallery

    I do some web design and need to add some tags to a web photo gallery created by Photoshop. Maybe this question should be directed to the GoLive / Dreamweaver Forum but since the gallery was created in PS I thought I'd start here.
    I need to add src, alt and title tags to the images in the web gallery. Normally this is as simple as working on the code in the html page in which the image sits but the PS gallery doesn't seem to be that simple.
    Can anyone tell me exactly how, and which files I need to work on, to add these tags to each of my 42 gallery images?
    Thanks.
    John.

    You can't do it in Photoshop.
    You can open the pages in a text editor adn easily ad any tags you want. They are simply html pages.
    If you really want to, you can use Dreamweaver or Golive. Using a text editor is generally faster and easier because you can just copy/paste between the files and not have to worry about code rewriting in the WYSIWYG applications. Don't believe the GoLive/Dreamweaver hype about "round trip code" they both will alter code.

  • How to add empty soap header?

    Hello,
    I created a web service proxy using WSDL and XSD files. Then, I created a sample request from client interface and sent the request as an object to call the web services. However, I am not directly calling the webservices as I am doing it through a Gateway. Here, the problem is, the Gateway accepts only empty SOAP headers and the Gateway inserts the security details in that SOAP header and will send a request to the original web services. Even if we add any element in the SOAP header, it is not accepting the request.
    While sending a request through the client interface(Java class), I am not able to generate a empty SOAP header and send as request. I tried several ways adding a empty header. but no result. Is there any way we can add empty SOAP header while sending a requesting through Java class(Client interface)?
    Thanks
    sekhar

    Thanks for your reply.
    I have tried different approaches for adding empty SOAP header with no elements. But, none of them worked. The only solution for this issue is to add OSB proxy which has the functionality to send empty SOAP header which worked for me.
    Thanks
    sekhar

  • How to add attributes in the xml tag

    hi,
    i have two tables employee,department
    employee table
    empno number,
    empname varchar2(100),
    deptno number,
    department table
    deptno number,
    deptname varchar2(100)
    i want xml file in the above mentioned two tables.The xml file is as follows,
    <?xml version="1.0" encoding="UTF-8" ?>
    <EmployeeInfo>
    <Data type="employee">
    <empno>1</empno>
    <empname>siva</empname>
    <deptno>10</deptno>
    </data>
    <Data type="department">
    <deptno>10</empno>
    <deptname>IT</empname>
    </data>
    </EmployeeInfo>
    can anybody please give plsql code for this requirement.i need to add attributes in the xml tag.Its urgent
    By
    Siva

    A general example (based on the OE sample data/tables)
    SQL>SELECT XMLElement("Emp",
      2                     XMLAttributes(employee_id AS "id"
      3                                  , '10' "dept"),
      4                     first_name||' '||last_name) as result
      5 FROM   employees e
      6 WHERE  department_id = 10;
    RESULT
    <Emp id="200" dept="10">Jennifer Whalen</Emp>

  • Add Empty Row not working

    Hi,
    We have an "Add Empty Row" Button.
    When that is clicked a new row seems to be added but we cannot view it.
    It is visible when a seperate action is carried out. Like a checkbox being checked.
    It seems that there is no refresh after the row has been added.
    This was working previously.
    What change could have been done that has caused this.
    Regards,
    Girishkumar Hegde

    data lo_nd_nd_pernr type ref to if_wd_context_node.
        data lt_nd_pernr type wd_this->elements_nd_pernr.
        data ls_nd_pernr type wd_this->element_nd_pernr.
        lo_nd_nd_pernr = wd_context->get_child_node( name = wd_this->wdctx_nd_pernr ).
        lo_nd_nd_pernr->get_static_attributes_table( importing table = lt_nd_pernr ).
      if lt_nd_pernr is initial.
          append ls_nd_pernr to lt_nd_pernr.
        elseif lt_nd_pernr is not initial.
      clear ls_nd_pernr.
      append ls_nd_pernr to lt_nd_pernr.
        endif.
      lo_nd_nd_pernr->bind_table( lt_nd_pernr ).
    This is the sample code for adding rows. Compare with this.

  • Add Empty New Line for ePub Using Adobe InDesign CS5.5

    Hello
    i am new to ePub, i did test ePub to see the possubilities and did great success.
    i am facing one issue i do not how to do that.
    i need to creat empty new line betwwn the title and the body text, i know the hardest way is to make one frame for title and other frame for body, this will take much time to complete the book.
    i tried to add empty lines using the Enter button on my Keyboard, but does not work.
    thanks in advance

    Do you know HTML and CSS? If not, you’re not likely to have much success with EPUB.
    If you do, you’ll need to crack open the epub and change the bottom margin for the title or the top margin for the text.
    Bob

  • How to add empty coloumn in the work sheet

    Hi
    how to add empty coloumn in the work sheet for taking notes after getting print out the work sheet
    Regards
    Manikandan

    And if you want the column to be a certain width, then just create that calculation with spaces instead (ie: calc_junk = ' ' ).
    Russ

  • [svn] 1318: Add empty dummy method to get MovieMetaDataPrinter to compile again.

    Revision: 1318
    Author: [email protected]
    Date: 2008-04-20 12:14:40 -0700 (Sun, 20 Apr 2008)
    Log Message:
    Add empty dummy method to get MovieMetaDataPrinter to compile again. I added a method to an interface in ASC, and this implements that method so it needs it too. New method doesn't do anything, just like all the other opcode methods it has.
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/MovieMetaDataPrinter.java

    Pls. Post only once.
    I think somebody already answered your problem in your other post.

  • [svn:fx-trunk] 13282: Add empty doc target back to TLF build file.

    Revision: 13282
    Revision: 13282
    Author:   [email protected]
    Date:     2010-01-05 10:48:56 -0800 (Tue, 05 Jan 2010)
    Log Message:
    Add empty doc target back to TLF build file.  Currently we are not building docs since they are included in the TLF drop.
    QE notes:
    Doc notes:
    Bugs:
    Reviewer: Jim
    Tests run:
    Is noteworthy for integration:
    Modified Paths:
        flex/sdk/trunk/frameworks/build.xml
        flex/sdk/trunk/frameworks/projects/textLayout/build.xml

    This is a duplicate post.  This should be locked to avoid further confusion.
    My CSS wont change
    Nancy O.

  • How to add namespace prefix to root tag in XSL version 1.1  SOA 11g

    Hi Experts,
       Can any one post solution for adding namespace prefix to root tag using XSL version 1.1 in SOA 11g?
    I have tried the below options and none is working.
    1. Removing prefix add in exclude-prefixes in XSL.But still seeing no prefix for root tag.
    2. Added the <xsl-element>   tag with namespace.But it is not working
    3. Added the below XSL code and it is not working.
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:ns0="https://api.ladbrokes.com/v1/sportsbook-couchbase/Temp.xsd">
      <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
      <xsl:template match="@* | node()">
       <xsl:copy>
       <xsl:apply-templates select="@* | node()"/>
       </xsl:copy>
      </xsl:template>
      <xsl:template match="/*">
       <xsl:element name="ns0:{local-name()}">
       <xsl:copy-of select="namespace::*" />
       <xsl:apply-templates select="@* | node()" />
       </xsl:element>
      </xsl:template>
    </xsl:stylesheet>

    Try this:
    <xsl:stylesheet  version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="@*|text()|comment()|processing-instruction()">
            <xsl:copy>
                <xsl:apply-templates select="@*|node()"/>
            </xsl:copy>
        </xsl:template>
        <xsl:template match="/">
            <RootTag xmlns:ns0="https://api.ladbrokes.com/v1/sportsbook-couchbase/Temp.xsd">
                <xsl:apply-templates select="@*|node()"/>          
            </RootTag >
        </xsl:template>
        <xsl:template match="*">
            <xsl:element name="{local-name()}">
                <xsl:apply-templates select="@*|node()"/>
            </xsl:element>
        </xsl:template>
    </xsl:stylesheet>

  • Add Editable Area to HEAD Tag?

    I am working in DW CS 5.5.
    My site has a base template and then a nested template for the Work pages.
    I'm trying to make the items in the vertical menu bar of the Work page editable attributes. When I select Modify > Template > Make Editable Attribute then set Attribute to class, enter a label name and set type to Text I get this error message:
    "There are no editable regions in the HEAD tag to insert the template property tag into. Please add an editable area to the HEAD tag in the base template and try again."
    I'm confused because I do have an editable region in the head. What am I doing wrong?

    Whoops, I should have included the top code in the base template file:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <!-- TemplateParam name="Home Link" type="text" value="" -->
    <!-- TemplateParam name="About Link" type="text" value="" -->
    <!-- TemplateParam name="Services Link" type="text" value="" -->
    <!-- TemplateParam name="Work Link" type="text" value="" -->
    <!-- TemplateBeginEditable name="head" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Creative Consulting | Fresh Thinking + Clever Ideas</title><meta name="description" content="AFB Creative Consulting helps companies reach new levels of success. Services range from high level business strategy and project management to website design, blog design, email campaign design, logo design, brand development and social networking." />
    <meta name="keywords" content="AFB Creative Consulting, Amy Fuller Boyd, websites, blog, email campaigns, logos, branding, social media, project management, business development, business strategy" />
    <link href='../images/favicon.ico' rel='shortcut icon' type='image/x-icon'/>
    <style type="text/css">
    </style>
    <link href="../afbCCStyles.css" rel="stylesheet" type="text/css" />
    </head>
    <!-- TemplateEndEditable -->

Maybe you are looking for

  • Error when IdentityXML is called

    Hi all! I'm working with OAM and trying to call an IdentityXML function to create a new user from outside of product using this API. I read de documentation (http://download.oracle.com/docs/cd/B28196_01/idmanage.1014/b25346/toc.htm) and I can't put t

  • Can't delete songs from playlists

    While transferring my library to a new computer, songs were put into the wrong playlists. In trying to correct this, I find that itunes won't allow me to delete any songs from existing playlists. Nothing happens when you hit the delete button and del

  • Program ID Required for RFC Connection

    Hi All, I'm trying to create a RFC Connection betwen SAP BI and SSIS (SQL Server Integration Services). In SM59 screen i'm unable to get the appropriate Program ID required for the connection. Could someone please help me in knowing how to get it.

  • Can I use my epson sx425w stylus wireless printer with my macbook air?? if so how do I link it as Im struggling to get it connected wirelessly

    Ive recently bought a macbook air and have an epson sx425w wireless printer which has been excellent when used with my previous laptop and im reluctant to purchase another when its in perfect working order, I just cant seem to link it to my macbook f

  • Archlinux Live Image Kernel to old

    I have a lot of installations in the last time where i have to use Archboot instead of the official Live ISO, in case of the kernel being just to old and so the installation does not work for example in case of missing network card drivers. Are there