<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'><br><font class="Apple-style-span" size="3">Hi Anthony,</font><div>Sascha gave you all the technical answers we had in stock so far, but I can add a bit of context here, it may help.</div><div><br><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; ">As Sascha said, the state/newState switch is due to XIP not following the specifications. And your change is valid. We started with "state", but the only other host we could use being XIP, we changed it. You are welcome to revert it.</div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; ">I think we notified Larry (Lawrence Tarbox) of that problem during the last hackfest in Chapel Hill. Eventually XIP will change its API there (or so I hope).</div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; ">Replacing the WSDL files doesn't change anything since we don't use them to generate the interface, all the messages are hard coded soap messages constructed from C++.</div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; ">Now I know nothing of the WCF unfortunately, so I can't tell you whether the "type:" keyword is misinterpreted or whatever. Sascha's suggestion of changing the casing sounds promising to me. I remember we used capitals in some actions , following the WSDL actually, and had to change it afterwards for specifications and XIP compatibility. I remember Larry telling us the WSDL provided in the specs was not up to date, and thus we provide an updated (or at least it was valid last february) set of WSDL (and siblings) files there: <span class="Apple-style-span" style="font-size: medium; "><a href="http://www.commontk.org/index.php/File:Wsdl_ft.zip">http://www.commontk.org/index.php/File:Wsdl_ft.zip</a></span></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; "><span class="Apple-style-span" style="font-size: medium; "><br></span></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; ">Note that they also have actions starting with capitals. I have a faint memory of Larry giving us an explanation as to why they were upper cased, but I can't remember the reason, my guess is that the .Net implementation forced them to do so. And it is very well possible that the XIP java implementation accepts both casing and the .NET or WCF are stricter, so I guess you'll have to choose between the proposed WSDL and the specifications...</div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; "><br></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; ">Keep us posted of your progress.</div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; "><br></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; ">Ben</div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; "><br><hr id="zwchr"><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;">
<title></title>
Hi Anthony,<br>
<br>
Welcome to the ctk-developers list.<br>
<br>
<blockquote cite="mid:CA+rdb6SXRv7pe74i4Eq8P9yenG5yWLHHFxEZZzkA9q=3ACL9Fw@mail.gmail.com">
<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>
</blockquote>
<br>
So far, good news.<br>
<br>
<blockquote cite="mid:CA+rdb6SXRv7pe74i4Eq8P9yenG5yWLHHFxEZZzkA9q=3ACL9Fw@mail.gmail.com">
<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>
</blockquote>
<br>
Please note that we could only test our implementation against the
XIP host (written in Java) so far. So the problems you are
experiencing might very well relate to our implementation.<br>
<br>
<blockquote cite="mid:CA+rdb6SXRv7pe74i4Eq8P9yenG5yWLHHFxEZZzkA9q=3ACL9Fw@mail.gmail.com">
<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: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal">When traced the SOAP communication, we found<span style="color: rgb(31, 73, 125);"> </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: rgb(31, 73, 125);"></span></p>
<p class="MsoNormal"><span style="font-size: 8pt; font-family:
"Verdana","sans-serif"; color: blue;"> </span></p>
<p class="MsoNormal"><span style="font-size: 8pt; font-family:
"Verdana","sans-serif"; color: blue;"><</span><span style="font-size: 8pt; font-family:
"Verdana","sans-serif"; color: rgb(153, 0,
0);">Message</span><span style="font-size: 8pt; font-family:
"Verdana","sans-serif"; color: blue;">></span><b><span style="font-size: 8pt; 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: 8pt; font-family:
"Verdana","sans-serif"; color: blue;"></</span><span style="font-size: 8pt; font-family:
"Verdana","sans-serif"; color: rgb(153, 0,
0);">Message</span><span style="font-size: 8pt; font-family:
"Verdana","sans-serif"; color: blue;">></span></p>
<p class="MsoNormal"><span style="font-size: 8pt; 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: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal" style="background: none repeat scroll 0% 0%
white;"><span style="font-size: 10pt; font-family: Consolas;
color: blue;"><</span><span style="font-size: 10pt;
font-family: Consolas; color: rgb(163, 21, 21);">SOAP-ENV:Envelope</span><span style="font-size: 10pt; font-family: Consolas; color: blue;"> </span><span style="font-size: 10pt; font-family: Consolas; color: red;">xmlns:SOAP-ENV</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">=</span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;" lang="RU"><a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank"><span lang="EN-US">http://schemas.xmlsoap.org/soap/envelope/</span></a></span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;"> </span><span style="font-size: 10pt; font-family: Consolas; color: red;">SOAP-ENV:encodingStyle</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">=</span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;" lang="RU"><a href="http://schemas.xmlsoap.org/soap/encoding/" target="_blank"><span lang="EN-US">http://schemas.xmlsoap.org/soap/encoding/</span></a></span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;"> </span><span style="font-size: 10pt; font-family: Consolas; color: red;">xmlns:xsd</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">=</span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;" lang="RU"><a href="http://www.w3.org/1999/XMLSchema" target="_blank"><span lang="EN-US">http://www.w3.org/1999/XMLSchema</span></a></span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">></span><span style="font-size: 10pt; font-family: Consolas; color: black;"></span></p>
<p class="MsoNormal" style="background: none repeat scroll 0% 0%
white;"><span style="font-size: 10pt; font-family: Consolas;
color: blue;">
<</span><span style="font-size: 10pt; font-family:
Consolas; color: rgb(163, 21, 21);">SOAP-ENV:Body</span><span style="font-size: 10pt; font-family: Consolas; color: blue;"> </span><span style="font-size: 10pt; font-family: Consolas; color: red;">xmlns:SOAP-ENV</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">=</span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;" lang="RU"><a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank"><span lang="EN-US">http://schemas.xmlsoap.org/soap/envelope/</span></a></span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">></span><span style="font-size: 10pt; font-family: Consolas; color: black;"></span></p>
<p class="MsoNormal" style="background: none repeat scroll 0% 0%
white;"><span style="font-size: 10pt; font-family: Consolas;
color: blue;">
<</span><span style="font-size: 10pt; font-family:
Consolas; color: rgb(163, 21, 21);">notifyStateChanged</span><span style="font-size: 10pt; font-family: Consolas; color: blue;"> </span><span style="font-size: 10pt; font-family: Consolas; color: red;">xmlns</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">=</span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;" lang="RU"><a href="http://wg23.dicom.nema.org/" target="_blank"><span lang="EN-US">http://wg23.dicom.nema.org/</span></a></span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">></span><span style="font-size: 10pt; font-family: Consolas; color: black;"></span></p>
<p class="MsoNormal" style="background: none repeat scroll 0% 0%
white;"><span style="font-size: 10pt; font-family: Consolas;
color: blue;">
<</span><span style="font-size: 10pt; font-family:
Consolas; color: rgb(163, 21, 21);">newState</span><span style="font-size: 10pt; font-family: Consolas; color: blue;"> </span><span style="font-size: 10pt; font-family: Consolas; color: red;">:type</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">=</span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">xsd:string</span><span style="font-size: 10pt; font-family: Consolas; color: black;">"</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">></span><span style="font-size: 10pt; font-family: Consolas; color: black;">IDLE</span><span style="font-size: 10pt; font-family: Consolas; color: blue;"></</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(163,
21, 21);">newState</span><span style="font-size: 10pt;
font-family: Consolas; color: blue;">></span><span style="font-size: 10pt; font-family: Consolas; color: black;"></span></p>
<p class="MsoNormal" style="background: none repeat scroll 0% 0%
white;"><span style="font-size: 10pt; font-family: Consolas;
color: blue;">
</</span><span style="font-size: 10pt; font-family:
Consolas; color: rgb(163, 21, 21);">notifyStateChanged</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">></span><span style="font-size: 10pt; font-family: Consolas; color: black;"></span></p>
<p class="MsoNormal" style="background: none repeat scroll 0% 0%
white;"><span style="font-size: 10pt; font-family: Consolas;
color: blue;">
</</span><span style="font-size: 10pt; font-family:
Consolas; color: rgb(163, 21, 21);">SOAP-ENV:Body</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">></span><span style="font-size: 10pt; font-family: Consolas; color: black;"></span></p>
<p class="MsoNormal" style="background: none repeat scroll 0% 0%
white;"><span style="font-size: 10pt; font-family: Consolas;
color: blue;"></</span><span style="font-size: 10pt;
font-family: Consolas; color: rgb(163, 21, 21);">SOAP-ENV:Envelope</span><span style="font-size: 10pt; font-family: Consolas; color: blue;">></span><span style="font-size: 10pt; font-family: Consolas; color: black;"></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"> </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>
</blockquote>
<br>
Looking at the debug output from the CTK hosted app, the xml
namespace for the "type" attribute in the "newState" tag is intact.
So I am wondering it the output above has already been modified
somehow by the WCF host or if it is the original message from the
CTK hosted app.<br>
<br>
<blockquote cite="mid:CA+rdb6SXRv7pe74i4Eq8P9yenG5yWLHHFxEZZzkA9q=3ACL9Fw@mail.gmail.com">
<p class="MsoNormal">Here’s the example of the SOAP message
generated by Non-CTK
based HostedApp:</p>
<pre style="background: none repeat scroll 0% 0% white;"><span style="font-family: Consolas; color: blue;"><</span><span style="font-family: Consolas; color: rgb(163, 21, 21);">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 style="font-family: Consolas; color: blue;" lang="RU"><a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank"><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: none repeat scroll 0% 0% white;"><span style="font-family: Consolas; color: blue;"> <</span><span style="font-family: Consolas; color: rgb(163, 21, 21);">s:Body</span><span style="font-family: Consolas; color: blue;">></span><span style="font-family: Consolas; color: black;"></span></pre>
<pre style="background: none repeat scroll 0% 0% white;"><span style="font-family: Consolas; color: blue;"> <</span><span style="font-family: Consolas; color: rgb(163, 21, 21);">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 style="font-family: Consolas; color: blue;" lang="RU"><a href="http://dicom.nema.org/PS3.19/HostService-20100825" target="_blank"><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: none repeat scroll 0% 0% white;"><span style="font-family: Consolas; color: blue;"> <</span><span style="font-family: Consolas; color: rgb(163, 21, 21);">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: rgb(163, 21, 21);">state</span><span style="font-family: Consolas; color: blue;">></span><span style="font-family: Consolas; color: black;"></span></pre>
<pre style="background: none repeat scroll 0% 0% white;"><span style="font-family: Consolas; color: blue;"> </</span><span style="font-family: Consolas; color: rgb(163, 21, 21);">NotifyStateChanged</span><span style="font-family: Consolas; color: blue;">></span><span style="font-family: Consolas; color: black;"></span></pre>
<pre style="background: none repeat scroll 0% 0% white;"><span style="font-family: Consolas; color: blue;"> </</span><span style="font-family: Consolas; color: rgb(163, 21, 21);">s:Body</span><span style="font-family: Consolas; color: blue;">></span><span style="font-family: Consolas; color: black;"></span></pre>
<pre style="background: none repeat scroll 0% 0% white;"><span style="font-family: Consolas; color: blue;" lang="RU"></</span><span style="font-family: Consolas; color: rgb(163, 21, 21);" lang="RU">s:Envelope</span><span style="font-family: Consolas; color: blue;" lang="RU">></span><span style="font-family: Consolas; color: black;" lang="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>
</blockquote>
<br>
I think it is still either related to the ":type" attribute or the
error described below. Concerning state/newState, please also see my
comments below.<br>
<br>
<blockquote cite="mid:CA+rdb6SXRv7pe74i4Eq8P9yenG5yWLHHFxEZZzkA9q=3ACL9Fw@mail.gmail.com">
<p class="MsoNormal"> ...</p>
<p class="MsoNormal"><i><span style="font-size: 9pt;">2011-09-06
17:17:59,609
<faultstring xsi:type="xsd:string" xmlns:xsi="<a href="http://www.w3.org/1999/XMLSchema-instance" target="_blank">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>
<i>...</i> <br>
</blockquote>
<br>
This actually hints at a problem concerning the action names.
Looking at the WSDL, the operation names start with upper case
latters, where we are using lower case (unfortunately, the text in
the DICOM Part 19 specs refer to the method names with starting
lower case letters).<br>
<br>
<blockquote cite="mid:CA+rdb6SXRv7pe74i4Eq8P9yenG5yWLHHFxEZZzkA9q=3ACL9Fw@mail.gmail.com">
<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>
</blockquote>
<br>
Yes, that does not change the actual behavior.<br>
<br>
<blockquote cite="mid:CA+rdb6SXRv7pe74i4Eq8P9yenG5yWLHHFxEZZzkA9q=3ACL9Fw@mail.gmail.com">
<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>
</blockquote>
<br>
Unfortunately, again, the text in the specs refer to "newState" for
the argument name and this is what the XIP host is using. So we used
it too for testing with XIP. But I agree that the WSDL should be the
definite guide and we should use "state" when not testing with XIP.<br>
<br>
My advice would be to keep your modification ("newState" ->
"state") and also try to modify the action (method) names in
ctkDicomAppService.cpp (lines 40 - 60) to use upper case for the
first letter.<br>
<br>
I would be happy if you could keep us posted about your progress.<br>
<br>
Thanks,<br>
Sascha<br>
<br>_______________________________________________<br>Ctk-developers mailing list<br>Ctk-developers@commontk.org<br>http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers<br></blockquote><br></div></div></div></body></html>