问题描述
public PingResponse ping(String xml) throws remoteexception {
PingResponse response = new PingResponse();
response.setPingResult("Service is Live");
return response;
}
这是 PingResponse.java
@XmlRootElement(name = "PingResponse")
public class PingResponse implements java.io.Serializable {
private String pingResult;
@XmlElement(name = "PingResult")
public String getPingResult() {
return pingResult;
}
public void setPingResult(String pingResult) {
this.pingResult = pingResult;
}
我遇到的问题是我得到的 XML 响应的 pingResult
为小写。完整示例:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<PingResponse>
<pingResult>Service is Live</pingResult>
</PingResponse>
</soapenv:Body>
</soapenv:Envelope>
知道这里可能有什么问题吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)