PI SOAP Sender Problem Sending Special Chars '  "  &

Hello Experts
We are sending Customer Invoice, Accounting and Delivery data IDOCs via XML to a SOAP receiver channel webservice. The data contains some special characters (which should not be present in XML data) as indicated in the following paragraph:
Note: - quote ("), apostrophe ('), ampersand (&), less than (<), greater than (>) are special characters in XML. They should not be present in data per W3.org standards. http://www.w3.org/TR/REC-xml/
The Webservice requires specific strings containing the special characters which exist in some of the Material Descriptions of the Customer Data. This is to be processed by Stored Procedures which cannot process them unless the special characters are formatted as the following examples show:
Examples:
&amp;&apos;     (Translates to &' )
&amp;&quot;     (Translates to &" )
I have created a UDF (shown below the signature) which creates some promising output in the Message Mapping test, however once it reaches the Payload it "converts" and although I have tried various combinations, the closest I have been able to get is shown below. :
&amp;amp;apos;
&amp;&amp;apos;           
It seems that because of the embedded conversion PI performs it may not be possible to send the desired strings as shown in the Example above.
In addition, the required (or ideal) solution should not operate on a field basis but on the entire Payload and would not apply the conversion to the XML tags, but to the data portion of the Payload only.
I am wondering if any of you experts have run in to a similar requirement and what you may have done to solve it? I am hoping that perhaps I may have missed something obvious, such as a character combination that does the trick.
(Some comments I have heard so far is this is better done on the ECC or on the Webservice side, feedback on this would also be valuable, Thanks)
Thanks in advance for your knowledgeable and valued feedback.
Jim
QuestRoi.com
UDF:
String Change_Var = var1;
if (Change_Var.contains("'") || Change_Var.contains("\""))
Change_Var = Change_Var.replaceAll("'", "&&apos;");
//Change_Var = Change_Var.replaceAll(" &amp;apos; ", " \\\\&amp;apos; ");
Change_Var = Change_Var.replaceAll("\"", "&&quot;");
//Change_Var = Change_Var.replaceAll(" &amp;quot; ", " \\\\&amp;quot; ");
return Change_Var;

Hello John
Sorry, I misread your original question.
If PI is delivering
     &amp;&amp;apos;
then the text before escaping was
     &&apos;
If you are sending
then the data should be escaped as
     &amp;&apos;
and PI should escape again to
     &amp;amp;&amp;apos;
There is an example of XML escaping on StackOverflow :
http://stackoverflow.com/questions/439298/best-way-to-encode-text-data-for-xml-in-java
You could put that in a UDF and use it on all XML data elements that require escaping. I would expect PI to escape the result correctly.
Kind regards
Steve

Similar Messages

  • Problem with special chars in BLOB datatype using contains keyword

    Facing problem, when part searching with special chars in BLOB datatype. It is considering the non alpha-numeric chars as a separtor in a provided string
    EX:
    SELECT *
    FROM RESUME_TEST P,grst_candidate d
    WHERE d.candidate_id = p.candidate_id
    AND CONTAINS(P.CAND_RESUME,'%VB.NET%',1) > 0
    Strings: , VB.NET , PL/SQL AS/400 , C etc..
    Followed the below approaches
    1) created a table:
    Syntax: create table resume_Test(cand_id number(10),cand_resume blob);
    2) inserted the values into this table upto 60,000
    3) created a context index
    3.1 created preferences
    Syntax:
    BEGIN
    ctx_ddl.create_preference('try_lexer3','BASIC_LEXER');
    ctx_ddl.set_attribute('try_lexer3','printjoins','-_~!@#$%^&*(){}[],=?\;|><.+');
    END;
    3.2 created context index
    Syntax:
    CREATE INDEX CANDRESUME_CTX_IDX ON resume_test (cand_resume)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('LEXER try_lexer3 memory 500M');
    4) while executing this index, it is taking much time approx 6 hrs(plz explain why it is taking time)
    5) Problems:
    5.1 when searching with string(VB.NET , PL/SQL AS/400 , C etc..) it is considering the special char as a separator
    5.2 used escape char (\) also, but no effect
    5.3 when searching with single char, it is giving error (ORA-29902,ORA-20000,DRG-51030)
    5.4 getting the above error with wild card chars (& ,_, (),{},[])
    So, please explain the clear scenarios, why am getting this error , and how to get the proper results.

    Have you tried adding the / char to the printjoin characters?
    Indexing can take a lot of time, depending on the amount of data and your machine's power. You could try to parallelize the index creation and / or assign more memory
    CREATE INDEX CANDRESUME_CTX_IDX ON resume_test (cand_resume)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('LEXER try_lexer3 memory 2000M') PARALLEL 8;

  • SLM2048 - Password problems with special chars

    Hi all,
    We´ve got a SLM2048 in use  (most current FW) and I wanted to apply our new password standards  onto that switch. So I changed the password of the user admin and used  special chars, which were =&!= and clicked update and save changes. I  now know, that I should have been using only alphanumerical characters,  but why is there no routine that checks the PW for conformance, before  writing it onto the switch.
    Problem now is, that I am unable to login and  don´t want to do a hard reset, because the configuration would be lost. I  know there should have been a rescue admin user, but there is none.  What can I do now? Any chance that a cisco engineer could get in contact  with me to debug the entered password in the lab and who could then  tell me what was saved to ROM or how I can login again?
    Thanks,
    Philip

    If your switch has a console port, you can try this:
    http://www.opendreams.net/jesse/doc/linksys_srw_switch_password_recovery.txt
    http://www.cisco.com/en/US/products/ps9967/products_qanda_item09186a0080a36735.shtml
    HTH,
    Andrew Lissitz

  • Problem in special char

    Hi,
    my query is
    select * from TABLENAME where COLUMN1 = ('LEAD:ACCEPT')
    is working in developer, but not working in APEX.
    is not considering ':' ,showing no data found.
    i used upper, like all related things.
    pls tell me the solution for this. Is Urgent.
    thanks advance ,

    The query syntax is not correct. if you are using "=", there is no need for parentheses.
    You can also modify your query and try this:
    SELECT *
    FROM TABLENAME
    WHERE COLUMN1 LIKE 'LEAD'||':'||'ACCEPT'"=" will work only if column1 is exactly same as the right-hand side. Otherwise, you could try using upper() function on both sides just to be safe.

  • Problem with special character like u00E5,u00E4 u00F6 in Sender JMS Adapter

    Hi,
    Problem:
    Sender JMS Adapter has transformation error when the file includes western european characters such as å,ä ö. And because of this reason the data is not picked up by adapter.
    The scenrio is JMS --- > XI ---> Proxy.
    If the file does not include the western European characters then it is working fine, but when the file include the western european characters such as å, ä, ö so got the error.
    Our Efforts:
    We have tried ISO8859-1 in JMS Module Tab as shown below.
    1. Transfer.ContentType text/xml;charset=ISO-8859-1
        AND with this also
    2. Transfer.ContentType application/coctet-stream;charset=ISO-8859-1
    None of them working.
    Error In CC:
    In Sender CC monitoring we are getting the below error.
    Error while processing message 'aa157082-b064-4421-0fc3-c286d2732093'; detailed error description: com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: Error converting Message: sun.io.MalformedInputException: TransformException: Error converting Message: 'sun.io.MalformedInputException' at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java(Compiled Code)) ...
    Any suggestion in this regard will be a great help.
    Regards,
    Sarvesh

    > I think you have to figure out first, which codepage you really have, not just try. Maybe you ask someone or you check with a hex editor.
    Hi Stefan,
    Finally we solved the problem.
    As you said above to figure the the codepage, we asked to our MQ team for the same and found that they are using ISO-8859-1. In XI we were also trying with multiple conbinations (ISO-8859-1, UTF-8 and many more), but didn't get any success.
    Finally MQ team changed their encoding to UTF-8 and in XI we used ISO-8859-1 and we get the success in picking the data with spl char. Even though in XI the spl char comes in destorted order but at the receiver end they are in proper shape.
    Thanks a lot for your help.
    Regards,
    Sarvesh

  • URGENT: Problem sending array of complex type data to webservice.

    Hi,
    I am writing an application in WebDynpo which needs to call External web service. This service has many complex data types. The function which I am trying to access needs some Complex data type array. When i checked the SOAP request i found that the namespace for the array type is getting blank values. Because of which SOAP response is giving exception.
    The SOAP request is as below. For the <maker> which is an array ,the xmlns:tns='' is generated.
    <mapImageOptions xsi:type='tns:MapImageOptions' xmlns:tns='http://www.themindelectric.com/package/com.esri.is.services.glue.v2.mapimage/'>
    <dataSource xsi:type='xs:string'>GDT.Streets.US</dataSource>
    <mapImageSize xsi:type='tns:MapImageSize'><width xsi:type='xs:int'>380</width><height xsi:type='xs:int'>500</height></mapImageSize>
    <mapImageFormat xsi:type='xs:string'>gif</mapImageFormat>
    <backgroundColor xsi:type='xs:string'>255,255,255</backgroundColor>
    <outputCoordSys xsi:type='tns:CoordinateSystem' xmlns:tns='http://www.themindelectric.com/package/com.esri.is.services.common.v2.geom/'>
    <projection xsi:type='xs:string'>4269</projection>
    <datumTransformation xsi:type='xs:string'>dx</datumTransformation>
    </outputCoordSys>
    <drawScaleBar xsi:type='xs:boolean'>false</drawScaleBar>
    <scaleBarPixelLocation xsi:nil='true' xsi:type='tns:PixelCoord'></scaleBarPixelLocation>
    <returnLegend xsi:type='xs:boolean'>false</returnLegend>
    <markers ns2:arrayType='tns:MarkerDescription[1]' xmlns:tns='' xmlns:ns2='http://schemas.xmlsoap.org/soap/encoding/'>
    <item xsi:type='tns:MarkerDescription'><name xsi:type='xs:string'></name>
    <iconDataSource xsi:type='xs:string'></iconDataSource><color xsi:type='xs:string'></color>
    <label xsi:type='xs:string'></label>
    <labelDescription xsi:nil='true' xsi:type='tns:LabelDescription'>
    </labelDescription><location xsi:type='tns:Point' xmlns:tns='http://www.themindelectric.com/package/com.esri.is.services.common.v2.geom/'>
    <x xsi:type='xs:double'>33.67</x><y xsi:type='xs:double'>39.44</y>
    <coordinateSystem xsi:type='tns:CoordinateSystem'>
    <projection xsi:type='xs:string'>4269</projection>
    <datumTransformation xsi:type='xs:string'>dx</datumTransformation>
    </coordinateSystem></location></item>
    </markers><lines xsi:nil='true'>
    </lines><polygons xsi:nil='true'></polygons><circles xsi:nil='true'></circles><displayLayers xsi:nil='true'></displayLayers>
    </mapImageOptions>
    Another problem:
    If the webservice is having overloaded methods , it is generating error for the second overloaded method.The stub file itself contains statment as follow:
    Response = new();
    can anyone guide me on this?
    Thanks,
    Mital.

    I am having this issue as well.
    From:
    http://help.sap.com/saphelp_nw04/helpdata/en/43/ce993b45cb0a85e10000000a1553f6/frameset.htm
    I see that:
    The WSDL document in rpc-style format must also not use any soapenc:Array types; these are often used in SOAP code in documents with this format. soapenc:Array uses the tag <xsd:any>, which the Integration Builder editors or proxy generation either ignore or do not support.
    You can replace soapenc:Array types with an equivalent <sequence>; see the WS-I  example under http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16556272.
    They give an example of what to use instead.
    Of course I have been given a WSDL that has a message I need to map to that uses the enc:Array.
    Has anyone else had this issue?  I need to map to a SOAP message to send to an external party.  I don't know what they are willing to change to support what I can do.  I changed the WSDL to use a sequence as below just to pull it in for now.
    Thanks,
    Eric

  • There was a problem sending the command to the program is a pop-up I get ever since I upgraded

    "There was a problem sending the command to the program"...this is a pop-up every time I want to load certain programs (facebook specially). This started when I upgraded to the current Firefox.

    How do I get a solution to this problem?????

  • "Send" Problem with Mail

    When I reply to an email in Mail, the "send" button in the reply message windeow is greyed out and will not function. This has occured since the machine was updated to OS X Tiger. What is the fix?

    In case you're missing something, instructions for setting up an AOL account in Mail can be found here:
    http://members.aol.com/adamkb/aol/mailfaq/imap/applemail.html
    The instructions are for Mail 1.3, but they can be used for Mail 2.x as well, noting that the Special Mailboxes preference pane is called Mailbox Behaviors in Mail 2.x.
    You may also want to read the more general guide the above article is part of:
    Accessing the AOL Mail System using IMAP - An Unofficial Guide
    Also, Mail Help has some articles devoted to sending problems, e.g. I can't send email or I can't send email because the connection to the server on port 25 timed out. You may want to take a look at them in case there is something there that applies to you. Something that usually works is changing the outgoing server port to 587 instead of 25.

  • Problems sending long SMS on N8

    I am having problems sending long SMS texts. Whenever I try to write out a text that is longer than a few sentences, the screen just goes off and the message disappears. The screen just goes back to the inbox and the half written text is nowhere to be seen. It is driving me up the wall! I have updated to the latest software in the last couple of weeks so I don't think it is that. If anyone has any ideas please help!
    Thanks

    Hi,
    I don't know... but could you try this:
    Create a very long sms (more than 160 char) via phone UI and save it to phone's drafts folder -> does PC Suite shows that in one message?

  • Problems sending from desktop to vtext or vzwpix

    I'm having problems sending text messages from my desktop computer to vtext and vzwpix addresses.
    Here's one that failed today:
    From: S <<edited for privacy>>
    Date: February 15, 2012 10:41:07 AM EST
    To: <<edited for privacy>>@vzwpix.com
    Subject: Sent to...
    ... WKTV in Utica.
    Are there too many characters?  Or is it another problem?
    Message was edited by: Moderator

    here's the message again (Moderator: no need to edit for privacy, I have already done that)
    From: S <[email protected]>
    Date: February 15, 2012 10:41:07 AM EST
    To: [email protected]
    Subject: Sent to...
    ... WKTV in Utica.
    That's it.  are the "...." considered special characters? 
    I'm sending from Mac Mail.  Settings are "plain" text , not "rich" text.
    I don't understand why these messages can't be delivered.

  • When i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program

    when i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program.
    i am using office2007  with windows7 premium home edition.  i have checked file associations., all DDE settings. i have even tried this in safe mode. the same thing happens. please note once i see the error. i can then go back to the file click on
    it a second time and it WILL open. AND i can open any file if i open excel and and find the file from there. i uninstalled and re-installed office 2007 from scratch. And i checked the compatibility mode (all un-checked) still the problem persisits. this is
    a real PITA.   anyone have any solution for this? Thanks 
    ken yanow

    Hi,
    Have you try to un-select the Ignore other applications that use Dynamic Data Exchange (DDE) setting?
    Click the Microsoft Office Button, and then click Excel Options.
    Click Advanced, and then click to clear the Ignore other applications that use Dynamic Data Exchange (DDE)
    check box in the General area.
    Click OK.
    If the problem cannot resolve, the Run as administrator may selected.
    Go to Office default install location: C:\Program Files\Microsoft Office\Office12.
    Right-click EXCEL.EXE > Properties >
    Compatibility tab.
    Under Privilege Level, uncheck Run this program as an administrator
    check box.
    Best regards.
    William Zhou
    TechNet Community Support

  • I need help with an email WiFi sending problem on my iPad 2

    I’m having an email WiFi sending problem on my iPad 2     Model:  MC774C/A;  IOS VERSION: 6.1.3 (10B329). 
    While I use 4 email accounts on the iPad -- Hotmail, Gmail, iCloud and ns.sympatico.ca ( a division of BellAliant) – the sending difficulty only relates to the ns.sympatico.ca.  The settings for this account are:         pop.bellaliant.net            and      smtp.bellaliant.net
    I first noticed the problem about 3 weeks ago while travelling across the country (Canada).  (I do recall about that time there was an update of my IOS and I also for my wife purchased from the Bell store an iPhone which shares my Apple account.)  Prior to that everything worked well for a couple of years.
    I noticed earlier this month that the iPad received mail fine but would not send at night using the motels’ WiFi.  During the day, using my 3G account, all worked fine.  I phoned Bell but was told that my experience was normal so I thought no more about it until I returned home and found the same problem at the house.  I called Bell again and worked for 2 hours with 3 Bell technicians who succeeded in getting the iPad to neither send nor receive and gave up advising me to take the iPad into a Bell store to have it looked at.  I did that and the young technician got the iPad sending and receiving by changing the        smtp.bellaliant.net      to         mail.1xbell.ca
    However, when I returned home again, I realized that it was working on my 3G and still doesn’t send on my WiFi
    I’m looking for any suggestions that might solve this annoying problem?

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Server does not allow relaying email error, fix
    http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
    Why Does My iPad Say "Cannot Connect to Server"?
    http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
    iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
    http://support.apple.com/kb/ts2621
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
    http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • Excel won't open and error message There was a problem sending the command to the programe

    Hi there
    I'd be grateful for your help.
    I've just bought a new laptop and installed Office 2013.  I used Excel 2013, did what I needed to do and saved it.  This was 5 days ago.
    Today, I've tried opening the file from my desktop and get the error message 'There was a problem sending the command to the program'.
    And when I try to open Excel to do the DDE fix, which seems to be the best suggestion, I can't open Excel at all.  I've tried to get into it from the Apps screen.
    Any help would be gratefully appreciated.
    Thanks

    Don't seem like this can be fixed so I went back to version 6.0.2 which works good.
    I have Chrome now as my default browser and will not use fire fox until they fix it!
    Chrome works great!

  • I've checked my current plugins and it still shows Adobe Acrobat Version 7 for Netscape (7.0.9.50) I tried to do the update but I got an error - "Please tell Microsoft about this problem" "Send Error Report/ Don't Send".

    I've checked my current plugins and it still shows Adobe Acrobat Version 7 for Netscape (7.0.9.50)
    I tried to do the update but I get the same error each time - "Please tell Microsoft about this problem" "Send Error Report/ Don't Send".
    Also, do I need to Disable or Uninstall the Extension: "SEO For Firefox 3.3.4 as this was highlighted?
    == This happened ==
    Every time Firefox opened
    == When I try to do the update

    http://www.microsoft.com/mac/support
    http://answers.microsoft.com/en-us/mac/forum/macword?auth=1
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macword/microsoft-wor d-for-mac-2011-will-not-open-error/ecc42616-6f49-40bb-b8f5-e21c711ea359

  • I'm having a problem sending a word doc via email. I have Mac for Office 08, when I save the document as a .doc or .docx, and send it to someone, they receive it as a blank document. Yet, when I open it on my Mac, it has a "word" icon. How do I fix?

    I'm having a problem sending a word doc via email. I have Mac for Office 08, and I'm using Mavericks OS. When I save the document as a .doc or .docx, and send it to someone, (doesn't matter if its safari, chrome or firefox or on my yahoo or gmail accounts) they receive it as a blank document. Yet, when I open it on my Mac, it has a "word" icon and I can read it. How do I fix?

    I suggest you post on the Microsoft Mac forums since it's their software you're having issues with.
    http://answers.microsoft.com/en-us/mac

Maybe you are looking for

  • ProcesskeyEvent not invoked in JDialog andin JPanel

    I have overriden processKeyEvent in my class but this method never gets invoked on typing or pressing a key but the processMouseEvents are invoked properly the JDK Version which I am using is 1.4.1_01 .Please guide what else should be done to handle

  • BO XI R2 - Random connection problem

    Hi, I installed a Citrix server dedicated for BO training. One user is domain admin. Seven users are users without special rights. Everybody can connect to the universe and can work correctly using deski. But approximatively every hours, the 7 users

  • IMac get burn when switch on the power

    On 21 Oct 2007, in the shinning morning I switch on the power point at my iMac, there is smoke emitting from iMac. Is thanks to God where I notices the burning smell and switch on the main power port immediately. On 24 Oct 2007, I report this to loca

  • How to install only Garageband from OS 10.6 install discs?

    Hi. I recently got a new Mac with OS 10.6.2. It came with the iLife Apps installed.For reasons I won't get into ......I had to try to install the older iMovie 08 (which I believe had some sound files connected to Garageband).After attempting that ins

  • How to install/use business contents on Erecruit - in BW 3.5

    I am challenged with a brand new BW 3.5 install where I am trying to install Erecruit (ODSs) business contents. I cannot find any documents on what is needed before I can use the business contents as well as what's included in the ODSs and the rest o