<p class="MsoNormal">-------------I'm re-sending this email since I got it bounced back.</p><p class="MsoNormal"><br></p><p class="MsoNormal">Hello,</p>

<p class="MsoNormal"> </p><p class="MsoNormal">We've tried adapting one of our DICOM application into a CTK
Based Hosted App. It works well when tried with the ctkhost - we could launch
the app, load the DICOM data and get through different states as well.</p>

<p class="MsoNormal">However when tried launching the same app with different
non-ctk based host,  it launches our app but fails to load any data. This
non-ctk based host seems to be written using the WCF as per specification in
 DICOM 118.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">On investigating, we noticed that the initial ‘IDLE’ message
sent by the App upon launch is not getting processed by the Non-CTK based host.
</p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal">When traced the SOAP communication, we found<span style="color:#1F497D"> </span>out that the messages from the plug-in are
getting to the host, but then they are not processed by WCF because of some
WSDL contacts mismatch. Thus the host does not receive any messages. Here’s the
log message:<span style="color:#1F497D"></span></p>

<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";
color:blue"> </span></p>

<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";
color:blue"><</span><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";
color:#990000">Message</span><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";
color:blue">></span><b><span style="font-size:8.0pt;font-family:"Verdana","sans-serif"">The
message with Action '' cannot be processed at the receiver, due to a
ContractFilter mismatch at the EndpointDispatcher. This may be because of
either a contract mismatch (mismatched Actions between sender and receiver) or
a binding/security mismatch between the sender and the receiver.  Check
that sender and receiver have the same contract and the same binding (including
security requirements, e.g. Message, Transport, None).</span></b><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:blue"></</span><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#990000">Message</span><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:blue">></span></p>


<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";
color:blue"> </span></p>

<p class="MsoNormal">When debugging the WCF processing of the message we get the
deserialization error:</p>

<p class="MsoNormal">"The ':' character, hexadecimal value 0x3A, cannot be
included in a name. Line 4, position 11."</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Here’s the SOAP message braced between the CTK-plugin and
Non-CTK based Host:</p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;
font-family:Consolas;color:blue"><</span><span style="font-size:10.0pt;
font-family:Consolas;color:#A31515">SOAP-ENV:Envelope</span><span style="font-size:10.0pt;font-family:Consolas;color:blue"> </span><span style="font-size:10.0pt;font-family:Consolas;color:red">xmlns:SOAP-ENV</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">=</span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span lang="RU" style="font-size:10.0pt;font-family:Consolas;color:blue;mso-ansi-language:
RU"><a href="http://schemas.xmlsoap.org/soap/envelope/"><span lang="EN-US">http://schemas.xmlsoap.org/soap/envelope/</span></a></span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span style="font-size:10.0pt;font-family:Consolas;color:blue"> </span><span style="font-size:10.0pt;font-family:Consolas;color:red">SOAP-ENV:encodingStyle</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">=</span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span lang="RU" style="font-size:10.0pt;font-family:Consolas;color:blue;mso-ansi-language:
RU"><a href="http://schemas.xmlsoap.org/soap/encoding/"><span lang="EN-US">http://schemas.xmlsoap.org/soap/encoding/</span></a></span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span style="font-size:10.0pt;font-family:Consolas;color:blue"> </span><span style="font-size:10.0pt;font-family:Consolas;color:red">xmlns:xsd</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">=</span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span lang="RU" style="font-size:10.0pt;font-family:Consolas;color:blue;mso-ansi-language:
RU"><a href="http://www.w3.org/1999/XMLSchema"><span lang="EN-US">http://www.w3.org/1999/XMLSchema</span></a></span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">></span><span style="font-size:10.0pt;font-family:Consolas;color:black"></span></p>


<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;
font-family:Consolas;color:blue">        
<</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515">SOAP-ENV:Body</span><span style="font-size:10.0pt;font-family:Consolas;color:blue"> </span><span style="font-size:10.0pt;font-family:Consolas;color:red">xmlns:SOAP-ENV</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">=</span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span lang="RU" style="font-size:10.0pt;font-family:Consolas;color:blue;mso-ansi-language:
RU"><a href="http://schemas.xmlsoap.org/soap/envelope/"><span lang="EN-US">http://schemas.xmlsoap.org/soap/envelope/</span></a></span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">></span><span style="font-size:10.0pt;font-family:Consolas;color:black"></span></p>


<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;
font-family:Consolas;color:blue">                
<</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515">notifyStateChanged</span><span style="font-size:10.0pt;font-family:Consolas;color:blue"> </span><span style="font-size:10.0pt;font-family:Consolas;color:red">xmlns</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">=</span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span lang="RU" style="font-size:10.0pt;font-family:Consolas;color:blue;mso-ansi-language:
RU"><a href="http://wg23.dicom.nema.org/"><span lang="EN-US">http://wg23.dicom.nema.org/</span></a></span><span style="font-size:
10.0pt;font-family:Consolas;color:black">"</span><span style="font-size:
10.0pt;font-family:Consolas;color:blue">></span><span style="font-size:10.0pt;
font-family:Consolas;color:black"></span></p>

<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;
font-family:Consolas;color:blue">                         
<</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515">newState</span><span style="font-size:10.0pt;font-family:Consolas;color:blue"> </span><span style="font-size:10.0pt;font-family:Consolas;color:red">:type</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">=</span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">xsd:string</span><span style="font-size:10.0pt;font-family:Consolas;color:black">"</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">></span><span style="font-size:10.0pt;font-family:Consolas;color:black">IDLE</span><span style="font-size:10.0pt;font-family:Consolas;color:blue"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515">newState</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">></span><span style="font-size:10.0pt;font-family:Consolas;color:black"></span></p>


<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;
font-family:Consolas;color:blue">                
</</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515">notifyStateChanged</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">></span><span style="font-size:10.0pt;font-family:Consolas;color:black"></span></p>


<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;
font-family:Consolas;color:blue">        
</</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515">SOAP-ENV:Body</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">></span><span style="font-size:10.0pt;font-family:Consolas;color:black"></span></p>


<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;
font-family:Consolas;color:blue"></</span><span style="font-size:10.0pt;
font-family:Consolas;color:#A31515">SOAP-ENV:Envelope</span><span style="font-size:10.0pt;font-family:Consolas;color:blue">></span><span style="font-size:10.0pt;font-family:Consolas;color:black"></span></p>

<p class="MsoNormal"><span style="color:#1F497D"> </span></p>

<p class="MsoNormal">We can see the “:type” item in the newState element that’s
causing the error in WCF. Also, per DICOM supplement 118 it should be called
“state”, not “newState”.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Here’s the example of the SOAP message generated by Non-CTK
based HostedApp:</p>

<pre style="background:white"><span style="font-family:Consolas;color:blue"><</span><span style="font-family:Consolas;color:#A31515">s:Envelope</span><span style="font-family:Consolas;color:blue"> </span><span style="font-family:
Consolas;color:red">xmlns:s</span><span style="font-family:Consolas;color:blue">=</span><span style="font-family:Consolas;color:black">"</span><span lang="RU" style="font-family:Consolas;color:blue;mso-ansi-language:RU"><a href="http://schemas.xmlsoap.org/soap/envelope/"><span lang="EN-US">http://schemas.xmlsoap.org/soap/envelope/</span></a></span><span style="font-family:Consolas;color:black">"</span><span style="font-family:
Consolas;color:blue">></span><span style="font-family:Consolas;color:black"></span></pre><pre style="background:white"><span style="font-family:Consolas;color:blue">         <</span><span style="font-family:Consolas;color:#A31515">s:Body</span><span style="font-family:
Consolas;color:blue">></span><span style="font-family:Consolas;color:black"></span></pre><pre style="background:white"><span style="font-family:Consolas;color:blue">                 <</span><span style="font-family:Consolas;color:#A31515">NotifyStateChanged</span><span style="font-family:Consolas;color:blue"> </span><span style="font-family:
Consolas;color:red">xmlns</span><span style="font-family:Consolas;color:blue">=</span><span style="font-family:Consolas;color:black">"</span><span lang="RU" style="font-family:Consolas;color:blue;mso-ansi-language:RU"><a href="http://dicom.nema.org/PS3.19/HostService-20100825"><span lang="EN-US">http://dicom.nema.org/PS3.19/HostService-20100825</span></a></span><span style="font-family:Consolas;color:black">"</span><span style="font-family:
Consolas;color:blue">></span><span style="font-family:Consolas;color:black"></span></pre><pre style="background:white"><span style="font-family:Consolas;color:blue">                          <</span><span style="font-family:Consolas;color:#A31515">state</span><span style="font-family:
Consolas;color:blue">></span><span style="font-family:Consolas;color:black">IDLE</span><span style="font-family:Consolas;color:blue"></</span><span style="font-family:
Consolas;color:#A31515">state</span><span style="font-family:Consolas;
color:blue">></span><span style="font-family:Consolas;color:black"></span></pre><pre style="background:white"><span style="font-family:Consolas;color:blue">                 </</span><span style="font-family:Consolas;color:#A31515">NotifyStateChanged</span><span style="font-family:Consolas;color:blue">></span><span style="font-family:
Consolas;color:black"></span></pre><pre style="background:white"><span style="font-family:Consolas;color:blue">         </</span><span style="font-family:Consolas;color:#A31515">s:Body</span><span style="font-family:
Consolas;color:blue">></span><span style="font-family:Consolas;color:black"></span></pre><pre style="background:white"><span lang="RU" style="font-family:Consolas;color:blue;
mso-ansi-language:RU"></</span><span lang="RU" style="font-family:Consolas;
color:#A31515;mso-ansi-language:RU">s:Envelope</span><span lang="RU" style="font-family:Consolas;color:blue;mso-ansi-language:RU">></span><span lang="RU" style="font-family:Consolas;color:black;mso-ansi-language:RU"></span></pre>


<p class="MsoNormal"> </p>

<p class="MsoNormal">Next, we tried changing “newState” to “state” but again it
fails when tried with  the  non-ctk based host and producing the same
error.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:52,234 New
incoming connection </span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,469
"<SOAP-ENV:Envelope xmlns:SOAP-ENV="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>"
SOAP-ENV:encodingStyle="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>"
xmlns:xsd="<a href="http://www.w3.org/1999/XMLSchema">http://www.w3.org/1999/XMLSchema</a>"></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,469
<SOAP-ENV:Body xmlns:SOAP-ENV="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>"></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,485
<notifyStateChanged xmlns="<a href="http://wg23.dicom.nema.org/">http://wg23.dicom.nema.org/</a>"></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,500
<state :type="xsd:string">IDLE</state></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,500
</notifyStateChanged></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,516
</SOAP-ENV:Body></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,516
</SOAP-ENV:Envelope></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,531
" </span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,547
Submitted request  "notifyStateChanged" </span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,547 New
incoming connection </span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,563 New
incoming connection </span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,563
Response:  "<SOAP-ENV:Envelope xmlns:SOAP-ENV="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>"
SOAP-ENV:encodingStyle="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>"
xmlns:xsd="<a href="http://www.w3.org/1999/XMLSchema">http://www.w3.org/1999/XMLSchema</a>"></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,578
<SOAP-ENV:Body xmlns:SOAP-ENV="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>"></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,594
<SOAP-ENV:Fault xmlns:SOAP-ENV="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>"></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,594
<faultcode xsi:type="xsd:string" xmlns:xsi="<a href="http://www.w3.org/1999/XMLSchema-instance">http://www.w3.org/1999/XMLSchema-instance</a>">a:ActionNotSupported</faultcode></span></i></p>


<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,609
<faultstring xsi:type="xsd:string" xmlns:xsi="<a href="http://www.w3.org/1999/XMLSchema-instance">http://www.w3.org/1999/XMLSchema-instance</a>">The
message with Action '' cannot be processed at the receiver, due to a
ContractFilter mismatch at the EndpointDispatcher. This may be because of
either a contract mismatch (mismatched Actions between sender and receiver) or
a binding/security mismatch between the sender and the receiver.  Check
that sender and receiver have the same contract and the same binding (including
security requirements, e.g. Message, Transport, None).</faultstring></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,625
</SOAP-ENV:Fault></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,625
</SOAP-ENV:Body></span></i></p>

<p class="MsoNormal"><i><span style="font-size:9.0pt">2011-09-06 17:17:59,641
</SOAP-ENV:Envelope></span></i></p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">I even tried replacing the WSDL files with the one provided
by Non-CTK based  host, but still it doesn’t  seem to work.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">When looked at the code, I noticed a comment in the CTK code
(below methods)  “spec would be "state", java has
"newState" FIX JAVA/STANDARD”. Could  this be something we need
to look for? If so may I know what would be the change in Java side.</p>

<p class="MsoNormal"><i>void ctkDicomHostService::notifyStateChanged(ctkDicomAppHosting::State
state)</i></p>

<p class="MsoNormal"><i>void
ctkHostSoapMessageProcessor::processNotifyStateChanged(  const
QtSoapMessage &message, QtSoapMessage * /* reply */) const</i></p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Could you please advice? </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Thank you!</p>

<p class="MsoNormal">~Anthony</p>