這是我面臨的問題,需要一些幫助/指導。我已經從我的引擎生成了一條XML消息,需要將其解析為服務。為此,我必須將該消息更改為SOAP消息并在其上插入SAML令牌。我正在嘗試使用C#代碼執行此操作。下面是我生成的輸入消息和預期輸出:輸入消息:刪除已在SOAP正文中插入的輸入消息期望的輸出消息:<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope" xmlns:wsse11="http://docs.oasisopen.org/wss/oasis-wss-wssecurity-secext-1.1.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-utility-1.0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:exc14n="http://www.w3.org/2001/10/xml-exc-c14n#"> <S:Header> <To mustUnderstand="true" xmlns="http://www.w3.org/2005/08/addressing">https://localhost:443/Gateway/PatientDiscovery/1_0/NwHINService/NwHINPatientDiscovery </To> <Action mustUnderstand="true" xmlns="http://www.w3.org/2005/08/addressing">urn:hl7-org:v3:PRPA_IN201305UV02:CrossGatewayPatientDiscovery </Action> <ReplyTo mustUnderstand="true" xmlns="http://www.w3.org/2005/08/addressing"> <Address>http://www.w3.org/2005/08/addressing/anonymous</Address> </ReplyTo> <MessageID mustUnderstand="true" xmlns="http://www.w3.org/2005/08/addressing">461433e3-4591-453b-9eb6-791c7f5ff882 </MessageID> <wsse:Security S:mustUnderstand="true"> <wsu:Timestamp wsu:Id="_1" xmlns:ns17="http://docs.oasis-open.org/ws-sx/wssecureconversation/200512" xmlns:ns16="http://schemas.xmlsoap.org/soap/envelope/"> <wsu:Created>2012-06-08T18:31:44Z</wsu:Created> <wsu:Expires>2012-06-08T18:36:44Z</wsu:Expires> </wsu:Timestamp> 使用X509證書我可以創建簽名部分。但是,我無法創建SAML斷言和SOAP消息。如果有人可以幫助/指導我這將是一個很大的幫助。這是我在C#中的代碼:刪除我的代碼因為它已經是主代碼庫的一部分
- 3 回答
- 0 關注
- 746 瀏覽
添加回答
舉報
0/150
提交
取消