calling web service eith scheduling task

Discussion in 'ASP.NET WebServices' started by vagelis, Apr 8, 2011.

  1. hello everyone,

    i try to call a sub of a web service with scheduling task

    after some tries i manage to page .asmx can be displayed on server

    but now i cannot hit the webmethod to get results
    i only see the method and if i hit to it i get

    "
    Click here for a complete list of operations.

    ela(the sub)

    Test
    The test form is only available for requests from the local machine.
    SOAP 1.1
    The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values."




    and how have i to call the sub of the web service in schedule manager?

    the support says to only put the url of the .asmx file
    but so it doesnt executes the sub..

    any idea???
     
  2. The DASP task scheduler acts in the same way as a client browser that makes a http GET request to a target url endpoint. An asmx webservice supports the soap protocol which implicitly means the service is expecting correctly formatted soap xml to be POSTed for processing. This behaviour is beyond the scope of the scheduler but it's possible to achieve the same results by developing an aspx web page that processes query string parameters.
     
  3. so if i understand well you say that web service cannot be caled from sceduled task??
    and that i have to do that by another way??sory my english and my knowledges about this issue doesnt allow me to understand what did you say

    and another question is if the way of web services is correct how can i run a web service in discountasp??

    i read that i have to create a new folder and change it to web application
    and then create there the web service

    the problem is i create the webservice in its folder but the vb code goes outside to app_code directory while tha asmx goes inside the new root folder

    because the directory that i insert the .asmx must be application it is root
    so the .asmx it cannot see the .vb that is outside this root folder

    then if i try to move the .vb inside this root folder and use the

    <%@ WebService Language="vb" CodeBehind="~/App_Code/Service.vb" Class="Service" %>

    it cannot see the service.vb again and i dont know why..
     
  4. The task scheduler cannot be configured to post formatted SOAP xml to an asmx webservice so the answer is no, you can't call a web service via the task scheduler.

    One alternative is to develop a web page that performs the same task as your web service and configure the task scheduler to call that web page e.g. http://www.mydomain.com/MyPageToBeCalledFromTheScheduler.aspx?p1=PARAM1_VALUE&p2=PARAM2_VALUE&p3=PARAM3_VALUE

    You can then process the query string parameters in the same you would process web service method parameters and your web page code can act according to your application needs.

    If you're still stuck, it might help if you explain a little bit about what your application needs to achieve.
     
  5. ok i wish it works like this
    i seems easier..
    and the web method of the web service must be insterted in the page load sub???
    or else how can i call a specific sub of the vb code of the page?
     
  6. ok it works like this!
    thank you very much!!
     

Share This Page