How to start a batch job through a web service call

I have a batch job created Data Services that I would like to be able to start through a web service call.
I have exposed the batch job as a Web Service through the mangement console.
The Integrators guide is not the clearest piece of documentation that I have ever read so I'm now having a little trouble.
In C# I'm issuing the following statements:
            DataServices.Batch_JobsClient batchClient = new DataServices.Batch_JobsClient();
            batchClient.Open();
            DataServices.Testjob_Match_GlobalVariables myVar = new DataServices.Testjob_Match_GlobalVariables();
            myVar.ptd_FilePath = "D:
Jobs
Test";
            batchClient.Testjob_Match(myVar);
That all executes without error -- but the job is not started. Obviously I'm missing a step here but I can not figure out what is needed to acutally start the job execution from the Integrators Guide.
Any help would be appricated.

first test invoking the batch job webservice using SoapUI
does your client application logs the SOAP message that is sent to DS WebServer ?
Check the %LINK_DIR%\lg\webservices.log if there is any errors logged in it ?

Similar Messages

  • How to create a batch job through coding

    Hi Experts,
    How to create a batch job through coding?
    Regards
    Saroj

    Hi, below is the code.
    ***Create Variant for the job
    ***Get the dynamic variant name
      DATA: variant_name TYPE  varid-variant value 'test'.
      DATA: vari_desc LIKE varid,
            vari_contents LIKE rsparams OCCURS 0 WITH HEADER LINE,
            vari_text     LIKE varit    OCCURS 0 WITH HEADER LINE.
      CLEAR: vari_desc,vari_contents,vari_text.
      REFRESH: vari_contents[], vari_text[].
      vari_desc-mandt = sy-mandt.
      vari_desc-report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
      vari_desc-variant = variant_name.
      vari_desc-transport = 'F'.
      vari_desc-environmnt = 'A'.
      vari_desc-version = 1.
      vari_desc-mlangu = sy-langu.
    ***Varint Text
      vari_text-mandt = sy-mandt.
      vari_text-langu = sy-langu.
      vari_text-report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
      vari_text-variant = variant_name.
      CONCATENATE 'job' 'Background' INTO vari_text-vtext SEPARATED BY space.
      APPEND vari_text.
    ***Partner
      IF ( p_partner-low IS NOT INITIAL ).
        vari_contents-selname = 'PARTNER'.
        vari_contents-kind    = 'S'.
        vari_contents-sign    = 'I'.
        IF ( ( p_partner-low IS NOT INITIAL ) AND ( p_partner-high IS INITIAL ) ).
          vari_contents-option = 'EQ'.
          vari_contents-low = p_partner-low.
        ENDIF.
        IF ( ( p_partner-low IS NOT INITIAL ) AND ( p_partner-high IS NOT INITIAL ) ).
          vari_contents-option = 'BT'.
          vari_contents-low = p_partner-low.
          vari_contents-high = p_partner-high.
        ENDIF.
        APPEND vari_contents.
      ENDIF.
    ***Contract Account
      IF ( p_cont_acct-low IS NOT INITIAL ).
        vari_contents-selname = 'CA_ACC'.
        vari_contents-kind    = 'S'.
        vari_contents-sign    = 'I'.
        IF ( ( p_cont_acct-low IS NOT INITIAL ) AND ( p_cont_acct-high IS INITIAL ) ).
          vari_contents-option = 'EQ'.
          vari_contents-low = p_cont_acct-low.
        ENDIF.
        IF ( ( p_cont_acct-low IS NOT INITIAL ) AND ( p_cont_acct-high IS NOT INITIAL ) ).
          vari_contents-option = 'BT'.
          vari_contents-low = p_cont_acct-low.
          vari_contents-high = p_cont_acct-high.
        ENDIF.
        APPEND vari_contents.
      ENDIF.
    ***Contract Object
      IF ( p_cont_obj-low IS NOT INITIAL ).
        vari_contents-selname = 'CO_OBJ'.
        vari_contents-kind    = 'S'.
        vari_contents-sign    = 'I'.
        IF ( ( p_cont_obj-low IS NOT INITIAL ) AND ( p_cont_obj-high IS INITIAL ) ).
          vari_contents-option = 'EQ'.
          vari_contents-low = p_cont_obj-low.
        ENDIF.
        IF ( ( p_cont_obj-low IS NOT INITIAL ) AND ( p_cont_obj-high IS NOT INITIAL ) ).
          vari_contents-option = 'BT'.
          vari_contents-low = p_cont_obj-low.
          vari_contents-high = p_cont_obj-high.
        ENDIF.
        APPEND vari_contents.
      ENDIF.
    ***Account Category
      IF ( p_ctra_acc_category  IS NOT INITIAL ).
        vari_contents-selname = 'P_CAT'.
        vari_contents-kind    = 'P'.
        vari_contents-low    = p_ctra_acc_category.
        APPEND vari_contents.
      ENDIF.
    ***filed_freq_to_change_from
      IF ( p_filed_freq_to_change_from  IS NOT INITIAL ).
        vari_contents-selname = 'P_TO_CH'.
        vari_contents-kind    = 'P'.
        vari_contents-low    = p_filed_freq_to_change_from.
        APPEND vari_contents.
      ENDIF.
    ***req_filed_freq_change
      IF ( p_req_filed_freq_change  IS NOT INITIAL ).
        vari_contents-selname = 'P_CHANGE'.
        vari_contents-kind    = 'P'.
        vari_contents-low    = p_req_filed_freq_change.
        APPEND vari_contents.
      ENDIF.
    ***Test Run p_tstrun
      vari_contents-selname = 'P_TSTRUN'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_test_run.
      APPEND vari_contents.
    ***Update Filing Frequency Checkbox
      vari_contents-selname = 'P_FIL_FR'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_update_filing_frequency.
      APPEND vari_contents.
    ***Update Incoming Payment Channel Checkbox
      vari_contents-selname = 'P_PAY_CH'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_update_payment_channel.
      APPEND vari_contents.
    ***Update Filing Channel Checkbox
      vari_contents-selname = 'P_FIL_CH'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = p_update_filing_channel.
      APPEND vari_contents.
    ***Use Current Filing Period Checkbox
      vari_contents-selname = 'P_CU_PER'.
      vari_contents-kind    = 'P'.
      vari_contents-low    = use_curr_per.
      APPEND vari_contents.
    ****Create Variant thru Function Module
      CALL FUNCTION 'RS_CREATE_VARIANT'
        EXPORTING
          curr_report   = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'
          curr_variant  = variant_name
          vari_desc     = vari_desc
        TABLES
          vari_contents = vari_contents
          vari_text     = vari_text.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ****Prepare all the date for scheduling job
    ***Get the print parameters
      DATA: params LIKE pri_params.
      CLEAR params.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          mode           = 'CURRENT'
          no_dialog      = 'X'
        IMPORTING
          out_parameters = params.
      params-paart = 'X_65_255'."'X_PAPER'.
    ***Open The scheduling job
      DATA: job LIKE tbtcjob-jobname,
            jobcount LIKE tbtcjob-jobcount.
      CLEAR: job,jobcount.
      job = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname  = job
        IMPORTING
          jobcount = jobcount
        EXCEPTIONS
          OTHERS   = 4.
    ***Job Submit
      DATA: authcknam LIKE tbtcjob-authcknam.
      CLEAR: authcknam.
      authcknam = sy-uname.
      params-primm = space.
      CALL FUNCTION 'JOB_SUBMIT'
        EXPORTING
          authcknam = authcknam
          jobcount  = jobcount
          jobname   = job
          priparams = params
          report    = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'
          variant   = variant_name.
    ***JOB_CLOSE
      DATA: sdlstrttm TYPE tbtcjob-sdlstrttm,
            released LIKE btch0000-char1.
      sdlstrttm = p_job_start_time + 30.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          sdlstrtdt        = p_job_start_date
          sdlstrttm        = sdlstrttm
          jobcount         = jobcount
          jobname          = job
        IMPORTING
          job_was_released = released.
    Regs
    Manas

  • How to see http response from an axis web service call (Eclipse)

    Hello,
    I would like to see the raw http response which is returned from web service calls. I have a dynamic web project in Eclipse which uses a local instance of Tomcat 6. I'm using all of the default setting for a top-down web service generated from a WSDL file. I've generated the client using the built-in "generate client" using default settings.
    I've tried using the Eclipse plugin TCP/IP monitor and apache's TCPMON, but I am only able to see the http request, not the http response returned from the web server I am querying.
    I've seen some sparse documentation outlining how to use logging handlers and a client-config.wsdd file, but I haven't been able to get that working.
    So to recap, I'm looking for a way to view raw http responses using a web service client and server generated from a WSDL file in eclipse. I don't mind creating a new project using different code-generating libraries if someone has an easy way to do this using a different configuration.
    Thanks very much,
    Craig

    908794 wrote:
    Hello,
    I would like to see the raw http response which is returned from web service calls.Why the HTTP response? Isn't the soap message body enough? If it is, you probably want to check out SoapUI.
    A simple google query for "apache axis2 http response" also return this article:
    http://blogs.cocoondev.org/dims/archives/004668.html
    And finally, you did go through the Axis2 website right? It has a wiki with a rather staggering amount of articles in there.
    http://wiki.apache.org/ws/FrontPage/Axis2/

  • How to retrieve error message(s) after failed web service call

    Hi!
    I tried to create an item using the web service ego_item_pub.process_item and it worked ok (version 12.1.1). Sending the same request again, I got an error which should be ok since the item id already exists. The thing is, that I only get an "E" as return status:
    <X_RETURN_STATUS>E</X_RETURN_STATUS>
    <X_MSG_COUNT>1</X_MSG_COUNT>
    As described in the integration repository, there should be a parameter called msg_data which should contain the message if there is exactly 1 message, but I cannot find it.
    So, I tried to get the message using fnd_message.get, but the response of my web service call is:
    AuthorizationFailure : User not authorized to execute service. (I use sysadmin/sysadmin as ws security user).
    I use the following grant details:
    All Users     Direct     GLOBAL     Revoke Action Enabled
    SYSADMIN SYSADMIN     Direct     USER
    What else can I do or how can I retrieve error messages for a failed web service call?
    Thanks a lot,
    Konrad

    Hi Konrad,
    As we've found out, search the Integration Repository for internal name ERROR_HANDLER and use that. Letting the general public know the answer for this one!
    Regards,
    Gareth
    http://garethroberts.blogspot.com

  • How to execute XML batch commands using SharePoint Web services or Client Object Model

    Hi,
    I have a requirement to execute some batch commands to update SharePoint View Style, how can i do it using SharePoint webservices or SharePoint Client Object model.
          I need to execute the following Batch command over a particular web.
    <Method ID="UpdateView">
      <SetVar Name="Cmd">UpdateView</SetVar>
      <SetList Scope="Request">{GUID of List}</SetList>
      <SetVar Name="View">{GUID of View}</SetVar>  
      <SetVar Name="ViewStyle">6</SetVar>
      <SetVar Name="RowLimit">100</SetVar>
      <SetVar Name="Paged">TRUE</SetVar>
    </Method>

    Hi
    I tried it already... But UpdateView Method in the Views.asmx and Lists.asmx, both are not supporting for updating the style of the view (like Boxed, Newsletter...).
    If you have any code sample which will do this job with any of the SharePoint web services, please share it..

  • Batch job invoke Sharepoint web service

    Hi all,
    Can BODS job invoke a SharePoint web service which accepts two parameters?
    The first parameter is a string and the second one is an XML.
    Any inputs will be greatly helpful.
    Thanks and Regards,
    Prateek

    first test invoking the batch job webservice using SoapUI
    does your client application logs the SOAP message that is sent to DS WebServer ?
    Check the %LINK_DIR%\lg\webservices.log if there is any errors logged in it ?

  • FLEX- how to serialize date type to null in web service call

    Does anyone know how to get actionscript to render a null date value '000:00:00T00:00:00' into a SOAP xml structure? I am calling a commercial web service that exposes data structures. I use one of these data structures as a parameter to a method call in the web service. The data structure has about 12 date fields and I need most of them to be null in the resulting database. The WSDL/SOAP force me to populate these fields with a date type. I can't figure out how to populate a date variable with a NULL value. The closest value I can get is '1899-11-30T00:00:00Z'. Below is the code I am using:
    var dateStr:String = "0000-00-00T00:00:00+";
    var emptyDate:Date = DateUtil.parseW3CDTF(dateStr);
    newReqData.DateTimeInit = emptyDate;
    When calling this same web service with a .Net client, it automatically puts in the null date value of '000:00:00T00:00:00' into the xml for me, if I don't populate the date field in the data structure.
    Any help would be appreciated.

    Hi,
    Thanks frank.
    I already check this link before posting this so if you have any other link then kindly reply.
    Regards,
    Devang

  • How to view the SOAP message in a web service call + Urgent

    Hi All,
    Iam trying to test a web service call(Iam using CXF). But I need to view SOAP message sent to web service or need to debug the web service call. Please help me on this regard with example.

    Yes. to find any tcp monitor, define a listen port number, task host and port number, changing your request to listen post, then you can monitor TCP/IP like
    HTTP/1.1 200 OK
    Set-Cookie: JSESSIONID=7A00BD65EF7516AD8947359A25C4D98B; Path=/ComponentName
    Content-Type: text/xml;charset=utf-8
    Date: Wed, 20 Oct 2004 15:45:03 GMT
    Server: Apache-Coyote/1.1
    Connection: close
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <ns1:testObjectResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ComponentName">
    <testObjectReturn href="#id0"/>
    </ns1:testObjectResponse>
    <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:MyObject" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:ComponentName">
    <name xsi:type="xsd:string">Set Name</name>
    <value xsi:type="xsd:string">set Value</value>
    </multiRef>
    </soapenv:Body>
    </soapenv:Envelope>
    Lixin

  • How to invoke a short lived process using web service start point?

    I have a custom short-lived process that does not take any input parameter. I am able to successfully invoke the process from LiveCycle Workbench ES2. I want this process to be invoked by a java client through a web service call. Apart from the web service URL of my process (which looks like
    http://<server>:<portno>/soap/services/MyApplication/MyProcess?wsdl&lc_version=9.0.0&versi on=1.0) do the java client know anything else? Any authentication is required?
    My intention is to just find out what all the consumer of this process needs to know to invoke it through a web service call.
    Was anybody able to test a short-lived process through a web service invocation from SoapUI?

    I am not a programmer but I did find this article on he Developers Resource site that might lead you in th eright direction:
    http://www.adobe.com/devnet/livecycle/articles/java_soap.html
    Paul

  • How to find out batch job failure and taking action:

    Normally We will monitor the batch jobs  through transaction code sm37 for job monitoring. In SM37 we will give a batch job name date and time  as  input. In the first step we will check the batch job for the reason failure or check the spool request for the batch job for failures an help in analyzing the error
    I understand from the my experience is that the batch may fail due to below reasons.
    1.,Data issues :             ex: Invalid character in quantity (Meins) field  >>>> We will correct the corresponding document with correct value or we will manually run or request the team to rerun the batch job by excluding  the problematic documents from the batch job variant  so that it may process other documents.
    2.Configuration issues : Materials XXXX is not extended for Plant >>>> we will contact the material master team or business to correct the data or we will raise sub contract call with support team to correct he data. Once the data been corrected and will request the team to rerun the batch job.
    3.Performance issues : Volume of the data being processed  by the batch job ,network problems.>>>Normally these kind of issues we will encounter during the month end process as there will lot of accounting transactions or documents being posted business hence it may cause the batch job failure as there is enough memory to complete the program or select queries in the program will timeout because of volume of the records.
    4.Network issues. : Temporary connectivity issues in other partner systems :Outage in other partner systems like APO or other system like GTS  will cause the batch job failure as Batch job not in position to connect other system to get the inforamtion and proceed for further steps.Nornmally we will check RFC destination status by running a custom program  weather connectivity between system are in progress or not. then intimate other partner system  for the further actions, Once the partner system comes online then we will intimate the team to restart or manually submit batch job.
    Some times we will create a manual job by transaction code SM36.

    I'm not sure what the question is among all that but if you want to check on jobs that are viewable via SM37 and started via SM36. The tables are TBTCP -Background Job Step Overview and TBTCO - Job Status Overview Table.
    You can use the following FM to get job details:
    GET_JOB_RUNTIME_INFO - Reading Background Job Runtime Data

  • How to stop a batch job

    Hi Folks,
    Please do let me know how to stop a batch job.
    I am having a batch job which will run a program for every 15 mins in order to update some Z-tables.
    I need to debug and do some investigation. Meanwhile when I am doing this debugging it may take 20-30 mins also. Here this background job scheduling is getting started and the table getting updated and I am not able to do any investigation..
    Can anyone please let me know how can I stop this batch job scheduled every 15 mins taht is make it stop for an hour. So that after my investigation it should keep on running the batch job for every 15 mins.
    Regards
    Mac

    If u schedule this job from SM36 then u can make it active or inactive from there only. From SM36 ..give the name of ur job then press Extended job selection button..then in next screen choose Active tab and there u can check the checkbox "Job on longer active in time interval" and then give ur time.
    Hope this info will help u.
    Regards,
    Joy.

  • How to handel a Batch job in oracle database

    How to handel a Batch job in oracle database?
    Regards
    alok

    Alekh wrote:
    lists of jobs execute concurrently.Thats a definition we all aware of ;), I meant do you want to execute the jobs in a sequence? is there any dependency? is it more like scheduling?
    And What kind of jobs you are talking about? running PL/SQL programs? or stats collection? or DB backup?
    Regards,
    Prazy

  • How to create a batch job for transaction SM13 or SM37

    How to create a batch job for transaction SM13 or SM37?
    I want to create a batch job for t-code SM13/SM37, the jobs will send a email to my inbox when the errors occurred in SM13/SM37.
    How to do this? thanks in advance.

    Hi,
    Check the link:
    http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/30237989-0901-0010-70a4-944691eb5e52 [original link is broken]
    Make sure the CCMS agent installation is in place as per the Monitoring setup guide.
    Follow the link Central auto reactions for configuring alert mails.
    Regards,
    Srikishan

  • How to run a batch file as windows Nt service

    Hi friends
    I want to know how to run a batch file as windows NT service.
    I got some information in the following link
    http://support.microsoft.com/kb/q243486/
    I tried it but i want to know what we need to include in Autoexnt.bat
    And one thing i need Instexnt.exe file. I cannot find tht file.
    Please search tht file and send me tht file or else send the link in which this file is present
    Please give me reply fast.its very urgent.
    Thanks in advance.

    Hi,
    My aim is to run a MS-DOS Batch file, that I created to run a Java Prgram.
    I need to call the Batch File from the Oracle Procedure, Also I may need to change the content of the Batch File (Argument to the Java JAR File ).
    I can keep the JAR FIle either in the Oracle Server or in the Application Server.
    The Java program is to convert XML Format FIle to PDF and MS Word format.
    Oracle Version : 10g 2.0.1.0.
    Thanks in advance
    Rizly

  • Query for job status using Web Services in BODI

    Hello,
    I am starting a Batch job in DI using Web Services, getting the following response from DI:
    Code:
    <soapenv:Envelope
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <soapenv:Body>
            <BatchJobResponse>
                <pid>704</pid>       
                <cid>26</cid>       
            </BatchJobResponse>
        </soapenv:Body>
    </soapenv:Envelope>
    How can I know the status of the started job?
    How can I know if the job execution finished with success or not?
    I did not find in WSDL file any method to query for job or service status...
    Thank you in advance,
    Adrian Mitrica

    Did you ever get this figured out?  I am having exactly the same problem in code generated by VS, with the BAPIRET2 structure.
    Any help you could provide would be greatly appreciated.
    Thanks!
    Leighton Wingerd
    Adirondack Solutions, Inc.
    [email protected]

Maybe you are looking for

  • Building an Application in Windows to be used in Linux (with the Run-Time Engine)

    Hi All, I have an LabVIEW project I have developed in a Windows environment.  I can create an Application (.exe) using the Build Specification -> Application Builder which works fine on the development platform. I now want to distribute the applicati

  • Validation of Material Group in SD Pricing Routines

    Hi , I have created a new custom routine( Condition Value in VOFM ) for Excise duty calculation. Now, I have  requirment where in I need to check the material group and based on that materai group I need to calculate the Excise duty in my Routine . S

  • How do you specifically let the Itemlistener know which Item was selected..

    How do you specifically let the Itemlistener know which Item was selected in a JComboBox? Anyone has any idea? What should the coding look like?

  • Script to Filter for Multiple ComboBox

    Hello, I am trying to create two combo boxes, company and contact. When company selected only contacts for that company display in the contact combo box. I created the script below but it does not work. Please look at the script and tell me what if I

  • I want to install an e-commerce.

    While I know that Muse does not have an e-commerce yet, I do know there are several templates designed for Muse. Which one of the templates work best with Muse? Or what would you suggest for an e-commerce site that will grow. Thanks- Todd [email prot