package com.malk.mcli.service;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

/**
 * @author shinka
 * @date 2021/03/26
 */

@WebService(name = "IH3yunWebService", // 暴露服务名称
        targetNamespace = "http://service.example.com/h3yun" // 命名空间,一般是接口的包名倒序
)
// @BindingType(value = SOAPBinding.SOAP12HTTP_BINDING) // soap1.1
public interface IH3yunWebService {

    public static final String NAMESPACE = "http://service.example.com/h3yun";

    @WebMethod(operationName = "GetSchema", action = NAMESPACE + "/GetSchema")
    @WebResult(name = "GetSchemaResult")
    public String GetSchema(@WebParam(name = "schemaCode", targetNamespace = NAMESPACE) String schemaCode);

    @WebMethod(operationName = "GetSchemaList", action = NAMESPACE + "/GetSchemaList")
    @WebResult(name = "GetSchemaListResult")
    public String GetSchemaList();

    @WebMethod(operationName = "GetList", action = NAMESPACE + "/GetList")
    @WebResult(name = "GetListResult")
    public String GetList(@WebParam(name = "userCode", targetNamespace = NAMESPACE) String userCode,
                          @WebParam(name = "schemaCode", targetNamespace = NAMESPACE) String schemaCode,
                          @WebParam(name = "filter", targetNamespace = NAMESPACE) String filter);

    @WebMethod(operationName = "Invoke", action = NAMESPACE + "/Invoke")
    @WebResult(name = "InvokeResult")
    public String Invoke(@WebParam(name = "userCode", targetNamespace = NAMESPACE) String userCode,
                         @WebParam(name = "schemaCode", targetNamespace = NAMESPACE) String schemaCode,
                         @WebParam(name = "methodName", targetNamespace = NAMESPACE) String methodName,
                         @WebParam(name = "param", targetNamespace = NAMESPACE) String param);
}
