如何从任何数据类型的 BPEL 中获取数据?[xpath/xquery]
How to fetch data from any data type BPEL?[xpath/xquery]
我无法从 XSD 获取数据:BPEL 订阅事件流程中的任何数据类型
<?xml version="1.0" encoding="UTF-8"?>
<inputVariable0>
<taskAssignedMessage xmlns="http://xmlns.oracle.com/bpel/workflow/taskService">
<action>INITIATE</action>
<task xmlns="http://xmlns.oracle.com/bpel/workflow/task">
<title>Self-Register User Request ID-216025</title>
<payload>
<RequestID>999</RequestID>
<RequestModel>Self-Register User</RequestModel>
<RequestTarget />
<RequesterDetails xmlns="http://xmlns.oracle.com/request/RequestDetails">
<ns0:Login xmlns:ns0="http://xmlns.oracle.com/request/RequestDetails" />
<ns0:DisplayName xmlns:ns0="http://xmlns.oracle.com/request/RequestDetails" />
</RequesterDetails>
<BeneficiaryDetails xmlns="http://xmlns.oracle.com/request/RequestDetails">
<ns0:DisplayName xmlns:ns0="http://xmlns.oracle.com/request/RequestDetails">None</ns0:DisplayName>
</BeneficiaryDetails>
<ObjectDetails xmlns="http://xmlns.oracle.com/request/RequestDetails">
<ns0:attributes xmlns:ns0="http://xmlns.oracle.com/request/RequestDetails" />
</ObjectDetails>
<OtherDetails xmlns="http://xmlns.oracle.com/request/RequestDetails" />
<RequesterDisplayName />
<BeneficiaryDisplayName>None</BeneficiaryDisplayName>
<Requester />
<CatalogData xmlns="http://xmlns.oracle.com/RequestServiceApp/RequestDataService/CatalogData" />
<RegistrationRequestElement xmlns="http://www.approver-notification.org">
<Approver_UserId>Manager</Approver_UserId>
<Approver_divisionID>DIV310021</Approver_divisionID>
<Approver_isAboveJE>NO</Approver_isAboveJE>
</RegistrationRequestElement>
<Discoms>ABC</Discoms>
<Post>OA_FIRST</Post>
<FirstName>Test</FirstName>
<LastName>Nikita</LastName>
<RequestType>Self-Register User</RequestType>
</payload>
</task>
</taskAssignedMessage>
</inputVariable0>
我需要从 RegistrationRequestElement/Approver_UserId 获取数据。如果有人对此有任何想法,请帮助我。
@乔
您粘贴的 xml 有太多重复的命名空间声明。假设您无法控制它,请尝试使用此 xpath 表达式:
//*[name()='inputVariable0']//*[name()='taskAssignedMessage']//*[name()='task']//*[name()='RegistrationRequestElement']/*[name()='Approver_UserId']/data(.)
输出:
Manager
我无法从 XSD 获取数据:BPEL 订阅事件流程中的任何数据类型
<?xml version="1.0" encoding="UTF-8"?>
<inputVariable0>
<taskAssignedMessage xmlns="http://xmlns.oracle.com/bpel/workflow/taskService">
<action>INITIATE</action>
<task xmlns="http://xmlns.oracle.com/bpel/workflow/task">
<title>Self-Register User Request ID-216025</title>
<payload>
<RequestID>999</RequestID>
<RequestModel>Self-Register User</RequestModel>
<RequestTarget />
<RequesterDetails xmlns="http://xmlns.oracle.com/request/RequestDetails">
<ns0:Login xmlns:ns0="http://xmlns.oracle.com/request/RequestDetails" />
<ns0:DisplayName xmlns:ns0="http://xmlns.oracle.com/request/RequestDetails" />
</RequesterDetails>
<BeneficiaryDetails xmlns="http://xmlns.oracle.com/request/RequestDetails">
<ns0:DisplayName xmlns:ns0="http://xmlns.oracle.com/request/RequestDetails">None</ns0:DisplayName>
</BeneficiaryDetails>
<ObjectDetails xmlns="http://xmlns.oracle.com/request/RequestDetails">
<ns0:attributes xmlns:ns0="http://xmlns.oracle.com/request/RequestDetails" />
</ObjectDetails>
<OtherDetails xmlns="http://xmlns.oracle.com/request/RequestDetails" />
<RequesterDisplayName />
<BeneficiaryDisplayName>None</BeneficiaryDisplayName>
<Requester />
<CatalogData xmlns="http://xmlns.oracle.com/RequestServiceApp/RequestDataService/CatalogData" />
<RegistrationRequestElement xmlns="http://www.approver-notification.org">
<Approver_UserId>Manager</Approver_UserId>
<Approver_divisionID>DIV310021</Approver_divisionID>
<Approver_isAboveJE>NO</Approver_isAboveJE>
</RegistrationRequestElement>
<Discoms>ABC</Discoms>
<Post>OA_FIRST</Post>
<FirstName>Test</FirstName>
<LastName>Nikita</LastName>
<RequestType>Self-Register User</RequestType>
</payload>
</task>
</taskAssignedMessage>
</inputVariable0>
我需要从 RegistrationRequestElement/Approver_UserId 获取数据。如果有人对此有任何想法,请帮助我。 @乔
您粘贴的 xml 有太多重复的命名空间声明。假设您无法控制它,请尝试使用此 xpath 表达式:
//*[name()='inputVariable0']//*[name()='taskAssignedMessage']//*[name()='task']//*[name()='RegistrationRequestElement']/*[name()='Approver_UserId']/data(.)
输出:
Manager