Hi,

It is a file URI
It has the following values
fScheme=(0x03a73778)"file"
fHost=(0x03a737c0)""
fPath=(0x03a73b58)"/C:/DOCUME~1/vincent/LOCALS~1/Temp/TemporaryDALMLDocument.xml"

I have included the xml document as well

Hope it helps

        Vin

> -----Original Message-----
> From: Berin Lautenbach [mailto:[EMAIL PROTECTED]
> Sent: 26 May 2005 12:25
> To: security-dev@xml.apache.org
> Subject: Re: URI resolution problem
> 
> 
> 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_);
> > 
> > 
> 
<?xml version="1.0" encoding="UTF-16" standalone="no" ?><Start><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>
<ds:Reference URI="TemporaryDALMLDocument.xml">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>Not yet calculated</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>Not yet signed</ds:SignatureValue>
</ds:Signature></Start>

Reply via email to