<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>eliasen - .NET</title>
    <link>http://blog.eliasen.dk/</link>
    <description>Just another BizTalk guy</description>
    <language>en-us</language>
    <copyright>Jan Eliasen</copyright>
    <lastBuildDate>Wed, 21 Nov 2007 23:34:20 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>jan@eliasen.dk</managingEditor>
    <webMaster>jan@eliasen.dk</webMaster>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=a46d79f2-1d70-4c51-a3de-21b0a0d03998</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,a46d79f2-1d70-4c51-a3de-21b0a0d03998.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,a46d79f2-1d70-4c51-a3de-21b0a0d03998.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=a46d79f2-1d70-4c51-a3de-21b0a0d03998</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi
</p>
        <p>
Recently, I ran into a peculiar problem, which really had me fooled a long time.
</p>
        <p>
Basically, I had a BizTalk Server 2006 R2 solution running. It consisted of 10 assemblies.
One of the orchestrations in each of 9 of the assemblies was exposed as a web service,
all using complex types - no strings, ints and so on.
</p>
        <p>
And then there was the system, that was to call my web services. I had no saying over
that system. We started calling the first web service. Everything went ok. Then they
implemented code to call the second web service, everything OK... all was well (except
some minor things here and there) for the first eight web services.
</p>
        <p>
But at the ninth web service, strange things started to happen.
</p>
        <p>
Basically, the other system would call my web service, IIS would return http 200 OK,
but still, no data came into BizTalk. I had NOTHING in group hub page, nothing in
HAT, nothing in the eventlog, NOTHING! IIS log said: I received a post on this url
and responded with 200 OK - that's it - nothing more.
</p>
        <p>
Really weird - I mean... where did the XML go? Why were there no errors? So we installed
YATT, which is an http sniffer tool, that would be able to tell us what was exatly
sent across the wires. Basically, what we found out was, that allthough the sender
might have send 13000 bytes, the sniffer only reported maybe 10500 bytes. So we started
investigating the network. The two servers were on the same subnet, one hop away from
eachother. So no servers on the route could mingle with the traffic. 
</p>
        <p>
I decided that I would write my own little C# test program, that would call the web
service and see if that failed as well. It didn't. I ended up calling the web service
succesfully with more than 100k (I didn't bother to try anything higher than that.)
</p>
        <p>
But it turned out, that the sniffer must have a bug - it reported all sorts of different
numbers, when using my test program, and none were correct. Apparently, it wasn't
created to handle large packets, but just a few kilobytes. So we installed wireshark
instead (get it from sourceforge). Now THAT is a nice tool! Totally professional (and
free), and it showed us everything that came in and out - no limitations.
</p>
        <p>
So we did a test with my tool, and a test with the other system, and tried comparing
the http headers, the soap action, and so on. It turned out, that all the other web
services, when called by the other system, returned http 202 Accept and not http 200
OK. And when my test program called the web service, it got the http 202 Accept.
</p>
        <p>
We ended up discovering what the issue was. The other system (programmed in .NET)
wasn't calling my web services the "right way". They were sending everything using
httprequests. Now, this is a perfectly legal way of doing it, but it really requires
that you know what you are doing. I mean: They added a header to the httprequest for
the SOAPAction, and then they built up XML with the soap envelope, soap body, elements
for the web method and inside that the actual XML. This was just a string that they sent
using httprequest.
</p>
        <p>
The answer ended up being that the XML that the other system was sending me had invalid
data in elements of type xsd:date. So basically, the XML couldn't be deserialized
into the object that my web method on the web service was expecting. Therefore, the
web method was never called, and therefore there was no data in biztalks log, the
eventlog or anywhere else.
</p>
        <p>
So, I have learned two things from this:
</p>
        <p>
1. You should always accept the help your programming environment gives you. If the
programmer of the other system had added a web reference to the web service and built
XML and deserialized it into the object that was the parameter, he would have gotten
an exception at runtime, that he could debug. The way he did it meant that we got
NO errors at all - the data just disappeared (which I think .NET shouldn't do. Some
sort of warning somewhere would have been nice.)
</p>
        <p>
2. When debugging, don't trust the tools you download you to help debugging :-)
</p>
        <p>
I hope this can help someone.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a46d79f2-1d70-4c51-a3de-21b0a0d03998" />
      </body>
      <title>XML disappearing when calling a BizTalk Web Service</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,a46d79f2-1d70-4c51-a3de-21b0a0d03998.aspx</guid>
      <link>http://blog.eliasen.dk/2007/11/21/XMLDisappearingWhenCallingABizTalkWebService.aspx</link>
      <pubDate>Wed, 21 Nov 2007 23:34:20 GMT</pubDate>
      <description>&lt;p&gt;
Hi
&lt;/p&gt;
&lt;p&gt;
Recently, I ran into a peculiar problem, which really had me fooled a long time.
&lt;/p&gt;
&lt;p&gt;
Basically, I had a BizTalk Server 2006 R2 solution running. It consisted of 10 assemblies.
One of the orchestrations in each of 9 of the assemblies was exposed as a web service,
all using complex types - no strings, ints and so on.
&lt;/p&gt;
&lt;p&gt;
And then there was the system, that was to call my web services. I had no saying over
that system. We started calling the first web service. Everything went ok. Then they
implemented code to call the second web service, everything OK... all was well (except
some minor things here and there) for the first eight web services.
&lt;/p&gt;
&lt;p&gt;
But at the ninth web service, strange things started to happen.
&lt;/p&gt;
&lt;p&gt;
Basically, the other system would call my web service, IIS would return http 200 OK,
but still, no data came into BizTalk. I had NOTHING in group hub page, nothing in
HAT, nothing in the eventlog, NOTHING! IIS log said: I received a post on this url
and responded with 200 OK - that's it - nothing more.
&lt;/p&gt;
&lt;p&gt;
Really weird - I mean... where did the XML go? Why were there no errors? So we installed
YATT, which is an http sniffer tool, that would be able to tell us what was exatly
sent across the wires. Basically, what we found out was, that allthough the sender
might have send 13000 bytes, the sniffer only reported maybe 10500 bytes. So we started
investigating the network. The two servers were on the same subnet, one hop away from
eachother. So no servers on the route could mingle with the traffic. 
&lt;/p&gt;
&lt;p&gt;
I decided that I would write my own little C# test program, that would call the web
service and see if that failed as well. It didn't. I ended up calling the web service
succesfully with more than 100k (I didn't bother to try anything higher than that.)
&lt;/p&gt;
&lt;p&gt;
But it turned out, that the sniffer must have a bug - it reported all sorts of different
numbers, when using my test program, and none were correct. Apparently, it wasn't
created to handle large packets, but just a few kilobytes. So we installed wireshark
instead (get it from sourceforge). Now THAT is a nice tool! Totally professional (and
free), and it showed us everything that came in and out - no limitations.
&lt;/p&gt;
&lt;p&gt;
So we did a test with my tool, and a test with the other system, and tried comparing
the http headers, the soap action, and so on. It turned out, that all the other web
services, when called by the other system, returned http 202 Accept and not http 200
OK. And when my test program called the web service, it got the http 202 Accept.
&lt;/p&gt;
&lt;p&gt;
We ended up&amp;nbsp;discovering what the issue was. The other system (programmed in .NET)
wasn't calling my web services the "right way". They were sending everything using
httprequests. Now, this is a perfectly legal way of doing it, but it really requires
that you know what you are doing. I mean: They added a header to the httprequest for
the SOAPAction, and then they built up XML with the soap envelope, soap body, elements
for the web method and inside that the actual XML. This was just a string that they&amp;nbsp;sent
using httprequest.
&lt;/p&gt;
&lt;p&gt;
The answer ended up being that the XML that the other system was sending me had invalid
data in elements of type xsd:date. So basically, the XML couldn't be deserialized
into the object that my web method on the web service was expecting. Therefore, the
web method was never called, and therefore there was no data in biztalks log, the
eventlog or anywhere else.
&lt;/p&gt;
&lt;p&gt;
So, I have learned two things from this:
&lt;/p&gt;
&lt;p&gt;
1. You should always accept the help your programming environment gives you. If the
programmer of the other system had added a web reference to the web service and built
XML and deserialized it into the object that was the parameter, he would have gotten
an exception at runtime, that he could debug. The way he did it meant that we got
NO errors at all - the data just disappeared (which I think .NET shouldn't do. Some
sort of warning somewhere would have been nice.)
&lt;/p&gt;
&lt;p&gt;
2. When debugging, don't trust the tools you download you to help debugging :-)
&lt;/p&gt;
&lt;p&gt;
I hope this can help someone.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=a46d79f2-1d70-4c51-a3de-21b0a0d03998" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,a46d79f2-1d70-4c51-a3de-21b0a0d03998.aspx</comments>
      <category>.NET</category>
      <category>BizTalk 2006</category>
    </item>
    <item>
      <trackback:ping>http://blog.eliasen.dk/Trackback.aspx?guid=8fc5422e-1dd3-4702-9ab1-b77748fbf8d2</trackback:ping>
      <pingback:server>http://blog.eliasen.dk/pingback.aspx</pingback:server>
      <pingback:target>http://blog.eliasen.dk/PermaLink,guid,8fc5422e-1dd3-4702-9ab1-b77748fbf8d2.aspx</pingback:target>
      <dc:creator>Jan Eliasen</dc:creator>
      <wfw:comment>http://blog.eliasen.dk/CommentView,guid,8fc5422e-1dd3-4702-9ab1-b77748fbf8d2.aspx</wfw:comment>
      <wfw:commentRss>http://blog.eliasen.dk/SyndicationService.asmx/GetEntryCommentsRss?guid=8fc5422e-1dd3-4702-9ab1-b77748fbf8d2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Hi
</p>
        <p>
I just thought I'd share with you a nice little link: <a href="http://biztalkia.blogspot.com/2005/12/easier-way-to-add-dll-to-gac.html">BIA</a> which
has a little registry thingy you run, which enables you to right click a .dll and
add it to the GAC.
</p>
        <p>
Can be modified, of course, to point to any .NET version.
</p>
        <p>
Useful for BizTalk assemblies, web parts, etc.
</p>
        <p>
-- 
<br />
eliasen
</p>
        <img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=8fc5422e-1dd3-4702-9ab1-b77748fbf8d2" />
      </body>
      <title>Easy way to add assembly to the GAC</title>
      <guid isPermaLink="false">http://blog.eliasen.dk/PermaLink,guid,8fc5422e-1dd3-4702-9ab1-b77748fbf8d2.aspx</guid>
      <link>http://blog.eliasen.dk/2007/03/04/EasyWayToAddAssemblyToTheGAC.aspx</link>
      <pubDate>Sun, 04 Mar 2007 20:52:20 GMT</pubDate>
      <description>&lt;p&gt;
Hi
&lt;/p&gt;
&lt;p&gt;
I just thought I'd share with you a nice little link: &lt;a href="http://biztalkia.blogspot.com/2005/12/easier-way-to-add-dll-to-gac.html"&gt;BIA&lt;/a&gt;&amp;nbsp;which
has a little registry thingy you run, which enables you to right click a .dll and
add it to the GAC.
&lt;/p&gt;
&lt;p&gt;
Can be modified, of course, to point to any .NET version.
&lt;/p&gt;
&lt;p&gt;
Useful for BizTalk assemblies, web parts, etc.
&lt;/p&gt;
&lt;p&gt;
-- 
&lt;br&gt;
eliasen
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.eliasen.dk/aggbug.ashx?id=8fc5422e-1dd3-4702-9ab1-b77748fbf8d2" /&gt;</description>
      <comments>http://blog.eliasen.dk/CommentView,guid,8fc5422e-1dd3-4702-9ab1-b77748fbf8d2.aspx</comments>
      <category>.NET</category>
    </item>
  </channel>
</rss>