sopaui使用groovy从url更新wsdl

时间:2016-01-22 21:06:46

标签: groovy soapui

是否可以从网址动态更新wsdl文件? 此代码指向存在静态wsdl文件的路径。 如何在第二行修改代码:

using System;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.ServiceModel.Activation;
using System.IO;

namespace ExampleRESTService
{
    [ServiceContract(Name = "RESTServices")]
    public interface IRESTServices
    {    
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = Routing.Route, BodyStyle = WebMessageBodyStyle.Bare)]
        string GetCounts();
    }

    public static class Routing
    {            
        public const string Route = "/GetCounts";
    }

   [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single, IncludeExceptionDetailInFaults = true)]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class RESTServices : IRESTServices
    {
        public string GetCounts()
        {
            string sData = "Hello"
            return sData;
        }
    }
}

0 个答案:

没有答案