Vincent,
What kind of URI is this? Can you give us a sample XML file?
Cheers,
Berin
Vincent Finn wrote:
Hi,
I have what I hope is a simple problem
I have recently upgraded to xsec 1.1
My call to sign() now fails
I traced the code and it fails in XSECURIResolverGenericWin32::resolveURI()
The reason it fails is because it thinks the URI is not to a localhost
The reason for this is that xmluri->getHost() returns "" not NULL
I have got it to work again by changing the if statement to
if (xmluri->getHost() == NULL ||
!XMLString::compareIString(xmluri->getHost(), XMLUni::fgLocalHostString) ||
!XMLString::compareIString(xmluri->getHost(), L"")) {
Any idea what might be causing this?
The code for creating the resolver is below
I am using VC7 if that makes a difference
Thanks, Vin
//////////////////////////////////////////////////////////////
// setting the URI
char baseURI_[(MAX_PATH * 2) + 10]; \
strcpy(baseURI_, "file:///"); \
\
char acTempPath_[MAX_PATH]; \
::GetTempPath(MAX_PATH, acTempPath_); \
strcat(baseURI_, acTempPath_); \
\
/* need to replace '\' with '/' */ \
for (size_t i_ = 0; i_ < strlen(baseURI_); ++i_) \
{ \
if ('\\' == baseURI_[i_]) \
{ \
baseURI_[i_] = '/'; \
} \
} \
\
XMLUri uri_(MAKE_UNICODE_STRING(baseURI_)); \
XSECURIResolverGenericWin32 theResolver_; \
theResolver_.setBaseURI(uri_.getUriText()); \
Sig->setURIResolver(&theResolver_);