What is the significance of the variable 'baseURI' in the XMLSignature constructor? If I am not refefring to an external file, and there are no relative URIs in my document, can i leave baseURI blank? or is there some way to indicate that the generated document is the location of the baseURI? does the baseURI affect how the document is signed?
also, I have attached a copy of my SOAP request. i add a reference in the signature to '#Body', do i then need to add an id='Body' attribute to the soap:Body tag, or elsewhere? thanks, -peter p.s. - is it a problem that the 'SignatureValue' is broken across 3 lines?
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope soapenv:mustUnderstand="1" xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header><SOAP-SEC:Signature><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"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference URI="#Body"> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <ds:DigestValue>2jmj7l5rSw0yVb/vlWAYkK/YBwk=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue> CLrgbscpDCb4jRhDuvpKKIvgY1W3wARpPuvuSVvwjBqAOjiZJL/gxOsgUMHkFHitzdm4u8/zbwfn SCnDSvXfwg5DusPmQOK2JR5yLYSCm32FPM5c7T4flFxZZUBtU44QY2rkhXMXZqXW+vnMinY5Cfcs I2JQWSVA5HSsa+7C+ek= </ds:SignatureValue> </ds:Signature></SOAP-SEC:Signature> </soapenv:Header> <soapenv:Body> <ns1:getMRPointsWithCard soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:mraccount"> <request href="#id0"/> </ns1:getMRPointsWithCard> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:MyWebService" xmlns:ns2="http://www.myservice.com/schemas/MyWebService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <ID xsi:type="xsd:int">7777</ID> <PostalCode xsi:type="xsd:string">38611</PostalCode> <Number xsi:type="xsd:string">592009</Number> <requestID xsi:type="xsd:string">TestRequestId</requestID> <Date xsi:type="xsd:string">03/01/2008</Date> <clientID xsi:type="xsd:string">TestClientID</clientID> </multiRef> </soapenv:Body> </soapenv:Envelope>