Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional C# 4.0 and .NET 4
This is the forum to discuss the Wrox book Professional C# 4.0 and .NET 4 by Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner; ISBN: 9780470502259
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C# 4.0 and .NET 4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 24th, 2011, 10:33 AM
Authorized User
Points: 169, Level: 3
Points: 169, Level: 3 Points: 169, Level: 3 Points: 169, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2008
Location: Northampton, , United Kingdom.
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
Default Digital Signature for SoapRequest

From a web application (VS2010) I am to call a third party web service (for which I have no control over) using a SoapRequest which is signed.

Looking at the supplied XML example, it is (cut down version) something like the example below.

Searching the internet, I run into the same common problems:
  1. Examples using WSE, which reads like it's been superceded by WCF
  2. Examples refer to a web service for which you have control over (and can change)
  3. Examples are targetted at older versions of Visual Studio
If anyone can give me some guidance for getting this working, using VS2010 and a web service for which I have no control, I would greatly appreciate it. I do have the WSDL for the service, which I have running as a mockService in SoapUI so that I can generate 'dummy' calls to the service.


Code:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:m0="http://somwhere.com/corporate/integration/core/20100510" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://xxx.org/wss-wssecurity-secext-1.0.xsd">
<wsse:BinarySecurityToken 
 EncodingType="http://xxx.org/wss-soap-message-security-1.0#Base64Binary" 
 ValueType="http://xxx.org/wss-x509-token-profile-1.0#X509v3" 
 wsu:Id="CertId-2544524" 
 xmlns:wsse="http://xxx.org/wss-wssecurity-secext-1.0.xsd" 
 xmlns:wsu="http://www.w3.org/2000/09/xmldsig#"/>
   <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
    </ds:Transforms>
    <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">qnzun---snip---HRC/cCqU=</ds:DigestValue>
   </ds:Reference>
  </ds:SignedInfo>
  <ds:SignatureValue xmlns:ds="http://xxx.org/wss-wssecurity-secext-1.0.xsd"/>
   </wsse:SecurityTokenReference>
  </ds:KeyInfo>
 </ds:Signature>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body wsu:Id="philID" xmlns:wsu="http://xxx.org/wss-wssecurity-utility-1.0.xsd">
<m:TheEnquiryRequest xmlns:m="http://somewhere.com/someschema">
 <m0:IntegrationHeader>
  <m0:Date>2001-12-17T09:30:47.0Z</m0:Date>
  <m0:Version>0.0</m0:Version>
  <m0:Identification>
   <m0:ApplicationId>EnquiryAppID</m0:ApplicationId>
   <m0:TransactionId>1</m0:TransactionId>
  </m0:Identification>
  <m0:Security>
   <m0:AuthorisationId>a</m0:AuthorisationId>
  </m0:Security>
 </m0:IntegrationHeader>
 <m:RequestData>
  <m:OriginDateTime>2001-12-17T09:30:47.0Z</m:OriginDateTime>
  <m:Variable1>One</m:Variable1>
  <m:Variable2>Two</m:Variable2>
  <m:Variable3>Three</m:Variable3>
  <m:Variable4>Four</m:Variable4>
  <m:Variable5>Five</m:Variable5>
 </m:RequestData>
</m:TheEnquiryRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Thanks in advance for any/all help
__________________
Regards,

Sean


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to implement the digital signature kotaiah J2EE 0 May 11th, 2007 05:06 AM
Page 33 Creating digital signature bmiller28 BOOK: ASP.NET Website Programming Problem-Design-Solution 7 November 12th, 2005 03:01 PM
How to create Digital Signature using certificate iron_ ASP.NET 1.0 and 1.1 Professional 0 September 5th, 2005 10:02 PM
Incorporate Signature thru Digital Pad ashu_gupta75 Classic ASP Basics 0 May 14th, 2004 01:24 AM
Digital signature verification using PHP. Hawk PHP How-To 0 July 16th, 2003 08:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.