This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x,ys/[^[:space:]]\+/'&',/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
#####21 Juggle Fest or | |
##### the Hospital/Residents Problem with ties and partial lists | |
use strict; | |
use List::Util qw( reduce sum ); | |
use feature qw( say ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\IKleinman\Temp>svcutil https://service01.emedny.org:7602/MHService?wsdl | |
Microsoft (R) Service Model Metadata Tool | |
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.17929] | |
Copyright (c) Microsoft Corporation. All rights reserved. | |
Attempting to download metadata from 'https://service01.emedny.org:7602/MHService?wsdl' using WS-Metadata Exchange or DISCO. | |
Warning: The following Policy Assertions were not Imported: | |
XPath://wsdl:definitions[@targetNamespace='http://org/emedny/mhs/']/wsdl:binding[@name='MHS'] | |
Assertions: | |
<dpe:summary xmlns:dpe='http://www.datapower.com/extensions'>..</dpe:summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.serviceModel> | |
<bindings> | |
<customBinding> | |
<binding name="MHService_MHSPort"> | |
<!-- WsdlImporter encountered unrecognized policy assertions in ServiceDescription 'http://org/emedny/mhs/': --> | |
<!-- <wsdl:binding name='MHS'> --> | |
<!-- <dpe:summary xmlns:dpe="http://www.datapower.com/extensions">..</dpe:summary> --> | |
<!-- <sp:SupportingTokens xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">..</sp:SupportingTokens> --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mhs="http://org/emedny/mhs/" xmlns:urn="urn:hl7-org:v3"> | |
<soapenv:Header> | |
<wsse:Security soap:mustUnderstand="1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> | |
<wsse:BinarySecurityToken ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-e00c8062-83d2-4f04-88fc-996218e7bb3d">MIICeDCC....(eMedNY signed user MLS cert).......</wsse:BinarySecurityToken> | |
<wsse:BinarySecurityToken ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-securi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AsymmetricSecurityBindingElement sec; | |
sec = (AsymmetricSecurityBindingElement) SecurityBindingElement.CreateMutualCertificateBindingElement( | |
MessageSecurityVersion.WSSecurity10WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10); | |
sec.DefaultAlgorithmSuite = SecurityAlgorithmSuite.TripleDesRsa15; | |
sec.IncludeTimestamp = false; | |
sec.AllowSerializedSigningTokenOnReply = true; | |
sec.MessageProtectionOrder = MessageProtectionOrder.SignBeforeEncrypt; | |
sec.EndpointSupportingTokenParameters.Signed.Add( new UserNameSecurityTokenParameters( )); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> | |
<s:Header> | |
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> | |
<o:BinarySecurityToken u:Id="uuid-604c12aa-1a76-4f40-b7e3-57857b596549-3" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"> | |
MIICL...(USER CERTIFICATE)...lmdGpDz8gbg646R5gzebF1waazrrVM=</o:BinarySecurityToken> | |
<e:EncryptedKey Id="_0" xmlns:e="http://www.w3.org/2001/04/xmlenc#"> | |
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/> | |
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> | |
<o:SecurityTokenReference> | |
<o:KeyIde |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unhandled Exception: System.ServiceModel.Security.SecurityNegotiationException: Could not establish | |
trust relationship for the SSL/TLS secure channel with authority 'service01.emedny.org:7602'. | |
---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ServiceModel.Channels; | |
using System.Xml; | |
namespace eMedNySOAPClient | |
{ | |
public class CustomTextMessageBindingElement : MessageEncodingBindingElement | |
{ | |
private MessageVersion msgVersion; | |
private string mediaType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ServiceModel.Channels; | |
namespace eMedNySOAPClient | |
{ | |
public class CustomTextMessageEncoderFactory : MessageEncoderFactory | |
{ | |
private MessageEncoder encoder; | |
internal CustomTextMessageEncoderFactory(string contentType, MessageVersion msgVersion) | |
{ |
OlderNewer