Async version: 'application/xop+xml; ...' was not expected

Mar 27, 2012 at 1:41 PM

Hello,

I'm trying to test my Async services but, when i tried to retrieve a document that I insert into the with XDSTestHarness application in the Sync version, the XDSRequestService logs the following message:

Error: The remote server returned an error: (415) Cannot process the message because the content type 'application/xop+xml;charset=utf-8;type=application/soap+xml;' was not the expected type 'multipart/related; type="application/xop+xml"'..
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.IHE.XDS.RequestService.Utility.PostRequest(XmlDocument xmlRequest, Uri toURI, RequestQueue request) in C:\Local\VSwspace\IHE_ASYNC4.0\XDSRequestService\XDSRequestService\Utility.cs:line 101

To send the document request I used the following code (adapting it from the Sync version):

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml;
using System.Xml.XPath;
using System.ServiceModel.Channels;
using System.Security.Cryptography.X509Certificates;
using System.Net.Security;

namespace IHETests
{
    class Program
    {
        const string RETRIEVEDOCUMENTSET_WSAACTION = "urn:ihe:iti:2007:RetrieveDocumentSet";

        static readonly MessageVersion MESSAGE_VERSION = MessageVersion.Soap12WSAddressing10;

        static void Main(string[] args)
        {
            XmlDocument retrieveDocumentSetRequest = new XmlDocument();

            try
            {
                XmlElement root = retrieveDocumentSetRequest.CreateElement("RetrieveDocumentSetRequest", "urn:ihe:iti:xds-b:2007");

                XmlElement documentRequest = retrieveDocumentSetRequest.CreateElement("DocumentRequest", "urn:ihe:iti:xds-b:2007");
                XmlElement homeCommunityID = retrieveDocumentSetRequest.CreateElement("HomeCommunityId", "urn:ihe:iti:xds-b:2007");
                XmlElement repositoryUniqueID = retrieveDocumentSetRequest.CreateElement("RepositoryUniqueId", "urn:ihe:iti:xds-b:2007");
                XmlElement documentUniqueID = retrieveDocumentSetRequest.CreateElement("DocumentUniqueId", "urn:ihe:iti:xds-b:2007");

                homeCommunityID.InnerText = "$HomeCommunityID"; //docRequest.HomeCommunityID;
                repositoryUniqueID.InnerText = "2855d566-21f7-4c4f-b29a-4d59e3020096";//docRequest.RepositoryUniqueID;
                documentUniqueID.InnerText = "$uniqueId06";//docRequest.DocumentUniqueID;

                documentRequest.AppendChild(homeCommunityID);
                documentRequest.AppendChild(repositoryUniqueID);
                documentRequest.AppendChild(documentUniqueID);

                root.AppendChild(documentRequest);

                retrieveDocumentSetRequest.AppendChild(root);

                Message msgInput, msgOutput;

                msgInput = Message.CreateMessage(MESSAGE_VERSION
                                                     , RETRIEVEDOCUMENTSET_WSAACTION
                                                     , new XmlNodeReader(retrieveDocumentSetRequest));
                //SerializaMessage(msgInput);

                msgOutput = Message.CreateMessage(MESSAGE_VERSION, ""); //, "urn:ihe:iti:2007:RetrieveDocumentSetResponse"

                System.Net.ServicePointManager.ServerCertificateValidationCallback =
                delegate(Object obj, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
                {
                    // Replace this line with code to validate server certificate.
                    if (errors == SslPolicyErrors.None || errors == SslPolicyErrors.RemoteCertificateNameMismatch)
                        return true;

                    return false;
                };

                //XDSRepository.XDSRepositoryClient client = new XDSRepository.XDSRepositoryClient(GetRepositoryEndPointName());
                XDSRepositoryAsyncClient client = new XDSRepositoryAsyncClient(GetRepositoryEndPointName());

                //msgOutput = client.RetrieveDocumentSet(msgInput);
                client.RetrieveDocumentSet(msgInput);

                //XmlDictionaryReader rdr = msgOutput.GetReaderAtBodyContents();

                //XmlDocument result = new XmlDocument();
                //result.Load(rdr);

                //XmlNode fault = result.SelectSingleNode(@"//*[local-name()='Fault']");
                //XmlNode errorList = result.SelectSingleNode(@"//*[local-name()='RegistryErrorList']");

                //if (fault != null)
                //{
                //    System.Console.Error.WriteLine("Error occurred when executing web service.");
                //    System.Console.Error.WriteLine(fault.OuterXml);
                //}
                //else
                //{
                //    if (errorList != null)
                //    {
                //        System.Console.Error.WriteLine("Transaction resulted in Error!");
                //        System.Console.Error.WriteLine(result.OuterXml);
                //    }
                //    else
                //    {
                //        System.Console.Out.WriteLine("Transaction succeded!");
                //        System.Console.Out.WriteLine(result.OuterXml);
                //    }
                //}

            }
            catch (Exception ex)
            {
                System.Console.Error.WriteLine(ex.ToString());
            }

            System.Console.ReadLine();
        }

        private static string GetRegistryEndPointName()
        {
            return System.Configuration.ConfigurationManager.AppSettings["REGISTRY_ENDPOINT_NAME"];
        }

        private static string GetRepositoryEndPointName()
        {
            return System.Configuration.ConfigurationManager.AppSettings["REPOSITORY_ENDPOINT_NAME"];
        }

        private static void SerializaMessage(Message requestMessage)
        {
            using (FileStream stream = new FileStream(@"message.xml", FileMode.Create))
            {
                using (XmlWriter writer = XmlWriter.Create(stream))
                {

                    requestMessage.WriteMessage(writer);
                    writer.Close();
                }
            }
            //db insert code here
        }

    }
}

I didn't found any example related to the Async version, so I thought that it is just needed to change the client classes from the Sync version to those of the Async version. Any idea?

Mar 27, 2012 at 1:46 PM

I missed to post my App.config:

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <!--<add key="ebRIMTransformFile" value="D:\xds\Connectathon2012\Connectathon2012\source\Testing\XDSTestHarness\TransformFiles\ebRIM_21_to30_Conversion1.xslt"/>-->
    <!--<add key="ebRIMTransformFile" value="D:\xds\Connectathon2012\Connectathon2012\source\Testing\XDSTestHarness\TransformFiles\ebRIM_21_to30_Conversion1"/>-->
    <add key="REPOSITORY_ENDPOINT_NAME" value="CustomBinding_IXDSRepositoryAsync"/>
    <add key="REGISTRY_ENDPOINT_NAME" value="CustomBinding_IXDSRegistryAsync"/>
  </appSettings>
  <system.web>
    <webServices>
      <protocols>
        <add name="HttpGet"/>
        <add name="HttpPost"/>
      </protocols>
    </webServices>
  </system.web>
  <system.serviceModel>
    <bindings>
      <customBinding>
        <binding name="CustomBinding_IXDSRepositoryAsync">
          <compositeDuplex/>
          <oneWay maxAcceptedChannels="10" packetRoutable="false">
            <channelPoolSettings idleTimeout="00:02:00" leaseTimeout="00:10:00" maxOutboundChannelsPerEndpoint="10"/>
          </oneWay>
          <mtomMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Default" maxBufferSize="65536" writeEncoding="utf-8">
            <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
          </mtomMessageEncoding>
          <httpTransport manualAddressing="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true"/>
        </binding>
        <binding name="CustomBinding_IXDSRegistryAsync">
          <compositeDuplex/>
          <oneWay maxAcceptedChannels="10" packetRoutable="false">
            <channelPoolSettings idleTimeout="00:02:00" leaseTimeout="00:10:00" maxOutboundChannelsPerEndpoint="10"/>
          </oneWay>
          <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Default" writeEncoding="utf-8">
            <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
          </textMessageEncoding>
          <httpTransport manualAddressing="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true"/>
        </binding>
      </customBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:8731/XDSAsyncService/Microsoft.IHE.XDS.AsyncApp.Repository/XDSRepositoryAsync/" binding="customBinding" bindingConfiguration="CustomBinding_IXDSRepositoryAsync" contract="IXDSRepositoryAsync" name="CustomBinding_IXDSRepositoryAsync">
        <identity>
          <dns value="localhost"/>
        </identity>
      </endpoint>
      <endpoint address="http://localhost:8731/XDSAsyncService/Microsoft.IHE.XDS.AsyncApp.Registry/XDSRegistryAsync/" binding="customBinding" bindingConfiguration="CustomBinding_IXDSRegistryAsync" contract="IXDSRegistryAsync" name="CustomBinding_IXDSRegistryAsync">
        <identity>
          <dns value="localhost"/>
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

Mar 28, 2012 at 2:00 AM
Edited Mar 28, 2012 at 2:01 AM

hi,

iadegesso
i meet a problem that you may help me.

I successfully configured, installed and started  the both (Repository  & Registry ) services. But I am unable to browse the services.

 I uninstalled both the services and stopped the IIS and reinstalled the services,this problem still is here.

i set "machinename":(my comupter name:DengMin-PC)

and set "port"both in these App.configs of registry service and repository service to be "6025",which is free port in my computer.is it right?(these port are the same?)

thanks

regards

DengMin_1

Mar 28, 2012 at 7:39 AM

My services are all up and running wihout the need of stopping IIS... and they work using ports specified into documentation... but you cannot use the same port for two different services on the same machine...

 

My problem is not that services don't run, but with the MIME type of the response, as shown above

 

Iade

Mar 28, 2012 at 11:05 AM

DengMin_1 i checked my configuration and also my services run both on the same port... sorry

Mar 29, 2012 at 1:52 AM

hi

Iade

did you just modify these three app.config ?the other documents in the source folder just keep the same?

thanks

DengMin

Mar 29, 2012 at 6:43 AM

thanks for telling me this important news

 

Mar 29, 2012 at 7:03 AM

Yes, I just modified them, as in the instructions

Iade

Mar 29, 2012 at 7:37 AM
iadegesso wrote:

Yes, I just modified them, as in the instructions

Iade


i followed the :Documentation/<XDSb Build and Deployment Guide>

**************************************************************************

NOTE:i did not config the"TLS",so when i met this step,I fellowed this part in the document:

Note: If TLS is not configured,

  • comment <servicecredentials> block in “XDSRepositoryServiceHost\App.config” and “XDSRepositoryServiceHost\App.config” for the services to browse,
  • Also configure all the bindings to use HTTP only, no HTTPS.
  • these steps,i can not browse the registry and repository service

************************************************************************************************

NOTE:to this step,i can not understand ,what should i do for "configure log path"

 

Configure Log Path:

Modify path name in

<sharedListeners>

           <add initializeData="C:\Log\App_tracelog_Reg.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

        name="TraceListener" >

to the file path and filename in the local system.

 

Mar 29, 2012 at 9:36 AM

Hi,

NOTE:i did not config the"TLS",so when i met this step,I fellowed this part in the document:

I commented HTTPS tags only, and it works...

NOTE:to this step,i can not understand ,what should i do for "configure log path"

Just change the value of initializeData attribute

Mar 29, 2012 at 1:21 PM

thanks very much

Iade.

i will try it.

Mar 29, 2012 at 1:57 PM

Deng have you some suggestions to help me to retrieve data response from the XDSRepositoryAsyncClient RetrieveDocumentSet() call?

Thanks

Iade

Mar 30, 2012 at 3:21 AM
Edited Mar 30, 2012 at 5:02 AM

Iade

Unfortunately,wiht  the method you said, I still encounter obstacles,it does not work.

  you can paste your code of the three App.config files metioned in the  <XDSb Build and Deployment Guide> out ?

 

 because I have encountered many problems in the configuration of the previous step,i can not answer your question.i am sorry.


When I do the steps after, I think I will meet the problem you say,

 thanks for your help

Deng

my email :dengminsmile0515@yeah.net

 

Mar 30, 2012 at 7:36 AM

XDSDocumentRepositoryServiceHost:

<?
xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data"/> <section name="storageprovider" type="Microsoft.IHE.XDS.DocumentRepository.StorageProvider.SQLProviderSection,Microsoft.IHE.XDS.DocumentRepository.StorageProvider" /> </configSections> <system.web> <webServices> <protocols> <add name="HttpGet" /> <add name="HttpPost" /> </protocols> </webServices> </system.web> <system.diagnostics> <sources> <source name="System.ServiceModel.MessageLogging" switchValue="Verbose,ActivityTracing"> <listeners> <add type="System.Diagnostics.DefaultTraceListener" name="Default"> <filter type="" /> </add> <add name="TraceListener"> <filter type="" /> </add> </listeners> </source> </sources> <sharedListeners> <add initializeData="C:\Log\App_tracelog_Rep.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="TraceListener"> <filter type="" /> </add> </sharedListeners> </system.diagnostics> <connectionStrings> <add name="XDSRequestAsync" connectionString="Initial Catalog=XDS_REQUEST;Data Source=localhost;uid=admin;pwd=Enter321;Enlist=false;" providerName="System.Data.SqlClient" /> <add name="XDSRepository" connectionString="Initial Catalog=XDSRepositoryDB;Data Source=localhost;uid=admin;pwd=Enter321;Enlist=false;" providerName="System.Data.SqlClient" /> <add name="CONSTRING" connectionString="Initial Catalog=XDSRegistryDB;Data Source=localhost;uid=admin;pwd=Enter321;Enlist=false;" providerName="System.Data.SqlClient" /> <!--<add name="ConnectionString" connectionString="Initial Catalog=XDS_REQUEST_C1;Data Source=ilink\sql2008;uid=sa;pwd=Enter321;Enlist=false;" providerName="System.Data.SqlClient" />--> <add name="ATNA" connectionString="Initial Catalog=XDSRepositoryDB;Data Source=localhost;uid=admin;pwd=Enter321;Enlist=false;" providerName="System.Data.SqlClient" /> </connectionStrings> <appSettings> <add key="HASH_ALGORITHM" value="SHA1" /> <add key="SYSLOG_SERVER" value="sun1" /> <add key="SYSLOG_PORT" value="4010" /> <!-- HTTPS/TLS --> <!--<add key="XDSREPOSITORY_SERVICE_ADDRESS" value="https://msft-ihe1:8081/XdsService/XDSRepository" /> <add key="XDSREGISTRY_SERVICE_ADDRESS" value="https://msft-ihe1:8081/XdsService/XDSRegistry"/> <add key ="XDSREGISTRY_ENDPOINT_NAME" value="XDSRegistry_HTTPS_Endpoint"/>--> <!-- HTTPS/TLS --> <!-- HTTP --> <!--<add key="XDSREPOSITORY_SERVICE_ADDRESS" value="https://localhost:9081/XdsService/XDSRepository" />--> <!--<add key="XDSREGISTRY_SERVICE_ADDRESS" value="https://icw2:8443/ehealth/webservices/xdsb-registerdocuments" />--> <add key="XDSREPOSITORY_SERVICE_ADDRESS" value="http://localhost:1025/XdsService/XDSRepository" /> <add key="XDSREGISTRY_SERVICE_ADDRESS" value="http://localhost:1025/xdsservice/xdsregistry" /> <add key="XDSREPOSITORY_SERVICE_ADDRESS" value="https://localhost:9081/XdsService/XDSRepository" /> <add key="XDSREGISTRY_SERVICE_ADDRESS" value="https://localhost:9080/xdsservice/xdsregistry" /> <add key="XDSREGISTRY_ENDPOINT_NAME" value="XDSRegistry_HTTP_Endpoint" /> <!-- <add key="XDSREGISTRY_ENDPOINT_NAME" value="XDSRegistry_HTTPS_Endpoint" /> --> <!-- HTTP --> <!-- changes for PnR - register document set async --> <add key="IsAsync" value="false"/> </appSettings> <!-- This is the custom provider section which gets loaded into the QualityData.MyProviderSection Class --> <storageprovider defaultProvider="SQLStorageProvider"> <!-- Change this to swap providers --> <providers> <clear /> <!-- Here are one or more providers, each defined by its type "Class Name, DLL Name" and each with settings. Within the class, MyProviderSection, these get loaded into and are accessed by "Providers" property --> <add name="SQLStorageProvider" type="Microsoft.IHE.XDS.DocumentRepository.StorageProvider.SQLServerStorageProvider,Microsoft.IHE.XDS.DocumentRepository.StorageProvider" /> </providers> </storageprovider> <system.serviceModel> <diagnostics> <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxSizeOfMessageToLog="50000000" /> </diagnostics> <services> <service behaviorConfiguration="XDSRepository_ServiceBehavior" name="Microsoft.IHE.XDS.DocumentRepository.DocumentRepositoryService"> <endpoint address="https://localhost:9081/XdsService/XDSRepository" binding="wsHttpBinding" bindingConfiguration="XDSRepository_HTTPS" name="XDSRepository_HTTPS_Endpoint" contract="Microsoft.IHE.XDS.DocumentRepository.IDocumentRepository" /> <endpoint address="http://localhost:1025/XdsService/XDSRepository" binding="wsHttpBinding" bindingConfiguration="XDSRepository_HTTP" name="XDSRepository_HTTP_Endpoint" contract="Microsoft.IHE.XDS.DocumentRepository.IDocumentRepository" /> <endpoint address="http://localhost/XdsService/XDSRepository" binding="mexHttpBinding" name="XDSRepository_Metadata_Endpoint" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="https://localhost:9081/XdsService/XDSRepository" /> <add baseAddress="http://localhost:1025/XdsService/XDSRepository" /> </baseAddresses> </host> </service> </services> <bindings> <wsHttpBinding> <binding name="XDSRepository_HTTPS" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Mtom" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="Transport"> <transport clientCredentialType="Certificate" proxyCredentialType="None" /> <message clientCredentialType="None" establishSecurityContext="false" negotiateServiceCredential="false" /> </security> </binding> <!-- HTTP ONLY --> <binding name="XDSRepository_HTTP" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Mtom" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" /> <message clientCredentialType="None" establishSecurityContext="false" negotiateServiceCredential="false" /> </security> </binding> <!-- HTTP ONLY --> <binding name="XDSRegistry_HTTPS_Endpoint" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="Transport"> <transport clientCredentialType="Certificate" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="true" /> </security> </binding> <binding name="XDSRegistry_HTTP_Endpoint" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="None"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="true" /> </security> </binding> </wsHttpBinding> </bindings> <client> <!--<endpoint address="https://icw2:8443/ehealth/webservices/xdsb-registerdocuments" binding="wsHttpBinding" bindingConfiguration="XDSRegistry_HTTPS_Endpoint" contract="Microsoft.IHE.XDS.DocumentRepository.XDSRegistry.XDSRegistry" name="XDSRegistry_HTTPS_Endpoint" behaviorConfiguration="XDSRegistry_HTTPS_EndPointBehaviour" />--> <endpoint address="https://localhost:9080/xdsservice/xdsregistry" binding="wsHttpBinding" bindingConfiguration="XDSRegistry_HTTPS_Endpoint" contract="Microsoft.IHE.XDS.DocumentRepository.XDSRegistry.XDSRegistry" name="XDSRegistry_HTTPS_Endpoint" behaviorConfiguration="XDSRegistry_HTTPS_EndPointBehaviour" /> <!--<endpoint address="http://localhost:8731/XDSAsyncService/Microsoft.IHE.XDS.AsyncApp.Registry/XDSRegistryAsync/" binding="wsHttpBinding" bindingConfiguration="XDSRegistry_HTTP_Endpoint" contract="Microsoft.IHE.XDS.DocumentRepository.XDSRegistry.XDSRegistry" name="XDSRegistry_HTTP_Endpoint" />--> <!--<endpoint address="http://emc-ihe1:9092/mosaix-iti42" binding="wsHttpBinding" bindingConfiguration="XDSRegistry_HTTP_Endpoint" contract="Microsoft.IHE.XDS.DocumentRepository.XDSRegistry.XDSRegistry" name="XDSRegistry_HTTP_Endpoint" />--> <!--<endpoint address="http://misys3:8010/axis2/services/xdsregistryb" binding="wsHttpBinding" bindingConfiguration="XDSRegistry_HTTP_Endpoint" contract="Microsoft.IHE.XDS.DocumentRepository.XDSRegistry.XDSRegistry" name="XDSRegistry_HTTP_Endpoint" />--> <endpoint address="http://localhost:1025/xdsservice/xdsregistry" binding="wsHttpBinding" bindingConfiguration="XDSRegistry_HTTP_Endpoint" contract="Microsoft.IHE.XDS.DocumentRepository.XDSRegistry.XDSRegistry" name="XDSRegistry_HTTP_Endpoint" /> </client> <behaviors> <serviceBehaviors> <behavior name="XDSRepository_ServiceBehavior"> <serviceDebug includeExceptionDetailInFaults="true" /> <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> <!-- HTTP ONLY --> <!--<serviceMetadata httpGetEnabled="true" />--> <!-- HTTP ONLY --> <!-- <serviceCredentials> --> <!-- <serviceCertificate findValue="99e0fb6df06d82f2a802a9e5a1ca34c8e443f4fa" storeLocation="LocalMachine" storeName="Root" x509FindType="FindByThumbprint"/> --> <!-- </serviceCredentials> --> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="XDSRegistry_HTTPS_EndPointBehaviour"> <clientCredentials> <clientCertificate findValue ="f05be3965ae2ef0c7b296a8410b120fef39442a1" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint"/> </clientCredentials> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"></supportedRuntime> </startup> </configuration>

Mar 30, 2012 at 7:37 AM

XDSRegistryServiceHost:

<?
xml version="1.0"?> <configuration> <configSections> <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data"/> </configSections> <system.diagnostics> <sources> <source name="System.ServiceModel.MessageLogging" switchValue="Verbose,ActivityTracing"> <listeners> <add type="System.Diagnostics.DefaultTraceListener" name="Default"> <filter type=""/> </add> <add name="TraceListener"> <filter type=""/> </add> </listeners> </source> </sources> <sharedListeners> <add initializeData="C:\Log\App_tracelog_Reg.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="TraceListener"> <filter type=""/> </add> </sharedListeners> </system.diagnostics> <connectionStrings> <!--<add name="XDSRegistry" connectionString="Initial Catalog=XDSRegistryDB;Data Source=ilink\sql2005;uid=admin;pwd=Enter321;" providerName="System.Data.SqlClient" />--> <add name="XDSRegistry" connectionString="Initial Catalog=XDSRegistryDB;Data Source=localhost;uid=admin;pwd=Enter321;Enlist=false;" providerName="System.Data.SqlClient"/> <add name="ATNA" connectionString="Initial Catalog=XDSRegistryDB;Data Source=localhost;uid=admin;pwd=Enter321;" providerName="System.Data.SqlClient"/> <add name="CONSTRING" connectionString="Initial Catalog=XDS_REQUEST;Data Source=localhost;uid=admin;pwd=Enter321;" providerName="System.Data.SqlClient"/> <!--<add name="ConnectionString" connectionString="Initial Catalog=XDS_Request;Data Source=ilink\sql2008;uid=sa;pwd=Enter321;" providerName="System.Data.SqlClient"/>--> </connectionStrings> <appSettings> <add key="SYSLOG_SERVER" value="misys1"/> <add key="SYSLOG_PORT" value="2863"/> <add key="XDSREGISTRY_SERVICE_ADDRESS" value="http://localhost:1025/xdsservice/xdsregistry"/> <add key="PATIENT_ROOT_EXTENSION_SEPARATOR" value="{0}^^^&amp;{1}&amp;ISO"/> <add key="ClientSettingsProvider.ServiceUri" value=""/> </appSettings> <system.serviceModel> <diagnostics> <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxSizeOfMessageToLog="50000000"/> </diagnostics> <services> <service name="Microsoft.IHE.XDS.DocumentRegistry.DocumentRegistryService" behaviorConfiguration="XDSRegistry_ServiceBehavior"> <host> <baseAddresses> <!-- HTTPS/TLS --> <add baseAddress="https://localhost:9080/xdsservice/xdsregistry"/> <!-- HTTPS/TLS --> <!-- HTTP ONLY --> <add baseAddress="http://localhost:1025/xdsservice/xdsregistry"/> <!-- HTTP ONLY --> </baseAddresses> </host> <endpoint name="XDSRegistry_HTTPS_Endpoint" contract="Microsoft.IHE.XDS.DocumentRegistry.IDocumentRegistry" address="https://localhost:9080/xdsservice/xdsregistry" binding="wsHttpBinding" bindingConfiguration="XDSRegistry_HTTPS"/> <!-- HTTP ONLY --> <endpoint name="XDSRegistry_HTTP_Endpoint" contract="Microsoft.IHE.XDS.DocumentRegistry.IDocumentRegistry" address="http://localhost:1025/xdsservice/xdsregistry" binding="wsHttpBinding" bindingConfiguration="XDSRegistry_HTTP"/> <!-- HTTP ONLY --> <endpoint name="XDSRegistry_Metadata_Endpoint" address="http://localhost/xdsservice/xdsregistry" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <bindings> <wsHttpBinding> <binding name="XDSRegistry_HTTPS" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647"/> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/> <security mode="Transport"> <transport clientCredentialType="Certificate" proxyCredentialType="None"/> <message clientCredentialType="None" establishSecurityContext="false" negotiateServiceCredential="false"/> </security> </binding> <!-- HTTP ONLY --> <binding name="XDSRegistry_HTTP" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647"/> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None"/> <message clientCredentialType="None" establishSecurityContext="false" negotiateServiceCredential="false"/> </security> </binding> <!-- HTTP ONLY --> </wsHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="XDSRegistry_ServiceBehavior"> <serviceDebug includeExceptionDetailInFaults="true"/> <!--ilink--> <!--<serviceMetadata httpGetEnabled="true" />--> <!-- HTTP ONLY --> <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> <!-- HTTP ONLY --> <!-- <serviceCredentials> --> <!-- <serviceCertificate findValue ="2da3869ff0c8b8744c598edc5ddff88fc99ebd5a" storeLocation="LocalMachine" storeName="Root" x509FindType="FindByThumbprint"/> --> <!-- <serviceCertificate findValue ="f05be3965ae2ef0c7b296a8410b120fef39442a1" storeLocation="LocalMachine" storeName="Root" x509FindType="FindByThumbprint"/> --> <!-- </serviceCredentials> --> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> <system.web> <membership defaultProvider="ClientAuthenticationMembershipProvider"> <providers> <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/> </providers> </membership> <roleManager defaultProvider="ClientRoleProvider" enabled="true"> <providers> <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/> </providers> </roleManager> </system.web> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.ServiceModel" publicKeyToken="B77A5C561934E089" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration>

Mar 30, 2012 at 8:01 AM
Edited Mar 30, 2012 at 8:13 AM

these app.config files almost are the same with the source paper.

####################################

note:your port is 1025 which is occupied ,(which i can not understand i think it is wrong port)

#####################################

this <connectionString>part  is not modified in accordance with the requirements in the document.

add name="XDSRequestAsync" connectionString="Initial Catalog=XDS_REQUEST;Data Source=localhost;uid=admin;pwd=Enter321;Enlist=false;"

should modify fellowed this :

 Locate the node that starts with <add name=”XDSRequestAsync

On that node, replace the value of the connectionString attribute with the following value:
Initial Catalog=XDS_Request; Server=<machinename>;Integrated Security=SSPI

############################################

<sharedListeners>
      <add initializeData"----------------

         -this part is the same with source app.config which is not modified.

 

thanks

DengMin

 

Mar 30, 2012 at 8:22 AM

I found that documentation in not aligned with last source version...

My 1025 port seems to be not occupied in my Windows 7 machine

 

Iade

Mar 30, 2012 at 8:43 AM

god.i feel very Confused.

my 1025 is occupied bu "wininit.exe"

do you have email ?

we can discuss in email that can show picture.

i can show the different and vague parts to you.

thanks very much

regards

DengMin