Page History
...
| Code Block | ||
|---|---|---|
| ||
var idCardRequest = SOSIFactory.CreateNewUserIdCard(
"systemName",
new UserInfo(requestCpr, givenName, surName, email, occupation, role, authorizationcode),
new CareProvider(careProviderIdFormat, careProviderId, careProviderName),
AuthenticationLevel.MocesTrustedUser, userName, password, user.Certificate, "alternativeIdentifier");
awaitvar binding = new CustomBinding();
binding.Elements.Add(new TextMessageEncodingBindingElement(MessageVersion.Soap11WSAddressingAugust2004, Encoding.UTF8));
binding.Elements.Add(new HttpTransportBindingElement()); await LoginToGateway(idCardRequest, certificate);
var client = new Fmk.MedicineCardPortTypeClient(
binding, // MedicineCardPortTypeClient.EndpointConfiguration.MedicineCardPort, //kan Kanevt. ogsåbruges konfigureresi yderligere med System.ServiceModel.Channels.Bindingstedet CustomBinding
new EndpointAddress(new Uri("https://test2.fmk.netic.dk/fmk12/ws/MedicineCard")));
client.Endpoint.EndpointBehaviors.Add(
new ViaBehavior(new Uri("http://test2.ekstern-test.nspop.dk:8080/sosigw/proxy/soap-request")));
var response = await client.GetMedicineCard_2015_06_01Async(
Security: new SecurityHeaderType { },
Header: requestHeader,
WhitelistingHeader: whitelistingHeader,
GetMedicineCardRequest: new GetMedicineCardRequestType
{
PersonIdentifier = new PersonIdentifierType
{
source = "CPR",
Value = requestCpr
}
}); |
...