Direct service calls in java-driven components

Hello all,
I am new to WebCenter Content customization and have run into a problem I have trouble with solving correctly.
Context
I try to concentrate as much logic in ordinary java (and perhaps an ini or yaml file) and avoid the more unknown .hda and the customized .htm files.
I experimented with creating a service class, service handler and filter. No biggies there apart from the difficult and slow debugging.
The long list of UCM/URM services and complexity of these services themselves made me inclined to write a different API to make UCM/URM programming fun; e.g. an adapter to simplify and abstract away from the standard service API. Think in terms of "checkin(...args...)" so I can rely on the IDE hints to develop faster.
Infrastructure should be either Linux or Windows Server.
Problem
I have not been able to call UCM/URM services directly from java in UCM/URM components yet.
Question
What is the best way to go about this?
Perhaps I'm reinventing the wheel, if so please enlighten me. To me it feels what I'm trying to do should be a basic feature but for now I've missed it completely. If it's not as simple as that I'm wondering why.
I did find documentation on IdcCommand which relies heavily on .hda, a lengthy installation and even duplicating intradoc.cfg which is bound to give someone a headache at some point.
I also read some documentation on UCPM API for JavaEE, but I'm not using JavaEE.
If anyone knows what I've been missing out of, your help is much appreciated!
Edited by: Niels Krijger on Sep 18, 2012 4:58 AM
Edited by: Niels Krijger on Sep 18, 2012 5:03 AM

Thank you! RIDC appears to be exactly what I was looking for.
I also discovered I've been looking at the wrong documentation. I was looking in:
Oracle® Fusion Middleware Developer's Guide for Content Server
http://docs.oracle.com/cd/E14571_01/doc.1111/e10807/toc.htm
instead of
Oracle® WebCenter Content Developer's Guide for Content Server
http://docs.oracle.com/cd/E23943_01/doc.1111/e10807/toc.htm
While the first mentions RIDC very briefly (I didn't think much of it then) the latter is much more helpful.
Thank you very much.

Similar Messages

  • Service call exception java.lang. missing soap end tag..

    Hi Experts,
    I did the soap to rfc sync interface and Create the java deployble client proxy application in nwds. In Nwds i maintaine the PI parameters message server host,port and exectue the application. it is working fine. but i was deploying the another j2ee engine server messager server host name and port parameters I am getting the error. that is Service call exception java.lang. mising soap end tag.
    Could you help me.
    Thanks & Regards,
    Veera

    hi,
    restarting the java stack would be enough. You can do that at SMICM. Before you should deregister all queues in SMQR so that incoming messages has to wait in the queue. Of coz all synchronous msgs would fail, as well messages going to your Java Inbound Adapters.
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • Web Service call from java UDF in message mapping

    Hi,
           Is it possible to call a web service from inside a java UDF in message mapping? The webservice can be any standard one. If this is possible please let me know how this can be done.
    Regards,
    Shiladitya

    Hi Shila,
                 Hope u remember me
    Here is the standard code used to call webservice from Java UDF
    public String setSoapAction(String SOAPAction,Container container){
    try{
    DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey soapurl = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/SOAP" , "THeaderSOAPACTION");
    conf.put(soapurl, SOAPAction);
    return "";
    }catch(Exception e){
    e.getMessage();
    return "";
    Regards,
    Arijit

  • Axis Client Web Service call problem: java.io.IOException: Stream closed

    Hi, I tried to call a webservice from Axis Client, and I encounter the following error. Do you guys have any idea what actually happens?
    Please help, I am newbie in web services.
    ==============Root Cause===============
    AxisFault
    faultCode: { h t t p : / / schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.io.IOException: Stream closed
    faultActor:
    faultNode:
    faultDetail:
         {h t t p : / / xml.apache.org/axis/}stackTrace:java.io.IOException: Stream closed
         at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
         at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
         at java.io.FilterInputStream.read(FilterInputStream.java:111)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:688)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:796)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:224)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
         {h t t p : / / xml.apache.org/axis/}hostname:compname
    java.io.IOException: Stream closed
         at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:301)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)     
    Caused by: java.io.IOException: Stream closed
         at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
         at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
         at java.io.FilterInputStream.read(FilterInputStream.java:111)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:688)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:796)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:224)
         ... 17 more  I am calling through proxy, the setting is as follows:
                System.setProperty("https.proxyHost", [proxyname here]);
                System.setProperty("https.proxyPort", [proxyport here]);
                System.setProperty("http.proxyHost", [proxyname here]);
                System.setProperty("http.proxyPort", [proxyport here]);

    Are there any problems showing up in the server's log?

  • Workflow step (Approve Action) calling custom Java Service and "passing params"

    Good Afternoon, Fellow Coders!
    Normally I research and do proof of concepts until I find a solution but given super tight deadlines, I just don't have time - so I need your help.
    I am trying to have an Workflow Approve Action (Workflow Exit Event idocScript call) call a Custom Component (Java Service) AND "pass" some kind of parameters (bare minimum dDocName)
    In a perfect world it would be as simple as:    processContentInfo(String dDocName, String xMyCode1, String xMyCode2);
    But since I am calling the Java Service from idocScript (via executeService) I cannot directly pass params via the API.
    Is there a simple way to do this??
    It seems like if you can't directly pass params you could at least set them in the managed container (m_binder) and just know to pick them up on the Java side via some DataBinder like m_binder.getLocal(
    Am I missing a simple idocScript function that will let you do this?
    Note: I am NOT executing the Service from a URL so the normal ?param1&param2 -> m_binder.getLocal  solution is no good.
    Also, Bex's book warns about Service Classes "not easily being able to call other UCM Services"....  My Custom Service needs to do exactly that (as well as JDBC and other stuff). Is this really an issue??
    Seems like as long as I have dDocName I could use RIDC to hit whatever I want as long as I know how to use a binder, etc - is there some mystic nuance that prevents this?  Or was he just saying it's hard UNLESS you know RIDC well??
    Any and all quality advice is appreciated!  And please, try to give me a detailed answer as opposed to something vague like "try a Service Handler", I need something I can quickly digest.
    Thanks in advance!

    You can set parameters for the service call by setting Idoc Script variables before you call executeService.
    <$dDocName="TEST12345"$>
    <$param1="09876"$>
    <$param2="ABCDEFG"$>
    These variables are then available via the service DataBinder.
    Here is information about how to execute a service from a custom component. There should not be any issues doing this.
    http://www.redstonecontentsolutions.com/5/post/2012/05/executing-a-service-from-aservicehandler.html
    http://jonathanhult.com/blog/2012/06/execute-a-service-from-a-java-filter/
    Jonathan
    http://jonathanhult.com

  • Why Service Call and why not call Function module Directly in WD ABAP

    Hi,
    I have created a Webdynpro applications and the logic requires calling avrious Function modules.
    Do I need to create Service Call for each Function module or call them directly.
    It would be great if you can suggest me under what cases I need to opt for Service call
    For example, if I use 'RP_CALC_DATE_IN_INTERVAL', do I need to use Service call or call function module directly.
    Note: I have searched forums but could not get the correct answer which I want
    Thanks!

    The Service Call is really meant to be a wizard/time saver.  It has the advantage that it can generate matching context nodes/attributes for the interface of the Function Module you are calling. However everything that the service call does can also be created by hand.
    Personally I'm not a fan of what the service call wizard generates.  Its good as a time saver or for beginners, but I find I prefer to touch up the code it generates anyway. I much prefer to create a nice reusable model class with its own unit test and then consume this model class (with the service call wizard) from WD.  This model class might contain one or more function module calls depending upon what logic I need to access.

  • Calling a soap web service from a java desktop application

    Hi,
    Does anyone know how to call a soap web service from a java desktop application? I've seen examples using Apache Axis, but it sounds like Axis needs to run on a web server and we are trying to avoid that. My initial thought was that, "of course we need a web server", but I'm wondering if there is a way to do this without a web server.
    Any help is greatly appreciated.
    thank you,
    Julie

    If you are the consumer you don't need any web server. The web server is only needed in the provider end.
    In java 6 there is a built in framework to call web services without the need of third parties (such as apache axis)
    take a look at:
    https://jax-ws.dev.java.net/guide/Developing_client_application_with_locally_packaged_WSDL.html
    http://java.sun.com/webservices/technologies/index.jsp
    For the provider end there is also a built in http server to expose web service via HTTP without the need to
    use any external web server.
    take a look at:
    http://java.sun.com/javase/6/docs/api/javax/xml/ws/Endpoint.html

  • Java service call from webdynpro

    Hi,
    Pls provide me some doc/info on how to call java service from abapwebdynpro platform.
    Thanks in advance.

    Call a web service isn't really a function of WDA.  We have the service call wizard, but it only is a code wizard for generating the code to call a proxy class. It doesn't generate the web service proxy.  There is nothing special needed for WDA to interact with Web Services.  Follow the normal ABAP guides for generating web service proxies and then you can reuse this proxy class in WDA.

  • JDeveloper 10g 10.1.3 Web Service Question: java web service calls another

    I am looking for what I think should be a simple example/tutorial but so far no luck. I am using JDeveloper 10g 10.1.3 and the Oracle Application Server.
    I want to do this:
    - create a simple Java web service
    - deploy it
    - create another simple Java web service, that makes a call to a method on the first service
    - deploy it
    client->WSfront->WSback
    I want to keep this as basic as possible.
    Although I have found examples of how to create a web service proxy, there are no examples that I have found that show how to use that proxy in another web service:
    I did what I thought were the right things; generated a proxy for the first web service, and used that proxy in the second web service's source Java class. However when I deployed and tested many classes were missing: all the classes the proxy class depends on.
    I actually managed to get something like this working but had to manually create the .ear and .war files for WSfront, explode the archives, and manually add the missing classes to its WEB-INF/classes.
    I am comparing this to things like Weblogic Workshop in which doing this exercise is a snap.
    Is there a simple graphical way to do this in JDeveloper?

    Hello again,
    I am quite surprised I got no responses to my query below.
    Can anyone explain how I might do this?
    Please feel free to respond to [email protected]
    I am looking for what I think should be a simple
    example/tutorial but so far no luck. I am using
    JDeveloper 10g 10.1.3 and the Oracle Application
    Server.
    want to do this:
    create a simple Java web service
    deploy it
    create another simple Java web service, that makes a
    call to a method on the first service
    deploy it
    client->WSfront->WSback
    want to keep this as basic as possible.
    lthough I have found examples of how to create a web
    service proxy, there are no examples that I have
    found that show how to use that proxy in another web
    service:
    I did what I thought were the right things; generated
    a proxy for the first web service, and used that
    proxy in the second web service's source Java class.
    However when I deployed and tested many classes were
    missing: all the classes the proxy class depends
    on.
    I actually managed to get something like this working
    but had to manually create the .ear and .war files
    for WSfront, explode the archives, and manually add
    the missing classes to its WEB-INF/classes.

  • Web service calling java Caps

    Hi,
    I have developed a web service application in java caps 5.1.3 and can able to call that from the client successfully.
    But I dont want to create web service in java caps 5.1.3, the web service should run in weblogic server and the business logic it used should run in java caps.
    How should be the communication between web service and java caps
    please suggest

    Could you please paste your WSDL?

  • How to call web-service using only java code

    Hello, how to call web-service using only java code. I can call it from BPM process or Web Dynpro Java Application, but if I need to call it from ejb component?

    I'm found answer:
    Java and SAP Portal blog: How to call web service from java code example

  • [Best practice] How to call a service from custom Java code

    Hi all,
    I'm wondering what the best method is to call a standard service from custom Java code?
    In a specific situation iDoc script is extended with custom functions with a custom component. There's Java code mapping to these functions that is executing these functions. The iDoc script functions are called from a workflow entry script.
    In the Java code that runs when the custom iDoc functions are called, I want to call a standard Content Server service. I don't think that the m_service variable is available, so filling the binder and using m_service.executeService() probably isn't possible.
    Also, if it were possible (that is, if I want to call a standard service from my own custom service Java code), what would then be the best method to do so?
    Regards, Stijn

    Hi Sapan,
    Let me explain a bit further.
    I'm an UCM consultant trying to solve a problem that occured at a client when they installed the CS10gR35CoreUpdateBundle.
    Content items are entered into a Workflow when they are checked in. Part of one of the entry scripts of the a workflow step is that related content to the content item in the workflow is (re)submitted for conversion.
    To achive this, a custom component provides an iDoc script extension. This iDoc function (resubmitForConversion) is implemented in Java (the class extends ScriptExtensionsAdaptor).
    In this Java method, first the related content items are fetched. Then the service RESUBMIT_FOR_CONVERSION should be called for all dID's in of the related content.
    Thus, at a certain point in the custom Java code, a native Content Server service must be called. Of course the class of this Java code does not extend the Service class, so the m_service object isn't available.
    The thing is: before installed the 10gR35CoreUpdateBundle everything worked OK. This code was used to execute the service:
            Workspace workspace = CommonUtils.getSystemWorkspace();
            String cmd = binder.getLocal("IdcService");
            if (cmd == null) throw new DataException("!csIdcServiceMissing");
            ServiceData serviceData = ServiceManager.getFullService(cmd);
            if (serviceData == null) throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
            Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
            UserData fullUserData = CommonUtils.getFullUserData(userName, service);
            service.setUserData(fullUserData);
            binder.m_environment.put("REMOTE_USER", userName);
            ServiceException error = null;
            try {
                service.setSendFlags(true, true);
                service.initDelegatedObjects();
                service.globalSecurityCheck();
                service.preActions();
                service.doActions();
                service.postActions();
                service.updateSubjectInformation(true);
                service.updateTopicInformation(binder);
            } catch (ServiceException e) {
                error = e;
            } finally {
                service.cleanUp(true);
                if (!CommonUtils.isWorkspaceConnectionInTransaction(workspace)) {
                     workspace.releaseConnection();
            }the first problem was that the CS began to complain that a transaction was started within another transaction. So I suspect that the 10gR35 update wrapped a transaction around a workflow script entry.
    With some decompiling I figured out how a service is called from iDoc with the <$executeService()$> command. So I replaced the code above with:
                  String cmd = binder.getLocal("IdcService");
                ServiceData serviceData = ServiceManager.getFullService(cmd);
                if (serviceData == null) throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
                Workspace workspace = CommonUtils.getSystemWorkspace();
                Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
                UserData fullUserData = CommonUtils.getFullUserData(userName, service);
                service.setUserData(fullUserData);
                binder.m_environment.put("REMOTE_USER", userName);
                service.initDelegatedObjects();
                service.executeSafeServiceInNewContext(cmd, true);This solved the transaction problem but introduces another problem: !csUnableToResubmitItem,(null)!csIllegalScriptAccess,RESUBMIT_FOR_CONVERSION
    The Service Reference Guide says that the access level for RESUBMIT_FOR_CONVERION is 33 (Read, Scriptable). However, in shared/config/resources/std_services.htm the access level is specified as 2 (write).
    Thus, my question still is:
    What is the best method to call a standard Content Server service from any Java code (so without extending the Service class, or having the m_service object available)?

  • Service call exception; nested exception is: java.lang.IllegalMonitorStateE

    Hi All,
    when we try to run the Message Monitoring in our RWB then we get the following error:
    Service call exception; nested exception is: java.lang.IllegalMonitorStateException
    Has anybody of you an idea what this error occurs?
    Thank you for the support..
    Kind Regards
    Markus

    hi,
    restarting the java stack would be enough. You can do that at SMICM. Before you should deregister all queues in SMQR so that incoming messages has to wait in the queue. Of coz all synchronous msgs would fail, as well messages going to your Java Inbound Adapters.
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • Web services call directly from SAP ?

    Hi ESA Experts,
    Is it possible to make a web service call directly from a SRM or SAP R3 system without using SAP XI ?. If so, have you some code samples ?
    Thanks a lot for your response.
    Best regards
    Etienne

    Hi, Etienne.
      There are two things to do.
      1. Prepare Service Provider
      For providing services, there are many tools to publish as web services
    from BAPI, RFC and Enterprise Services.
      Please look at here.
      help.sap.com - Web Service Toolset
      http://help.sap.com/saphelp_nw04s/helpdata/en/db/99c04ba22fe64f96a8651df68eab92/frameset.htm
      i recommend Web Service Creation Wizard as first step.
      2. Prepare Service Consumer
      Also has many tools. What i like is WS Navigator for basic test of web services.
      help.sap.com - Web Service Homepage
      http://help.sap.com/saphelp_nw2004s/helpdata/en/b7/d7baaf1481a349ab723e3acd7334b3/frameset.htm
      Best Regards.

  • HELP!!! Problem of Calling external Web Service from a Java Stored Procedur

    1.I read the topic on http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html about Calling external Web Service from a Java Stored Procedur.
    2.After I import .jar to Oracle what is required by the topic,som error occued.
    Like: ORA-29521: javax/activation/ActivationDataFlavor class not found,
    ORA-29545: badly formed class.
    3.These is not enough .jar required on the topic? What can I do for ORA-29545: badly formed class?
    Thany you!

    Try this
    Re: HELP! Loading Java Classes into Oracle ERROR

Maybe you are looking for

  • MouseEvent and external SWF

    I'm loading an external SWF to use as a "skin" (no components are involved, only MovieClips). The external SWF contains a number of MovieClips, each exported for Actionscript and with an associated class. One of these classes is, for example, called

  • I cant sign in icloud for my apple 4s 64 gb

    how can you help me with it i have purchased 2nd hand

  • Change namespace for development objects

    hi at all, i have to transport a lot of customer development objects (reports, tables, programs, WebDynpro-components...) from one system to another development system. in the source system all customer-objects are named like Y* or Z* (e.g. Z_CM_COUR

  • How to see ASP/VBScript variable names inline

    When you use an ASP output in a form control (like <%=Submit_Button_Label%>), you can easily see on the page what you've done. This doesn't work for ASP outputs in the rest of the page--all you see are "ASP" graphics all over the place. I'm in the pr

  • Problem with attachMovie

    I have a movieClip that is a rounded rectangle, with 9-scale slicing turned on, and a linkage of "border" in my library, set to export in first frame. I am attempting to place this as a background behind a code-created text field. My code is as follo