Hi Aleksey!

 

I’m using xmlsec 1.0.2.

 

The transform I’m trying to add to my envelope uri reference element (uri=””) is:

 

<ds:XPath xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

����������������������� not(

���������������������������������� ancestor-or-self::node()[EMAIL PROTECTED]ENV:actor="urn:oasis:names:tc:ebxml-msg:actor:nextMSH"] |

���������������������������������� ancestor-or-self::node()[EMAIL PROTECTED]ENV:actor="http://schemas.xmlsoap.org/soap/actor/next"]

����������������������� �� )

</ds:XPath>

 

However I’m unable to make it work in xmlsec

 

There seems to be two problems:

1) Quotation marks are not included in the resulting XPATH element.

 

2) More than one namespace in an attribute doesn’t work (probably caused by me messing with the quotation marks).

This works: string xpathExpression = "not(ancestor-or-self::node()[EMAIL PROTECTED]ENV:actor=””urn:ebxml-msg””])";

This don’t:� string xpathExpression = "not(ancestor-or-self::node()[EMAIL PROTECTED]ENV:actor=””urn:oasis:ebxml-msg””])";

 

Since I’m new to xpath transforms it might be some minor syntactical problems…

 

Any tips?

 

 

Fyi: my code is below:

---------------------------------------------------

 

string xpathExpression = "not(ancestor-or-self::node()[EMAIL PROTECTED]ENV:actor=””urn:oasis:ebxml-msg””])"; // partial _expression_ test

 

xmlNodePtr transformNode = xmlSecTmplReferenceAddTransform(referenceNode, xmlSecTransformXPathId);

if(transformNode == NULL)

{

����������� m_lastError = "Failed to add XPath transform";

����������� return(NULL);

}

 

if (xmlSecTmplTransformAddXPath(transformNode,

�(const unsigned char*)xpathExpression.c_str(),

����������� �NULL) != 0)

{

m_lastError = "Failed to add XPath _expression_";

����������� return(NULL);

}

 

 

 

W | H�rek Ryeng, Senior System Developer
E | Well Diagnostics AS, Forskningsparken, 9291 Troms�
L | Tel: +47 77 75 76 79 (70), Cell: +47 970 05 022, Fax: +47 77 75 76 99
L |
http://www.welldiagnostics.com/

 

Reply via email to