Return-Path: Delivered-To: apmail-xml-security-dev-archive@www.apache.org Received: (qmail 38688 invoked from network); 29 Mar 2005 21:47:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Mar 2005 21:47:58 -0000 Received: (qmail 91917 invoked by uid 500); 29 Mar 2005 21:47:57 -0000 Delivered-To: apmail-xml-security-dev-archive@xml.apache.org Received: (qmail 91874 invoked by uid 500); 29 Mar 2005 21:47:56 -0000 Mailing-List: contact security-dev-help@xml.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: security-dev@xml.apache.org Delivered-To: mailing list security-dev@xml.apache.org Received: (qmail 91857 invoked by uid 99); 29 Mar 2005 21:47:56 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_50_60,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from ylpvm15-ext.prodigy.net (HELO ylpvm15.prodigy.net) (207.115.57.46) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 29 Mar 2005 13:47:54 -0800 Received: from soupnazi (adsl-64-123-5-207.cc-austin.com [64.123.5.207] (may be forged)) by ylpvm15.prodigy.net (8.12.10 outbound/8.12.10) with SMTP id j2TLhqbb020254 for ; Tue, 29 Mar 2005 16:43:53 -0500 Message-ID: <004501c534a8$f3ab7f60$ca011fac@soupnazi> From: "Skip Walker" To: Subject: Java XML C14n interop with .Net Date: Tue, 29 Mar 2005 15:47:48 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0040_01C53476.A8A10F80" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0040_01C53476.A8A10F80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm relatively new to most of this stuff. =20 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=20 usa japan =20 test crapola I'm using the Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS in java to = produce usajapan test crapola But using the XmlDsigC14NWithCommentsTransform in .Net C# to produce=20 usajapan test crapola If anyone can help, I would appreciate it. Thanks,=20 Skip ------=_NextPart_000_0040_01C53476.A8A10F80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I'm relatively new to most of this = stuff. =20
 
Does anyone have any experience with = the Java XML=20 Security package and  .Net C# interopability?
 
I'm trying to get xml, canonicalized = using the XML=20 Security package in Java, to be canonicalized in the same way the .Net = XmlDsigC14NWithCommentsTransform canonicalizes XML, or vice = versa. =20 I need to do this for some custom signature stuff I need to do on the=20 xml.
 
I can't seem to get the canonicalized = xml to match=20 up.  There appear to be issues with the namespaces.
 
With an example message of =
 
<soap:Envelope
 =20 xmlns:xsi=3D'http://www.w3.org/2001/XMLSchema-instance'
 =20 xmlns:xsd=3D'http://www.w3.org/2001/XMLSchema'
 =20 xmlns:soap=3D'http://schemas.xmlsoap.org/soap/envelope/'
 =20 xmlns:soapenc=3D'http://schemas.xmlsoap.org/soap/encoding/'
 =20 soap:encodingStyle=3D'http://schemas.xmlsoap.org/soap/encoding/'>
&= nbsp;=20 <soap:Body>
    <n:getRate=20 xmlns:n=3D'urn:xmethods-CurrencyExchange'>
    =  =20 <country1=20 xsi:type=3D'xsd:string'>usa</country1>
   &nbs= p; =20 <country2=20 xsi:type=3D'xsd:string'>japan</country2>
   =20 </n:getRate>
  </soap:Body>
 
  = <!--=20 test comment -->
  <testElement c=3D'3' b=3D'2'=20 a=3D'1'>
   test crapola
  =20 </testElement>
</soap:Envelope>
 
I'm using the=20 Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS in java to produce
 
<soap:Envelope soap=3D"http://schemas.xmlsoap= .org/soap/envelope/"=20 soapenc=3D"http://schemas.xmlsoap= .org/soap/encoding/"=20 xsd=3D"http://www.w3.org/2001/XMLSchem= a"=20 xsi=3D"http://www.w3.org/2001= /XMLSchema-instance"=20 http://schema= s.xmlsoap.org/soap/envelope/:encodingStyle=3D"http://schemas.xmlsoap.org/= soap/encoding/"><soap:Body><n:getRate=20 n=3D"urn:xmethods-CurrencyExchange"><country1 usa= http://www.w3.org/2001/XMLSchema-instance:type=3D"x= sd:string">usa</country1><country2=20 jap= anhttp://www.w3.org/2001/XMLSchema-in= stance:type=3D"xsd:string">japan</country2></n:getRate><= ;/soap:Body><!--=20 test comment --><testElement a=3D"1" b=3D"2"=20 c=3D"3">&#xD;
   test = crapola&#xD;
  =20 </testElement></soap:Envelope>
 
But using the = XmlDsigC14NWithCommentsTransform in=20 .Net C#  to produce
 
<soap:Envelope xmlns:soap=3D"http://schemas.xmlsoap= .org/soap/envelope/"=20 xmlns:soapenc=3D"http://schemas.xmlsoap= .org/soap/encoding/"=20 xmlns:xsd=3D"http://www.w3.org/2001/XMLSchem= a"=20 xmlns:xsi=3D"http://www.w3.org/2001= /XMLSchema-instance"=20 soap:encodingStyle=3D"http://schemas.xmlsoap.org/soap/encoding/"><soap:Body><n:get= Rate=20 xmlns:n=3D"urn:xmethods-CurrencyExchange"><country1=20 xsi:type=3D"xsd:string">usa</country1><country2=20 xsi:type=3D"xsd:string">japan</country2></n:getRate></s= oap:Body><!--=20 test comment --><testElement a=3D"1" b=3D"2"=20 c=3D"3">&#xD;
   test = crapola&#xD;
  =20 </testElement></soap:Envelope>
 
If anyone can help, I would appreciate=20 it.
 
Thanks,
 
Skip
 
 
------=_NextPart_000_0040_01C53476.A8A10F80--