[英]Generate same XML request tags for methods with different name for soapUI by Java
我想要用于不同方法的相同XML请求标签
我的界面如下
@WebService
@SOAPBinding(style = Style.RPC)
public interface Services {
@WebMethod public String login(String networkId,String password);
@WebMethod public String loginAS(String networkId,String password);
}
soapUI生成以下请求
要求1:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.project.com/">
<soapenv:Header/>
<soapenv:Body>
<ser:login>
<arg0>?</arg0>
<arg1>?</arg1>
</ser:login>
</soapenv:Body>
</soapenv:Envelope>
要求2:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.project.com/">
<soapenv:Header/>
<soapenv:Body>
<ser:loginAS>
<arg0>?</arg0>
<arg1>?</arg1>
</ser:loginAS>
</soapenv:Body>
</soapenv:Envelope>
我希望我的两个请求都具有相同的标签(突出显示)
所需的请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.project.com/">
<soapenv:Header/>
<soapenv:Body>
***<ser:login>***
<arg0>?</arg0>
<arg1>?</arg1>
***</ser:login>***
</soapenv:Body>
</soapenv:Envelope>
我希望两个请求都应具有相同的**<ser:login>**
标签,而不是两个不同的标签**<ser:login>**
和**<Ser:loginAS>**
我的建议:使用简单的方法并添加新的参数以标识
@WebService
@SOAPBinding(style = Style.RPC)
public interface Services {
@WebMethod public String login(String networkId,String password, String newParam);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.