Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    Leonardo Barbosa
    How invoke Webservice with custom button workspaceAnswered
    Topic posted March 12, 2015 by Leonardo BarbosaBronze Medal: 1,250+ Points 
    692 Views, 17 Comments
    Title:
    How invoke Webservice with custom button workspace
    Content:

    Hello guys,

     

    I need invoke Webservice through custom button workspace, but I don't know how can I do. My webservice work with SoapUI but I need to automate this process.

    See the image to better understand

     

    How can I making it? Someone can help me?

     

    Best,

    Image:

    Best Comment

    Heena Karir

    Hi Leonardo,

    I have used a weather web service for example. find below the code snippet:

    public void RuleActionInvoked(string actionName)

    {

    if (actionName == "Button Rule Action Invoke")

    {EndpointAddress epa = new EndpointAddress("https://wsf.cdyne.com/WeatherWS/Weather.asmx");

    BasicHttpsBinding bpa = new BasicHttpsBinding();

    WeatherSoapClient wsc = new WeatherSoapClient(bpa, epa);

    ForecastReturn fr = wsc.GetCityForecastByZIP("xxxx");

    MessageBox.Show("City: " + fr.City);

    MessageBox.Show(fr.Success.ToString());

    }

    }

    Also, I have attched the screen shot of the workspace rule.

    ~Heena Karir

    Comment

    • Sebastian Montero

      Hi,

      I need to know what is the step by step for developer this situation, could you help me please?

    • Anuj Behl
      sebastian Montero said:

      Hi,

      I need to know what is the step by step for developer this situation, could you help me please?

      View original

      Hi Sebastian,

      It would be better if you create a new post for your question, you'll get more exposure. Good luck. Here's a post to get your started.

      -Anuj