Provide XML or json format API

I love Curah!, it's simple and clean service. Wouldn't it be great if it serve curated contents with json or xml format? I want to display my contents via my Windows Store App.

Can you tell us a little more about how you would use a Curah! API?  Is the goal to display your own curations in a Windows Store App?  If so, would a curator-specific RSS feed meet your needs?  Or are you interested in other use cases too?
Sorry for the late reply.
It would be great to have REST interface not only fetching list of articles but also submitting new items. I'm building statistics learning app, so if Curah provides REST interface, I can mix and personalize contents list with
YouTube video link, Wikipedia articles, etc in order to share to my colleagues.

Similar Messages

  • Rest method that can support request/responce in both xml and json formats

    Hi,
    I want  to create rest method that can support request/responce in both xml and json formats.
    I am trying in bellow way, but its not working getting error.
    any idea on this?
    Code in IService.cs :
    [OperationContract]       
    [WebGet(UriTemplate = "/Login/{UserID}/{Password}")]
    Responce Login(string UserID, string Password);
    Code in Service.cs :
    public Responce Login(string UserID, string Password)
                try
                    objResponce = new Responce();
                    objResponce.MessageType = Responce.ResponceType.Warning.ToString();
                    string Con = GetConnectionString(UserID, Password);  //Method to check valid user or not
                    if (Con.Trim().Length != 0)            
                        objResponce.Message = "you have logged in Successfully";                   
                    else
                        objResponce.Message = "Please Enter Valid UserID,Password";                
                catch (Exception ex)
                    through ex;             
                return objResponce;
    My Config settings :
    <services>
          <service name="OnePointAPI.OnePointAPIService">
               <endpoint address="JSON" binding="webHttpBinding" contract="OnePointAPI.IOnePointAPIService" behaviorConfiguration="webJSON" ></endpoint>
               <endpoint address="XML" binding="basicHttpBinding" contract="OnePointAPI.IOnePointAPIService" behaviorConfiguration="webXML" ></endpoint>     
          </service>   
     </services>
     <behaviors>
          <serviceBehaviors>
            <behavior>
              <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="webJSON">
              <webHttp defaultOutgoingResponseFormat="Json"/>
            </behavior>
            <behavior name="webXML">
              <webHttp defaultOutgoingResponseFormat="Xml" />
            </behavior>
          </endpointBehaviors>
     </behaviors>  
    Anwar Shaik

    In several days (in the 19th) i will lecture at
    SQLSaturday #360 and my last demo (hopefully I will have the time) is
    Full implementation of JSON, I will show several function using JSON serializer and deserializer, and as mentioned full implementation including fast
    indexes on JSON column (finding specific Node in 10 million rows
    in less then a second). If you want to wait, then I will publish it latter probably, or you can come the lecture if you want :-)
    * I am using Json.NET framework, by the way.
    regarding your question, all you need is to find a nice serializer/deserializer framework (you can use
    Json.NET framework) in order to do what you are looking for (if I understand what you asked)
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Convert XML to JSON format

    Hi all,
    I need to do a POC on converting XML format to JSON format,i found that there is rest adapter which we can achieve this  ,
    but i couldn't find the adapter in the list of adapters ,how to download this adapter from sap market place and also is there any alternative way of achieving this.

    Hi Vidya Sagar,
    REST Adapter is not available for free like SOAP, FTP, SFTP etc Adapters. You need to purchase it from third party vendors like Advantco. You can visit the link below for more information:
    REST Adapter for SAP NW PI | Advantco SAP NetWeaver Solutions
    https://www.advantco.com/misc/Gateway%20or%20Progress%20Integration.pdf
    Alternate way to convert XML to JSON and viceversa is use of open source technology - Apache Camel. You can download the Apache Camel from the link below:
    Apache Camel: Camel 2.13.2 Release
    Also you can refer to tutorials and examples available on the site - Apache Camel: Tutorials for the implementation.
    Regards,
    Shreyansh Shah

  • Generate a Shared Component LIST in XML or JSON format

    Greetings...
    I am using the LIST functionality within the Shared Component area of our application in order to maintain a menu/navigation list. I'm utilizing all of the features of the LIST Shared Component -- links, authorizations, conditions, comments, etc. This list will appear on every page, so I'm putting it on page zero.
    I'd like to get this list in an XML, JSON, or some format so I can manipulate it in javascript to display it. I guess another way to put it is that the template options for a LIST template seem to be very detailed and specific (which is great in general) and I am looking to just get the data out and display it myself.
    I can easily enough write a SQL query to produce the hierarchy proper hierarchy of the list, but I would be circumventing the method ApEx uses to implement all of the conditions and authorizations on the entries. I see there are APIs for both generating the list and also checking conditions, but neither of them are accessible to my custom schema and I wasn't sure if I should even attempt to reproduce them.
    Basically, I'd like to use the built-in functionality of the LIST Shared Component, but use my own display methods.
    Shane.

    http://htmldb.oracle.com/pls/otn/f?p=20297:14

  • How to access search service api to get results in JSON format?

    How to access search service api to get results in JSON format in asp.net web application outside SharePoint farm. It should be an app or SharePoint hosted.
    I have tried the same with the help of "http://dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/09/how-to-query-sharepoint-2013-using-rest-and-javascript.aspx".
    function onQuerySuccess(data) {
        var results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results;
        $("#resultsDiv").append('<table>');
        $.each(results, function () {
            $("#resultsDiv").append('<tr>');
            $.each(this.Cells.results, function () {
                $("#resultsDiv").append('<td>' + this.Value + '</td>');
            $("#resultsDiv").append('</tr>');
        $("#resultsDiv").append('</table>');
    But we are getting data.d as undefined.
    I have checked and verify that I am getting success and data in XML format not in JSON. As I expected the JSON. Although I have specified the "JSON" in headers " headers:
    { "Accept": "application/json;
    odata=verbose" } ". 
    Thanks

    Hi,
    Per my understanding, you might want to access search service REST API and get results in JSON format using jQuery.
    The code you use is working in a SharePoint Hosted App project, to compose a working code snippet easier, you can take the demo below for a try:
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    _spBodyOnLoadFunctionNames.push("ready");
    function ready()
    var spAppWebUrl = _spPageContextInfo.webAbsoluteUrl;
    var queryUrl = spAppWebUrl + "/_api/search/query?querytext='book'";
    $.ajax({
    url: queryUrl,
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: function (data) {
    console.log(data);
    var results = data.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results;
    $.each(results, function () {
    $.each(this.Cells.results, function () {
    console.log(this.Key+"--"+this.Value);
    error: function (data) {
    console.log(data);
    </script>
    Add the code into a page of your site, it will retrieve JSON format data and print the search result in the console of browser.
    More information about how to work with SharePoint Hosted App:
    https://msdn.microsoft.com/en-us/library/office/fp142379.aspx
    If you want to call the search service REST API in a remote environment, authentication is required to be taken into consideration, the link below with a working demo
    would be helpful:
    https://pholpar.wordpress.com/2013/05/11/accessing-office-365-sharepoint-sites-using-rest-from-a-local-html-javascript-host/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Need to parse xml or json file but am not a programmer

    My VPN provider has an api I can use to download the current servers in xml or in json format. I want to parse it and have it show me the top 3 servers based on the current load but after googling linux xml parser tutorial I found the format of the xml file I have is very different than what is expected. Here is a sample.
    <?xml version='1.0' standalone='yes'?>
    <status result="ok">
    <servers>
    <servers public_name="Acamar" country_name="United States" country_code="us" location="Miami" continent="America" bw="47" bw_max="1000" users="57" currentload="4" />
    <servers public_name="Acrux" country_name="Netherlands" country_code="nl" location="Amsterdam" continent="Europe" bw="25" bw_max="1000" users="20" currentload="2" />
    <servers public_name="Acubens" country_name="Sweden" country_code="se" location="Uppsala" continent="Europe" bw="121" bw_max="1000" users="64" currentload="12" />
    <servers public_name="Alhena" country_name="Canada" country_code="ca" location="Toronto, Ontario" continent="America" bw="269" bw_max="1000" users="84" currentload="26" />
    <servers public_name="Alkaid" country_name="United States" country_code="us" location="Chicago, Illinois" continent="America" bw="210" bw_max="1000" users="88" currentload="21" />
    </servers>
    </status>
    The tutorials I found expect these things like "public_name" and "bw" to be inside their own entries like <public_name>Acamar</public_name>. Can someone recommend a good tool that doesn't need me to know perl or python I can use to: pull out all servers in Canada with bw_max of 1000 for example?
    Last edited by maggie (2015-05-30 11:49:45)

    @maggie: That is easily done with XPath expressions, for example:
    xmlstarlet sel -t -m '//servers[@country_code="us"]' -c '.' -n vpn.xml
    xmlstarlet sel -T -t -m '//servers[@country_code="us"]' -v @public_name -o " " -v @bw -n vpn.xml
    xmlstarlet sel -t -m '//servers[@country_code="us"]' -v '@public_name' -o ": " -v '@currentload' -n vpn.xml
    xmlstarlet sel -t -m '//servers[@country_code="us" and @currentload<15]' -v '@public_name' -o ": " -v '@currentload' -n vpn.xml
    xmlstarlet sel -t -m '//servers[@currentload<15]' -v '@public_name' -o ": " -v '@currentload' -n vpn.xml
    http://www.w3schools.com/xpath/default.asp
    Edit: If you use json and jshon, then you'll have to do the sorting and filtering in the shell
    jshon -e servers -a -e country_code -u -p -e public_name -u -p -e bw -u <vpn.json | {
    # filter country_code
    while read -r country_code && read -r public_name && read -r bw; do
    [ x"$country_code" = x"ca" ] && echo "$public_name $bw";
    done
    } | sort -k2,2nr -k1,1d # sort second field (bw) numeric reverse, if equal use dictionary sort on first (name)
    Last edited by progandy (2015-05-31 05:47:50)

  • Deep Insert in Json Format

    Hi Team,
    I am facing  issue in JSON format which i can achieve using XML format for Create Deep Insert.Can you please have a look and provide your inputs.
    SP is 740 SP4
    Here for below, Navigation name is Nav2ReqProducts.
    I am getting error while passing XML stream, I already referred below link, not able to trace out, and also please give sample JSON data which has multiple inputs as deep insert
    http://scn.sap.com/message/14659195#14659195
    "d":{
    "__metadata":{
    "uri" : "http://XXXXXXX.XXXX.com:8000/sap/opu/odata/sap/ZGW_TIRES_CASE_DETAIL_SRV/CaseHeaderSet('')",
      "type" : "ZGW_TIRES_CASE_DETAIL_SRV.CaseHeader"},
    "PhoneNumber":"405-595-9130",
    "DeviceId":"TEST",
    "IvCaseNumber":"8000000519",
    "CallDate":"/Date(1407110400000)/",
    "CallTime":"PT11H55M00S",
    "ServiceNeeded":"Tire Replacement",
    "Location":"N bound on i-235 East of ball park",
    "Latitude":"0.000000000000",
    "Longitude":"0.000000000000",
    "VehType":"01",
    "VehYear":"2010",
    "VehMake":"MACK",
    "VehColor":"GREEN",
    "VehLicplate":"KJI900",
    "VehUnitnum":"54",
    "TrailerNumber":"35",
    "MaddencoInvoice":"",
    "PaymentMethod":"01",
    "AccountNo":"23234",
    "ReferenceNo":"",
    "Technician":"FRED SMITH",
    "LoyaltyCard":"",
    "StoreDate":"/Date(1407110400000)/",
    "StoreTime":"PT12H00M00S",
    "ArrivDate":"/Date(1407110400000)/",
    "ArrivTime":"PT14H02M15S",
    "RollDate":null,
    "RollTime":"PT00H00M00S",
    "DepDate":null,
    "DepTime":"PT00H00M00S",
    "EtaDate":"/Date(1407110400000)/",
    "EtaTime":"PT13H30M00S",
    "ReturnDate":null,
    "ReturnTime":"PT00H00M00S",
    "AuthPhone":"",
    "MobileSentDate":"/Date(1407283200000)/",
    "MobileSentTime":"PT14H21M51S",
    "Nav2ReqProducts":
    "__metadata":{
    "uri":"http://tcmod.XX.com/sap/opu/odata/sap/ZGW_TIRES_CASE_DETAIL_SRV/CaseReqProductsSet('0000000010')",
    "type":"ZGW_TIRES_CASE_DETAIL_SRV.CaseReqProducts"},
    "ItemNo":"0000000010",
    "ProductId":"G27373",
    "Description":"275/80R24.5 TR144 LRG TL",
    "WheelPos":"02",
    "TirePos":"02"}]}}
    Thanks,
    Vijay V

    Hello Vijay,
    I think error is because of date field.
    Please do the following with some changes to payload and check :
    1. Change ABAP type to DATE in ABAP Type Editor in service builder.
    2. Regenerate objects.
    3. Clear /n/iwfnd/cache_cleanup, /n/iwbep/cache_cleanup & smicm cache to be on safer side.
    4. In a new session fire the service with the below payload.
             "PhoneNumber" : "405-595-9130",
             "DeviceId" : "TEST",
             "IvCaseNumber" : "8000000519",
             "CallDate" : "\/Date(1405382400000)\/",    
             "CallTime" : "PT08H00M00S",
             "ServiceNeeded" : "",
             "Location" : "loc1",
             "Latitude" : "293.320000000000",
             "Longitude" : "923.420000000000",
             "VehType" : "01",
             "VehYear" : "2004",
             "VehMake" : "TOYOTA",
             "VehColor" : "PINK",
             "VehLicplate" : "9B2127",
             "VehUnitnum" : "10923823",
             "TrailerNumber" : "",
             "MaddencoInvoice" : "AB1829APD",
             "PaymentMethod" : "04",
             "AccountNo" : "192AB39E23",
             "ReferenceNo" : "",
             "Technician" : "JEFF",
             "LoyaltyCard" : "",
             "StoreDate" : "\/Date(1405382400000)\/",
             "StoreTime" : "PT08H10M00S",
             "ArrivDate" : "\/Date(1405382400000)\/",
             "ArrivTime" : "PT08H28M00S",
             "RollDate" : "\/Date(1405382400000)\/",
             "RollTime" : "PT08H44M00S",
             "DepDate" : "\/Date(1405382400000)\/",
             "DepTime" : "PT08H17M00S",
             "EtaDate" : "\/Date(1405382400000)\/",
             "EtaTime" : "PT08H35M00S",
             "ReturnDate" : "\/Date(1405382400000)\/",
             "ReturnTime" : "PT08H59M00S",
             "AuthPhone" : "",
             "MobileSentDate" : "null",
             "MobileSentTime" : "PT00H00M00S",
             "Nav2ReqProducts":
                   "ItemNo" : "0000000010",
                   "ProductId" : "M00692",
                   "Description" : "225/70R19.5 G XST4",
                   "WheelPos" : "01",
                   "TirePos" : "06"
             "Nav2RemProducts":
                   "SvcItem" : "00",
                   "FailureCause" : "",
                   "RemovalTread" : "",
                   "DeleteInd" : ""
    Or
    "PhoneNumber":"405-595-9130",
    "DeviceId":"TEST",
    "IvCaseNumber":"8000000519",
    "CallDate":"2013-10-23T10:10:10",
    "CallTime":"PT11H55M00S",
    "ServiceNeeded":"Tire Replacement",
    "Location":"N bound on i-235 East of ball park",
    "Latitude":"0.000000000000",
    "Longitude":"0.000000000000",
    "VehType":"01",
    "VehYear":"2010",
    "VehMake":"MACK",
    "VehColor":"GREEN",
    "VehLicplate":"KJI900",
    "VehUnitnum":"54",
    "TrailerNumber":"35",
    "MaddencoInvoice":"",
    "PaymentMethod":"01",
    "AccountNo":"23234",
    "ReferenceNo":"",
    "Technician":"FRED SMITH",
    "LoyaltyCard":"",
    "StoreDate":"2013-10-23T10:10:10",
    "StoreTime":"PT12H00M00S",
    "ArrivDate":"2013-10-23T10:10:10",
    "ArrivTime":"PT14H02M15S",
    "RollDate":"null",
    "RollTime":"PT00H00M00S",
    "DepDate":"null",
    "DepTime":"PT00H00M00S",
    "EtaDate":"2013-10-23T10:10:10",
    "EtaTime":"PT13H30M00S",
    "ReturnDate":"null",
    "ReturnTime":"PT00H00M00S",
    "AuthPhone":"",
    "MobileSentDate":"2013-10-23T10:10:10",
    "MobileSentTime":"PT14H21M51S",
    "Nav2ReqProducts":
    "ItemNo":"0000000010",
    "ProductId":"G27373",
    "Description":"275/80R24.5 TR144 LRG TL",
    "WheelPos":"02",
    "TirePos":"02"
    both should work.
    revert if any issues. we can check.
    Regards,
    Ashwin

  • Converting from PDF directly to Java Objects/XML (and PDF format questions)

    Hi,
    I posted this originally in the Acrobat Windows forums but was told I might have more luck here, so here goes:
    I am desperately trying to find a tool (preferably open source but commercial is fine also) that will sit on top of a PDF and allow me to query it's text for content and formatting (I don't care about images). I have found some tools that get me part of the way there, but nothing that seems to provide an end-to-end solution but is quite lightweight. My main question is WHY are there so many tools that go from PDF to RTF, and many tools that go from RTF to XML, but NONE that I can find that go PDF to XML.
    To clarify, by formatting I simply mean whether a line/block of text is bold/italic, and its font size. I am not concerned with exact position on the page. The background is that I will be searching PDFs and assigning importance to whether text is a heading/bodytext etc. We already have a search tool in place so implementing a pure PDF search engine is not an option. I need a lightweight tool that simply allows me to either make calls directly to the PDF OR converts to XML which I can parse.
    Some tools I have tried:
    1) PDFBox (Java Library) - Allows the extraction of text content easily, but doesn't seem to have good support for formatting.
    2) JPedal (Java Library) - Allows extraction of text content easily, and supports formatting IF XML structured data is in the PDF (not the case for my data).
    3)  Nitro PDF (Tool) + RTF to XML (script) - This works quite nicely and shows that PDF to XML is possible, but why do I have to use 2 tools? Also, these are not libraries I can integrate into my app.
    4) iText (Java Library) - Seems great at creating PDFs but poor at extracting content.
    I don't really expect someone to give me a perfect solution (although that would be nice!).
    Instead, what I'd like to know is WHY tools support PDF to RTF/Word/whatever retaining formatting, and other tools support RTF to XML with the formatting information retained. What is it about PDF and RTF/Word that makes it feasible to convert that way, but not to XML. Also, as I found in 3) above, it is perfectly feasible to end up as XML from PDF, so why do no tools support this reliably!
    Many thanks for any advice from PDF gurus.

    XML doesn't mean anything - it's just a generic concept for structuring
    information.  You need a specific GRAMMAR of XML to mean anything.  So what
    grammar would you use?  Something standard?  Make up your own?
    However, there are a number of commercial and open source products that can
    convert PDF to various XML grammars - SVG, ABW, and various custom grammars.
    But the other thing you need to understand is that most PDF files do not
    have any structure associated with them (as you saw when using JPEDAL).  As
    such, any concepts of paragraphs/sections/tables/etc. Are WILD GUESSES by
    the software in question.

  • Oracle script to extract SQL server data to XML/CSX file format

    HI,
    I have a requirement like-
    Create an Oracle script to Extract data from SQL Server to XML/CSV file format in File server (Oracle Server and File Server are in different boxes).
    Create an Oracle script to Retrieve data from the File Server, validate and load into the Oracle staging table
    Create an Oracle script to Push data from Oracle Staging table to native SQL Server table
    We may/may not be using the staging table
    Could anyone please respond immediately as it is urgent ?
    Thanks,
    Inbamalar

    user10594152 wrote:
    HI,
    I have a requirement like-
    Create an Oracle script to Extract data from SQL Server to XML/CSV file format in File server (Oracle Server and File Server are in different boxes).
    Create an Oracle script to Retrieve data from the File Server, validate and load into the Oracle staging table
    Create an Oracle script to Push data from Oracle Staging table to native SQL Server table
    We may/may not be using the staging table
    Could anyone please respond immediately as it is urgent ?
    Thanks,
    Inbamalar
    Urgent issues indicate a live/production system is having problems and a company is losing money, or customers are being prevented from using it.
    For urgent issues you should raise your issue with Oracle Support using your customer support identifier.
    The community forums are for non-urgent issues.  To suggest such issues are urgent is considered rude, as the people who help here are volunteers with their own jobs to do, so demanding their time for your "urgent" issue is not appropriate.  It also suggests that you think your issue is more important than other people's issues, so you are being rude to those people too.  Your issue is no more important than anyone elses.
    In relation to your question, you need to provide more information.
    Please read: Re: 2. How do I ask a question on the forums?
    When you refer to "SQL Server" are you referring to the Microsoft SQL Server product, or are you just referring to a physical server with your oracle database on it?

  • SSRS Atom feed as JSON format

    Is there anyway to get tablix data in JSON format from Atom Feed generated by an SSRS report?
    Tried HTTP header Accept:application/json, but didn't work. the server still returns XML.

    No, Reporting Service offers only an Atom feed, no other data services.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • In ActionScript 2.0 , How can I send HTTP request and get the response in JSON format.

    I am using ActionScript 2.0 for my app development. I have checked XML and LoadVars class. These classes by default send/receive data either in XML or name/value pair format. I want to send data in JSON format and receive the response in JSON format. How can I achieve this behavior using AS2.0. I have noticed that AS3.0 has the capabilities to do so. My client platform doesn't support AS3.0. Can anybody suggest a way to achieve this?
    Thanks in Advance.

    Atlast I am able to find the solution for this problem. In the end solutioin is very simple.
    Following steps will help in sending request in JSON format.
    1. extend LoadVars class
    2. override toString method. (It should return JSON format )
    3. Use subclass to send the request.

  • PO output with XML and PDF format

    Hi All,
    I need PO output with XML and PDF format. when I give print it shld go to vendor with xml and pdf format through mail. please kindly guide me on this .
    Thanks in advance
    JK

    hi,
    try this code to get in pdf form
    REPORT zsuresh_test.
    Variable declarations
    DATA:
    w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
    w_fmodule TYPE rs38l_fnam,
    w_cparam TYPE ssfctrlop,
    w_outoptions TYPE ssfcompop,
    W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string.
    Internal tables declaration
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    This function module call is used to retrieve the name of the Function
    module generated when the SMARTFORM is activated
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_form_name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = w_fmodule
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    format of the output
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
                                                        " for print preview
    w_cparam-getotf = 'X'.
    Printer name to be used is provided in the export parameter
    OUTPUT_OPTIONS
    w_outoptions-tddest = 'LP01'.
    CALL FUNCTION w_fmodule
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = w_cparam
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = w_outoptions
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otf_from_fm
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    t_otf[] = t_otf_from_fm-otfdata[].
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
    WINDOW_TITLE =
    DEFAULT_EXTENSION =
    DEFAULT_FILE_NAME =
    FILE_FILTER =
    INITIAL_DIRECTORY =
    WITH_ENCODING =
    PROMPT_ON_OVERWRITE = 'X'
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = T_pdf_tab
    FIELDNAMES =
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    reward points if useful,
    siri

  • Problem: J2EE Server Component Library's provider.xml error message

    Hello,
    I open the provider.xml fle. Then I click on the Jars tab and I get an error  message:
    The source page has errrors.  Other pages cannot be used until these errors are
    corrected.
    How can I correct the error(s) so that when I click on the Jars tab it will allow me add jar files?
    provider.xml content:
    ======================
    <?xml version="1.0" encoding="utf-8"?>
    <provider-descriptor>
      <display-name>Store jar files that need to be used at runtime</display-name>
      <component-name>global/lmco/runtime/j2ee/libs</component-name>
      <description/>
      <major-version>6</major-version>
      <minor-version>40</minor-version>
      <micro-version>0</micro-version>
      <provider-name>lmco.com</provider-name>
      <jars>
        <jar-name>
            commons-dbutils-1.0.jar
        </jar-name>
      </jars>
    </provider-descriptor>

    I have one provider.xml which has the dtd in it
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE provider-descriptor SYSTEM "library.provider.dtd">
    <provider-descriptor>
      <display-name>abclib</display-name>
      <component-name>abcLib</component-name>
      <description>
      </description>
      <major-version>6</major-version>
      <minor-version>1</minor-version>
      <micro-version>0</micro-version>
      <provider-name>com.company</provider-name>
      <group-name>
      </group-name>
      <references>
         <reference reference-type="hard">
         <reference-target provider-name="com.company" target-  type="library">xyzLib</reference-target>
    </reference>
    </references>
      <jars>
        <jar-name>aspectjrt.jar</jar-name>
        <jar-name>axiom-api-1.2.5.jar</jar-name>
        <jar-name>axiom-impl-1.2.5.jar</jar-name>
        <jar-name>nux.jar</jar-name>
        <jar-name>stax.jar</jar-name>
        <jar-name>xom.jar</jar-name>
      </jars>
    </provider-descriptor>
    check for the DOCTYPE declaration
    Regards
    Fariha

  • Issue with exposing the created unicodes-views in to odata in JSON format

    JSON Format not displaying the Unicode’s properly but other formats displaying properly. Please check the screenshot for more info.
    Can you please provide your input is it is an issue from JSON side?
    Thanks in advance
    BR,
    Gowrisankar

    It's really frustrating to develop the form by making referenced Entity Object as Non Updatable. My entire form layout got messed up.
    I am not sure who came up with the requirement of displaying the component as label if the data presented in the compoment is read only. This is definitely pushing us to deviate from the development guide lines specified in the developer guide. One other point is, if the information is rendered as label it severely effect the layout of the form if we go to ADF declarative security on the entity objects.
    In the current scenario (Example scenario with Emp and Dept) I can not display the department details in the Employee form as expected (minimum expectation by any user) by the user (Display the information as inputtext/date).
    Can Some one help me in addressing the issue.
    Thanks and Regards,
    S R Prasad
    Edited by: Prasad Challagundla on Dec 17, 2009 1:44 PM

  • How to save a selected word image to image file in open XML in PNG format?

    Hi Everyone,
    I have a very strange problem. I want to extract the image from word using open xml sdk. Here the user selects the image on opened word, and then clicks on any button, so it should extract the same selected image to any predefined location in the PNG format.
    I also tried to do the same thing using Word API, there I am copying the selection of image to clipboard and then getting the image and converting it to bitmap and saving it, but the image resolution is coming very bad. Is there any method through which
    I can save the image to file either by Open XML sdk or Word API using C#.
    Thanks,
    Shahab Abbasi

    Hi Shahab,
    To extract images from word document, please take a look at this thread:
    https://social.msdn.microsoft.com/Forums/office/en-US/e2a795ea-2ab7-401e-b6a8-0576220553f8/openxml-excel-how-to-extract-only-image-files?forum=oxmlsdk
    string fileName = @"C:\test.docx";
    using (WordprocessingDocument document = WordprocessingDocument.Open(fileName, true))
    var e = document.MainDocumentPart.ImageParts.GetEnumerator();
    int picNum = 0;
    while (e.MoveNext())
    picNum++;
    ImagePart imagePart = e.Current;
    Stream stream = imagePart.GetStream();
    long length = stream.Length;
    byte[] byteStream = new byte[length];
    stream.Read(byteStream, 0, (int)length);
    FileStream fstream = new FileStream(@"C:\abc.jpg", FileMode.OpenOrCreate);
    fstream.Write(byteStream, 0, (int)length);
    fstream.Close();
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for