ATG Rest Services - capture IP of caller

Is it possible to capture the IP address of who is calling a REST service?
The reason I am asking is that we seem to be having a lot of the following errors in our log file:
ERROR [RepositoryServlet??] Error code: 500 CONTAINER:atg.repository.RepositorySecurityException; SOURCE:atg.security.PermissionDeniedException: You do not have read access to the category item descriptor.
null
atg.rest.RestException??: CONTAINER:atg.repository.RepositorySecurityException; SOURCE:atg.security.PermissionDeniedException: You do not have read access to the category item des criptor.
Now, We have a mobile site which makes use of the REST services and they are all set up with the correct login/security.
What I am trying to determine is who else is making these REST calls - something internal - or some unkown entity outside the application. I figured that if I can capture the IP then that will narrow down things. If it is outside, then the system is operating as expected and the error is justified. But if it is internal then need to do a bit more digging of what the root cause is.
thanks

I added the following to my method:
               if ("/rest".equalsIgnoreCase(pRequest.getContextPath()))
                    String clientAddressStr = pRequest.getHeader("x-forwarded-for");
                    if (StringUtils.isNotBlank(clientAddressStr))
                         //clientAddressStr will be of format: clientIp, Proxy1, Proxy2
                         String[] clientAddressArr = clientAddressStr.split(",");
                         if (isLoggingInfo())
                              logInfo("service(DynamoHttpServletRequest, DynamoHttpServletResponse) - IP Address is:: " + clientAddressArr[0].trim()); //$NON-NLS-1$
This does not work - the line
String clientAddressStr = pRequest.getHeader("x-forwarded-for");
always comes back as null.
Any issue of just grabbing the remote addr from the request?

Similar Messages

  • Not able to invoke ATG  Rest services

    Hi,
    I'm new ATG Rest service, To just create a dummy rest service I followed the below steps.
    1. added REST module in MANIFEST.MF file
    ATG-Required: DAS DPS DSS DCS B2CCommerce DAS REST
    2. created restSecurityCnfiguration.xml under atg/rest/seurity and following is the content of this file
    <programlisting>
         <rest-security>
              <default-acl value="Profile$login$admin:read,write,execute" />
              <resource component="/atg/service/TestComponent" secure="false"/>
         </rest-security>
    </programlisting>
    3. Created a TestComponent in my existing application and created a method testName
    public class TestComponent {
         public String getTestName(){
              return "arvind";
    4. Deployed my application on jboss.
    Now I'm trying to invoke this from a java class
    protected void execute() throws RestClientException {
              String mUsername = "admin";
              String mPassword = "admin";
              String mHost = "localhost";
              int mPort = 8080;
              RestSession mSession = null;
              RestResult result = null;
              mSession = RestSession.createSession(mHost, mPort, mUsername, mPassword);
              mSession.setUseHttpsForLogin(false);
              mSession.setUseInternalProfileForLogin(false);
              try {
                   mSession.login();
                   println("Login Successful");
                   result = RestComponentHelper.executeMethod("/atg/service/TestComponent", "testName", new Object[] {}, null, mSession);
              catch (Throwable t) {
                   println(t);
              } finally {
                   try {
                        mSession.logout();
                        println("Logout Successful");
                   } catch (RestClientException e) {
                        println(e);
    ----------------------------------------------------------------------out put ---------------------------------------------
    Login Successful
    atg.rest.client.RestClientException: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/bean/atg/service/TestComponent/testName
         at atg.rest.client.RestSession.createHttpRequest(RestSession.java:755)
         at atg.rest.client.RestComponentHelper.executeMethod(RestComponentHelper.java:252)
         at com.techm.restclient.RestClientSample.execute(RestClientSample.java:63)
         at com.techm.restclient.RestClientSample.main(RestClientSample.java:87)
    Caused by: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/bean/atg/service/TestComponent/testName
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
         at atg.rest.client.RestSession.createHttpRequest(RestSession.java:745)
         ... 3 more
    Logout Successful
    Even if I provide any username and password, which don't even exist, it says login succussful but while invocation it fails. Please help me here,
    What is default user I can use? or way to create new user ?
    Thanks in Advance,
    Arvind
    Edited by: Arvind Pal on Oct 4, 2012 10:21 AM
    Edited by: Arvind Pal on Oct 4, 2012 10:22 AM

    I created a user through ACC, and made the following changes.
    <programlisting>
         <rest-security>
              <default-acl value="Profile$login$arvind:read,write,execute" />
              <resource component="/atg/service/TestComponent" secure="false"/>
         </rest-security>
    </programlisting>
    and now I'm getting the loginStatus i.e userid of user "arvind".
    But while executing the invocation of web service call I'm getting the same exception.
    Do we need to give some permission somewhere for this user ? or I'm doing something wrong with restSecurityConfiguration.xml
    Login status[390002]
    Login Successful
    atg.rest.client.RestClientException: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/bean/atg/service/TestComponent/getTestName
         at atg.rest.client.RestSession.createHttpRequest(RestSession.java:755)
         at atg.rest.client.RestSession.createHttpRequest(RestSession.java:722)
         at atg.rest.client.RestComponentHelper.getPropertyValue(RestComponentHelper.java:182)
         at com.techm.restclient.RestClientSample.execute(RestClientSample.java:98)
         at com.techm.restclient.RestClientSample.main(RestClientSample.java:128)
    Caused by: java.io.IOException: Unauthorized Server returned HTTP response code: 401 for URL: http://localhost:8080/rest/bean/atg/service/TestComponent/getTestName
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
         at atg.rest.client.RestSession.createHttpRequest(RestSession.java:745)
         ... 4 more
    Logout Successful
    Edited by: Arvind Pal on Oct 4, 2012 12:36 PM

  • + Symbol is not working on ATG Rest Service Request.

    When calling loginUser ATG Rest services and passing email id "[email protected]" in the request parameter but the server received the request without +symbol
    +symbol is getting replaced with the whitespace.
    Request Sent with email - "[email protected]"
    Reached in the server - "test [email protected]"
    Can anybody explain me why + symbol is getting replaced by white space ?

    Hi D.J,
    A '+ ' in the query string represent space ' '. If you want to use '+' in query string encode it before send it to server and decode again on server before using it or you can use another symbol instead of '+', if you don't have specific requirement to use '+' in query string.
    Hope this will help.
    Thanks,

  • REST Services - Permission exceptions being thrown

    In setting up a mobile site which will make use of REST services we have started to see exceptions in the log file. These exceptions do not happen all the time - that is they are random in nature. We may see them for about an hour or so and then not see them for a day.
    We are seeing the same exceptions as identified in this Re: REST secureProductCatalog exception and I used the following [Not able to invoke ATG Rest services thread|https://forums.oracle.com/forums/thread.jspa?messageID=10615221&#10615221] as a reference as well.
    Working through the ATG10 document, have set up the restSecurityConfiguration.xml which identifies the beans with a secure setting of false, have set up the secureCustomCatalog.xml which identifies each of the item descriptors and the acl that is to be applied.
    Have created an external user as well.
    I created a simple unit test class - outside of my development environment - to simulate the remote call to the ATG server to verify the behavior. Everything passed.
    Now I was able to reproduce the issue if after I establish the session (LogIn) , I log out before the call to the repository.
    What I am wondering is -
    1. Is there any other way in which this kind of error can be created/occurred?
    2. Is there any other configuration that needs to happen?
    As a side note, is there any way in which to configure REST so that it does not dump a stack trace to the log file in the event of this error - possible to create a more meaningful shorter message? When the issue happens, it just fills up the log files.

    The issue turned out to be centered around the amount of connections from the mobile site to the REST service. This was verified via a load test.
    Solution was to modify the mobile logic that would check if a connection/session was already open/available and use it, otherwise create a new one.
    This seems to have addressed the issue

  • ATG REST Webservices - XML response

    Hi,
    I need to build an ATG REST component which returns the response in XML format and it is done.
    The question that I have here is that, in the XML response, the response XML that I exactly want is embedded inside <atgResponse>..</atgresponse> tag.
    For ex:
    The actual response that I need in the client side.
    <address>
    <address1>123 Main st</address1>
    <address2>Apt 12</address2>
    <city>Attleboro</city>
    <state>MA</state>
    <zip>02073</zip>
    </address>
    The response that I am getting back from my REST component:
    <atgResponse>
    <address>
    <address1>123 Main st</address1>
    <address2>Apt 12</address2>
    <city>Attleboro</city>
    <state>MA</state>
    <zip>02073</zip>
    </address>
    </atgResponse>
    Do I need to handle the logic of taking the xml that I needed from the XML response that is coming from my REST component, in the client side only?
    The other concern that I have is, I do not want my client application to know that I am using ATG REST services.
    Appreciate any help in this.
    Thanks in advance,
    Gopinath Ramasamy

    I have not tried it but I would probably try to extend XMLOutputCustomizer and override sendToOutputStream(Object pDocument, DynamoHttpServletResponse pResponse) method as per the requirement. Here pDocument would actually be an instance of org.dom4j.Document so you can access and update its root element. You can also process other output elements as well by iterating through the elements and when done write the Document object through org.dom4j.Document to XMLWriter. Something like below:
    Document doc = (Document)pDocument;
    //process Document object
    org.dom4j.io.XMLWriter writer = new org.dom4j.io.XMLWriter(pResponse.getWriter(), createDefaultOutputFormat());
    writer.write(doc)Override the default /atg/rest/output/XMLOutputCustomizer configuration to refer your class and see if it serves your purpose.
    API reference for XMLOutputCustomizer:
    http://docs.oracle.com/cd/E24152_01/Platform.10-1/apidoc/atg/rest/output/XMLOutputCustomizer.html

  • Issue with 'SAVE AS' RESTful service call in 4.1 SP5 ?

    Hello Everyone,
    I'm facing an issue when trying to save a webi document into another folder using 'SAVE AS' RESTful call, it's giving 500 Internal server error  (through AZOT & RESTClient)
    Following are details:
    We are on to BusinessObjects version 4.1 SP5. In the AZOT workflow, I have created a new document and in the next call I'm trying to save this newly created document into another folder, then this is error is observed.
    RESTful service URL:- [POST] : /documents/{docId}
    Request Body:
                             <document>
                                <name>Testing SAVE AS</name>
                                <folderId>219060</folderId>
                            </document>
    Response:
    Can anyone help me with this ?
    Thanks,
    Ram

    Hello,
    Thanks for your prompt replies.
    @Saritha:
    1. On new document Save call is giving message as "NOT Modified", as i didn't perform any actions.So Yes, I'm able to perform SAVE.
    2. Yes, I have performed other operations like creating a Report.
    @Eric: 3. Yes, the folder which I'm trying to save is writable for the user.
    My Observation: When I'm trying to 'SAVE AS' on new document its giving 500 error as I said earlier.
    1. But, after creating new document, I created a new Report for that document, then 'SAVE AS' working. That means after performing some action/modifying the document 'SAVE AS'  is working for me.
    2. Same issue(500 error) observed when trying to perform 'SAVE AS' call on the EXISTING document as well (which is create in BI Launchpad, refreshing and working fine).
    So, is it mandatory to perform any action (which brings the document to Modify mode [i guess]) before this 'SAVE AS' call ?
    Thanks,
    Ram

  • How to set the HTTP headers in HTTP Binding to call RESTful service

    I'm calling a RESTful service from the SOA Composite through a BPEL process. The RESTful service need few values to be set in the HTTP header to authorize the request. I tried several different options like setting the headers in the invoke service etc., but in vain. Apparently, the web service call fails for not having header information.
    I have burnt several days on this. Can somebody help me to get through this please?
    I'm using SOA composite 11.1.1.4 on WLS 10.3.4.
    Thanks in advance.
    The exception -
    <Oct 19, 2011 1:01:59 PM CDT> <Error> <oracle.webservices.service> <OWS-04086> <javax.xml.rpc.soap.SOAPFaultException: oracle.fabric.common.FabricInvocationException: Unable to access the following endpoint(s): https://txganguat.txd
    ps.state.tx.us/TxGang
    at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.generateSoapFaultException(WebServiceEntryBindingComponent.java:1053)
    at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.processIncomingMessage(WebServiceEntryBindingComponent.java:890)
    at oracle.integration.platform.blocks.soap.FabricProvider.processMessage(FabricProvider.java:113)
    at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:1187)
    at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:1081)
    at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:581)
    at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:232)
    at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:192)
    at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:459)
    at oracle.integration.platform.blocks.soap.FabricProviderServlet.doPost(FabricProviderServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)

    any updates on this? Running into the same issue!
    Thanks

  • How to call rest service with POST Http method in SMP2.3 HWC?

    Hi Experts,
       I am doing a sample for Rest Service in smp.
    http://192.168.1.119:8086/Test/services/Products
    I am calling the above service in the smp it is pulling the data from the service with GET Http Method.
    Now i want to call this service for login functionality.
    http://192.168.1.119:8086/Test/services/auth?uname=:uname&pass=:pass
    here :uname &:pass values are argument values for the uname & pass.
    the output of the service is
    http://192.168.1.119:8086/Test/services/auth?uname=sravanya.k&pass=sravanya
    <?xml version="1.0" encoding="UTF-8"?>
    <details>
    <responsecode>200</responsecode>
    <profile>
    <firstname>sravanya</firstname>
    <lastname>k</lastname>
    <email>[email protected]</email>
    <chart_type>North</chart_type>
    <location>MACHILIPATNAM</location>
    <language>English</language>
    </profile>
    </details>
    How can i do this?
    Thanks & Regards,
    Sravanya K

    Create a uriTemplate like this
    /auth?uname={uname}&pass={pass}
    use GET method only.
    generate the personalization keys.

  • [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

  • HTTP Adapter and Other Approaches to Call REST services

    Hi,
    We are coming up with a BPEL process to call the REST service using GET and POST methods. When i tried using HTTP adapter, we have got the error REPLACE_WITH_ACTUAL_URL so we went to another approach given in the blog https://blogs.oracle.com/reynolds/entry/oracle_http_adapter.
    This is working fine in BPEL 10g, when we did in the same way in 11g and tried to test we are getting the NullPointerException. Following is the error trace that is shown in the diagnostic log file. Please do let me know if anybody faced this issue and have insight on the same.
    java.lang.NullPointerException
    at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
    at java.util.regex.Matcher.reset(Matcher.java:291)
    at java.util.regex.Matcher.<init>(Matcher.java:211)
    at java.util.regex.Pattern.matcher(Pattern.java:888)
    at oracle.integration.platform.blocks.soap.WebServiceExternalBindingComponent.request(WebServiceExternalBindingComponent.java:557)
    at oracle.integration.platform.blocks.mesh.SynchronousMessageHandler.doRequest(SynchronousMessageHandler.java:139)
    at oracle.integration.platform.blocks.mesh.MessageRouter.request(MessageRouter.java:182)
    at oracle.integration.platform.blocks.mesh.MeshImpl.request(MeshImpl.java:154)
    at sun.reflect.GeneratedMethodAccessor1172.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:71)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy327.request(Unknown Source)
    at oracle.fabric.CubeServiceEngine.requestToMesh(CubeServiceEngine.java:820)
    at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:263)
    at com.collaxa.cube.engine.ext.common.InvokeHandler.__invoke(InvokeHandler.java:1059)
    at com.collaxa.cube.engine.ext.common.InvokeHandler.handleNormalInvoke(InvokeHandler.java:586)
    at com.collaxa.cube.engine.ext.common.InvokeHandler.handle(InvokeHandler.java:130)
    at com.collaxa.cube.engine.ext.bpel.common.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:74)
    at com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform(BaseBPELActivityWMP.java:158)
    at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:2543)
    at com.collaxa.cube.engine.CubeEngine._handleWorkItem(CubeEngine.java:1165)
    at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1071)
    at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:73)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:220)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:328)
    at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4430)
    at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4361)
    at com.collaxa.cube.engine.CubeEngine._createAndInvoke(CubeEngine.java:698)
    at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:555)
    at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:673)
    at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:293)
    at sun.reflect.GeneratedMethodAccessor1166.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:94)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.runJaasMode(JpsAbsInterceptor.java:81)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:112)
    at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:105)
    at sun.reflect.GeneratedMethodAccessor1064.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

    I tried using the HTTP adapter which is the straight forward way for calling the REST based services. But when we use XSD complex type we are getting the error REPLACE_WITH_ACTUAL_URL. We have to use GET method. when we tried from the browser it's working fine as expected but erroring out from BPEL.

  • [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

  • Issue with calling restful services via HTTP in an Orchestration

    The company I work for is using RESTful services for our I/O. We are processing EDI files using Biztalk, and are calling the REST services via HTTP from a c# code called within the orchestration. At lower volumes, the service performs fine, but at higher
    transaction volumes, the HTTP calls never return. Is there a resource that needs to be tuned somewhere on the biztalk node to allow higher volumes of HTTP calls? Its not the REST service side - it has no problems handling loads generated by non biztalk nodes.
    For further clarification, the EDI message is a multi batched, so there are many simultaneous orchestrations running at once.  I have started to look at ways to throttle how many instances can run at once, but I still suspect some resource in the HTTP
    sequence that we dont have enough of.
    Ideas?

    I think you were not  enough free threads in the ThreadPool to complete the operation.
    So you can work out with Max connection setting in your BTSNTSvc file first
    <system.net>
    <connectionManagement>
    <add address="http://name.of.server.here" maxconnection="1oo" />
    </connectionManagement>
    </system.net>
    and try increasing number of threads allocated to the specific send Host instance and your Orchestration instance  ,you can try twinkling Response timeout in minutes as well  on host instance
    Thanks
    Abhishek

  • [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

  • Calling a RestFUL service from a SOA composite

    Hi,
    I had thought a simple google search would have bought up the answer to this question but it dosn’t seem to have done so.
    I have to create a composite in 11.1.1.5 which has to call a restful sercice. Can anyone point me in the direction of a tutorial which describes how to do this.
    Thanks
    Robert

    That article looks intresting but:
    1. The pictures don't seem to be loading for me. Since they show a few of the steps this is quite important
    2. It talks about the httpbinding adapter which was removed when the article was written. This seems to be back now
    3. It uses tonnes and tonnes of Java.
    Can I conclude from this that it is not possible to call restful services from SOA without writing Java code?

  • Rest Service method called twice in wcf

    Hi all,
    I have created a rest service using wcf.
    I am writing Entity framework code within a service method to fetch data from database.
    Every call from browser is hitting the service method twice or thrice.
    I found no exception within the method. I encountered same problem before and solved it adding DataContract attribute to all the models(not helping now).
    What may be the possible reasons? Please help.
    Regards
    Ashish

    Hi,
    I want to know if you are using the WebGet (Http GET). If so, please try to change that API to WebInvoke (Http POST).
    Because IIS has some setting for HTTP GET as 40sec replay, so if within 40sec the server does not get response, then it will query itself again. Then it will be called twice or more.
    For more information, please try to refer to:
    #RESTful API in WCF get called more than one time:
    http://www.codeproject.com/Tips/338142/RESTful-API-in-WCF-get-called-more-than-one-time-b .
    Best Regards,
    Amy Peng
    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