05-23-05 04:53 PM
Within an Orchestration, in an expression editor, I am trying to read an att
ribute using xpath expression, from a message which has the following schema
format:
Schema Format
<ns0:Role integrated_system_code="1" role_key="3" integrated_role_id="3" che
ck_out_status_code="4" checked_out_status_datetime="2005-05-21T23:02:19.453"
checked_out_status_by_user_key="1" published_datetime="2005-05-21T23:02:19.
453" api_ind="0" error_notification_user_key="1" xmlns:ns0="http://Aderant.N
ovient.ProjectIntg.Schemas.Roles.Role"><ns1:Role_Before role_name="Role-Intg
-1" xmlns:ns1="http://Aderant.Novient.ProjectIntg.Schemas.Roles.Role_Before"
/><ns2:Role_Current role_name="Role-Intg-1" standard_rate="50" xmlns:ns2="h
ttp://Aderant.Novient.ProjectIntg.Schemas.Roles.Role_Current" /></ns0:Role>
Xpath Expressions that were tried, neither of them work.
1. sroleKey = xpath(msgRole,"/*[local-name()='Role' and namespace-uri()='htt
p://Aderant.Novient.ProjectIntg.Schemas.Roles.Role']/@*[local-name()='role_k
ey' and namespace-uri()='']");
System.Diagnostics.EventLog.WriteEntry("ProjectIntg", sroleKey); (debug stat
ement)
This doesn’t throw an exception but no value is returned either.
2. sroleKey = xpath(msgRole,"ns0:Role//@role_key");
System.Diagnostics.EventLog.WriteEntry("ProjectIntg", sroleKey); (debug stat
ement)
This throws an exception :
Uncaught exception terminated service Aderant.Novient.ProjectIntg.Orchestrat
ions.MSP.Roles.RoleUpdateOrchestration(1156e616-4ca5-4917-7ddd-305d354d2bfa)
, instance 6c3cec6b-7d3a-40df-86cc-2c326a9804d8
Namespace Manager or XsltContext needed. This query has a prefix, variable,
or user-defined function.
Exception type: XPathException
Source: System.Xml
Target Site: System.Xml.XPath.IQuery get_QueryTree()
Help Link:
Additional error information:
For more information, see Help and Support Center at http://go.microsoft.com/fwlin
k/events.asp.
[ Post a follow-up to this message ]
|