[英]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.