OSB with Rest JSON webservice

Hi, I am new to OSB and working on making OSB as a pass thru for RestFul JSON webservices. I am able to get JSON response back in case of GET request however for POST request I am getting this error:
<con:fault
xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-380000</con:errorCode>
<con:reason>Unsupported Media Type</con:reason>
<con:location>
<con:node>AegisRouteNode</con:node>
<con:path>response-pipeline</con:path>
</con:location>
</con:fault>
I have used transport header in response action to convert content type to application/json. I am not sure why it works perfectly for GET request but fails for POST.
I appreciate any help that can be provided. Thanks.

> I have used transport header in response action to convert content type to application/json
Why in response? o_O
My understanding of what is happening is that the remote server rejects your POST with HTTP 415. I.e. you need to set the Content-Type transport header in request pipeline.
For GET though the server may just ignore the Content-Type header or lack thereof, and that's why it may work.
Try to point your call via Fiddler to see the actual HTTP request and response, it should give you the idea what's going on.
Vlad
http://vladimirdyuzhev.com

Similar Messages

  • Implementing Rest/JSON Webservice

    Hello,
    I'm developing an app in iphone and want to use JSON webservice. Can anyone please guide me how to use json format with abap webservices or any document suggesting?
    Thanks in Advance

    Hi Tahir,
    First create a web service in SAP. The blog by Uwe Kunath descibes this clearly. Then create an Xcode project and use the  ASIHTTPRequest wrapper to connect to the web service. Parse the response with the KissXML parser. A more out of the box solution is NetWeaver Gateway. It also let you use SAP web services but it also generates iOs code for you. SAP just released a trial version in de download section.
    Example of  ASIHTTPRequest
    - (void)getFlightData:(NSString *) selectedDate {
         NSURL *url = [NSURL URLWithString:@"http://abap.sapdev.nl:8000/sap/resources/flights/from/%/to/%/date/20110128?sap-client=001"];
         ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
         [request setUsername:@"BCUSER"];
         [request setPassword:@"minisap"];
         [request startSynchronous];
         NSError *error = [request error];
         if (!error) {
              NSString *response = [request responseString];
              [self parseXML:response];
    Example of KissXML
    -(void)parseXML:(NSString*)source {
         NSError *error = nil;
         DDXMLDocument *theDocument = [[DDXMLDocument alloc] initWithXMLString:source options:0 error:&error];
         NSArray *results = [theDocument nodesForXPath:@"/asx:abap/asx:values/TAB/BAPISFLDAT" error:&error];
         for (DDXMLElement *flightdetail in results) {
              NSString *airlineid =   [[flightdetail elementForName:@"AIRLINEID"] stringValue];
              NSString *airline =     [[flightdetail elementForName:@"AIRLINE"] stringValue];

  • REST BASED  WEBSERVICES

    Hi,
    We Have a Legacy System based  on  REST BASED  WEBSERVICES, that  legacy  system  can  understand  only  HTTP  format(it does n't  support  SOAP ) our scenario  is  HTTP TO  RFC  SYNCHRONOUS.
    And   we  have  to  connect PI   with  REST BASED  WEBSERVICES     ?
    1---->How  can  we connect  PI  with  REST BASED  WEBSERVICES ?
    2---->and  how  to test  those    REST BASED  WEBSERVICES ?any  tool  for  that?
    Thanks,
    Nagaraju.

    Hi Nagaraju,
    you can sent message from PI via [http receiver adapter|http://help.sap.com/saphelp_nw2004s/helpdata/en/43/64dbb0af9f30b4e10000000a11466f/content.htm].
    For message from legacy to PI use a simple address, what is explained in [SAP help http sender adapter|http://help.sap.com/saphelp_nw2004s/helpdata/en/43/64db4daf9f30b4e10000000a11466f/content.htm]
    You can test http messages with Microsoft's tool [Wfetch|http://www.microsoft.com/download/en/details.aspx?id=21625] (in the net are hundreds of free ware http test tool available).
    Regards,
    Udo

  • OSB invoking RESTful webservices:issue with relative-URI instead of

    Hi,
    We have a requirement where we need to pass the request content as string in the URL.
    we need to send the request in the URL like:
    http://abc.com/rest/xvf/nas<Employee><name>abc</name><empid>1234</empid>...<Employee>
    we have used a servicecallout action which is invoking a business service which has the base uri value like:
    http://abc.com/rest
    and in the insert action we are trying to appened the remaining uri in the rest command i.e
    <http:relative-URI>/xvf/nas{fn-bea:serialize($xmldata)}</http:relative-URI>
    here $xmldata is <Employee><name>abc</name><empid>1234</empid>...<Employee>
    while trying to invoke the service we are getting the error like:
    BEA-380000: General runtime error: Illegal character in path at index 36: http://abc.com/rest/xvf/nas& lt ; Employee>& lt ; name>abc& lt ; /name>& lt ; empid>1234>...& lt ; Employee>
    before to that we used fn-bea:inlinedXML and fn:bea:serialize functions on the retrieved xml and stored it into the xmldata variable and this variable is displaying the request in the proper xml file, but while appending it to the relative URI method the xml data is changing as like shown above i.e instead of < it is coming as & lt ; and at the end with out invoking the servie it is stoppeing at the OSB with the above error as illegal character, please advice..
    how to append the proper xml to the URL/URI in the relative-URI method in the proxy transport??
    as here it is coming & lt ; (combined with out space) as < i am changing it as like & lt ; for better understanding
    Thanks..
    Edited by: user12679330 on May 13, 2010 9:36 AM
    Edited by: user12679330 on May 13, 2010 9:40 AM
    Edited by: user12679330 on May 13, 2010 9:40 AM

    Not sure what you are trying to do but if I am not wrong, you are trying to use HTTP get with REST. You may refer -
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/httppollertransport/transports.html#wp1083292
    http://blogs.oracle.com/jeffdavies/2009/06/restful_services_with_oracle_s_1.html
    http://blogs.oracle.com/jamesbayer/2008/07/using_rest_with_oracle_service.html
    http://blogs.oracle.com/woa/2009/04/restify_your_world_and_put_it.html
    Regards,
    Anuj

  • How to make an OSB proxy to the server responding with application/json?

    Hi,
    My question is related to unfortunately unanswered question: Re: OSB and Oracle Maps
    Big picture: There is a Jetty server on local network with SpringMVC controllers which respond with JSON. The only way to communicate from frontend application to that server is through the OSB. So OSB should work as transparent proxy, passing headers and respond with original JSON message.
    I tried to build such proxy, following some blogs entries. Proxy worked for the REST services based on XML, but when I go to the JSON business service I get stuck.
    I think that business service to communicate with JSON server should be a Messaging Service, with Response Type: Text and Request Type: None.
    All headers should be passed (Outbound request) so the JSON server receives them in same state as frontend send.
    Business service should be invoked from 'Service Callout' because I don't need any asynchronous calls, or routing - just call the business service endpoint, which will call JSON server and pass the response.
    There are some problems in which I stepped into when tried this approach:
    1. When using Request Type: None the Service Callout give me an error of type:
    A callout cannot invoke a one-way operation
    When switching Request Type to Text I get it working, but some services on JSON server which operates only on GET method stop work (because switching to Text automatically require to use POST method, which is obvious but not necessary in my case).
    2. Even with above modification I cannot get the response from business service - I guess it's because the JSON response isn't wrapped into any XML elements. So in Service Callout any logger prints the message on Request side, but anything is written by Response logger inside the Service Callout. The browser which launch the Proxy Service also answers with:
    HTTP 500 (Internal Server Error)
    and I don't see any errors in logs, last message is from Request logger inside Service Callout.
    3. Business Service itself seems to work - here is an output from 'Run on Server':
    Business Service Testing - SampleJSON
    Request Document
    Response Document      
    {"models":[],"success":1}
    Response Metadata      
    <con:metadata xmlns:con="http://www.bea.com/wli/sb/test/config">
    <tran:headers xsi:type="http:HttpResponseHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <http:Content-Length>696</http:Content-Length>
    <http:Content-Type>application/json;charset=ISO-8859-1</http:Content-Type>
    <http:Server>Jetty(7.4.2.v20110526)</http:Server>
    </tran:headers>
    <tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">0</tran:response-code>
    <tran:response-message xmlns:tran="http://www.bea.com/wli/sb/transports">OK</tran:response-message>
    <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">ISO-8859-1</tran:encoding>
    <http:http-response-code xmlns:http="http://www.bea.com/wli/sb/transports/http">200</http:http-response-code>
    </con:metadata>
    But when calling it from a service proxy I don't get any logger message on the JSON server, which appears normally when I runs business service tests. So it seems that the request doesn't even reach it.
    If anyone has a time to look at this problem I can share the configuration jar ready to import: http://dl.dropbox.com/u/21341604/sample-osb-json/sample-json.jar, to make it working you need change Endpoint URI in SampleJSON.biz.
    Thanks in advance for any kind of help or tips,
    Adrian

    If you are the admin, then use the following command in Terminal:
    sudo mkdir /.nameOfFolder
    Replace nameOfFolder with the name you want.  The sudo will prompt you for your admin password. 

  • OSB to RestFul with Custom Header and Authentication

    I am trying to add to OSB a RestFul service which requires authentication and custom http headers.
    I am able to register the RestFul service as Business Service with following parameter
    - Service Type: Messaging Service
    - Request Message Type: None
    - Response Message Type: Text
    - Http Request Method: Get
    - Authentication: Basic (Service Account)
    When I test the Business Service in the Test Console, I passed in the custom http header and the content type and it did return back the JSON object I was expected.
    However when I then try to create a Proxy against it with the following parameter, I had problem running it in the Test Console. Although I did pass in the http header it still complained that I didn't pass in the header. And as for Authentication, I was not even able to specify a service account like how I did in Business Service.
    - Service Type: Messaging Service
    - Request Message Type: None
    - Response Message Type: Text
    - Http Request Method: Get
    Any ideas?
    Thanks

    What type of service account are you using ? If it is static you need specify the username/password in the PS. Also you do not specify service account for a proxy service. What is the error in the logs.
    If you have to pass the HTTP header use transport headers in your request, select request type as http and then set the content type and custom http header.
    http://docs.oracle.com/cd/E21764_01/doc.1111/e15867/modelingmessageflow.htm#i1125373

  • Start Runbook with Parameter over Webservice with JSON / Jquery / Javascript

    Hi i try to figure out to add a Job to the Webservice with JQuery/Json to the Webservice
    The follow i have:
    I tryed it with Various things, but i cannot get it to work, there must be something special about the Parameter Node, someone got an Idea or an working sample?
    var paramJson = {
    "Data": {
    "Parameter":{
    "ID": "8665b6e6-acea-498f-ac35-5c239a0c1023", "Value": "Test"
    var paramJsonWithoutData = {
    "Parameter": {
    "ID": "8665b6e6-acea-498f-ac35-5c239a0c1023", "Value": "Test"
    var paramString = "&lt;Data&gt;&lt;Parameter&gt;&lt;Name&gt;Username&lt;/Name&gt;&lt;ID&gt;{8665b6e6-acea-498f-ac35-5c239a0c1023}&lt;/ID&gt;&lt;Value&gt;tester&lt;/Value&gt;&lt;/Parameter&gt;&lt;/Data&gt;";
    var paramXML = "<Data><Parameter><ID>8665b6e6-acea-498f-ac35-5c239a0c1023</ID><Value>Tester</Value></Parameter></Data>";
    //var stringParamData = JSON.stringify(jsonRBID);
    var jsonData = { "RunbookId": runbookId, "Parameters": paramXML };
    //var jsonData = { "RunbookId": runbookId, "Parameters": "<![CDATA['&lt;Data&gt;&lt;Parameter&gt;&lt;Name&gt;Username&lt;/Name&gt;&lt;ID&gt;{8665b6e6-acea-498f-ac35-5c239a0c1023}&lt;/ID&gt;&lt;Value&gt;tester&lt;/Value&gt;&lt;/Parameter&gt;&lt;/Data&gt;]]>" };
    var datastring = JSON.stringify(paramJsonWithoutData);
    var orchurl = GetOrchURL(server) + "Jobs";
    $.ajax({
    url: orchurl,
    async: false,
    contentType: "application/json; charset=utf-8",
    type: "POST",
    data: datastring,
    dataType: 'json',
    success: function (json) {
    JobID = json.d.results[0].Value;
    error: function (json) {
    alert(datastring + " || " + json.responseText);
    Its the ghost in the machine how dont let me go in vadication :-)

    Here is my new Test Script but still not working
    I writed the Response for Each Parameter in Comment Above.
    Maybe we can Check this out and i write a jquery  ODATA wrapper class then :-)
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <script src="script/jquery-1.4.4.js" type="text/javascript"></script>
    <script src="script/date.js" type="text/javascript"></script>
    <title></title>
    <script type="text/javascript">
    $(document).ready(function () {
    //Response An Error occured while processing this request
    var paramXML = "<Data><Parameter><ID>8665b6e6-acea-498f-ac35-5c239a0c1023</ID><Name>Username</Name><Value>Tester</Value></Parameter></Data>";
    //Response An Error occured while processing this request
    var paramXML2 = "<Data><Parameter><ID>8665b6e6-acea-498f-ac35-5c239a0c1023</ID><Value>Tester</Value></Parameter></Data>";
    //Job parameter not in expected format. <Data><Parameter><ID></ID><Value><Value></Parameter><Parameter><ID></ID><Value></Value></Parameter></Data>
    //So Somethings Works here with the CDATA Tag or it not Works and it is invalid Datan and the other 2 XML requests look good
    var paramXML3 = "<![CDATA[<Data><Parameter><ID>8665b6e6-acea-498f-ac35-5c239a0c1023</ID><Value>Tester</Value></Parameter></Data>]]>";
    //Job parameter not in expected format. <Data><Parameter><ID></ID><Value><Value></Parameter><Parameter><ID></ID><Value></Value></Parameter></Data>
    var paramString = "&lt;Data&gt;&lt;Parameter&gt;&lt;Name&gt;Username&lt;/Name&gt;&lt;ID&gt;8665b6e6-acea-498f-ac35-5c239a0c1023&lt;/ID&gt;&lt;Value&gt;tester&lt;/Value&gt;&lt;/Parameter&gt;&lt;/Data&gt;";
    //Job parameter not in expected format. <Data><Parameter><ID></ID><Value><Value></Parameter><Parameter><ID></ID><Value></Value></Parameter></Data>
    var paramString2 = "&lt;Data&gt;&lt;Parameter&gt;&lt;ID&gt;{8665b6e6-acea-498f-ac35-5c239a0c1023}&lt;/ID&gt;&lt;Value&gt;tester&lt;/Value&gt;&lt;/Parameter&gt;&lt;/Data&gt;";
    //Job parameter not in expected format. <Data><Parameter><ID></ID><Value><Value></Parameter><Parameter><ID></ID><Value></Value></Parameter></Data>
    var paramString3 = "<![CDATA[&lt;Data&gt;&lt;Parameter&gt;&lt;ID&gt;{8665b6e6-acea-498f-ac35-5c239a0c1023}&lt;/ID&gt;&lt;Value&gt;tester&lt;/Value&gt;&lt;/Parameter&gt;&lt;/Data&gt;]]>";
    var paramJsonShort = {
    "RunbookId": "c979eb39-3b00-481c-881b-20ab1ba1e081",
    "RunbookServerId": "76bac998-57ec-4246-8efa-a4aac43ae3b2",
    "Parameters": paramString3
    var JobID;
    var datastring = JSON.stringify(paramJsonShort);
    var orchurl = "http://<enter_server_here>:81/Orchestrator2012/Orchestrator.svc/Jobs";
    $.ajax({
    url: orchurl,
    async: false,
    contentType: "application/json; charset=utf-8",
    type: "POST",
    data: datastring,
    dataType: 'json',
    success: function (json) {
    JobID = json.d.results[0].Value;
    alert(JobID);
    error: function (json) {
    alert(datastring + " || " + json.responseText);
    </script>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    Nothing to see Here
    </div>
    </form>
    </body>
    </html>
    Its the ghost in the machine how dont let me go in vadication :-)

  • Securing REST based Webservices using OSB

    Can anyone please lead me to any pointers on securing the REST based webservices.
    Thanks,
    KC

    REST is more or less, a pure HTTP service so it is as secure as that. From my perspective transport security (basic authentication, SSL) is the basic security requirement for a REST based web-service. As far as message security is concerned, you may use custom HTTP headers to pass the tokens/digest but again it requires transmission over SSL to become an effective solution.
    If you really have tight requirement from message security perspective, then I would suggest going to SOAP rather than using REST.
    Regards,
    Anuj

  • Getting error while uploading multiple files in sharepoint hosted app in 2013 with REST API

    Hi All,
    In one of my tasks, I was struck with one issue, that is "While uploading multiple files into custom list with REST API".
    Iam trying to upload multiple files in library with REST calls for an APP development, my issue is if i wants to upload 4 image at once its storing only
    3 image file and further giving "Conflict" error". Below is the attached screenshot of exact error.
    Error within screenshot are : status Code : 409
    status Text :conflict
    For this operation i am uploading different files as an attachment to an list item, below is the code used for uploading multiple files.
    my code is
    function PerformUpload(listName, fileName, listItem, fileData)
        var urlOfAttachment="";
       // var itemId = listItem.get_id();
        urlOfAttachment = appWebUrl + "/_api/web/lists/GetByTitle('" + listName + "')/items(" + listItem + ")/AttachmentFiles/add(FileName='" + fileName + "')"
        // use the request executor (cross domain library) to perform the upload
        var reqExecutor = new SP.RequestExecutor(appWebUrl);
        reqExecutor.executeAsync({
            url: urlOfAttachment,
            method: "POST",
            headers: {
                "Accept": "application/json; odata=verbose",
                "X-RequestDigest": digest              
            contentType: "application/json;odata=verbose",
            binaryStringRequestBody: true,
            body: fileData,
            success: function (x, y, z) {
                alert("Success!");
            error: function (x, y, z) {
                alert(z);

    Hi,
    THis is common issue if your file size exceeds 
     upload a document of size more than 1mb. worksss well for kb files.
    https://social.technet.microsoft.com/Forums/office/en-US/b888ac78-eb4e-4653-b69d-1917c84cc777/getting-error-while-uploading-multiple-files-in-sharepoint-hosted-app-in-2013-with-rest-api?forum=sharepointdevelopment
    or try the below method
    https://social.technet.microsoft.com/Forums/office/en-US/40b0cb04-1fbb-4639-96f3-a95fe3bdbd78/upload-files-using-rest-api-in-sharepoint-2013?forum=sharepointdevelopment
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Split joint with RESTful serivices in OSB11g

    Hi
    I have a scenario to implements in OSB11g
    I need to call 4 end points one of them is RESTful service. I need to call in parallel.
    How can i use split-join in this scenario in OSB implement for parallel processing?
    Restful service is not having WSDL, here in this case can i use spli-joint to acheive parellel processing in osb if so couldyou pls let me knw how can i do this??
    In short
    How can i use split-join with restful service in OSB11g?
    Is there otherway to achieve my scenario in OSB (in parallel)??
    Quick reply is highly appriciated.
    Thanks.

    Hi hisaak,
    stage folder is always empty. And in the tmp folder following files and folders are available.
    osb_server1.lok
    WebServiceUtils.ser
    WLinternal*
    WLuser*
    kindly guide which of the folders has to be cleaned.

  • Get elements from external sites with rest

    Hello!!!
    I have a site collection in SPO2013 and i would like to read texts from a Drupal site and show it in my SP site. Is possible to do that with REST? if so, how? Is there some tutorial?
    Thanks!!!

    Hello,
    Yes you can create list items inside your SharePoint site using rest api. here is the simple function for your understating,
    // Adding a list item with the metadata provided
    function addListItem(url, listname, metadata, success, failure) {
    // Prepping our update
    var item = $.extend({
    "__metadata": { "type": getListItemType(listname)}
    }, metadata);
    // Executing our add
    $.ajax({
    url: url + "/_api/web/lists/getbytitle('" + listname + "')/items",
    type: "POST",
    contentType: "application/json;odata=verbose",
    data: JSON.stringify(item),
    headers: {
    "Accept": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: function (data) {
    success(data); // Returns the newly created list item information
    error: function (data) {
    failure(data);
    you can refer to the article below which explains basic CRUD operations using REST api  with simple code  examples:
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    Regards,
    Subhash Reddy.
    subhash reddy

  • How to configure proxy services in OSB for Rest based services?

    how to configure proxy services in OSB for Rest based services implemented using Jersey (Rest).
    The Client need to contact OSB proxy servies by posting application/xml using jersey client and OSB proxy service will call the OSB business service.
    i would like to know how to get this request in OSB proxy service and send it to the business service and get the response back.

    I would suggest you refer to the below links:
    https://blogs.oracle.com/jeffdavies/entry/restful_services_with_oracle_s_1
    https://blogs.oracle.com/jamesbayer/entry/using_rest_with_oracle_service
    Hope this helps.
    Thanks,
    Patrick

  • An error occurred querying a data source - with REST services

    Hi,
    I have a SharePoint 2013 form library library with an info-path form. I need to get the logged in user's 'Display Name' on my form load automatically.
    I used REST service to fetch the current user details. In the preview mode of the form, its showing the right name. But when I publish this form to library I am getting the following error.
    REST Service --> http://site url/_api/SP.UserProfiles.PeopleManager/GetMyProperties
    Please help me to resolve this issue.
    Thanks in advance for your time and reply :)

    Hi,
    According to your post, my understanding is that an error occurred querying a data source with REST services.
    It is defiantly permission issue with GetUserProfileByName service
    and could be many reasons of this problem. You first try with UDCX file and make sure that UPS is running.
    Here are some similar threads for your reference:
    http://social.technet.microsoft.com/Forums/en-US/b8c668ea-7511-4657-a1a8-08fb4a6bd53d/info-path-an-error-occurred-querying-a-data-source?forum=sharepointcustomizationprevious
    http://social.technet.microsoft.com/Forums/en-US/46866ac2-da09-4340-a86a-af72cbb2c8d7/info-path-an-error-occurred-querying-a-data-source-?forum=sharepointcustomization
    http://blogs.msdn.com/b/russmax/archive/2012/08/17/want-to-call-sharepoint-2010-web-services-within-browser-based-infopath-2010-forms.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Issue in Consuming Rest/JSON Service from Netweaver gateway system

    Hello Experts,
    We are trying to consume the Rest/JSON web service from NetWeaver Gateway System.
    But we are getting HTTP Communication failure error.
    URL: 'http://sgpvmc0031.apac.bosch.com/ActivityManager2/rest/v1/query/employees/amh1sgp/workItems/pending'
    The Host system of Serve is a Non-SAP System.
    In web browser, it ask for user id and password, by passing them, it provide the response.
    Please find my code details.
    DATA: lo_http_client TYPE REF TO if_http_client,
             lv_service TYPE string,
             lv_result TYPE string,
             lo_ixml TYPE REF TO if_ixml,
             lo_streamfactory TYPE REF TO if_ixml_stream_factory,
             lo_istream TYPE REF TO if_ixml_istream,
             lo_document TYPE REF TO if_ixml_document,
             lo_parser TYPE REF TO if_ixml_parser,
             lo_weather_element TYPE REF TO if_ixml_element,
             lo_weather_nodes TYPE REF TO if_ixml_node_list,
             lo_curr_node TYPE REF TO if_ixml_node,
             lv_value TYPE string,
             lv_node_length TYPE i,
             lv_node_index TYPE i,
    *        ls_weather TYPE zweather,
             lv_node_name TYPE string,
             lv_bin            type xstring,
             lv_node_value TYPE string,
             lo_conv           type ref to cl_abap_conv_in_ce,
             lv_response       type string,
             l_client type string.
    DATA: result_tab TYPE TABLE OF string,
              w_result TYPE string .
       lv_service = 'http://sgpvmc0031.apac.bosch.com/ActivityManager2/rest/v1/query/employees/amh1sgp/workItems/pending'.
    *  lv_service = 'https://rb-wam-q.bosch.com/ActivityManager2/rest/v1/query/employees/amh1sgp/workItems/pending'.
    *BREAK-POINT.
    CALL METHOD CL_HTTP_CLIENT=>CREATE
       EXPORTING
         HOST               = 'sgpvmc0031.apac.bosch.com'
         SERVICE            = '80'
    *    PROXY_HOST         =
    *    PROXY_SERVICE      =
    *     SCHEME             = SCHEMETYPE_HTTP
    *    SSL_ID             =
    *    SAP_USERNAME       =
    *    SAP_CLIENT         =
       IMPORTING
         CLIENT             = lo_http_client
       EXCEPTIONS
         ARGUMENT_NOT_FOUND = 1
         PLUGIN_NOT_ACTIVE  = 2
         INTERNAL_ERROR     = 3
         others             = 4
    IF SY-SUBRC <> 0.
    * Implement suitable error handling here
    ENDIF.
        lo_http_client->request->set_method( if_http_request=>co_request_method_get ).
        lo_http_client->authenticate( username = 'portal' password = 'portal' ).
        cl_http_utility=>set_request_uri(
            request = lo_http_client->request
            uri = '/ActivityManager2/rest/v1/query/employees/amh1sgp/workItems/pending'
        call method lo_http_client->request->set_header_field
           EXPORTING
             name = 'content-type'
             value = 'text/plain'.
        call method lo_http_client->send( ).
        call method lo_http_client->receive( ).
    Kindly help us to understand where to check.
    Regards,
    Nitin

    Hi,
    Try to test the url in the standard report RSHTTP20.
    Regards,
    Felipe

  • How to read azure storage data using JAVA with REST API

    Hi,
    We have a cloud service in our lab. We have enabled diagnostics
    in cloud services. So WADPerformanceCounterTable was created in storage account. Now , We want to read the WADPerformanceTable using
    JAVA with REST API. Is there any way to collect these details. please give me any
    sample code to connect azure storage using table service REST API.
    Thanks & Regards
    Rathidevi

    Hi,
    Please have a look at this article:
    https://convective.wordpress.com/2010/08/18/examples-of-the-windows-azure-storage-services-rest-api/, it demonstrate how to use table service Rest API, it also give us the code, hope this helps. Of course, the
    MSDN article could also help us coding.
    Best Regards,
    Jambor
    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

  • Message transformation in BPM

    I have a scenario where I'm collecting Debmas from R3 and I want to convert it to a text file. I'm unable to transform the multiple Debmas to a single xml structure with multiple debmas. The BPM collects the IDOCs correctly but during the transformat

  • Problem while uploading FF_5

    Hello, We are uploading the bank file using FF_5. when we upload the file the file is getting uploaded but showing error message difference is to large for clearing. When we check in FEBA the items in files are displayes as TO BE POSTED. Can any one

  • Itune music

    I am trying to get the music to rotate. Example, a song is playing and after it finishes it moves to the top of the list. How do I create a playlist that will do this procedure? I had it before and my power went out which wipe out the function.

  • Launch WebADI Addin in Excel causes other spreasheets not to be accessible

    Hi Multiple users at my job have an issue where they unable to ALT-Tab or switch between spreadsheets once they have uploaded Journals using Oracle WebADI through Excel 2010. The workaround is to right click the preview of the spreadsheet from the ta

  • Cannot edit document pdf

    not sure what happened, i had copied and pasted  another document in pdf, yesterday was editing it- now when I opened it today I cannot edit it as far as delete text and write in stuff how do I unlock it so it can be edited.