XML Encoding from SBO - Unable to Read in a 3rd Party APP

Hi:
I have created an Add-On app that produces an XML document file when a new item is created or an existing item is updated. However, the 3rd party app that I am trying to integrate into is unable to read this XML. After doing some research, the following appears to be the issue.
SBO produces the data with UTF-16 which is a double byte encoding for XML's. The 3rd party app that I have appears to be able to handle only single byte encoding formats such as UTF-8 or ISO-8859-1. Can anyone please tell me whether it is possible to change the encoding format in my Add-On code?
Thank you.
Kushal Dutta

Kushal,
The forum that you have posted your question in is for questions related to the SAP Business One Integration for SAP NetWeaver.  Your question seems to be related to the SAP Business One SDK and should be posted in the SAP Business One SDK Discussion Forum.
Eddy

Similar Messages

  • XML Encoding from Business One - Unable to Read in a 3rd Party APP

    Hi:
    I have created an Add-On app that produces an XML document file when a new item is created or an existing item is updated. However, the 3rd party app that I am trying to integrate into is unable to read this XML. After doing some research, the following appears to be the issue.
    SBO produces the data with UTF-16 which is a double byte encoding for XML's. The 3rd party app that I have appears to be able to handle only single byte encoding formats such as UTF-8 or ISO-8859-1.
    I would like to know if there is a way in SDK to convert the output XML format to a single byte encoding such as ISO-8859-1. Can anyone please tell me how to achieve that in my Add-On code?
    Thank you.
    Kushal Dutta

    Hi Kushal,
    You can use a XLST transformation to convert from UTF-16 to UTF-8.
    The coding goes something like this:
    XmlReader xmlRdr = XmlReader.Create(new StringReader(sXML));
    XmlWriterSettings xmlWtrSettings = new XmlWriterSettings();
    xmlWtrSettings.Encoding = Encoding.Unicode;
    XmlWriter xmlWtr = XmlWriter.Create(sOutFile, xmlWtrSettings);
    XslCompiledTransform xslt = new XslCompiledTransform();
    xslt.Load(sTransformFile);
    xslt.Transform(xmlRdr, xmlWtr);
    xmlWtr.Flush();
    xmlWtr.Close();
    xmlRdr.Close();
    Where sXML is the XML string generated by the SBO GetAsXML method, sOutFile is the path and filename where the transformed XML will be created and sTransformFile is the path of the XLST file.
    Assuming that you wish to retain the same XML structure as before, the XLST file should look something like the following:
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
         <BOM>
              <xsl:for-each select="BOM/BO">
              <BO>
                   <AdmInfo>
                        <Object>
                             <xsl:value-of select="AdmInfo/Object"/>
                        </Object>
                   </AdmInfo>
                   <ORDR>
                        <xsl:for-each select="ORDR/row">
                        <row>
                             <DocEntry>
                                  <xsl:value-of select="DocEntry"/>
                             </DocEntry>
                             <DocNum>
                                  <xsl:value-of select="DocNum"/>
                             </DocNum>
                             <DocDate>
                                  <xsl:value-of select="DocDate"/>
                             </DocDate>
                             <DocDueDate>
                                  <xsl:value-of select="DocDueDate"/>
                             </DocDueDate>
                             <DocStatus>
                                  <xsl:value-of select="DocStatus"/>
                             </DocStatus>
                             <Cancelled>
                                  <xsl:value-of select="CANCELED"/>
                             </Cancelled>
                             <CardCode>
                                  <xsl:value-of select="CardCode"/>
                             </CardCode>
                             <CardName>
                                  <xsl:value-of select="CardName"/>
                             </CardName>
                             <NumAtCard>
                                  <xsl:value-of select="NumAtCard"/>
                             </NumAtCard>
                        </row>
                        </xsl:for-each>
                   </ORDR>
                   <RDR1>
                        <xsl:for-each select="RDR1/row">
                        <xsl:sort select="LineNum" />
                        <row>
                             <LineNum>
                                  <xsl:value-of select="LineNum"/>
                             </LineNum>
                             <ItemCode>
                                  <xsl:value-of select="ItemCode"/>
                             </ItemCode>
                             <Dscription>
                                  <xsl:value-of select="Dscription"/>
                             </Dscription>
                             <Quantity>
                                  <xsl:value-of select="Quantity"/>
                             </Quantity>
                             <WhsCode>
                                  <xsl:value-of select="WhsCode"/>
                             </WhsCode>
                             <BaseType>
                                  <xsl:value-of select="BaseType"/>
                             </BaseType>
                             <BaseEntry>
                                  <xsl:value-of select="BaseEntry"/>
                             </BaseEntry>
                             <BaseLine>
                                  <xsl:value-of select="BaseLine"/>
                             </BaseLine>
                             <FreeTxt>
                                  <xsl:value-of select="FreeTxt"/>
                             </FreeTxt>
                        </row>
                        </xsl:for-each>
                   </RDR1>
              </BO>
              </xsl:for-each>
         </BOM>
    </xsl:template>
    </xsl:stylesheet>
    The above example shows a XLST transform for the sales order document type. This example is for use with the xet_ValidNodesOnly setting for the XmlExportType company property. If you are using a different XmlExportType setting then the XLST will be slightly different but the principal is the same. For simplicity, I have shown only a cut-down list of the fields from the sales order but other fields and tables can be included (assuming that they are in the original XML from SBO).
    Kind Regards,
    Owen
    P.S. Sorry for the lack of indentation on the XML file. It was there when I created this post but the forum removes the indentation.

  • Unable to read information of application in app store. Still can download but unable to read the application infor before downloading

    Hi,
    Please help, unable to read information of application in app store. Still can download but unable to read the application infor before downloading.
    I'm using iphone4, ios 6

    Yes it sounds like your application could be corrupt.
    First I would make sure you don't have a program like backup software or virus protection trying to read the files when you try to start the application. If not,
    Do you have any backups or data exports? If so, I would try to restore them for the application
    If you do what EsbHelper suggests, you will have to recreate the database. I think he is missing a few steps.
    If you are going to try to recreate the application, you need to copy your outline rules files calc scripts and report scritps (.otl, CSC, REP and rul files) to s saved directory.
    If you delete the directory using the file system, you orphan things in the security file. It's better to try to do it from EAS.
    Once it has been deleted, and recreated from EAS, then copy back in the objects. You will have everything but data and security. those will have to be recreated.
    As aI said first, the best way to do this is from some sort of backup. othersiwe it can get a bit messy

  • How can I restore 3rd party app data from my backup in the cloud

    First a brief history. I use the iCloud to backup my iPad 2 and hardly ever synch it to itunes on my computer. I got the new iPad and restored the backup of my iPad 2 onto it.  All was fine except that an issue I had on my iPad 2's Safari had transferred over to my new iPad. That's is for another discussion. Anyhow I went to the genius bar and they said to just setup my new iPad as a new device and then manually install everything back on it. Stuff like mail, contacts, etc, would be reloaded from the cloud. So I did and I noticed that one of my 3rd party apps, MadPad, had none of my saved data. Does anyone know of a way to restore 3rd party app data from the iCloud? Is there some sort of utility out there that would do this?  I don't want to restore it from my previous iPad 2 backup because it will reintroduce the Safari problem back onto my new iPad.
    Thanks!

    Assuming that you even have a backup with the data in it, you have no choice but to use a backup in order to restore that data. That is the idea behind backing up to iCloud. If that is the only backup that you have - then that is the one that you have to use.
    But if the backup is bad - or had corrupt data - then you will end up with the corrupt data again. You cannot selectively restore app data from a backup. you restore all settings and data - or nothing at all.

  • How do i print sms messages from my iphone without a 3rd party app?

    How do I print a complete SMS message from my iphone without using a 3rd party app?

    If you have an AirPrint compatible printer, or you have a print app, then you could take a screenshot of each page of the message and then print them. Otherwise, there is no native solution to print SMS messages on the iPhone.

  • Should 3rd party app installed from app store has admin or wheel in info box?

    I installed a free program from the app store called Kitabu (an epub reader). Click on the info & it said wheel. I thought only programs came with the mac by default will have wheel and all other programs (ex: iWork, microsolf office) will have admin instead--which they do, I checked. Is this normal for 3rd party app to have wheel group?
    Also the quick look plugin in this program (kitabu) works fine when I 1st installed it (quick look & preview function can view page cover of epub books). Then it stopped working. Is it the program fault or my mac?

    CrownPixel wrote:
    Also the quick look plugin in this program (kitabu) works fine when I 1st installed it (quick look & preview function can view page cover of epub books). Then it stopped working. Is it the program fault or my mac?
    Either or.
    Trash the program's plist file which is located inside /Library/Preferences.  Repair permissions, restart your computer and empty the trash.

  • Query: Selective Transferring of old data (3rd party app) from old iPhone

    Hello all.
    I am collecting my new iPhone 3GS tomorrow
    (and) I want only to add some, and not all the 3rd party apps (from App Store) that was with my old iPhone, in particular, Notes+
    I know if before I perform a software restore or upgrade, iTunes will perform a back up of the phone, and if I insert a new iPhone, and choose the same name, e.g. "howwow iPhone", it will restore all the apps and data into the new phone.
    But if I treat this new 3GS phone as a new phone, e.g. I name it "My 3GS iPhone" and add the Notes+ app, will all the data inside be copied into the new phone?
    My main 2 aims are to only add some apps I need (like Notes+) to the new phone and still able to keep the data/notes in it, without re-adding manually.
    Thanks and cheers

    There is no way to selectively restore certain data from the backup to the new iPhone - it's all or none. If you set it up as a new phone, none of the old data will be transferred. Alternatively, you could set it up from the backup, then delete all of the unwanted stuff.

  • I have installed 10.8.5 and now am unable to install 3rd party apps, like weather bug.

    MACBOOK AIR OS X 10.8.5.
    It is going from a great experience to now almost wishing I would have bought another PC.  How hare is it to install a 3rd party app.  I was running WEATHERBUG just fine with 10.8.2.  All I have read about 10.8.5 is that it has fixed abunch of bugs.  Yeah right.

    I am trying to install "WEATHERBUG"  Weatherbug was allowed to run just fine on earlier versions of MOUNTAIN LION.  10.4 and later won't allow this 3rd party app to download.
    WeatherBug Alert for Mac helps you plan your day with confidence by putting severe weather alerts and your live temperature on your desktop.
    Features
    The most reliable weather information found anywhere.
    Severe weather alerts to help protect you and your family.
    One click access to radar, forecasts and more on WeatherBug.com
    Installation Intructions
    Download zip file.
    Copy file to Applications folder.
    Run the app.
    System Requirements
    Mac OS X version 10.4 or later
    Internet connection
    Support
    For support or to provide feedback on WeatherBug Alert for Mac, please visit the WeatherBug Alert Forum
    Click here for the OS X 10.3.9 Compatible Version
    FREE DOWNLOAD 
    WeatherBug Alert for Mac helps you plan your day with confidence by putting severe weather alerts and your live temperature on your desktop.
    Features
    The most reliable weather information found anywhere.
    Severe weather alerts to help protect you and your family.
    One click access to radar, forecasts and more on WeatherBug.com
    Installation Intructions
    Download zip file.
    Copy file to Applications folder.
    Run the app.
    System Requirements
    Mac OS X version 10.4 or later
    Internet connection
    Support
    For support or to provide feedback on WeatherBug Alert for Mac, please visit the WeatherBug Alert Forum
    Click here for the OS X 10.3.9 Compatible Version
    FREE DOWNLOAD 
    When I click install WEATHERBUG from the FINDER it get this message.
    "WeatherBug Alert" can't be opened because it is from an unidentified developer. 
    Your security preferances allow installation of only apps from the Mac App Store and identified developers.
    Safari downloaded this file today at 7:33 AM from wdownload.weatherbug.com.

  • I recently purchased a 4S. I now have 2 files in my iCloud both with my name. One from my 3gs and one from my 4S. The problem is the data history of all my games and 3rd party apps did not transfer over to my 4S. Is there a way to merge the two in icloud?

    I backed up my 3gs to the iCloud and when I synced my 4S, it did not transfer my game histories or my 3rd party app histories. When I look at my iCloud storage, it shows both phones under the same name. Is there a way to merge them together in iCloud? I tried adding the account to my 4S but since they are both named the same, it says I already have that account added! Help!!

    Welcome to the Apple Community.
    Assuming you have finished with your old backup.....
    You can see what your iCloud storage is used for and delete any unwanted content at settings > iCloud > backup & storage > manage......

  • 3rd party apps from someone other then Apple

    Does anyone now if you can get 3rd party apps without jail braking and without using Apples application store. I found a website that offers apps that I really want and was very disappointed to see none of the in the Apps store and dont know why nobody made them or offered them there. For $24.99 I can get all these apps that I was really looking forward to seeing in the apps store but werent:
    NES System : Nintendo with all the games
    Customization : Were I can custom every aspect of the I-Phone from I-cons to backgrounds
    Screen shot : A app where I can take a picture of anything that my I-Phone is viewing at that time like from a game or a website ETC.
    Video Recorder : I cant believe there was no video recorder in the apples web app release it is just something every phone should have
    MMS : Picture messaging, I mean I dont know how many times I recieve a picture message and have to wait till I get home to go on my computer to go to a website just to see them. How long it takes also with normal broadband just to see a simple picture.........This is a must have app
    Ringtone: Now all you have to do is select a song from your music library and put it to you contacts that easy no cutting or editing it down to size, no extra programs to make them with and no money to spend to make them
    Also much more that I dont feel like describing like:
    Instant Messenger
    YouTube Downloader
    Books
    VNC
    <post edited by host>

    Wow don't try to send a MMS to someones cell phone from the e-mail option this was a nightmare. I tried it to see if it would work and I received a message that the attempt didn't succeed so it kept trying and trying automatically. Then I get a phone call from the person I sent it to telling me it work but for me to quit sending it. I said I only sent it once then he said I have like 15 already so I check out my phone and it is really warm I looked at it and the battery went from fully full to a little less then half empty. So I am like what the heck so I go into my e-mail account and I see there is an e-mail demon meaning there was an attempt to send a e-mail but it didn't succeed. Normally when this happens it will make another try just to make sure it wasn't a service error well apparently my cell phone is continuing to retry to send the message so I have the phone trying my e-mail account trying while the person who the message is being sent to is receiving everyone........So I had to delete every message being sent on my e-mail account, I had to delete my E-mail account on my phone, and I had to shut it off for 30 minutes to see if this works it not I don't know what to do and my nightmare continues as well for the person who's phone keeps blowing up with the MMS message and I am wasting all of his text on his plan.......
    Thanks for the bad advice

  • Outlook "The Operation Failed" - Sending emails from 3rd Party Apps

    I have an issue similar to this one
    http://community.office365.com/en-us/f/158/t/272002.aspx
    This started a few weeks ago for some users. Users cannot send emails generated from 2 3rd party apps. They get the error "The Operation has failed".
    Not all users are affected but the only solution is to turn on Cached Mode in Outlook.

    Hi,
    I'm marking the reply as answer as there has been no update for a couple of days.
    If you come back to find it doesn't work for you, please reply to us and unmark the answer.
    Regards,
    Melon Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Upload xml file from aplication server using read dataset, parser error.

    Hi,
    I would like to upload xml file from app. server but parser failed. If I upload this xml file from workstation (using ws_upload) it is correct. For uploading xml file from app. server I use open dataset... read dataset. In loop section I remove '#' char. How do You upload xml file from app server? What Could be incorrect.
    I try to open dataset in binary mode, text mode...
    TYPES: BEGIN OF xml_line,
            data(255) TYPE c,
          END OF xml_line.
    DATA: gt_xml_table TYPE TABLE OF xml_line,
          gs_xml_structure TYPE  xml_line,
          gv_xml_table_size TYPE i.
    OPEN DATASET s FOR INPUT IN BINARY MODE.
      IF sy-subrc <> 0.
        MESSAGE e001(zet) WITH '....'.
      ENDIF.
      DO.
        READ DATASET s INTO gs_xml_structure.
        IF sy-subrc <> 0.
          EXIT.
        ELSE.
         len = STRLEN( gs_xml_structure ).
         len = len - 1.
         check len > 0.
         WRITE gs_xml_structure(len) TO gs_xml_structure.
          APPEND gs_xml_structure TO gt_xml_table.
        ENDIF.
      ENDDO.

    You Can do this too
    parameters: p_file like rlgrap-filename.
    data: subrc like sy-subrc.
      create object me.
      REFRESH t_data.
    *  Open XML File
      CALL METHOD me->CREATE_WITH_FILE
        EXPORTING
          filename = p_file
        RECEIVING
          retcode  = subrc.
    * Saves Data in an itab from XML File.
      CALL METHOD me->get_data
        IMPORTING
          retcode    = subrc
        CHANGING
          dataobject = t_data[].
    Regards,
    Claudio.

  • How to uninstall 3rd party app from MacBook Pro?

    Does anyone know how to uninstall a 3rd party application (RMSViewer) from MacBook Pro?  The app doesn't work and I want to remove it from memory.  I can't find an "uninstall" utility on my computer and the 3rd party software doesn't include an uninstall link.

    Tap and old the app until it starts to wiggle. Tap the "x" that appears on the corner of the icon.
    If that doesn't work, check Settings>General>Restrictions to see if removing apps is restricted.
    You may also want to take a read through the manual:
    Apple - Support - Manuals

  • My newly bought ipad4 is unable to delete 3rd party apps

    I have purchased a new ipad retina on 16.01.2013 from kernal harayana and my ipad retina is not deleting 3rd party i.e later installed apps. On searching the net it seems that restriction settings under general settings is on but my ipad doesnot have restriction settings. Is it because when i closely watched the model no. on box it says DEMO.The seller from Kernal,Infotech computers has cheated while selling. Kindly help me to solve this problem.

    It's a demo model, nothing anyone here can do.  Take it up with kernal harayana.
    You can try settings > general > reset > erase all content and settings but no guaranteee that will work.

  • Can I move an iTunes library from Comp1 to Comp2 through Home Sharing?  What happens with the first sync?  What happens to 3rd party app data (specifically, game scores/levels)?

    I need to move an iTunes library from Computer 1 to Computer 2.  Can I do this through Home Sharing, by dragging and dropping library items from one to the other?  The library consists of iTunes purchases, home shared items and music/movies from our personal collection.  Both computers have had all the accounts authorized, so I don't anticipate an issue there.  I'd like to do this so that my son's ipod is impacted as little as possible -- specifically, his game scores/levels and other 3rd party data remain intact after the 1st sync and the organization of his icons remain intact.
    Is there a way to do this smoothly and easily, protecting his ipod data/organization?

    Sorry, I obviously wasn't clear. If you replicate the library from Computer 1 to Computer 2 by copying it, then all will be well. I routinely sync my iPhone and iPad both at home and at work using a single library that I migrate between the two locations via an external drive which is kept up do date using SyncToy.
    Backup the iPod touch on Computer 1.
    Copy the entire iTunes folder from Computer 1 to Computer 2, replacing any existing iTunes folder on Computer 2.
    Check that content is accessible in the migrated library. (Won't be a problem for a standard iTunes library where all the content is inside the iTunes Media folder which in turn is inside your iTunes folder).
    Connect iPod touch to Computer 2.
    Sync.
    In the unlikely event that something goes wrong (it won't) then you can connect the device back to Computer 1 to restore it.
    Note device backups are not stored within the iTunes library and stay on the machine on which they were created. It is theorectically possible to migrate them but there isn't really any point. Once you have synced the iPod with the copy of the library on Computer 2 then Computer 2 will make its own backup of the device.
    tt2

Maybe you are looking for

  • Can't decide which ipod nano case to buy :S

    I am actually planning to buy an ipod nano 2gb. I want to buy a nice protective leather case with it which will protect my ipod from scratches. But I am actually very confused which one to buy :S Can any one of you help me with the decision? It would

  • Is it possible to change row colors on array fields orscroll lists?

    I need to create a list field that will allow me to dynamically change the fillColor and/or penColor attributes of individual rows. (I just want to highlight the rows, and those seem to be the obvious attributes...) It appears you can't do that on sc

  • Advice on how to do this ?

    I currently have a table in sql server with 600 records and growing. The table contains main columns ref_no,qty, etc. We plan to add another column for line items.So if ref_no 12345 currently is in the table five times with five different quantities,

  • Can't remove criteria in Find under Keywords, CS6

    I wonder if anyone else has this problem.  I just recently started using CS6.  This bug is regarding the find "Find" function in my Keywords collection, for example, find everything with Keywords "child".  Adding criteria works wonders, except that o

  • Success with 7 - now a Calendar

    Ok friends, here's the rare success story...I beat my way thru all the issues installing Widows 7 RC on my MacBook, and it actually works rather well, so far as I can tell. I got a free email program, Thunderbird, from Mozilla which looks a lot like