How to remove xmlns="" from the message

some reason on the header node in the below message gets xmlns="" when the message is generated from BPEL.
below is the output that generated. I want to remove xmlns="" from the message.
<?xml version="1.0" ?><ProductMovementReport xmlns="urn:cidx:names:specification:ces:schema:all:4:0" Version="4.0">
<Header xmlns="">
<ThisDocumentIdentifier>
<DocumentIdentifier>42519</DocumentIdentifier>
</ThisDocumentIdentifier>
<ThisDocumentDateTime>
Can anybody help me please ?

It's is missing my blog article :-)
Here it is:
<?xml version="1.0" encoding="UTF-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="comment()|processing-instruction()|/"><xsl:copy><xsl:apply-templates/></xsl:copy></xsl:template><xsl:template match="*"><xsl:element name="{local-name()}"><xsl:apply-templates select="@*|node()"/></xsl:element></xsl:template><xsl:template match="@*"><xsl:choose><xsl:when test="name() != ''xmlns''"><xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute></xsl:when></xsl:choose></xsl:template></xsl:stylesheet>';

Similar Messages

  • Remove xmlns="" from the response structure

    Hi all,
    This is the response which I get from the Webservice which I'm calling using the SAOP adapter
    How can I remove xmlns="" from the sc and sm tags?
    Input:
    <Response xmlns="urn:com.xyz.xyz/platform" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <error>
      <sc xmlns="">100</sc>
      <sm xmlns="">No Organizations found</sm>
      </error>
      </Response>
    Expected Output structure:
    <Response xmlns="urn:com.xyz.xyz/platform" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <error>
      <sc>100</sc>
      <sm>No Organizations found</sm>
      </error>
      </Response>
    Thanks,
    Srini

    Hi Srinivas,
    Using Java mapping you can remove or add whatever the content to the XML message. Below is the code i am giving. Create a Jar file and upload into XI. This code you can test using SAP NWDS also. Put your XML message in C:\test\in.xml file and run it. you can check the desired output in out.xml.
    package com.sap.wrap;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import java.util.Map;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.io.ByteArrayOutputStream;
    public class truncate_namespace implements StreamTransformation {
         public static void main(String[] args) {
                                                      try {
                                                           InputStream in = new FileInputStream(new File("in.xml"));
                                                           OutputStream out = new FileOutputStream(new File("output.xml"));
                                                           truncate_namespace myMapping = new  truncate_namespace();
                                                           myMapping.execute(in, out);
                                                      } catch (Exception e) {
                                                           e.printStackTrace();
                   String strXML = new String();
                   int index = 0;
                   AbstractTrace trace;
                   private Map param = null;
                   public void setParameter(Map param) {
                        this.param = param;
                   public void execute(InputStream in, OutputStream out) {
                        int strBegin, strEnd;
                        String ns1String = new String();
                        String headerString = new String();
                        String outString = new String();
                        try {
                             //Convert InputStream to String
                             OutputStream temp = new ByteArrayOutputStream(1024);
                             byte[] buffer = new byte[1024];
                             for (int read = in.read(buffer); read > 0; read = in.read(buffer))
                                  temp.write(buffer, 0, read);
                             strXML = temp.toString();
                             strXML = strXML.replaceAll(" xmlns=\"\">", ">");
                             outString = strXML;
                             out.write(outString.getBytes());
                        } catch (Exception e) {
    Thanks & Regards
    Vijayanand Poreddy

  • HT1386 The first time I synced my iphone with my mac, I didn't realize that all of my photos from iphoto would transfer over to the phone.   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the

    The first time I synced my iphone 4 with my mac, I didn't realize that all of my photos from the iphoto library would transfer over to the phone (more than 3,000).   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the phone.  I tried to uncheck boxes and sync again, but I get a message that there is no room on the iphone.  I've read as many articles as I can find, but still cannot manage this.  Thanks for any help.

    Open itunes, connect iphone, select what you want, sync

  • How to remove photos from the photo library

    How can I remove photos from the photo library?
    I searched and tried the below method.
    I connected to the PC and open iTunes. I clicked "photos" on the top. Then clicked the box "Sync Photos with" and choose the dropdown and "choose folder"
    Then I clicked "desktop" option and chose an empty file and click "apply", "sync".
    However, it doesn't work. Nothing has been removed.
    I saw there is another method - deselecting the checkbox of the photo files. However, in my iTunes, there is no files has been selected.
    How can I delete photos from the photo library? Thank you.

    How did the photos get onto your device (and is it an iPad, iPhone, iPod Touch ?) ? Only photos that were synced from a computer can be deleted via iTunes, photos that were taken with it or saved from emails/websites on the iPad (or if it's an iPad copied to it via the camera connection kit) can be deleted directly in the Photos app, or you might be able to delete the via the import process : Import photos and videos from your iPhone, iPad, or iPod touch to your Mac or Windows PC.

  • How to remove "help" from the menu bar?

    I'm using a landscape monitor in vertical mode, so I have a very narrow top of the screen. I never use the help button, ever. How can I remove it from the menu bar, freeing up some space? I need more space in the menu bar for MenuMeters etc. Thanks.
    MacBook Pro Retina 15" (mid-2014) 2.5 GHz Intel Core i7
      OS X 10.9.5

    Usually the apps belonging to these icons have an option that allows you to hide the Menu Bar icon by allowing them to run as an app in the dock. However, certain applications like Caffeine must show their icons as otherwise you wouldn't be able to access them.
    For example, Dropbox doesn't allow you to remove its menu bar icon:

  • I have an iPhone 4 and I am wondering how I remove emails from the "All Mail" .  I have over 8,000 emails and want to free up storage but it will take forever to delete them 1 at a time!  Help!

    Is there a way to remove emails from the Exchange Account "All Mail"?  I have over 8 thousand emails and want to clear them out.  It looks as though I have to delete them one by one!

    Since it's an Exchange account, it sounds like the way to do this would be to remove them using a computer.

  • How to remove LexSleeperX from the system profiler?

    I installed a Lexmark printer on my macbook pro and everytime I startup my mac I get this error message. I deleted the printer but I still get this error message. I looked in the system profiler but I am unable to delete it from there. How do I remove this error message my mac?

    Here are the steps:
    1. Go to Mac HD > Library > StartupItems.
    2. Look for "LexSleeperX.app" and drag it to the trash.
    3. Make sure the file is no longer present on the StartupItems folder.
    4. Restart your mac.
    5. The message should no longer appear.

  • 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 to remove SANE from the list of scanners that are shared in Preferences

    So I installed SANE for an old scanner, which is now replaced by a new Canon that is supported by native OSX and canon drivers. I therefore uninstalled SANE, the prefpane and all occurrences in the /Library and so on, however it is still being listed as an option in the scanners that can be shared i.e. in System Preferences>Sharing>Scanner sharing.
    How do I go about removing this, any hints?
    I also have this suspicion that this is the root of major issues I have accessing the scanner on my system some times, since I get "scanner communication errors" quite frequently, which are in turn resolved my plugging my scanner off and back on again...I did reinstall the software and drivers that came with the scanner to no avail.
    Thanks

    Hey, I used wonder as well where the information was stored regarding the scanner sharing and I think I found a solution. Here's what I found. Download an application that can edit .plist files, such as Martin Bresink's "Prefedit" or "PlistEdit Pro".
    Go to this location: ~/Library/Preferences/ByHost and find the file "com.apple.ImageCaptureExtension2.[xxxxxxxxxxxx].plist" where X's stands for your specific Ethernet/Airport Mac address.
    Edit the file using the application mentioned and remove your scanner/device (SANE) from the Devices list (remove the device number, ie. 0 or 1 or 2, etc). Save the file. If unable to save, change permissions to own the file, save it, and reset the permissions.
    That removed the shared scanner from my list of scanners in the sharing preference.
    Hope it works.

  • Does anyone know how to remove sundays from the datepicker in BC?

    I have a client that is closed on Sundays and occasionally gets an irate customer that books late saturday and is upset that no one is there on Sundays. So I would really like to remove the option of Sundays from the date picker.

    Hi guys,
    I had the same problem as jbyrom and found a work-around using a bit of jQuery. Before I begin...
    Downsides
    It's a bit of a pain if you have tons of date fields, as you'll need to add a class to each datepicker field
    Because you need to add a class to each datepicker field, you'll need to add the Web Form as HTML (ie make sure "insert as module instead" is unchecked when adding the form to a page)
    As mentioned, it's a work-around - may stop working in the future if Adobe changes the way the datepicker works
    Users could still put in "restricted" dates by manually typing the date instead of clicking the date in the datepicker
    How-To
    Add a class to each datepicker field you want to restrict days on (I'm using "datepickerhack").
    Add the script below the form (ie at least after the closing </form> tag). This is so jQuery and BC's Java_Datepick.js are loaded before the script.
    Add some CSS to your stylesheet to make it obvious to them they can't click certain dates.
    Script
    <script type="text/javascript">
    $(document).ready(function(){
         $(".datepickerhack").focus(function(){
              // Grab the ID of the relevant date field and use it to call the built-in BC displayDatePicker function
              var datetable = $(this).attr("id");
              displayDatePicker(datetable);
              // Now the date table is in the DOM, remove the onclick events of the appropriate TDs
              // In this example I'm removing the onclick event of the first TD in each row (ie Sunday)
              $(".date tr td:first-child").attr("onclick","");
              return false;
    </script>
    CSS
    Last step is something simple for usability, so users know they can't click the unclickable days. I just used:
    .date tr td:first-child{background-color:#CCC;}
    .date tr:last-child td{background-color:#FFF;}
    The second line is needed as the last row contains the "Today"/"Clear"/"Close" buttons (as opposed to dates)
    Edit: fixed formatting, added last "Downside"

  • How to remove addresses from the automatic list

    OK, I'm using in Italian version of Mail, so I don't know the exact name of the funcion I'm having a problem with.
    This is my problem: when I create a new messagge and type in the address, Mail suggest previous addresses with a pop-up list. Unfortunately this list includes old spam addresses of emails that I have received.
    Could anyone tell me if it is possible to modify, even manually, such list?
    Thanks a lot,
    Emmanuel

    The Mail.app doesn't automatically save the sender's email address for received messages but saves recipient's email addresses for all sent messages in the list of Previous Recipients in Mail.
    The Mail.app autofill feature pulls from the Address Book and the list of Previous Recipients in Mail.
    At the Mail.app menu bar, go to Window and select Previous Recipients.
    A previous recipient entered in the Address Book will have a vCard icon to the left of the name or email address. You can remove a previous recipient from the list or add a previous recipient to the Address Book that is not already entered.
    Removing a previous recipient from the list of Previous Recipients in Mail has no effect on Address Book entries.

  • Caching issue - How ro remove cache from the portal iview

    Hi,
    I am facing problem of caching.In my application I am substituting one user(user 1) to some other user(user 2).Based on the substitution(latest substitute user 2),I should get the values for the User 2.
    But after substitution,I am getting the values for the user 1 and after some time(2/3 second) I am able to get all the values for the User 2.The application is working fine.But some how its retaing the previous values of the user 1.
    Can anyone please suggest me how to remove the cache from the iview.
    Regards
    -Sandip

    Hi Sandip,
    Enterprise Portal caching can be taken care or in a number of ways, all these are listed in the doc below:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/71d7b8dc-0701-0010-dfba-881dba1b5b95
    - Regards, Dibya

  • How to remove Babylon from the search engine menu?

    My OS is Windows 7 Pro 64 bit; using Firefox ver 15.0. I downloaded Babylon tool bar and related apps because they were associated with a tool manual that I wanted to review. I then discovered how invasive these apps are. Successfully removed Babylon downloader and Tool bar via Start | Control Panel | program menu. However I notice that "Search the web (Babylon)" is still listed in the drop down menu of search engine options. I have defaulted my search engine to Google, and I can delete the Babylon option, but it returns every time when I close my browser and then return to my FF Mozilla home page. How can I permanently remove Babylon as a search engine option?

    '''edit'''<sub>( comments by a forum moderator - J99 )</sub> COMMENT: everyone;
    *I realise there may be a good deal of frustration is some situations, and some comment may be intended as hyperbole or humour, but please try to follow [[Forum rules and guidelines]]. There is otherwise a risk that action will be taken against infringers, that could include deletion of whole posts or even account deactivation.
    * I have let this post stand, it is quote by Babylon in a [https://support.mozilla.org/en-US/questions/935739#answer-372309 rebuttal] lower down in this thread
    * as an aside, note that I understand Firefox management staff are currently co-ordinating improvement in documentation relating to removal of software extensions.
    Babylon is the most pernicious, invasive, intrusive, manipulative and misleading software company on the internet. They pretend to be legitimate but their practices, actions and tactics are in the same league as spyware, viruses and malware. If there is a way to block them I want to know how. Legal action is the only way companies like this one can be controlled. I volunteer as lead plaintiff.

  • How to remove entries from the new auto-complete ?

    Firefox 33 came with a new auto-complete for forms. Unfortunately I cannot seem to delete the auto-complete suggestions once they have been stored. This is necessary functionality for things like mis-spelled words, where you want to get rid of the old (bad) auto-complete entry, or where username was changed on a form, etc. With the older versions, you could just press delete key on highlighted auto-complete suggestion and it would be removed, but this functionality does not work with the new auto-complete. The only workaround I have been able to find so far is to clear the browser history for the last 1 hour, but that wipes out good history as well as the error.

    Hello,
    Can you '''try Firefox Safe Mode''' and see if you have the same problem there? [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • How to remove photos from the new photos app (os x Yosemite) from one mac without (accidentally) deleting them on my other mac?

    I've upgraded from iPhoto to Photos app on my MBP. All the pictures from my main mac got uploaded to the iCloud. I also upgraded to Photos on my older mac (it has limited HD  space) and all the pictures started being downloaded to it. I went to preferences (on the older mac) and turned off the downloading, photo stream, etc. but the pictures are still there. I'm afraid to hit delete because I don't want them to magically disappear from my main mac.
    All I want, is to remove them from my old mac to free up the space.

    If you turned off or uncheck iCloud Photo Library and My Photo Stream in the Photos app preference window, then the delete should not sync up to the cloud. Also, until you empty the 'Recently Deleted' container, the images are still on your Mac:
    https://help.apple.com/photos/mac/1.0/?lang=en#/pht3bfab2f96
    Deleted photos and video aren’t immediately removed from your library; they’re placed in the Recently Deleted album, where they remain for the number of days shown, and then are deleted. You can recover the items before that period of time (see the next task). If you have iCloud Photo Library turned on, the photos may remain in iCloud up to 40 days and then are removed from all your devices that use iCloud Photo Library. If you’re not using iCloud Photo Library, your deleted photos are removed from your Mac only.

Maybe you are looking for

  • After software update, will not boot up past blue screen

    I just did a software update and after restarting, the computer will not go past the blue screen with the spinning wheel at the bottom. Please help! I've tried everything under troubleshooting in the manual. Any other ideas?

  • Most allocated extents in any segment

    hi gurus My db is oracle with HP-UX In rz20 -- database-oraclesegmentsin that most allocated extents in any segment-  is showing red.how to rectify this problem. and y its shoing red wht is the problem and how can i solved this. thanks/regards

  • Presentation Services Error

    Hi All, I have installed and configured OBIEE on Windows 2003 Server as per the document. On opening Presentation Services I am getting "Page cannot be displayed" error message. All the required services are running in windows services. I have chosen

  • Benefits Participation Print Confirmation Form

    There is a Print Confirmation Form link on the Benefits Participation page that brings up an adobe form with a benefits summary. Where that form is located, maintained, and how can it be changed? Edited by: David Keiser on Feb 25, 2009 12:33 AM

  • Development Team: CLEANUP utility, please.

    In light of various [albeit minor but]frustrating problems, with multiple installs of various products, producing multiple instances of same services, with multiple copies of same software installed in various directories, with multiple ora's, net's,