Я не занимался ранее web-сервисами, только WCF, а там всё проще, может подскажете в какую сторону копать? Есть web-сервис, которому надо передать, что-то, тиа этого:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">SendElectronicRegistry</Action>
<h:transportHeader xmlns="http://egisz.rosminzdrav.ru" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:h="http://egisz.rosminzdrav.ru">
<authInfo />
</h:transportHeader>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SendRequest xmlns="http://mis.er.atc.ru/ws">
<MessageData>
<AppData>
<messageCode>GetResources</messageCode>
<messageSourceToken>c8e061b0440a0133e901995056b10e5e</messageSourceToken> <message>PHBhcmFtcz48bW9faWQ+MzQ2MTwvbW9faWQ+PHNwZWNfaWQgLz48ZG9jdG9yX2lkIC8+PHNlcnZpY2VfaWQgLz48cGF5bWVudCAvPjxyb29tIC8+PHNvdXJjZV9jb2RlcyAvPjxzdGF0dXMgLz48ZnJvbSAvPjx0aWxsIC8+PC9wYXJhbXM+</message>
</AppData>
</MessageData>
</SendRequest>
</s:Body>
</s:Envelope>
в тестовой среде это всё работает, но в боевой необходима ГОСТовское шифрование, т.е надо к этому добавить WS-Security заголовки и получить вот такое:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:egisz" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2013-11-15T07:17:05Z</wsu:Created>
<wsu:Expires>2013-11-15T08:17:05Z</wsu:Expires>
</wsu:Timestamp>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="e6988d7e-ab7b-4fae-73c7-c720b3c13857">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#e7914852-e0d3-fd40-6012-c6b7f393f1eb">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>Q/87KQarnnrtuZEvbmdNaFOkwBE=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#78c922eb-28e0-0a61-dd26-bafdbbb25fc2">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>yRz7PsjMydbGbon/joUN8p1tzzo=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#74a2c693-6d8f-37be-5966-dd4b0971ce56">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>iyoXPoCpDMQb1mE8Wkf3PWrSPno=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#ffab7084-3965-5ef6-310d-efcceb774754">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>QW//wCajqA6iil4UBNXfXe31Dqo=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#c0ff2f54-bfe1-41fb-9c46-8061a65f0e6d">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>ZN/2T8ficO+qUS36iA3tfFBAAEg=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#30ed97a5-fca3-1fbf-6691-f77ff65aa6de">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>3ApaKr/Pdtb714snGwvCnKqVO6U=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#158bb560-20e7-597d-c7f0-d10401584469">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>kWmiGbtLcJcHtwAJ+FKNjzDOtqM=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#6812ef2b-215e-ea43-fdcb-6c7bb65296bc">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>inPACZzi2yBUdBW55yZ5NM98fe8=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>aXwZyIlubcZRYAZMR1n8U0MTkdmv1Wpkb6/pcDyrtYh1wpKhBzOdznzyqMjeVrY6t4zxpjBu0ILfaJlAvC9x5LDvnbLysDEd9QbHcyQetoM7v5aKc+Zj+fFVp9PZwhIq6jqU4RkSdcti2tGACjseEyEpxM0YPG0sfMRCwTPmi3wtoKE+ZU9rtunxD2+oJFKE/s9smaoeIEDcQTA3JOsj6e2eRQe1UtdvYxTVtohgZcyQFMwiadh+9GZYXoJq/rsFRLsc9sZnAJ/Z/hlIMYliYqrOmMt2zyCGaw9WUmxe/KeBaRP1NcCvm4VDArr26/WSTJXz6Tp52lvUK/NMWQSxOA==</ds:SignatureValue>
<ds:KeyInfo>
<wsse:SecurityTokenReference>
<wsse:Reference URI="#e7914852-e0d3-fd40-6012-c6b7f393f1eb"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
<wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsu:Id="e7914852-e0d3-fd40-6012-c6b7f393f1eb" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3">MIIC/DCCAeSgAwIBAgIQREMQAfEzxaJDAceFnrsRyTANBgkqhkiG9w0BAQUFADAnMSUwIwYDVQQDExxtc2stdm9yb25vdi1pLm1zay5wcm9nbm96LnJ1MB4XDTEzMDUyMjExMTIxMFoXDTE0MDUyMjAwMDAwMFowJzElMCMGA1UEAxMcbXNrLXZvcm9ub3YtaS5tc2sucHJvZ25vei5ydTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL0K60I39PysxYaTdf1szaGw2FwZSU5OcAhXNqXI7P/q7QAVQ6Oe69W+NLyzGACunGTKa6TEzddz9K5AJ6SdXHWu12SVAZ+8JjW2XufYvtTtlGo+0e0bB2VIZYIMSZ6py/Ly0OoZzx498VMcwQFCFZbbI8f2S2uN3/fOC2DjuyJIhQQVryCWPdquT7bj70zZ0pSDLBKsi5+n6eu4uguaZTDFDAVItOAWk7rJckU0itQaSYz1tS+MZla4OlWSY1OvCWVD3NhheNZQVmuH9qxYqpH6YlxILunj/FhzzVjmcCvlVvrlD1Tyt0IPwqBaLVCXiDbXC3MAFYG5ZtvYBvyG2m0CAwEAAaMkMCIwCwYDVR0PBAQDAgQwMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA0GCSqGSIb3DQEBBQUAA4IBAQADJKrDiZFRdu+GSwNFNO1OrgpsJx6skNf4rRQSFDs4GwEGa7cZIS71Gj8s9ZTvUgtWHxT1lxhHkYoZE1ds5icNlWRYOpObSzjhp3CVwEmGTX8x8EOmJ1oLuqC9aT9iHh9ANrti2d0hHEnMFnU+z1DPhO1vq4kTL0x8Cw7bSyIuJWonslJyDlU9jLeX07OQGNj6JHYbkZkNDZI+vuaSfh8Gb1kB+ggHIIp5X/VaH49gfOjyc5v0XqCMNSnuJkfg+gD5NgYx2z4MejFe8oKz+Ne8n2GFqe9NnzkVFbWuXan7vsffnDQ/kr2DXARVd5CJvcfLJQzRrN2Lt0tx6wjK/42i</wsse:BinarySecurityToken>
</wsse:Security>
<egisz:transportHeader xmlns:egisz="http://egisz.rosminzdrav.ru" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="74a2c693-6d8f-37be-5966-dd4b0971ce56">
<egisz:authInfo>
<egisz:userSession></egisz:userSession>
<egisz:clientEntityId>http://demo.nsser.prognoz.ru/esiaia_client/</egisz:clientEntityId>
</egisz:authInfo>
</egisz:transportHeader>
<wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ffab7084-3965-5ef6-310d-efcceb774754">b0b7ad0f-0129c752-4901ad54-2201ebde-418da73f</wsa:MessageID>
<wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="c0ff2f54-bfe1-41fb-9c46-8061a65f0e6d">
<wsa:Address> http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="30ed97a5-fca3-1fbf-6691-f77ff65aa6de">urn:egisz:ips#Ping</wsa:Action>
<wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="158bb560-20e7-597d-c7f0-d10401584469">https://mz.nsser.prognoz.ru/esiaia/src/IPS/521d84f441037/</wsa:To>
<wsa:RelatesTo xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="6812ef2b-215e-ea43-fdcb-6c7bb65296bc"></wsa:RelatesTo>
</SOAP-ENV:Header>
<SOAP-ENV:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="78c922eb-28e0-0a61-dd26-bafdbbb25fc2">
<SendRequest xmlns="http://mis.er.atc.ru/ws">
<MessageData>
<AppData>
<messageCode>GetResources</messageCode>
<messageSourceToken>c8e061b0440a0133e901995056b10e5e</messageSourceToken> <message>PHBhcmFtcz48bW9faWQ+MzQ2MTwvbW9faWQ+PHNwZWNfaWQgLz48ZG9jdG9yX2lkIC8+PHNlcnZpY2VfaWQgLz48cGF5bWVudCAvPjxyb29tIC8+PHNvdXJjZV9jb2RlcyAvPjxzdGF0dXMgLz48ZnJvbSAvPjx0aWxsIC8+PC9wYXJhbXM+</message>
</AppData>
</MessageData>
</SendRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Не подскажете, как это можно реализовать, может есть какие-то стандартные средства?
Я пробовал подключить WSE 3.0, но у меня так ничего и не вышло. Очень нужна помощь.