Consuming a rest based srevices in abap

I am trying to consume a rest based servises in abap using the cl_rest_http_client class.
i was just trying to call a simple get method but it resulted in a responce "HTTP client - communication error".
when i use the same url from the restClient (Firefox extension it works)
I have checked some blogs which talk about consuming rest srevices. most of them have a pre requisite to importing the security certificate of the service provider using the "strust" transaction.
Since i dont have authorization for that transaction, i was wondering if it is possible to call a rest service without importing the certificate.
Kidly suggest ways in which i can overcome this
Thanks and regards,
Saurav

It is not possible to make an HTTPS request without importing the certificate.
It works fine with HTTP request but for HTTPS we need to import the certificate and pass the SSL id.

Similar Messages

  • Is there a way to consume REST based pdf web service in PeopleSoft

    We have a requirement to consume an pdf REST based web service in PeopleSoft and display the pdf file on browser. I have configured the Service & Service Operation in PeopleSoft.
    I have also confirmed the request is making to target server. Also when using curl, confirm the target web service is working  and response seems to be binary bytes representing pdf file.
    How can I consume this response from PeopleSoft message object. Tried using contentstring() and trying to do %response.write
       &getrpt_RESP = %IntBroker.SyncRequest(&MSG);
       &strresponse = &getrpt_RESP.GetContentString();
       %response.write(strresponse );
    /* Open a file.pdf* - to do/
    /* Write the response from message to file - to do */
    /*Use view attachment to open the file on browser - to do*/
    But this returns nothing on browser.
    If I had to copy pdf file, I normally would use something like
       Local JavaObject &in = CreateJavaObject("java.io.FileInputStream", &SrcFullPath);
       Local JavaObject &out = CreateJavaObject("java.io.FileOutputStream", &filepath);
       Local JavaObject &buf = CreateJavaArray("byte[]", 1024);
       Local number &byteCount = &in.read(&buf);
       While &byteCount > 0
          &out.write(&buf, 0, &byteCount);
          &byteCount = &in.read(&buf);
       End-While;
    But I am failing to find a way to copy the bytes from message to a file?
    Any help is appreciated!

    Integration Broker supports MTOM. You can find an example here: Sending and Receiving Binary Data.
    The alternative is to use Java to make the HTTP request. You can use HttpClient, as Sasank mentioned, if you don't mind managing jar dependencies. The alternative is to use HttpUrlConnection directly. Not easy in PeopleCode, but possible. If you are on PeopleTools 8.53, then you can script it in JavaScript and run it on the server through the Rhino JavaScript script engine manager included with Java 7 and part of PeopleTools 8.53+. I find this MUCH easier because you don't have to deal with reflection.
    Once you get the binary file, the next task is sending it to the client in binary format. %Response.WriteBinary works great, but requires you to start with binary data. I am only aware of one way to read binary data in PeopleCode that is suitable for %Response.WriteBinary and that is to select the binary data out of the database and into an Any variable. I have not figured out how to convert Java binary data into something suitable for PeopleCode's %Response.WriteBinary.

  • Can any help me on consuming rest web services from Abap..

    Basically I have an rest based url which i have to call from ABAP, The url has to be passed with some input XML PARSE..How do i do it any idea??
    i have tried cl_http_client calls in my case i'm having a problem in passing input xml.

    Please post to one of the ABAP SCN Spaces. Each SCN Space has an Overview tab and this tells you what products the Space "supports". To find the ABAP Space see:
    SCN Site Index
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Consume a third party REST Based Webservice from PeopleSoft

    We are in tools 8.49.33
    Using 'Consume Web Service' component we can only consume a WSDL based webservice I guess. But we have a requirement to consume to a third party webservice, for which we just have to invoke a URL with query string via HTTP GET and receive an XML response. Has anyone done this before?

    Three things to check:
    #1: Check your errorLog.html file in the PSIGW web app of your PeopleSoft server
    #2: Does your app server have to go through a proxy to connect to the internet? If so, did you configure integrationGateway.properties to use a proxy server? You can test this by trying to use ConnectorRequestURL for a plain old HTTP web site. If you get the same error, then it is likely a proxy issue.
    #3: If #2 passed, then it might have to do with certificates and you will need to review PeopleBooks for importing certificates for integration broker. I haven't had to do this before, but am pointing it out in case.

  • Consume a restful webservice using plsql

    Hi
    We need to consume a restful webservice and this needs to be implemented using plsql.
    I know that we can use utl_dbws or utl_http to consume SOAP based web services but
    there is not much information on how to consume restful web services.
    kindly let me know if you have information.
    Cheers
    rigel

    851866 wrote:
    Im looking for the opposite scenario where i need to access a restful web service from plsql.Why would a RESTful call be any different from a normal URL call? HTTP is the transport mechanism - and UTL_HTTP is used in PL/SQL as the client side of a HTTP conversation.
    I posted sample code of a how to use PL/SQL as a brower client in {message:id=1925297} - using a pipeline table to demonstrate the contents returned by the web server in response using plain SQL.
    Depending on what the contents is, you can write it into a BLOB (dealing with binary data returned), a CLOB (for XML data for example), or using varchar2 you can for example parse a text/csv response (no need for a pipeline in such a case).
    The only real issue I can see with a RESTful service is URL construction - as the URL becomes "parameterised" and not just the query string itself, or the data contents (name values) in the POST structure.

  • 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

  • Consume External Web Service (WSDL) in ABAP (Release 700) - Proxy Error

    Hi All,
    Have a requirement to Consume an External Web Service in ABAP. We have the WSDL for Ext. Web Service.
    Did some research and came across the link:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/69/8a1e9553dc4baba6026a3db510cadb/content.htm
    First tried to generate a 'Consumer Proxy'. Since external WSDL, used SE80 to generate the Consumer Proxy.
    But finally got Error Msg 'Incorrect value: XSD name space not available'! Could you please let me know:
    1) What is causing this error and how to rectify it?
    2) Is it possible to view the Proxy that I had created (which is in error)? is there a Proxy Editor?

    Hy Brad, I got the same error by trying to generate a 'Consumer Proxy' from a external WSDL. u2019Incorrect value: XSD name space not available'. I have solved it in this way: The report RSSIDL_DESERIALIZE_DEMO has the same check routines as the R3-Proxy Generator. I debugged this report using a saved external WSDL and compared it with using a saved WSDL (Server) generated under /nse80.
    -> In the WSDL, in part message the "type" isnu2019t allowed, because the dezerialization is done already.
    Coding, not working:
    <xsd:complexType name="OrderRequestMsg">
      <xsd:sequence>
         <xsd:element name="shop" type="xsd:string"/>
          u2026
      </xsd:sequence>
    </xsd:complexType>
    <message name=" OrderRequest">
      <part name="input" type=" tns:OrderRequestMsg"/>
    </message>
    Coding, working::
    <xsd:element name="OrderRequestMsg">
        <xsd:complexType>
           <xsd:sequence>
            <xsd:element name="shop" type="xsd:string"/>
       </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <message name="OrderRequest">
         <part name="input" element="tns:OrderRequestMsg"/>
    </message>

  • 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

  • Can I create JDE BSSV (Business Services) for REST based services?

    Can I create JDE BSSV (Business Services) for REST based services? If yes, then how? In what way it will be different from SOAP based?

    Hi
    Within Oracle SOA Suite, Oracle Service Bus would handle the REST side of things, which in turn would call the JCA adapter to talk to your JDE backend, or vice versa.
    Checkout the JDE adapter docs - http://www.oracle.com/technetwork/middleware/soasuite/documentation/jdewardsweb-1954164.pdf
    and the OSB Docs - HTTP and Poller Transports - 11g Release 1 (11.1.1.7)
    OSB 11.1.1.7 introduced additional REST support, so I'd recommend using that version onwards.
    Cheers
    iain

  • Using REST-based data in SolMan

    Hi,
    In the [Apache Project ESME|http://incubator.apache.org/esme], we have made JMX-based data available via a REST interface. This is partially related to restrictions that are present in many cloud-based environments.  We are looking to see how existing enterprise monitoring systems might be able to use this data.
    Does anyone know if it is possible to use REST-based data in SolutionManager?
    Thanks.
    D.

    Hi Alfred
    I tried to use nested tables and varrays in forms several times but also wasn't able to do so. The problem is that on the client side there are not all the PL/SQL 8 features implemented. Look what the manual says:
    "Not all Oracle8 features are currently supported across this release.
    The major unsupported features are:
    - Collection types (nested tables and
    varying arrays, or varrays)
    - Stored procedures that return object
    values
    - Scalar datatypes NCHAR and NVARCHAR2
    You should also be aware that, although this release does support PL/SQL 8, client-side PL/SQL 8 does not yet fully support all the features in the Oracle8 Server. (Server-side PL/SQL 8 support is complete.)"
    So you'll have to wait for the next release or a patch I guess. Please correct me if I am mistake.
    Hope this was kind of useful
    Nik
    null

  • 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

  • Rest based webservices from plsql procedures/packages

    Guyz.
    Please let me know How to create Rest based webservices in jdeveloper tool from plsql procedures/packages.
    Im very much in need
    Thanks,

    Hi User ,
    Welcome to OTN !!
    You can refer to these links and figure out -
    http://docs.oracle.com/cd/E16162_01/user.1112/e17455/dev_web_services.htm#CHDJIFAE
    http://theblasfrompas.blogspot.com/2011/03/developing-restful-web-services-from.html
    Also for calling pl/sql packages from Java , use soemthing like this - http://www.coderanch.com/t/302171/JDBC/databases/execute-PL-SQL-program-Java

  • Using relative-URI  in creating the REST based proxy service

    Hi,
    I am facing an issue when i am trying to create REST based proxy. i am looking at the urls given in the forum post Using Business Service that supports XML over HTTP in OSB
    I have created a conditional branch with xpath expression like *./ctx:transport/ctx:request/http:relative-URI/text()*
    and i am copying this value to $inbound as showin in the blog http://blogs.oracle.com/jeffdavies/2009/06/restful_services_with_oracle_s_1.html. But when i typed the uri in browser its saying xml parser error unable to find <.
    Not sure of the reason. If i modify my proxy to use http-method as shown in the blog its working fine and that too only when i copied ./ctx:transport/ctx:request/http:http-metho/text() to $inbound. But when i copied the same to another variable like branchcond, i am getting same parsing error. And Is it that the variable has to be always $inbound?  So what should be the variable name for using relativeURI
    And my uri is going to be like the following, thats why i am planning to create the conditonal branch on relative-uri.
    http:/localhost:8001/proxy/RESTbasedPS/getGreeting?name=23
    http:/localhost:8001/proxy/RESTbasedPS/getFullName?firstName=Some&lastName=Thing
    Any leads in above error will help me.
    Thanks
    Siva

    When i created the Conditonal branch, its asking for two mandatory properties. One is 'selected path' and the other is 'variable'. My scenario i am trying to base my conditional branch based on relative uri, so i have given './ctx:transport/ctx:request/http:relative-URI/text()' for 'selected path' variable and giving the value 'inbound' for 'variable' property of conditional branch.
    i was trying to do this in similar fashion as given in the blog http://blogs.oracle.com/jeffdavies/2009/06/restful_services_with_oracle_s_1.html, only thing is that i am using http:relative-URI rather http:http-method as shown in the blog.
    I am geting the following error in exact:
    XML Parsing Error: no element found
    Location: http://localhost:7001/proxy/RESTBasedPS/getGreeting?name=siva
    Line Number 1, Column 1:
    Please let me know if i am missing something or doing wrong with inbound variable.
    Thanks
    Siva

  • Support for REST based storage systems

    Hi,
    I have a question on the target storage for the movies served by the Flash Media server. In your FAQ you mention that data can be stored on a local server or remote location. I assume you are referring to CIFS and NFS mountpoints? Do you support any REST based storage solution as a backend for the Adobe Streaming server? For example could I store my data on an Amazon S3, OpenStack,... compliant storage solution.
    Referring to the following FAQ:
    How does Flash Media Server integrate into my network?
    Flash Media Server runs on either Windows or Linux 64-bit operating systems. The XML-based configuration and C++ plug-ins allow a great deal of customization. Media files can be stored on the local server or in remote locations. Plug-ins can be configured to provide access control, directory/file mapping, authentication, or additional security features.
    Thanks,
    Stefaan

    Hi Thanks for your answer.
    As more and more object storage systems come into the market I strongly recommend you to integrate with a native Amazon S3 and OpenStack API instead of recommending a FUSE implementation.
    Can you tell me if that is on the roadmap by any chance?
    Thanks!

  • Consuming EJB Web Service in WD ABAP component

    Hi,
    I have a scenario where I have Portal KM access methods exposed as EJB Web Service. This web service is deployed on J2EE engine.
    And I have to consume this web service from my WD ABAP component controller.
    Any idea how this can be achieved?
    Thanks and regards,
    Amey

    This doesn't really have anything to do with Web Dynpro.  Normal ABAP functionality is used for the consumption of a web service.  In ABAP we create a proxy class based off the WSDL of the web service.  This proxy class can then be called from within Web Dynpro like any other ABAP class.  You can read about consuming a web service in the online help:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9e/c7a3591dc74a679bbc9716354e42af/frameset.htm

Maybe you are looking for