Web Services as Background Callable Objects?

Hi everybody,
is it possible to use an Web Service as an Background Callable Object? And if it is possible, how can I do it?
For your background: If the Web Service throws an Exception, I want to handle it. My goal: The next step after finalizing the exception handler action will be the
action (WebService) that reported the exception. Or is there any other possibility? 
Thanks,
Stefan

Hi Stefan,
For repeating the WS Call after the exception handler, you can use the "repeat" strategy. When defining the exception handler, you can choose between "continue" and "repeat".
Check this page : <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/44/10a066e3650d19e10000000a114a6b/frameset.htm">Exception Handling in GP</a>
For using Web Service as Callable Object, check this out! <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/44/4758351fcb1193e10000000a155369/frameset.htm">WS in GP</a>
When specifying repeat, the action will be started again. If continue, the next action will be processed.
Hope this helps,
Best regards,
David

Similar Messages

  • GP / Background Callable Object / KM

    Hello,
    I have implemented a background callable object ("IGPBackgroundCallableObject"), which will be used by a GP.
    I need to create new resources in KM, but I don't know how.
    Hope anyone can give me some clues.
    Regards.
    Mathieu

    Hi,
    Thanks for answering.
    I have already done some dev with KM API (repository filters, km services, etc), but it's my first one with CAF.
    My problem is that I thought I could use "ResourceFactory", "Resource", etc, but I don't know how to import them in my project.
    For example, when I develop a KM service, I just add the jars I need to my "par" project, here I create a new "development component", and I tried to add some "Used DC" but I don't know which one I have to add...
    I hope it's clearer.
    Mat'

  • Problem with Background Callable Object

    Hi All,
    I am trying to create a background callable object in GP. From my understanding and according to the help document here is what I did:
    - Generated a deployable proxy development component using the Top down approach.
    - Created a Java Development component which implements the interface IGPBackgroundCallableObject. This Development component has the proxy object generated in Step 1 in the Used DCs. Internally this class does a JNDI lookup to the deployed Webservice Client and executes the webservice. Then I add this class as a public part in the Development Component.
    - Create a J2EE Library that has the public part of the class generated in Step 2 as the Used DCs.
    - Deploy the Library and use that in the GP Design time to create the Callable object.
    Following are the problems that I am facing:
    - The Java class that consumes the deployable proxy does not seem to recognize the classes that are present in the proxy object. Even though there is a reference to it.
    - If we try to include the proxy project in the Java Build path of the class it simply removes the link at build time.
    - At one instance it somehow succeeded during the build phase and I deployed the library to the J2EE engine but while testing the callable project it came up with a NoClassDef exception. Basically it was unable to find the proxy object’s classes.
    I am not sure if I am doing anything wrong or the process that I am following is not right. I would appreciate if anyone could help me understand what the problem is and how do we go about achieving the above scenario.
    Best regards,
    Sudhi

    Hi Jorgen,
    This behavior is completely normal. It can seem awkward but what you described is somehow logical.
    Let's say you have three actions, the second one is the email notification. When completing the first action, the second action is triggered. As it is a background callable object, it is put into the queue and wait for processing. As the refresh of the screen is faster than the processing of the callable object, the next action (the third) is not yet active/ready to be processed.
    When the email is sent (i.e. the background callable object executed), a callback takes place and the next activity is triggered. Then, the 3 action is active and can be shown.
    Due to technical restriction of Web Dynpro, it is not possible to refresh the screen when the action is ready to be processed. The user has to refresh it explictly.
    With SP12, the processing of the queue has been improved and it's much more faster than before. The "problem" you noticed shouldn't be there anymore.
    Hope this helps.
    David

  • GP Background callable object. Error while making a Callable object

    Hi,
    I have implemented a Background callable object and deployed it to the server.
    When I try to make a Callable object of this from the Design Time tab in GP, i get the following error msg.
    *Class does not correctly implement the required interface*
    The detailed error msg is as follows
    Full Message Text
    Unable to load the required classes. Check all the references to other modules, especially the GP API
    com.sap.caf.eu.gp.base.exception.EngineException: Unable to load the required classes. Check all the references to other modules, especially the GP API
    at com.sap.caf.eu.gp.model.svc.impl.EngineClassloaderImpl.isClassAvailable(EngineClassloaderImpl.java:101)
    at com.sap.caf.eu.gp.ui.co.config.bkgd.COCfgSelect.OnCanLeaveScreen(COCfgSelect.java:293)
    Pls help.
    Tx in advance

    The problem was resolved after retrying many times. Code was checked again and redeployed. Server restarted as well. GP objects deleted and steps repeated. It worked in the end.

  • Invoking a AXIS Web Service with a Java object as input argument

    Hi
    I've been trying to execute a bpel process that invokes a web service deployed through axis.
    This web service takes a java object as input argument as opposed to data types that are directly mapped to java types through the SOAP engine.
    I deployed and tested the service outside of BPEL using a test client class. Everything works well.
    When I try to configure the "Assign" and "Invoke" activities so that service can be invoked, I cannot see the data structure through the variable picker and I see the following message:
    "The element {urn:ComplexTypeWebService}TimeSheetBean is not know to the schema container. Perhaps a schema file that uses it needs to include or import its definition.There mat also be an XML schema issue (non resolvable schema) which prevents {urn:ComplexTypeWebService}TimeSheetBean from being seen by the schema processor."
    Is there any example that demonstrates how to invoke an axis web service in such scenario? What am I doing wrong?
    Please, let me know.

    The passing of Java objects in and out of a web service is NOT supported. variables must be xml documents defined by a XML schema. In my opinion, missing Java object and WSDL is not a good idea. -Edwin

  • SAP Cloud Application Studio Create Custom Web Service From Custom Business Object and Consume in External System

    Hi Experts,
    I have requirement to create custom business object and create Web Service for that and use in external system (SAP ECC / SAP CRM / Third Party).
    1) Is it possible to create custom object web service and used in external system ?
    2) When we create the Web service from custom business object what the necessary steps(action : Create , Read , Update) require?
    3) Sample Scenario :
    My Custom Business Object
    businessobject Custom_Integration {
      element EP_VAL1 : LANGUAGEINDEPENDENT_MEDIUM_Text;
      element EP_VAL2 : LANGUAGEINDEPENDENT_MEDIUM_Text;
      element IP_RES : LANGUAGEINDEPENDENT_MEDIUM_Text;
    I have created the Web Service using this custom business object.
    3) How i can use this web service in external system? what are the prerequisite steps in external system to consume this service in it?
    Please anyone have idea about this how to do this and how to achieve this using SDK and custom business object.
    Many Thanks
    Mithun

    Hello Mithun,
    Does this section in the documentation help you:
    SAP Cloud Applications Studio Help -> Developers Desktop -> Web Services
    The entry "Task -> Create a Web Service" describes how to create a Web Service on your own BO
    The entry "Task -> Test a Web Service" helps you how you can use it in a foreign tool / application.
    HTH,
       Horst

  • Can we create a Web Service from a Business Object??

    Hello All,
    Has anyone created a Web Service using a Business Object?
    When I am trying to create a Web Service in TM box, I can see that couple of options like Business Objects, Process Agents are disabled and rest like Consumer Group, Service Provider are enabled. Any idea why this is happening. Is this related to some configuration setting.
    Regards,
    Abhishek

    please elaborate in which environment or case you are creating Web Service from Business Object.As per my understanding we generally create web service through Wizard.
    Thanks
    Snehasish

  • Model in Background callable object

    Hi Gurus,
    Currently we have an application where a Scheduled background callable object is used , that does some table updation to SAP R/3 backend. Now all the connection parameters are maintained in property files and JCO connection is created through java coding and with JCO API. Is there any possiblity to used Model in Background callable object so that , we could have used our common jco destionations and connections . Please suggest.
    Thanks in Advance.
    Tony Isaac.

    Couldn't find a solution, in this case a new solution was developed which then had nothing to do with the callable object.

  • Background callable object :Error

    Hi,
    I created one background callable object in webdynpro,
    to be called from GP design time.
    I have done this using the tutorial :
    "Implementing Background callable object"
    Deployement finished successfully.
    But from GP design time, while creating callable object
    of type backround execution,  I selected,
    container type : library
    container : apibckg(deployed DC of type J2ee server
               library)
    implementation class name : the java class which implemented background callable object.
    But error in gp: is
    "Cannot find this class name"
    In webdynpro after building the project I got the warnings:
    Nov 3, 2006 11:57:13 AM /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] WARNING: apibckg: built with warnings sap.com/apibckg(MyComponents) in variant "default" (1.406 sec)
    can any bdy help me
    thanks
    smitha

    Hi Smitha,
    You just need to repeat the steps described in the tutorial, i.e. define the references and create a class that implements the GP Background callable object interface.
    Don't forget to define the sub-type of the library in the .dcdef file.
         <component-type>
              <vendor>Your vendor</vendor>
              <type>Java</type>
              <sub-type>Library</sub-type>
         </component-type>
    Then add a new empty file named "build.vm" under the folder "cfg". Add the line "#BuildSecondaryLibrary()".
    Then build and deploy. It should be there.
    Regards,
    David

  • "cannot find this class" erro while creating Background Callable Object.

    Hi All,
    I am facing "cannot find this class" while creating Background Callable Object.
    I followed the following document for Creating Background Callable Object.
    [Creating Callable Objects for Background Execution|http://help.sap.com/saphelp_nwce10/helpdata/en/53/cde385301f4aa3b8e77a92cd46bff3/frameset.htm]
    After giving the fully qualified java class name in the Implementation Class Name when i press next i am getting the error.
    Please suggets me in solving this issue.
    Regards,
    S.V.Satish Kumar
    Edited by: Sathish Kumar SV on Apr 4, 2009 10:34 AM

    Hi, kavita.
    First, make sure you choosed the correct container when you created the background CO.
    Second, make sure your package name was "com.examples.bckgco" and class name was "UserDetailsCallableObject". The exception  which you got just means you entered incorrect name.
    It doesn`t relate to your program.
    Best Regards.
    Louis Huang.

  • Implementing and Exposing a Background Callable Object

    Hi,
    I am following tutorial "Implementing and Exposing a Background Callable Object" of NWDS 7.1. I created implemented Java Enterprise Application and deployed. When i try to create Callable object in GP i am getting error saying "Cannot find this class name". Any solution for this please?
    Thanks,
    Songa

    Hi,
    I Have same problem, can anyone help me ?
    I tried the tutorial example for creating "Implementing and Exposing a Background Callable Object". In NW portal, i received message, "Cannot find this class name", when i try create callable objekt.
    Thanks,
    Nicholas

  • Create a web service according to business object 'BUS2012'

    Hi,
    I want to create a web service according to business object 'BUS2012'.But I can't finish it using wizard.System always tell me 'Time limit exceeded.'Who can give me any idea?
    Thanks & Regards
    Kelvin

    Hi ,
    check this article in the site :****************
    Regards,
    Suryanarayana

  • Background callable object :  can not find this class name

    Hi All ,
                  I am following this tutorial link for creating background callable object
    http://help.sap.com/saphelp_nwce10/helpdata/en/9a/e8934258a5ca6ae10000000a155106/frameset.htm
    I have created java and enterprise application DC and deployed successfully. But while creating CO in design time when i am selecting application and entering class as com.examples.bckgco.UserDetailsCallableObject  for Implementation Class Name , and on click next i m getting exception as  "can not find this class name".       package and class name are correct still getting this excetpion message. Plz help me to resolve this solution.
    Regards
    Kavita

    Hi, kavita.
    First, make sure you choosed the correct container when you created the background CO.
    Second, make sure your package name was "com.examples.bckgco" and class name was "UserDetailsCallableObject". The exception  which you got just means you entered incorrect name.
    It doesn`t relate to your program.
    Best Regards.
    Louis Huang.

  • Problem with web service that returns an object with a String that have som

    Hi everybody:
    I have a problem with a web service I am doing, I have made a web service that returns a collection of objects, the objects have a set of properties, there is one property that is a String,this property consists in a text fragment that could have some characters that are considered special in XML like &, <, >, " and that's why when I execute the service from a client an exception is thrown:
    {code}
    Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
    at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
    at org.codehaus.xfire.client.Client.invoke(Client.java:336)
    at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
    at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
    at $Proxy0.search(Unknown Source)
    at cu.co.cenatav.webservices.client.Client.main(Client.java:26)
    {code}
    I know that this is happening because special characters are sent by the soap message but I don't know how to solve this problem.
    How could I avoid this exception ?
    I hope you can help me.
    Regards.
    Ariel

    Hi,
    BPEL and BPEL PM do not have a good support for SOAPENC-Array: it would be very difficult to create such an array in BPEL or to receive it and manipulate it.
    The (unfortunately very intrusive) work around is to change the WSDL of the service to use a XML type defined using XML schema. This is all the more painful that JDev 9.0.4 does not have strong support for complex types.
    In general though, I would highly recommend this best practice:
    1) Start by define the WSDL contract first
    2) Then generate the server side skeleton to implement it
    3) Use BPEL as the client to this contract.
    By starting with the contract first, you make sure that 1) your interfaces are clean and coarse grained.
    2) things like java objects, sessions, etc to not leak through the interface (which would be the worst thing that could happen because it would closely link the client and the server.
    Sorry for not being more helpful. This will get radically cleaner in Oracle AS 10.1.3.
    Edwin

  • Weblogic - a web service with java.lang.Object parameter

    hi all,
    i'm creating a web service with a java.lang.Object parameter.
    my question is as follows:
    when a client calls the web service, how to i get the soap message object and convert it to soap message string using the parameter?
    thanks,
    alex

    Here's some code from one of the Axis samples, this shows the basic process of making a call:
    package samples.message;
    import org.apache.axis.client.Service;
    import org.apache.axis.client.Call;
    import org.apache.axis.message.SOAPBodyElement;
    import org.apache.axis.utils.Options;
    import org.apache.axis.utils.XMLUtils;
    import org.w3c.dom.Element;
    import java.net.URL;
    import java.util.Vector;
    public class TestMsg {
    public String doit(String[] args) throws Exception {
    Options opts = new Options(args);
    opts.setDefaultURL("http://localhost:8080/axis/services/MessageService");
    Service service = new Service();
    Call call = (Call) service.createCall();
    call.setTargetEndpointAddress( new URL(opts.getURL()) );
    SOAPBodyElement[] input = new SOAPBodyElement[2];
    input[0] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo",
    "e1", "Hello"));
    input[1] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo",
    "e1", "World"));
    Vector elems = (Vector) call.invoke( input );
    SOAPBodyElement elem = null ;
    Element e = null ;
    elem = (SOAPBodyElement) elems.get(0);
    e = elem.getAsDOM();
    String str = "Res elem[0]=" + XMLUtils.ElementToString(e);
    elem = (SOAPBodyElement) elems.get(1);
    e = elem.getAsDOM();
    str = str + "Res elem[1]=" + XMLUtils.ElementToString(e);
    return( str );
    public static void main(String[] args) throws Exception {
    String res = (new TestMsg()).doit(args);
    System.out.println(res);

Maybe you are looking for