BizTalk Server Orchestration - xpath in expression editor

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > May 2005 > xpath in expression editor





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author xpath in expression editor
Nisha

2005-05-23, 11:53 am

Within an Orchestration, in an expression editor, I am trying to read an attribute 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" check_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.Novient.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="http://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()='http://Aderant.Novient.ProjectIntg.Schemas.Roles.Role']/@*[local-name()='role_key' and namespace-uri()='']");
System.Diagnostics.EventLog.WriteEntry("ProjectIntg", sroleKey); (debug statement)

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 statement)

This throws an exception :
Uncaught exception terminated service Aderant.Novient.ProjectIntg.Orchestrations.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/fwlink/events.asp.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com