I'm relatively new to most of this stuff.
Does anyone have any experience with the Java XML
Security package and .Net C# interopability?
I'm trying to get xml, canonicalized using the XML
Security package in Java, to be canonicalized in the same way the .Net XmlDsigC14NWithCommentsTransform canonicalizes XML, or vice versa.
I need to do this for some custom signature stuff I need to do on the
xml.
I can't seem to get the canonicalized xml to match
up. There appear to be issues with the namespaces.
With an example message of
<soap:Envelope
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'> <soap:Body> <n:getRate xmlns:n='urn:xmethods-CurrencyExchange'> <country1 xsi:type='xsd:string'>usa</country1> <country2 xsi:type='xsd:string'>japan</country2> </n:getRate> </soap:Body> <!-- test comment --> <testElement c='3' b='2' a='1'> test crapola </testElement> </soap:Envelope> I'm using the
Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS in java to produce
<soap:Envelope soap="http://schemas.xmlsoap.org/soap/envelope/"
soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xsd="http://www.w3.org/2001/XMLSchema"
xsi="http://www.w3.org/2001/XMLSchema-instance"
http://schemas.xmlsoap.org/soap/envelope/:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><soap:Body><n:getRate
n="urn:xmethods-CurrencyExchange"><country1 http://www.w3.org/2001/XMLSchema-instance:type="xsd:string">usa</country1><country2
http://www.w3.org/2001/XMLSchema-instance:type="xsd:string">japan</country2></n:getRate></soap:Body><!--
test comment --><testElement a="1" b="2"
c="3">
test crapola
 </testElement></soap:Envelope> But using the XmlDsigC14NWithCommentsTransform in
.Net C# to produce
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><soap:Body><n:getRate
xmlns:n="urn:xmethods-CurrencyExchange"><country1
xsi:type="xsd:string">usa</country1><country2
xsi:type="xsd:string">japan</country2></n:getRate></soap:Body><!--
test comment --><testElement a="1" b="2"
c="3">
test crapola
 </testElement></soap:Envelope> If anyone can help, I would appreciate
it.
Thanks,
Skip
|
- Re: Java XML C14n interop with .Net Skip Walker
- Re: Java XML C14n interop with .Net Raul Benito
- RE: Java XML C14n interop with .Net Skip Walker
- RE: Java XML C14n interop with .Net Scott Cantor
- RE: Java XML C14n interop with .Net Skip Walker
- RE: Java XML C14n interop with .Net Scott Cantor
- RE: Java XML C14n interop with .Net Skip Walker
- RE: Java XML C14n interop with .Net Scott Cantor
- RE: Java XML C14n interop with .Net Skip Walker
- RE: Java XML C14n interop with ... Scott Cantor
- Re: Java XML C14n interop with ... Raul Benito