|Q: List over services in the different WSDLs.|
|Q: How-to implement WCF Security - Username Tokens via Transport-based Security|
We recommend the following
approach to generate the client proxy:
should now be ready.
Q: I receive the error message: TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 220.127.116.11:8901
The origin of this issue is
most likely problems with internal proxysettings in your network.
Try setting useDefaultWebProxy to True in the config-file.
The proxy settings in Internet Explorer will then be used also
by the client. Otherwise, try setting useDefaultWebProxy to
False and add the attribute proxyAddress instead.
Q: I receive the error message: The HTTP service located at http://utvikling-webservice.ihelse.net:8901/DIPSHL7Connector/PatientRegistryService/ is too busy
Please check your firewall. It should be open for traffic on the port used by the service.
Q: I receive the error message: The message with Action 'urn:hl7-org:v3/…' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher.
Please check the service address in the configfile.
Q: Will these WSDL schemas be exactly according to the HL7 or will there be changes to this schemas to adapt to your system?
There are not planned any changes on the delivered WSDL files or other schemas.
To enable tracing on a wcf client, you can choose to manually set up the tracing by editing the elements in the web/app.config file, or use ”Microsoft Service Configuration Editor” (SvcConfigEditor.exe) to edit the config file. Then you can read/analyze the trace log by using the ”Microsoft Service Trace Viewer” (SvcTraceViewer.exe). This post shows you how to do this using the Microsoft Service Configuration Editor.
The tools are located in: \Program Files\Microsoft SDKs\Windows\v6.0A\Bin.
1. Open the config.file in the editor.
2. Enable tracing and configure the trace level. PS! Remember to save your changes, File -> Save.
3. When you have enabled tracing and saved the changes, you will be able to see the tracelog file, e.x. app_tracelog.svclog in the same folder as your config file.
To read/analyze the trace log, you may open the trace log in the”Microsoft Service Trace Viewer” (SvcTraceViewer.exe).
In this article I will show you how you can implement security on the WCF services.
Helse Vest will be configuring and using a security mode called "TransportWithMessageCredential" on all services that will be published in their domain.
This security mode means that we are extending the <basicHttpBinding> element by setting the security mode to "TransportWithMessageCredential" and then specifying the <clientCredentialType> attribute of the message mode to be that of "Username." Translated, this means: "We are sending a username credential type in the message's headers and that we would like to protect it via a transport-level security protocol." Helse Vest will configure IIS and the virtual directory security where this service is hosted to have secure communications (HTTPS/SSL).
The configuration file for both service and client will be looking approx. as shown in the example below.
<service type="MyFirstSecuredWCFService, WebApp">
<endpoint address="" contract="IMyFirstSecuredWCFService, WebApp"
binding="basicHttpBinding" bindingConfiguration="MySecuredBasicHttpBinding" />
<!-- UsernameToken over Transport Security -->
<message clientCredentialType ="UserName" />
On the client side, the following two lines have to be added into the code, adding the username and password credentials to the client-side channel factory.
ServiceClient client = new ServiceClient();
client.ChannelFactory.Credentials.UserName.UserName = "<UserName>";
client.ChannelFactory.Credentials.UserName.Password = "<SomePassword>";
The result will be a username token embedded in the <headers> of the SOAP message as shown below. The SOAP headers will be generated and added automatically if you are using the WCF/.NET framework when using <security mode="TransportWithMessageCredential">.
<o:Security s:mustUnderstand="1" xmlns:o="...">
<!— message body -->
We hope this article will clarify some of the aspect of implementing security in your clients.
For other questions about the HL7 Implementation,
please email: (remove space)
Morten Solheim Myhre : morten.solheim.myhre @helse-vest-ikt.no