加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

unexpected element (uri:"", local:"p

发布时间:2020-12-16 23:09:46 所属栏目:安全 来源:网络整理
导读:soap协议访问webservice,如果入参中有list,需如下写入参格式 "?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:x

soap协议访问webservice,如果入参中有list,需如下写入参格式


 "<?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>"
				+ "<ns1:postPresc soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://service.webService.com">"
				+ "<prescInfos>"
				+ "<hospId>1001</hospId>"
				+ "<hospName>杭州第一医院</hospName>"
				+ "<patientCard>A12345678</patientCard>"
				+ "<patientName>1000</patientName>"
				+ "<patientPhone>1000</patientPhone>"
				+ "<postType>2</postType>"
				+ "<prescCode>NO123412</prescCode>"
				+ <span style="color:#6633ff;">"<prescDrugs>"</span>
				+ "<drugCode>1000</drugCode>"
				+ "<quantity>1000</quantity>"
				+ "<remark>最好别吃</remark>"
				+ <span style="color:#6600cc;">"</prescDrugs>"</span>
				+ "</prescInfos>"
				+ "</ns1:postPresc>"
				+ "</soapenv:Body>" + "</soapenv:Envelope>"


实体如下:

public class PrescInfo {
int hospId;// 医院编号
String hospName;// 医院名称
String prescCode;// 医院处方编号
String patientCard;// 患者卡号
String patientName;// 患者姓名
String patientPhone;// 患者手机
int postType;// 传送类型,1新增,2更新
List<PrescDrug> prescDrugs;// 处方药品信息列表 <<<<<<<这里参数是list

......

}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读