Removing namespace from xml

Hi,
I have an xml which has some target namespace.
I need to remove the namespace and the qualifiers and put it on a machine using a file adapter.
Any help in this regard is highly appreciated.
With Regards,
Harsh

Please go throught the below link
Removing namespace from xml  created

Similar Messages

  • Remove  Namespace from XML File except Attribute

    Hi  XI  Experts ,
    1.I have referred to the code of xslt Generic XSLT Code to Remove ALL Namespaces from XML:
    http://forums.sdn.sap.com/thread.jspa?threadID=1920630
    But this removes the Attribute : id  from the records .
    My expected output is supposed to be :
    <?xml version="1.0" encoding="GBK"?>
    <body>
      <head>
        <nsrsbh>112001069711</nsrsbh>
        <nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
        <dcrq>20120209</dcrq>
        <sssq_q>20111201</sssq_q>
        <sssq_z>20120207</sssq_z>
        <records>4</records>
      </head>
      <data>
        <record id="1">
           <fpdm></fpdm>
        </record>
    </data>
    </body
    But after using this XSLT code it removes :id from <record_1 id=> and generated the below code :
    The xml file now doesn't contain teh attribute :id
    <?xml version="1.0" encoding="GBK"?>
    <body>
      <head>
        <nsrsbh>112001069711</nsrsbh>
        <nsrmc>诺维信(中国)生物技术有限公司出口发票</nsrmc>
        <dcrq>20120209</dcrq>
        <sssq_q>20111201</sssq_q>
        <sssq_z>20120207</sssq_z>
        <records>4</records>
      </head>
      <data>
        <record>
          1
          <fpdm></fpdm>          
           </record>
    </data>
    </body>
    Could  you please provide your input
    Plaese note : Here  XI versin iS x1 3.0 SP7 . I have tried suing the Analyzer bean for the Encoing  of Chinese : GBK Intsead of UTF-8 in the Namespace  . But AF_Modules/XMLAnonymizerBean is not comptacible with XI 3.0 SP7
    Hence i have used the following code to remove namespcae and add  Encoding :GBK instead of UTF-8:
    <?xml version="1.0" ?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output encoding="GBK"/>
    <xsl:template match="node()|@*">
      <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
    </xsl:template>
    </xsl:stylesheet>

    You could use exclude-result-prefixes.
    For example:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wt="http://www.example.com" exclude-result-prefixes="wt">
    </xsl:stylesheet>

  • How to remove namespace from xml in ALSB?

    I have a xquery transformation which works for data without namespace. But the data coming from source system has namespace details in it. Is there a way to strip the xml of namespace details from xml before passing it to xquery transformation?

    Hi
    silly mistake :P
    Following 'bold' declaration was not there!!
    Just copy paste following code as xquery and it will be all ok:
    declare namespace xf = "http://tempuri.org/vijfhuizen/com/myMessage/";
    declare function xf:strip-namespace($e as element())
    as element()
    element { xs:QName(local-name($e)) }
    for $child in $e/(@*,node())
    return
    if ($child instance of element())
    then xf:strip-namespace($child)
    else $child
    declare variable $e as element() external;
    xf:strip-namespace($e)

  • Removing Default Namespaces from XML

    Hi All,
    I am having a situation where I can't remove the default
    namespace from XML mainly
    because there is no namespace prefix.
    I hope this code snipped makes better sense.
    function test():void
    document:XML =
    <test xmlns:soap="
    http://example.com" xmlns="
    http://swanmokshi.com">
    <item>peter</item>
    <item>jenny</item>
    <item>JK Angel</item>
    <test>
    // I can remove the soap namespace by doing the following
    soap:Namespace = document.namespace("soap");
    document.removeNamespace(soap).
    Alert.show(document.toXMLString()); // should now display
    the xml document without the soap namespace
    Note that removing the soap namespace is easy because of the
    first namespace is named "soap". How do
    I removed the unnamed namespace, xmlns="
    http://swanmokshi.com" ?
    regards,
    Arun

    Same problem for me.
    XPath expression failed to execute. Error while processing xpath expression, the expression is "ora:processXSLT("Transformation_2.xsl", bpws:getVariableData("PartyID", "Header"))", the reason is Character reference "&#24" is an invalid XML character.. Please verify the xpath query.
    I am getting the date from Oracle Advanced Queue

  • How to remove namespace from root-element

    Hi Gurus,
    I want one xml output from xslt transformation with no namespace. I managed to remove namespace from child elements by leveraging elementFormDefault ='unqualified' property of xsd. But not able remove namespace from root-element.
    Output that I want is :
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <inp1:Email_Mod_Root>
       <Email_Mod_Root_Element>
          <Email_Record1>
             <PERSON_NUMBER>123456</PERSON_NUMBER>
             <COUNTRY/>
              <EMAIL_TYPE>WORK</EMAIL_TYPE>
             <EMAIL>EMAIL3</EMAIL>
             <PRIMARY_FLAG>Y</PRIMARY_FLAG>
          </Email_Record1>
    </Email_Mod_Root_Element>
    </Email_Mod_Root>
    Output that I am getting:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <inp1:Email_Mod_Root xmlns:inp1="http://www.example.org">
       <Email_Mod_Root_Element>
          <Email_Record1>
             <PERSON_NUMBER>123456</PERSON_NUMBER>
             <COUNTRY/>
             <EMAIL_TYPE>WORK</EMAIL_TYPE>
             <EMAIL>EMAIL3</EMAIL>
             <PRIMARY_FLAG>Y</PRIMARY_FLAG>
          </Email_Record1>
    </Email_Mod_Root_Element>
    </Email_Mod_Root>
    Anyone, pls suggest.
    Thanks in advance,
    SG_SOA

    First of all :
    <inp1:Email_Mod_Root>
       <Email_Mod_Root_Element>
          <Email_Record1>
             <PERSON_NUMBER>123456</PERSON_NUMBER>
             <COUNTRY/>
              <EMAIL_TYPE>WORK</EMAIL_TYPE>
             <EMAIL>EMAIL3</EMAIL>
             <PRIMARY_FLAG>Y</PRIMARY_FLAG>
          </Email_Record1>
    </Email_Mod_Root_Element>
    </Email_Mod_Root>
    isn't valid xml (you start with inp1: prefix and you end the tag with no prefix, but let's assume you don't want any prefix/namespace at all)
    if i use :
    [code]
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:inp1="http://www.example.org" exclude-result-prefixes="inp1">
      <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="*">
        <xsl:element name="{local-name(.)}">
          <xsl:apply-templates select="@* | node()"/>
        </xsl:element>
      </xsl:template>
      <xsl:template match="@*">
        <xsl:attribute name="{local-name(.)}">
          <xsl:value-of select="."/>
        </xsl:attribute>
      </xsl:template>
    </xsl:stylesheet>
    [/code]
    i get this
    [code]
    <Email_Root_Element>
      <Email_Record>
      <EMPLID>EMPLID46</EMPLID>
      <EMAIL>EMAIL48</EMAIL>
      <E_ADDR_TYPE>E_ADDR_TYPE49</E_ADDR_TYPE>
      <COUNTRY>US</COUNTRY>
      </Email_Record>
      <Email_Record>
      <EMPLID>EMPLID47</EMPLID>
      <EMAIL>EMAIL49</EMAIL>
      <E_ADDR_TYPE>E_ADDR_TYPE50</E_ADDR_TYPE>
      <COUNTRY>US</COUNTRY>
      </Email_Record>
      <Email_Record>
      <EMPLID>EMPLID48</EMPLID>
      <EMAIL>EMAIL49</EMAIL>
      <E_ADDR_TYPE>E_ADDR_TYPE51</E_ADDR_TYPE>
      <COUNTRY>US</COUNTRY>
      </Email_Record>
    </Email_Root_Element>
    [/code]

  • Remove element from xml using dom.

    i want to remove an element from an xml file using dom.
    i remove the element but the whole content of the file is also deleted.
    how can i rewrite the file.

    vij_ay wrote:
    subject :Remove element from xml,but if empty element in input file then output should be <tag></tag>, not like <tag.xml/>I assume you mean <tag/> but why do you want this? Any application that will not accept this valid XML construct is flawed and a bug report should be raised against it.

  • How to remove Unicode from XML file

    I get following error when unmarshal xml:
    [java] org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x15) was found in the element content of the document.
    Anyone know how to remove Unicode from xml file? Can I remove the unicode by rebuild the file?
    Thanks

    These sort of error usually occur when you're using a different character encoding to read the file than the one you wrote it with. Perhaps if you were to post the problem section of the file and/or the code that created it in the first place.

  • Remove namespace from element name

    hello,
    which is the most efficient way to remove the namespace from the name of all the elements of a dom document ?
    eg:
    <ns1:mytag>aaa</ns1:mytag> should become <mytag>aaa</mytag>
    is it possible to have an example in java ?
    thanks
    roberto

    Personally I would write an XSLT to do that. Just modify the identity transformation to write out elements with no namespace prefix.

  • How to remove xmlns from xml using java

    Hi,
    <DLList xmlns="http://www.test.com/integration/feed" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Weather>
    <StateName>Karnataka</StateName>
    <ForecastName>Bagalkote</ForecastName>
    <Humidity>89.9</Humidity>
    </Weather>
    <Weather>
    <StateName>Karnataka</StateName>
    <ForecastName>Devengiri</ForecastName>
    <Humidity>89.9</Humidity>
    </Weather>
    </DLList>
    The above xml needs to be decomposed using xsu.I am facing a small problem because the xml has namespaces.
    How to remove the namespace using java to get the below xml
    Note:I am using XSLT for the transformation.The XSLT tag is not identifying the <DLList> tag with name space
    <DLList>
    <Weather>
    <StateName>Karnataka</StateName>
    <ForecastName>Bagalkote</ForecastName>
    <Humidity>89.9</Humidity>
    </Weather>
    <Weather>
    <StateName>Karnataka</StateName>
    <ForecastName>Devengiri</ForecastName>
    <Humidity>89.9</Humidity>
    </Weather>
    </DLList>
    Please help.Let me know if any other information is required
    Thanks

    OK, here goes :
    For the example, I'll use a TB_DISTRICT table with the following structure :
    create table tb_district (
    sr_no number(3),
    district_name varchar2(100)
    );loaded with data from this page :
    http://india.gov.in/knowindia/districts/andhra1.php?stateid=KA
    and this XML document (one additional record compared to the one you posted) :
    <DLList xmlns="http://www.test.com/integration/feed" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Weather>
    <StateName>Karnataka</StateName>
    <ForecastName>Bagalkote</ForecastName>
    <Humidity>89.9</Humidity>
    </Weather>
    <Weather>
    <StateName>Karnataka</StateName>
    <ForecastName>Devengiri</ForecastName>
    <Humidity>89.9</Humidity>
    </Weather>
    <Weather>
    <StateName>Karnataka</StateName>
    <ForecastName>Dharwad</ForecastName>
    <Humidity>70.1</Humidity>
    </Weather>
    </DLList>In order to access the XML, I'll also use this Oracle directory object :
    create directory test_dir as 'D:\ORACLE\test';Final relational tables are :
    create table BUSINESS_TABLE
      STATE         VARCHAR2(30),
      DISTRICT_NAME VARCHAR2(30),
      HUMIDITY      NUMBER
    );and
    create table REJECT_TABLE
      STATE         VARCHAR2(30),
      DISTRICT_NAME VARCHAR2(30),
      HUMIDITY      NUMBER,
      ERROR_MESSAGE VARCHAR2(500)
    );With XMLTable function, we can easily break the XML into relational rows and columns ready to use for DML :
    SQL> alter session set nls_numeric_characters=". ";
    Session altered
    SQL>
    SQL> SELECT *
      2  FROM XMLTable(
      3    XMLNamespaces(default 'http://www.test.com/integration/feed'),
      4    '/DLList/Weather'
      5    passing xmltype(bfilename('TEST_DIR','test.xml'), nls_charset_id('CHAR_CS'))
      6    columns
      7      state         varchar2(30) path 'StateName'
      8    , district_name varchar2(30) path 'ForecastName'
      9    , humidity      number       path 'Humidity'
    10  )
    11  ;
    STATE                          DISTRICT_NAME                    HUMIDITY
    Karnataka                      Bagalkote                            89.9
    Karnataka                      Devengiri                            89.9
    Karnataka                      Dharwad                              70.1
    Then with a multitable insert, we load both the business table and the reject table (if the district name does not exist in TB_DISTRICT) :
    SQL> INSERT FIRST
      2    WHEN master_district_name IS NOT NULL
      3      THEN INTO business_table (state, district_name, humidity)
      4                VALUES (state, district_name, humidity)
      5    ELSE INTO reject_table (state, district_name, humidity, error_message)
      6              VALUES (state, district_name, humidity, 'Invalid district name')
      7  WITH xml_data AS (
      8    SELECT *
      9    FROM XMLTable(
    10      XMLNamespaces(default 'http://www.test.com/integration/feed'),
    11      '/DLList/Weather'
    12      passing xmltype(bfilename('TEST_DIR','test.xml'), nls_charset_id('CHAR_CS'))
    13      columns
    14        state         varchar2(30) path 'StateName'
    15      , district_name varchar2(30) path 'ForecastName'
    16      , humidity      number       path 'Humidity'
    17    )
    18  )
    19  SELECT x.*
    20       , t.district_name as master_district_name
    21  FROM xml_data x
    22       LEFT OUTER JOIN tb_district t ON t.district_name = x.district_name
    23  ;
    3 rows inserted
    SQL> select * from business_table;
    STATE                          DISTRICT_NAME                    HUMIDITY
    Karnataka                      Dharwad                              70.1
    SQL> select * from reject_table;
    STATE                          DISTRICT_NAME                    HUMIDITY ERROR_MESSAGE
    Karnataka                      Bagalkote                            89.9 Invalid district name
    Karnataka                      Devengiri                            89.9 Invalid district name

  • How do I remove & amp; from XML?

    Hello,
    DB: 11.1.0.7.0
    I am trying to use XMLAGG to concatenate multiple fields delimited by "|". However, if the fields have characters like "&" or "<" they are being transformed in the XML. How do I convert them back?
    SELECT rtrim (xmlagg (XMLELEMENT (E, mck.concatenated_segments||', ')).extract ('//text()'),', ') concatenated_segments
      FROM mtl_category_sets mcs,
           mtl_item_categories mic,
           mtl_categories_kfv mck
    WHERE mcs.category_set_name = 'LiDestri Costing Sub Category'
           AND mic.inventory_item_id = 5862
           AND mic.organization_id = 98
           AND mic.category_set_id = mcs.category_set_id
           AND mck.category_id = mic.category_id
           AND mck.structure_id = mcs.structure_idResult (space added so it is not converted in html)
    BRANDY &lt ;= 170 PROOFDesired Result
    BRANDY <= 170 PROOFHow can I convert it to remove the & amp; type symbols?
    Thanks in advance,
    --Johnnie                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Johnnie,
    Use XMLCast :
    select rtrim(
             xmlcast(
               xmlagg(
                 xmlelement(e, mck.concatenated_segments || ', ')
               as varchar2(4000)
           ) as concatenated_segments
    from ...

  • DataWriter - removing attributes from xml tag at the start of document

    Hi,
    I'm using DataWriter for generating a large XML document, however I do not want the attributees of the starting xml tag to appear in the final file.
    Eg: <?xml version="1.0" {color:#ff0000}encoding="UTF-8" standalone="yes"{color}?>I do not want to output the part highlighted in red.
    What could be the possible ways to do it? I prefer if it can be removed in the begining itself instead of parsing the document and removing in the end.
    -TIA, saum
    Edited by: nkrust on Feb 15, 2010 4:29 PM

    try {
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        Marshaller marshaller = new Marshaller(new OutputStreamWriter(
                                  baos));
                        marshaller.marshal(ResponseContents);
                        // Create an object of type Document from the XML document
                        // created.
                        DocumentBuilderFactory domFactory = DocumentBuilderFactory
                                  .newInstance();
                        domFactory.setNamespaceAware(false);
                        DocumentBuilder builder = domFactory.newDocumentBuilder();
                        responseDoc = builder.parse(new ByteArrayInputStream(
                                  ResponseUtils.formatXMLString(baos.toString())));
                   } catch (IOException e) {
                        e.printStackTrace();
                        System.out.println(e.getMessage());
                   }

  • Remove namespaces from elements

    There is a problem I am experiencing, that others have discussed here Illustrator retains unsavory namespaces in SVGs, can't open it's own export
    Basically the AI document retains namespace data from SVG's that have been copied or used in some way to create the AI.
    When the document is saved to SVG - these namespace references remain and can result in invalid SVG output.
    Does anyone know of a way that these namespaces could be accessed using Illustrator Scripting?
    thanks,
    Mochael

    So under certain circumstances when an SVG is uploaded into our CMS data similar to this is added
    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="2550px" height="2000px" viewBox="0 2000 2550 2000" enable-background="new 0 2000 2550 2000" xml:space="preserve" xmlns:cib="http://connectib.com/connect">
      <path id="outline33" cib:unitID="0" fill="#6FACD3" stroke="#878787" d="M984.7,3258.8l187.2-46.6c0,0,47.1-13.3,64.4,33.4
      l-5,153.5c0,0-1.8,73.1-76.4,98.3l-89.6,23.5l-3-9.8l-13.9,2.4l-0.2,4.4l-64.2,15.9l-7-30l-7 .5,1.2l-31.2-130l6.1-1.9l-6.3-30.8
      l8.9-3.7l-2.2-10.5l31.5-54.2l11.6-3.2L984.7,3258.8z" />
    </svg>
    If you open that document in Illustrator it's fine, it appears under certain circumstances Illustrator loses the namespace declaration and when you save to SVG you still get the property on the path, but no declaration which makes it invalid.

  • How to remove indents from XML?

    I have a xml like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <view>
         <help>
              <block>No.1</block>
              <device>USB</device>
         </help>     
    </view>
    How could I output the xml to :
    <?xml version="1.0" encoding="UTF-8"?><view><help><block>No.1</block>          <device>USB</device></help></view>
    The reason to output like this is to make the xml comparison passed.
    I use org.custommonkey.xmlunit.XMLTestCase.compareXML to compare two xml string, one from Java code, the other from C# code. Now, since there are new lines and whitespaces embedded in the Java generated XML, the comparison always failed. Is there any way to output the indent xml to the one string only?

    Try running the strings through something like this before comparing:
    String <stringname> = <stringname>.replaceAll("\\n|\\t|\\s|\\r", "");
    that should normalize them both to no spaces, tabs, newlines, carrage returns.

  • I need an urgent help  remove namespace from proxyServie request body

    I have EFIBetalingOrdningMisligholdt proxyService that called IMMultiHaendelseModtag IMMultiHaendelseModtag business Service, but they have different xsd, so i am transforming EFIBetalingOrdningMisligholdt proxy service reuest xsd to
    IMMultiHaendelseModtag business service xsd.
    Bellow i have my xq file for the transformation.
    IMMultiHaendelseModtag Business Service request parameter should look like this.
    here is partial request to IMMultiHaendelseModtagBusinessService
    <soapenv:Body>
         <ns:IMMultiHændelseModtag_I      revision="string" xmlns:ns="http://skat.dk/begrebsmodel/2009/01/15/">
         <ns:Kontekst>
         <!--You may enter ANY elements at this point-->
         <AnyElement/>
         </ns:Kontekst>
    IMMultiHaendelseModtagBusinessService is called
    here is a partial of the transformed request
    Route to: "IMMultiHaendelseModtag"
         $outbound:
         <con:endpoint      name="BusinessService$dk.skat.efi.im$biz$IMMultiHaendelseModtag" xmlns:con="http://www.bea.com/wli/sb/context">
         <con:service>
         <con:operation>getIMMultiHændelseModtag</con:operation>
         </con:service>
         <con:transport>
         <con:mode>request-response</con:mode>
         <con:qualityOfService>best-effort</con:qualityOfService>
         <con:request      xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <tran:headers      xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
         <http:Content-Type>text/xml</http:Content-Type>
         <http:SOAPAction>
         "http://skat.dk/begrebsmodel/2009/01/15/getIMMultiHændelseModtag"
         </http:SOAPAction>
         </tran:headers>
         </con:request>
         </con:transport>
         <con:security>
         <con:doOutboundWss>false</con:doOutboundWss>
         </con:security>
         </con:endpoint>
         $body (request):
         <soapenv:Body      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <ns:EFIBetalingOrdningMisligholdt_I      revision="string" xmlns:ns="http://skat.dk/begrebsmodel/2009/01/15/">
         <ns:IMMultiHændelseModtag_I>
         <ns:HændelseSamling>
         <ns:EFIHændelseStruktur>
    but the problem this :
    <soapenv:Body      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <ns:EFIBetalingOrdningMisligholdt_I      revision="string" xmlns:ns="http://skat.dk/begrebsmodel/2009/01/15/">
    question.
    How can I transforme :<ns:IMMultiHændelseModtag_I      revision="string" xmlns:ns="http://skat.dk/begrebsmodel/2009/01/15/"> to <soapenv:Body      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <ns:EFIBetalingOrdningMisligholdt_I      revision="string" xmlns:ns="http://skat.dk/begrebsmodel/2009/01/15/"> ?
    declare namespace xf = "http://skat.dk/begrebsmodel/2009/01/15/";
    declare namespace ns0 = "http://skat.dk/begrebsmodel/2009/01/15/";
    declare function xf:test($eFIBetalingOrdningMisligholdt_I1 as element(ns0:EFIBetalingOrdningMisligholdt_I))
    as element(ns0:IMMultiHændelseModtag_I) {
    let $EFIBetalingOrdningMisligholdt_I := $eFIBetalingOrdningMisligholdt_I1
    return
    <ns0:IMMultiHændelseModtag_I>
    <ns0:HændelseSamling>
    <ns0:EFIHændelseStruktur>
    let $KundeStruktur := $EFIBetalingOrdningMisligholdt_I/ns0:BetalingsordningMisligholdListe/ns0:Kunde[1]/ns0:KundeStruktur
    return
    <ns0:KundeStruktur>
    <ns0:KundeNummer>{ data($KundeStruktur/ns0:KundeNummer) }</ns0:KundeNummer>
    <ns0:KundeType>{ data($KundeStruktur/ns0:KundeType) }</ns0:KundeType>
    for $VirksomhedCVRNummer in $KundeStruktur/ns0:VirksomhedCVRNummer
    return
    <ns0:VirksomhedCVRNummer>{ data($VirksomhedCVRNummer) }</ns0:VirksomhedCVRNummer>
    for $KundeNavn in $KundeStruktur/ns0:KundeNavn
    return
    <ns0:KundeNavn>{ data($KundeNavn) }</ns0:KundeNavn>
    for $DriftFormKode in $KundeStruktur/ns0:DriftFormKode
    return
    <ns0:DriftFormKode>{ data($DriftFormKode) }</ns0:DriftFormKode>
    for $EnkeltmandVirksomhedEjer in $KundeStruktur/ns0:EnkeltmandVirksomhedEjer
    return
    <ns0:EnkeltmandVirksomhedEjer>{ $EnkeltmandVirksomhedEjer/@* , $EnkeltmandVirksomhedEjer/node() }</ns0:EnkeltmandVirksomhedEjer>
    </ns0:KundeStruktur>
    <ns0:IndholdValg>
    <ns0:EFIBetalingOrdningMisligholdtStruktur>
    let $BetalingsOrdningliste := $EFIBetalingOrdningMisligholdt_I/ns0:BetalingsordningMisligholdListe/ns0:Kunde[1]/ns0:BetalingsOrdningliste
    return
    <ns0:BetalingsOrdningliste>
    for $MisligholdtBetalingsordning in $BetalingsOrdningliste/ns0:MisligholdtBetalingsordning
    return
    <ns0:MisligholdtBetalingsordning>
    <ns0:BetalingOrdningEFIIndsatsID>{ data($MisligholdtBetalingsordning/ns0:BetalingOrdningEFIIndsatsID) }</ns0:BetalingOrdningEFIIndsatsID>
    <ns0:BetalingOrdningID>{ data($MisligholdtBetalingsordning/ns0:BetalingOrdningID) }</ns0:BetalingOrdningID>
    <ns0:BetalingOrdningRateID>{ data($MisligholdtBetalingsordning/ns0:BetalingOrdningRateID) }</ns0:BetalingOrdningRateID>
    <ns0:BetalingOrdningRateSRBDato>{ data($MisligholdtBetalingsordning/ns0:BetalingOrdningRateSRBDato) }</ns0:BetalingOrdningRateSRBDato>
    <ns0:BetalingOrdningRateBeløbStruktur>{ $MisligholdtBetalingsordning/ns0:BetalingOrdningRateBeløbStruktur/@* , $MisligholdtBetalingsordning/ns0:BetalingOrdningRateBeløbStruktur/node() }</ns0:BetalingOrdningRateBeløbStruktur>
    </ns0:MisligholdtBetalingsordning>
    </ns0:BetalingsOrdningliste>
    </ns0:EFIBetalingOrdningMisligholdtStruktur>
    </ns0:IndholdValg>
    </ns0:EFIHændelseStruktur>
    </ns0:HændelseSamling>
    </ns0:IMMultiHændelseModtag_I>
    declare variable $eFIBetalingOrdningMisligholdt_I1 as element(ns0:EFIBetalingOrdningMisligholdt_I) external;
    xf:test($eFIBetalingOrdningMisligholdt_I1)
    I have called the business proxy alone it works.
    errors
    The invocation resulted in an error: .
         <soapenv:Envelope      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soapenv:Body>
         <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>BEA-380000: Internal Server Error</faultstring>
         <detail>
         <con:fault      xmlns:con="http://www.bea.com/wli/sb/context">
         <con:errorCode>BEA-380000</con:errorCode>
         <con:reason>Internal Server Error</con:reason>
         <con:location>
         <con:node>RouteNode1</con:node>
         <con:path>response-pipeline</con:path>
         </con:location>
         </con:fault>
         </detail>
         </soapenv:Fault>
         </soapenv:Body>
         </soapenv:Envelope>
         System Error Handler
    $fault:      
         <con:fault      xmlns:con="http://www.bea.com/wli/sb/context">
         <con:errorCode>BEA-380000</con:errorCode>
         <con:reason>Internal Server Error</con:reason>
         <con:location>
         <con:node>RouteNode1</con:node>
         <con:path>response-pipeline</con:path>
         </con:location>
         </con:fault>

    Thanks for answering.
    the situation is that I have to make a pass-trough proxyservice.
    That I have never done before.
    explanation:
    proxyservice A-calls business service B, B need password and user name, but proxyservice A does not have Process WS-Security Header to configured, so I have to create a pass-trough proxyService to call business Service B.
    What is the best way of doing that ?
    As I have read that to solve the problem one can set ./ctx:security/ctx:doOutboundWss to true, the only way I saw that was possible was by mean of xquery.
    I am trying to explaine the same situation here again:
    I have proxyService A that does not have :
    Process WS-Security Header in the configuration, that mean I can not set it in my proxy Configuration by way of normal proxy configuration.
    But A is calling a BS that need security, so I want to create a pass-trough proxyservice.
    in order to do that, I want to set ./ctx:security/ctx:doOutboundWss to true in the request
    how can I set ./ctx:security/ctx:doOutboundWss to true in xq ?
    Tks

  • Remove tags from XML using transformation

    Can anybody tell me how to remove empty tags using xsl transformation.
    <App_Data App="MOD" Name="Metadata_Id" Value="SP1282"/>
    <App_Data App="MOD" Name="Metadata_Spec_Major_Version" Value=""/>
    <App_Data App="MOD" Name="Metadata_Spec_Minor_Version" Value=""/>
    My XML will have tags similar to above. My requirement is to remove all tags having attribute Value="". How can i achieve this using transformation.
    Thanks
    Krish

    You need to add the xsi:nil="true" attribute to your xsl-construct to be able to ommit the xml-element which are empty.
    To be able to do this you need to add a choose-when-otherwise xsl construct inside your mapping file to test for ""-values.
    The xsi:nill='true' isn't supported in the transform-activity yet, you need to add this attribute manually inside your xsl-mapping file.
    Kind regards,
    Nathalie

Maybe you are looking for