Dynamic Invocation on REST Services

Hi,
I am new to OAG. Couldnt find documentation on below questions. Can you please provide inputs.
Question's:
1. Would it be possible to use single policy to invoke few external REST services. We want to externalize the URL in "Routing-->Connect to URL" activity.
2. For some cases we would like to Set target URL based on the Request Relative URL. Is this possible?
Thanks
Ramana.

Hi Stefan,
One other question.
I would like to extract value from the variable ${http.request.path}
Ex: If ${http.request.path} = /test/ramana/details, I would like to define variable say "customer" and assign "ramana" to customer.
Use Case: I want to set this variable "customer" to "Service Context".
I tried to use "Extract Path Parameters", ad explained in Extract Path Parameters
But I am unable to add success path from Extract Path Parameters to Set Service Context .
Policy Path:
Extract Path Parameters --> Set Service Context --> Connect to URL.
Can you please help.
Thanks
Ramana.

Similar Messages

  • Web Services Dynamic Invocation

    Hi,
    I am trying to find a way to do web services dynamic invocation where params and return type can be complex types.
    The process I intent to follow is, query a uddi registry based on some search criteria to get a reference to the service wsdl. Use maybe wsdl4j to introspect the wsdl to determine porttype, operations, param data types etc and then perform a dynamic invocation.
    Does anybody have any ideas on how best this can be achieved without having to reinvent the wheel.
    Thanks,
    -V

    Hi
    I am looking for the same thing, please let me know if you resolve it.
    thanks

  • Step by step installation for Web Services Dynamic Invocation application?

    please let me know the step by step process to install the Web Services Dynamic Invocation application Sample code.The install.htm that comes with the download does not give enough information.
    Thanks in Advance
    Shyam

    Sorry for the confusion,i got hold of the right document.
    Thanks
    Shyam

  • Role Assignment Discovery Issue for Files and Folders through Sharepoint REST services

    To preface, I am a decided Sharepoint newbie in every sense. I am trying to use the Sharepoint REST services (Sharepoint 2013) to walk the folder and file structure of my Sharepoint server and, determine as I go, the Role Assignments (and subsequently
    Permissions) on those folders and files. I'm using an Administrator credentials and I'm actually able to successfully do it but I've run into some caveats. All the caveats begin with this; when I'm examining a folder, for example:
    /_api/Web/GetFolderByServerRelativeUrl('/sites/cmisdev/Development')/ListItemAllFields
    I receive either an empty list or an error response doc when following the link supplied for ListItemAllFields.  When following that kind of link for folders, I either get:
    <d:ListItemAllFields
    m:null="true"
    />
    or an error response document that says "The object specified does not belong to a list." When I hit the /ListItemAllFields endpoint for files, I receive a response with a link for Role Assignments which subsequently also works and I get the
    info I need. So, is this a bug? Why does the link returned from Sharepoint work for files and not folders? So, google, google, google, and I discover that there is another possible way to get at the Role Assignments (and that the object does, indeed, belong
    to a list!).
    If I know the Title (or the guid) of the folder in question, I can use the following endpoint:
    /_api/Web/Lists/GetByTitle('Development')
    If I use that endpoint, I get the information I would have expected to get from following /ListItemAllFields and the subsequent Role Assignments links all work and I get what I need. If there's a bug and this is how I have to work around it, that's fine
    but I have yet to discover how to dynamically determine the Title of a given folder nor am I sure if all Titles are supposed to be unique within a given Sharepoint server. I'm assuming that the folder name as represented in the server relative URL and the
    Title may be different and this is where my newbishness may start to shine if I'm misunderstanding what a "List" is supposed to be in Sharepoint. Anyway, I did find that I could use the Properties endpoint to perhaps get the Title, for example:
    /_api/Web/GetFolderByServerRelativeUrl('/sites/cmisdev/Development')/Properties
    gives me:
    <d:vti_x005f_listtitle>Development</d:vti_x005f_listtitle>
    whose value I assume I could then supply to the /GetByTitle endpoint and be golden. However, "vti_x005f_listtitle" just sounds a little too deep to be something I should be relying on but maybe that's kosher. That's part of what I'm trying to
    find out. Also, if there is a way to use the Sharepoint REST API to discover the guid of a given object, then I could look it up in that way.
    So, in summary:
    1. Am I going about getting folder Role Assignment information in the wrong way? Based on the CSOM examples I've seen, I believe I'm doing it correctly and that the answer to #2 below is a resounding "Yes!" :)
    2. Is it a bug if I'm not able to use /ListItemAllFields on folders using the server relative url?
    3. If I'm supposed to use GetByTitle as a workaround, am I discovering that Title correctly through /Properties? Seems quite circuitous and awkward. Are Titles required to be unique throughout a given Sharepoint server?
    4. If I'm supposed to use the guid, how can I use the REST interface to discover an object's guid? Once we get down to the Role Assignments and other links, the guid appears in those links but I don't know how to discover it independently if that's the
    path I should use to get the data I described above.

    Upon further research, I'll answer my own question for the benefit of some other potential future newbie.  The answer to question number 1 above is "Not exactly.".  The server relative URLs I was using corresponded to lists (which are
    returned as a collection through /_api/web/lists).  I was treating them mentally like regular folders.  That, coupled with the fact that accessing their data as I showed above returns a ListItemAllFields link, made me think that was the way to get
    the Role Assignments just as I would for files and, as it turns out, "real" folders and sub-folders created under these lists.  That was the other problem with thinking of these lists as regular folders.  So, ListItemAllFields works on
    all files and folders in a list.  However, if you want Role Assignments for the lists themselves, you can keep track of the Titles and\or Guids from the /_api/web/lists that you're interested in (in my case, all non-hidden "document library"
    type lists) and then access those Role Assignments as I discussed in questions 3 and 4 above.  For example, from the /_api/web/lists collection from my test server, the "Development" document library Role Assignments are accessable via /_api/Web/Lists(guid'cd242eeb-aafa-4efa-aecc-9bbdf8e3d459')/RoleAssignments
    or /_api/Web/Lists/GetByTitle('Development')/RoleAssignments.

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

  • Error when calling simple restful service from SOA 11G

    Hi'
    I have a URL for simple restful service
    http://xxxxx:857/swift/v2/EMPIDChanges/{bookmarkDate}
    GET method
    I am able to invoke this from IE and This URL is also accessible in UNIX server where SOA server is deployed.
    http://xxxxx:857/swift/v2/EMPIDChanges/2012-11-28%2005:57:49
    I am using HTTP Binding adapter,
    This is what goes in the composite.xml
    <reference name="ff" ui:wsdlLocation="ff.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/pcbpel/adapter/http/AssetID/Test_AssetID_VL/ff#wsdl.interface(Request_Response_ptt)"/>
    <binding.ws port="http://xmlns.oracle.com/pcbpel/adapter/http/AssetID/Test_AssetID_VL/ff#wsdl.endpoint(ff/Request_Response_pt)"
    location="ff.wsdl" supports="http">
    <property name="http.verb" type="xs:string" many="false">GET</property>
    <property name="endpointURI" type="xs:string" many="false">http://xxxxx:857/swift/v2/EMPIDChanges/{bookmarkDate}</property>
    <property name="http.payload" type="xs:string" many="false">url-encoded</property>
    <property name="oracle.webservices.auth.username" type="xs:string" many="false" override="may">Test1</property>
    <property name="oracle.webservices.auth.password" type="xs:string" many="false" override="may">Test1</property>
    </binding.ws>
    however I am getting error
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="summary">
    <summary>oracle.fabric.common.FabricInvocationException: Unable to access the following endpoint(s): REPLACE_WITH_ACTUAL_URL</summary>
    </part>
    -<part name="detail">
    <detail>Unable to access the following endpoint(s): REPLACE_WITH_ACTUAL_URL</detail>
    </part>
    -<part name="code">
    <code>null</code>
    </reference>
    Please advice,
    Thanks,
    Yatan

    WS Binding: exception durign SOAP invocation: java.util.NoSuchElementException
    Looks like the error is in the data sent to or expected from the service in your composite. Check that audit logs and composite flow to make sure your soap message when using soapui matches what you are working with in soa suite.

  • Setting the charset in dynamic invocation

    I'm on WLS 8.1 SP1. The doc (http://e-docs.bea.com/wls/docs81/webserv/i18n.html)
    shows how to set the charset attribute of the Content-Type HTTP header via the
    client stub. But I am not using client stubs, I'm using dynamic invocation. So
    how do I accomplish the equivalent? I don't see an obvious javax.xml.rpc.Call
    property field for this.
    TIA...
    Mark

    The trouble with this example is that it doesn't use JAX-RPC dynamic invocation.
    The attachment contains an example of what I am trying to do. The method of interest
    is case3(), in which. on lines 294-296, is an (unsuccessful) attempt to set the
    character set. The other methods of interest here are getEMAExceptionServices()
    (which creates the javax.xml.rpc.Service object) and getUpdateExceptionResolutionStatusCall(Service
    iService) (which creates the javax.xml.rpc.Call object).
    [OK, this time I attached something.]
    -- Mark --
    Bruce Stephens <[email protected]> wrote:
    Hi Mark,
    Take a quick look at Manoj's Mega example [1] and see if this clears
    things up. If not, post your code and we can take a look, or speak to
    our outstanding support team: http://support.bea.com or [email protected]
    Thanks,
    Bruce
    [1]
    http://manojc.com/tutorial/mega/client/BindingProperties.java
    Mark Shaffer wrote:
    Bruce,
    If I try to get the "weblogic.webservice.bindinginfo" property froma Call object,
    this exception is thrown:
    javax.xml.rpc.JAXRPCException: unknown property: weblogic.webservice.bindinginfo
    at weblogic.webservice.core.rpc.CallImpl.getProperty(CallImpl.java:322)
    -- Mark --
    Bruce Stephens <[email protected]> wrote:
    Hi Mark,
    Did you try the code in the doc?
    import weblogic.webservice.binding.BindingInfo;
    BindingInfo info =
    (BindingInfo)stub._getProperty("weblogic.webservice.bindinginfo" );
    // The following method sets the Content-Type HTTP header
    info.setCharset( "UTF-8" );
    port.helloWorld();
    Thanks,
    Bruce
    Mark Shaffer wrote:
    Bruce,
    OK, but the disconnect here is that I don't have a BindingInfo object,nor do
    I know how to obtain one. All I have is javax.xml.rpc.* objects.
    -- Mark --
    Bruce Stephens <[email protected]> wrote:
    Hi Mark,
    Your client application can specify the character set that it would
    prefer the Web Service to use in its response by using the
    weblogic.webservice.binding.BindingInfo.setAcceptCharset() method.
    See: http://e-docs.bea.com/wls/docs81/webserv/i18n.html#1069629
    There is example code there as well.
    Hope this helps,
    Bruce
    Mark Shaffer wrote:
    I'm on WLS 8.1 SP1. The doc (http://e-docs.bea.com/wls/docs81/webserv/i18n.html)
    shows how to set the charset attribute of the Content-Type HTTP
    header
    via the
    client stub. But I am not using client stubs, I'm using dynamic
    invocation.
    So
    how do I accomplish the equivalent? I don't see an obvious javax.xml.rpc.Call
    property field for this.
    TIA...
    Mark
    [UTEMAExceptionServices.java]

  • 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

  • Dynamic invocation in Axis

    I've deployed two services, one using framework Axis, one using framework Muse(a web service apache project).
    I want to make a dynamic invocation from Axis to use an operation of Muse, I add the code in the impl document of Axis. Is it possible to do that?
    Thank you in advance.

    first of all, you are invoking the webservice with a string, not with xml.
    secondly, ditch axis and go read a tutorial on jaxws, it will be 10 times easier.

  • Dynamic Invocation: Error The SOAP PA receives a SOAP Fault from SOAP serve

    Hi All,
    I am trying to run the sample code "Dynamic Invocation of Oracle9i Web Services using Oracle UDDI registry"
    I was able to run the web services, publish them, and inquiry them using local UDDI registry.
    However, while invoking any method provided by the web services using the inovk method I get the following error
    oracle.j2ee.ws.client.WebServiceProxyException: Invocation failed 5,100: The SOAP PA receives a SOAP Fault from SOAP server
    Can anybody help me please?
    Regards,
    S.Al Shamsi

    It looks like the problem is occuring on the server side. I guess you have included the stacktrace from the client, can you get hold of the server side stacktrace?

  • Consuming REST services

    Hi,
    Can you please let me know the approach to consume a REST service dynamically. 
    I have a custom orchestration service as described in the below thread. I use BRE resolvers to resolve and set the endpoints runtime on dynamic ports. Also using dynamic transforms.
    http://www.ithero.nl/post/2013/06/02/Creating-a-Custom-Itinerary-Orchestration-Service-for-the-Recipient-List-pattern.aspx
    Now i want to extend this to invoke REST apis as well. Can you please guide to a link or share some ideas on how this can be achieved using BizTalk 2013.
    Also could you please comment on authentication of such requests.
    Thanks,
    Ujjwal
    -Ujjwal

    Hi Ujjwal,
    Here is a useful link for you.
    Calling Restful Service using Dynamic Send Ports – BizTalk 2013
    How to call RESTFULL service using Dynamic Ports with Variable Mapping in
    WCF-WebHttp Adapter
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Reg@ Dynamic invocation of Webservices using an Single Invoke

    Hi ,
    I am trying to implement Dynamic invocation of webservices using a single Invoke .
    Say , i have three webservices = WebA,WebB and Webc .Based on Logic , i need to invoke either of the webservice with an single Invoke .
    In [  ws-addressing.xsd ] there are different elements ,"Address" is for endpoint URL.PortType??ServiceName ?? .
    If i need to make use of this XSD can any one help me to map the WSDL components to this XSD Or lease suggest options if any ??
    Regards ,
    Naga

    http://blogs.oracle.com/dasoa/2010/09/11g_dynamic_partnerlink_example.html
    see the article he's refering too
    eventually you need something like :
    <assign>
    <copy>
    <from>
    <EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2003/03/addressing">
    <Address>http://localhost:9700/orabpel/default/UnitedLoan</Address>
    <ServiceName
    xmlns:ns1="http://services.otn.com">ns1:UnitedLoan</ServiceName>
    </EndpointReference>
    </from>
    <to variable="partnerReference"/>
    </copy>
    </assign>

  • Restful service returning components

    Is there any way, or indeed am I doing something wrong when creating my components, to get components to generate json consistently. The json I'm returning will have the first letter capitalized and the rest lower case when returning the component from the restful service however all capitalized when calling the compoent remotely.
    Some demo components as below:
    User.cfc
    component {
         property type="numeric" name="userid";
         property type="string" name="username";
    Users.cfc
    component output="false" restPath="/users"
         remote User function getByPK(required numeric id restArgSource="Path") output="false" httpMethod="GET" restPath="{id}"
              user = new user();
              user.userid = 1;
              user.username = "Chicken";
              return user;
    Output:
    /rest/users/1.json
    {"Username":"Chicken","Userid":1.0}
    /rest/users/1.xml
    <COMPONENT ID="1" NAME="User">
    <PROPERTY NAME="USERNAME" TYPE="STRING">Chicken</PROPERTY>
    <PROPERTY NAME="USERID" TYPE="STRING">1</PROPERTY>
    </COMPONENT>
    /Users.cfc?method=getByPK&id=1&returnFormat=json
    {"USERNAME":"Chicken","USERID":1}
    Is this simply a quirk I have to put up with?

    Hello Jereme,
    I've a similar requirement and trying to perform HTTP GET thorugh PI 7.31 HTTP Java adapter, My target URL looks like
    https://abc.com/api?filterFields=<FilterFields><FilterField><Id>26</Id><Value>1/1/2013,12/31/2013</Value></FilterField></FilterFields>
    I've configured my HTTP receiver adapter (Java) as below
    Addressing mode - URL address
    Target Host - https:abc.com
    Target port: 8080
    Path - /api
    Where should I mention the query path - ?filterFields=<FilterFields><FilterField><Id>26</Id><Value>1/1/2013,12/31/2013</Value></FilterField></FilterFields>
    Actually values inside the tag Value is dynamic and will be populated in message mapping,
    What should be the value of Main Payload Parameter Name in the adapter?
    Thanks in advance for your help.

  • Dynamically invoking a web service.

    How can i dynamically invoke a web service using jax-ws proxy?

    We will need more information on your use case.
    Typically, a JAX-WS proxy refers to the Java Proxy object that implements the interface for your port. If this is what you have then you could dynamically invoke it using reflection.
    However, if you really want to do dynamic invocation then you should look at the Dispatch interface. You can get a Dispatch instance from your Service object and use this to issue raw requests using SOAPMessage or streams. This will require that your application have expertise in generating SOAP requests from the WSDL of the target endpoint, but this is what is typically done in enterprise service bus type products.
    If that's not your use case, let us know.

  • Array of String for input paramter + dynamic invocation

    Does anybody know a place I can find an example of web service
    using the following methods:
    1. Array of String as input parameter
    2. Client uses dynamic invocation
    Specifically, 1. how do I define the parameter type in web-services.xml?
    2. how do I refer to the type in a client code?
    Thanks,
    Hong

    Hello,
    The doclitparam interop round 3 example does a echo string array.
    http://dev2dev.bea.com/managed_content/direct/webservice/r3server.zip
    Also there is a DII example in the WebService Wizard's archive:
    http://dev2dev.bea.com/managed_content/direct/webservice/wswa.html#qz29
    HTH,
    Bruce
    Hong wrote:
    Does anybody know a place I can find an example of web service
    using the following methods:
    1. Array of String as input parameter
    2. Client uses dynamic invocation
    Specifically, 1. how do I define the parameter type in web-services.xml?
    2. how do I refer to the type in a client code?
    Thanks,
    Hong

Maybe you are looking for