根据标签值从 soap 响应中提取值
Extract value from soap response based on tag value
我的肥皂回复如下:
<?xml version="1.0" encoding="UTF-8"?>
<e:Envelope xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:fn35="http://www.filenet.com/ns/fnce/2005/02/ws/schema" xmlns:fn40m="http://www.filenet.com/ns/fnce/2006/11/ws/MTOM/schema"
xmlns:fn40="http://www.filenet.com/ns/fnce/2006/11/ws/schema" xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:e="http://www.w3.org/2003/05/soap-envelope">
<e:Body>
<ExecuteChangesResponse xmlns="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
<ChangeResponse id="1" classId="Document" objectId="{F4CA442A-CE20-45E8-8372-7F34367113A4}"
objectStore="{2417ADC1-633A-4DE3-ADC1-7B6E85E832A9}"
updateSequenceNumber="0" accessAllowed="998903">
<Property i:type="fn40:SingletonString" propertyId="Owner" settable="1">
<Value>testUser</Value>
</Property>
<Property i:type="fn40:SingletonId" propertyId="Id">
<Value>{F4CA442A-CE20-45E8-8372-7F34367113A4}</Value>
</Property>
</ChangeResponse>
</ExecuteChangesResponse>
</e:Body>
</e:Envelope>
我想提取具有 属性Id="Id" 的 属性 的值
所以我尝试了以下并且它 returns 一个空字符串
<property expression="//ExecuteChangesResponse/ChangeResponse/property[@propertyId='Id']/text()" name="Id" scope="default"
type="STRING"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
我能够提取如下值:
<property expression="$body/fn:ExecuteChangesResponse/fn:ChangeResponse/fn:Property[@propertyId='Id']/fn:Value" name="Id" scope="default"
type="STRING"
xmlns:fn="http://www.filenet.com/ns/fnce/2006/11/ws/schema" />
我的肥皂回复如下:
<?xml version="1.0" encoding="UTF-8"?>
<e:Envelope xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns:fn35="http://www.filenet.com/ns/fnce/2005/02/ws/schema" xmlns:fn40m="http://www.filenet.com/ns/fnce/2006/11/ws/MTOM/schema"
xmlns:fn40="http://www.filenet.com/ns/fnce/2006/11/ws/schema" xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:e="http://www.w3.org/2003/05/soap-envelope">
<e:Body>
<ExecuteChangesResponse xmlns="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
<ChangeResponse id="1" classId="Document" objectId="{F4CA442A-CE20-45E8-8372-7F34367113A4}"
objectStore="{2417ADC1-633A-4DE3-ADC1-7B6E85E832A9}"
updateSequenceNumber="0" accessAllowed="998903">
<Property i:type="fn40:SingletonString" propertyId="Owner" settable="1">
<Value>testUser</Value>
</Property>
<Property i:type="fn40:SingletonId" propertyId="Id">
<Value>{F4CA442A-CE20-45E8-8372-7F34367113A4}</Value>
</Property>
</ChangeResponse>
</ExecuteChangesResponse>
</e:Body>
</e:Envelope>
我想提取具有 属性Id="Id" 的 属性 的值 所以我尝试了以下并且它 returns 一个空字符串
<property expression="//ExecuteChangesResponse/ChangeResponse/property[@propertyId='Id']/text()" name="Id" scope="default"
type="STRING"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
我能够提取如下值:
<property expression="$body/fn:ExecuteChangesResponse/fn:ChangeResponse/fn:Property[@propertyId='Id']/fn:Value" name="Id" scope="default"
type="STRING"
xmlns:fn="http://www.filenet.com/ns/fnce/2006/11/ws/schema" />