Testing OSB REST Service

Hello,
I have created an OSB Service(HTTP) which can be exposed as REST service to consumer application. Now, how can i test this OSB Service using SOAP UI/some tool, as its not exactly soap service(wsdl) but a REST Service.
Also, the end point URI in Proxy would be the end point for this OSB Service which can be exposed to consumer application?
Thanks

You can test REST services from SOAPUI.
http://www.soapui.org/REST-Testing/getting-started.html

Similar Messages

  • OSB RESTful service is not reachable

    Hi Team,
    I defined an OSB REST service as mentioned in https://blogs.oracle.com/jeffdavies/entry/restful_services_with_oracle_s_1
    When I test it from SOAPui, it is not reachable. Any pointers please.
    Thanks,
    AG

    You need to make an entry in OHS config files like below:-
    Example:With the following configuration, requests for the /myapplication URI received at the Oracle HTTP Server listen port will be forwarded to /myapplication on the Oracle WebLogic Server with the listen port localhost:7001
    <IfModule weblogic_module> <Location /myapp1> SetHandler weblogic-handler WebLogicHost localhost WeblogicPort 7001 </Location> </IfModule>
    To forward requests to an application running on a cluster of Oracle WebLogic Server instances, specify the details of that destination cluster within a new<location> element.Syntax:
    <IfModule weblogic_module> <Location path> SetHandler weblogic-handler WebLogicCluster host:port,host:port,... </Location> </IfModule>
    http://docs.oracle.com/cd/E23943_01/web.1111/e16435/oracle.htm#PLGWL553

  • OSB: Issue while testing OSB proxy service using SOAPUI

    Hi,
    I am trying to test an OSB proxy service using SOAPUI.
    The below are the steps i have followed in SOAPUI:
    1. File->New SOAPUI project
    2. Opens the dialog to create REST service
    3. Given service endpoint as: http://<osb servername>:<port>
    4. Opens dialog to create a REST resource
    5. Resource Path/EndPoint is the OSB proxy service end point.
    6. HTTP method = POST
    The proxy service accepts 'text' input so i have given Media Type as 'text/plain'
    But, when i give the request message and run the request. The request is not running. I am not seeing the processing symbol at the bottom right of the SOAP UI request. Whereas i am able to run other services.
    Kindly help me resolve this issue.
    Thanks,
    Kalpana.

    your problem:
    Missing class: oracle.tip.adapter.jms.JmsManagedConnectionFactory
    Dependent class: oracle.tip.adapter.fw.wsdl.WSDLUtils
    Loader: oracle.bpel.common:10.1.3
    Code-Source: /oraclesoa/oraclesoa/product/10.1.3.1/OracleAS_1/bpel/lib/orabpel.jar
    Configuration: <code-source> in /oraclesoa/oraclesoa/product/10.1.3.1/OracleAS_1/j2ee/home/config/server.xml
    It happens when server is custom installed, try to reinstall it as full version and problem should disappear otherwise your need another full installation to retrieve and replace orabpel.jar file from (or maybe more)

  • Testing of Restful Service with ECATT

    HI,
    has anyone experience with testing Restful services via ECATT?
    I didn't find any documentation about this.
    BR,
    Oliver

    I figured this out...the context root is NOT the one specified in the @ApplicationPath annotation. The context root has to be specificed in the vendor-specific dd, glassfish-web.xml for example, or the default needs to be accepted.
    The endpoint URI is of the form http://hostname:port/contextRoot/applicationPath/path, where applicationPath is specific with @ApplicationPath and path with @Path.
    Edited by: asarkar on Jul 24, 2011 2:45 PM

  • Test OSB proxy services

    Hi,
    I am new to OSB. I have created some proxy serices and business services. I want to know about the testing procedure. I m using soapUI to test, for that i need to create some script (Ant, Maven) to run in hudson. Can any one help me, what could be the best practise and how to create test scripts from soapUI.

    You may refer few links -
    http://technology.amis.nl/blog/7408/automatic-testing-oracle-service-bus-using-hudson-maven-and-soapui
    http://orasoa.blogspot.com/2011/05/using-soapui-mockupserver-in-osb-soa.html
    http://www.javamonamour.org/2010/07/soapui-junit-and-functional-tests.html
    Regards,
    Anuj

  • [OSB1031] how to call a RESTful service from OSB

    Hi all,
    I need to call a RESTful service from OSB.
    The RESTful URL service is http://xxx.xxx.xxx.xxx/api/ordertracer and has been implemented in IIS.
    The service accepts a xml string message as input and returns an HttpStatusCode.
    So I started defining a business service (named OrderTracer):
    Service Type: Any XML Service
    Endpoint URI: http://xxx.xxx.xxx.xxx/api/ordertracer
    HTTP Request Method:POST
    Or should I define instead a business service (named OrderTracer2) as following ?
    Service Type = Messaging Service
    Request Message Type = None
    Response Message Type = Text
    Endpoint URI: http://xxx.xxx.xxx.xxx/api/ordertracer
    HTTP Request Method:POST
    When I try to test the business service (the first one named OrderTracer) from OSB test console I got an error:
    <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:Connection>close</http:Connection>
    <http:Content-Length>315</http:Content-Length>
    <http:Content-Type>text/html; charset=us-ascii</http:Content-Type>
    <http:Date>Wed, 03 Oct 2012 14:26:39 GMT</http:Date>
    <http:Server>Microsoft-HTTPAPI/2.0</http:Server>
    </tran:headers>
    <tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">3</tran:response-code>
    <tran:response-message xmlns:tran="http://www.bea.com/wli/sb/transports">Not Found</tran:response-message>
    <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">us-ascii</tran:encoding>
    <http:http-response-code xmlns:http="http://www.bea.com/wli/sb/transports/http">404</http:http-response-code>
    </con:metadata>
    Could I test that RESTful service from business service test console or should I test it from a service callout within a proxy service ?
    Thanks in advance for any hints!
    ferp

    Hi,
    There's a sample on JSON REST here...
    http://java.net/projects/oraclesoasuite11g/downloads/download/OSB/osb-206-JSONREST.zip
    For other samples, see this...
    http://java.net/projects/oraclesoasuite11g/pages/OSB
    Cheers,
    Vlad

  • RESTful Services comfiguration step missing TEST Button

    Hello there,
    I was asked to set up the RESTful Services. When I get to my last page, there were not a test button to test the RESTful Services Reference as well as the set bind variable button to set the bind valiable. So at this point, I was not able to get the JSON result file that will show the URI where the application will consume the Web Services. Can someone assist me in getting this work? is this problem and upgrade problem? the saystem was upgrade from 4.0 to 4.2
    Can someone help?

    Hi,
    I would recommend that you review the APEX Installation Guide, for details on Configuring RESTful Services using APEX Listener 2.0 or higher.  RESTful Services requires Oracle Application Express Listener 2.0 or later.  The "Test" and "Set Bind Variables" buttons will only be visible on the Resource Handler page of App 4850 when your instance is configured to run with APEX Listener 2.0 or higher.
    I would recommend that review the installation doc steps, ensuring that you have executed the apex_rest_config.sql script, and download the latest version of APEX Listener from OTN and configure it.  Within the downloaded Listener zipfile, you'll contain a very useful RESTful Services Developer Guide, which I recommend that you review.
    Regards,
    Hilary

  • Rest service DELETE doesn't work with OSB

    Hi,
    I am using OSB 11g, I am using OSB proxy to monitor external rest services call. I've created a business service that point to the external rest service and I created a proxy that is routed to my business service. I modified the flow by adding a piplinepairNode -->requestPipline-->stage -->created two assign and created two variable one for the id and another one for the productID. Then I modified the business service flow as follow:
    created two insert, one to define the method, which is DELETE and another one to set the relative-URI to the productID variable and I set the response to replace the . in the body with $body, following this post: http://blogs.oracle.com/jeffdavies/entry/restful_services_with_oracle_s_1
    When I test it using osb console Execute, I can see my productID variable is set to $inbound and it is passed all the way to the business service, where it should call the external rest service with the relative-URI, which is set to my productID. it doesn't work, I get 404 error, which is undefined, I believe the reason is because business service is trying to call the external rest service with
    http://localhost:{port}/deleteProduct and the rest service expect this URL
    http://localhost:{port}/deleteProduct/2 or {productID}
    can you please help and tell me what I'm doing wrong?
    appreciate any kind of help
    Thanks
    M.

    Please refer -
    http://blogs.oracle.com/jeffdavies/entry/enhanced_rest_support_in_oracl
    Regards,
    Anuj

  • [OSB] - Calling REST Service - POST action

    Hi,
    I have a requirement to invoke a REST full service to pass on the processed XML message. I know OSB supports both calls via Proxy and Business services. I have tested it with HTTP and it works. However, my server side REST service is to be invoked/called over HTTPS.
    Request you to please let me know what I need to look for while implementing this requirement. Any help in this case will be appreciated. Thanks.
    Regards.

    Please refer - for Post implementation
    http://blogs.oracle.com/jeffdavies/entry/restful_services_with_oracle_s_1

  • Invoking RESTful service from OSB

    Hi
    I need to invoke Restful service from OSB11g in order to do that...
    1. I have created Business service with the end point of the RESTful service.
    2. Running the Business service and provided the XML as input in Transport Header--> query-string.. i got the response as bellow:
    <serviceResponse returnCode="-1">
    <statusMessage messageId="Exception" messageType="" severityCode="E">
    <text>
    Required input not supplied. Please revisit your input values and try again.
    </text>
    </statusMessage>
    </serviceResponse>
    Is this the correct way i am doing or am i missing something..???
    Thanks
    Vasu

    Hi Vasu,
    did you solve your issue ?
    I have a similar scenario where I need to call a RESTful service from OSB.
    The RESTful URL service is http://xxx.xxx.xxx.xxx/api/ordertracer and has been implemented in IIS.
    The service accepts a xml string message as input and returns an HttpStatusCode.
    So I started defining a business service (named OrderTracer):
    Service Type: Any XML Service
    Endpoint URI: http://xxx.xxx.xxx.xxx/api/ordertracer
    HTTP Request Method:POST
    I tested it from business service test console:
    - in Transport
    -> query-string I put my input xml
    -> http-method: POST
    -> Content-Type: text/xml
    but on execute I got an error:
    <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:Connection>close</http:Connection>
    <http:Content-Length>315</http:Content-Length>
    <http:Content-Type>text/html; charset=us-ascii</http:Content-Type>
    <http:Date>Wed, 03 Oct 2012 15:07:38 GMT</http:Date>
    <http:Server>Microsoft-HTTPAPI/2.0</http:Server>
    </tran:headers>
    <tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">3</tran:response-code>
    <tran:response-message xmlns:tran="http://www.bea.com/wli/sb/transports">Not Found</tran:response-message>
    <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">us-ascii</tran:encoding>
    <http:http-response-code xmlns:http="http://www.bea.com/wli/sb/transports/http">404</http:http-response-code>
    </con:metadata>
    May I ask you to provide me any hints ?
    Thanks in advance for any help
    ferp

  • How to test RESTful service?

    Hello Everyone!
    Working on APEX REST services, my query is in regard with the below link:
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35128/restful_svc.htm#autoId6
    In the above link, heading '5.5.2 Retrieving Data Based on a Parameter (employees/{id})' -> points from 1. -to- .8 are covered.
    Stuck on point '9. Click Set Bind Variables.', I cannot find this link on that page under my Development environment Application Express 4.2.0.00.27.
    Kindly help to locate this link so that I can test my service?
    For more clarity, please click below image link
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/dbservice/restfulws/images/t2_02.jpg
    The mouse cursor is placed at the end of the page on one of the two buttons 'Test' & 'Set Bind Variables', my development environment doesn't show these buttons. Anyone know why is this happening?
    - Krishna Vashistha

    Okay, I have got this sort out on my own.
    For the record, you must update you apex listener with new release apex_listener.2.0.5.287.04.27, which supports RESTful services. By updating you will see those two missing buttons 'Test' & 'Set Bind Variables', to test your newly created service.

  • Getting error while writing JUnit test case for RestFul Services

    Hi All,
    I have written Restful services in Netbean 6.8.
    It's running well...no issues.
    {color:#0000ff}While writing JUnit test cases for them, I am getting following error:
    {color}{color:#993300}Testcase: testGetAuthenticated(com.ct.services.LoginServicesTest): Caused an ERROR
    Implementing class{color}
    java.lang.IncompatibleClassChangeError: Implementing class
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:160)
    at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
    at com.ct.services.LoginServices.getAuthenticated(LoginServices.java:205)
    at com.ct.services.LoginServicesTest.testGetAuthenticated(LoginServicesTest.java:84)
    Test com.ct.services.LoginServicesTest FAILED
    F:\NetbeanProjectsWorkspace\DemoProject\nbproject\build-impl.xml:972: Some tests failed; see details above.
    BUILD FAILED (total time: 11 seconds)
    {color:#0000ff}Strange thing is that when I am commenting below lines and its related calls:
    {color}
    {color:#ff0000}EntityManagerFactory mEmf = Persistence.createEntityManagerFactory("AnyName");
    EntityManager mEm = mEmf.createEntityManager();
    {color}
    {color:#0000ff}from my code, JUnit test cases are working fine.
    {color}Anybody having any idea about this ?
    Thanks
    Avi
    Edited by: Avi007 on Aug 28, 2010 5:17 AM

    Hi All,
    [http://stackoverflow.com/questions/2778295/test-driven-development-problem]
    Please refer the above link for the solution
    Thanks
    Avi
    Edited by: Avi007 on Aug 30, 2010 12:33 AM

  • TNS timed out error while testing REST service

    4.2
    11g
    Hi There,
    We had a new application which was to get and post data using REST API which connects to an internal server. This works fine when we use the Google Chrome Advance REST application through the browser, but get a TNS timed out when trying through Apex
    Even a simple sql in the SQL workarea in Apex throws the same error
    select utl_http.request( 'http://ourserver.com/api/subscriptions') test
    from dual;
    ORA-29273: HTTP request failed ORA-06512: at &quot;SYS.UTL_HTTP&quot;, line 1130 ORA-12535: TNS:operation timed out
    Any idea, what the issue could be?   Works fine from the browser though using a REST client
    Trying this for the first time.
    thanks,
    Ryan

    Hi Ryan,
    During your installation, did you follow the steps to enable Network Services, which is one of the requirements when using web services in APEX.  You'll find the necessary information in the installation guide.   Also in your utl_http.request call, have you tried specifying a proxy, if one is required?  You might also want to take a look at at apex_web_service API, specifically the make_rest_request function, which might be useful if you're looking to invoke a RESTful Service via PL/SQL in your application.
    Regards,
    Hilary

  • Proxy restful services via osb

    Hi,
    I would like to proxy my rest services via OSB for monitoring purpose. I did configure a simple GET call to use OSB proxy, I did it by creating a business service and point the URI to use the absolute URL of the rest Services (i.e. http://localhost:port/myRestMethod) and then created a proxy service pointing to my business service. Is this the correct way of doing it? Also I have the following questions:
    1. is there a way to make the URI for the rest service dynamic?
    2. How should I configure a post?
    I would appreciate any kind of help or if you can point me to some kind of documentation or example. I am very new to OSB and don't have much knowledge about it.
    Thanks
    Regards
    M.

    You can set the headers of the request quit similar to the ones you use for the get and delete parts. If you want to POST or PUT JSON/Xml/Text to your rest service you have to fill the $body variable with the contents of the request you want to send. When you use a proxy service I would suggest adding a route to block at the end of the PS. The route block contains a route to the business service you want to call.
    When you send the $body in the request pipeline to the business service the $body variable gets updated when the business services receives a response.
    What I usually do is add reporting blocks to your request and response pipelines that contain the $body and $header vars. That way it's easy to see what requests you are sending and what kind of responses you are retrieving.
    Good luck!

  • [OSB1031] how to call a RESTful service from OSB with authentication

    Hi all,
    I called successfully a RESTful service from OSB.
    We have a business service, named OrderTracer, that wraps the call to the RESTful service.
    The RESTful service requires an authentication so we are trying to find out how the OSB business service should authenticate itself against the RESTful service.
    In addition the RESTful service accepts username/password coded as base64.
    So we defined a Service Account with static resource type and we added the reference to this service account in the business service.
    But when the OSB business service calls the RESTful service, we got an error:
    <fault>
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-380000</con:errorCode>
    <con:reason>Unauthorized</con:reason>
    <con:location>
    <con:node>RouteNode</con:node>
    <con:path>response-pipeline</con:path>
    </con:location>
    </con:fault>
    </fault>
    Does anyone have any hint ?
    Any clue would be of great help.
    Thanks in advance
    ferp

    Hi,
    There's a sample on JSON REST here...
    http://java.net/projects/oraclesoasuite11g/downloads/download/OSB/osb-206-JSONREST.zip
    For other samples, see this...
    http://java.net/projects/oraclesoasuite11g/pages/OSB
    Cheers,
    Vlad

Maybe you are looking for

  • Acrobat X Pro-no scanned images visible

    I recently bought Acrobat X Pro and try as hard as I can, I cannot get any scanned images to show up. The pages are gray. A pdf from Word, etc. is all right, but not if it's a scanned image. I went throught a couple of the tutorials on how to scan do

  • Retrieving entire path of metadata column

    To emulate document permissions based on metadata, I'm trying to create my own document routing logic through a workflow retrieving the value from a metadata column and moving the file to the appropriate folder. It works fine except for the fact that

  • Phone won't show contact name in recents list

    Phone won't show contact name while somebody call me, the same is in recent list under number is unknown. I already reset my phone and try to make new contact when somebody called me and it isn't work. 

  • ALV Export to Spreadsheet

    Hi, When I export data from ALV grid disply to Spreadsheet,Columsn positions are changes. All the columsn defined as CHARACTER are listed first and then the coulmns defined as N, I, DATS. Please let me know if there a way to resolve this instead of c

  • Service Cost and Material Reservation

    Dear Experts, We have came up with a requirement that maintenance service costs and material requirements for the same to be captured through PM orders. - A budget will be used to paid maintenance service costs - Service costs are to be paid for exte