I started testing a BizTalk application today which calls a 3rd party service, passing a couple of datetime parameters, to retrieve a dataset which is then persisted to a SQL Server database. This application had been running well in production for a while but enhancements were required to make use of web methods recently made available by the 3rd party. After making the changes I tested the BTS application on my dev box, calling a stubbed web service installed locally. I then deployed the BizTalk app to an integration test environment that has connectivity to the 3rd party web service. On running the application I started to receive exceptions such as the following:
SoapException: Server was unable to process request. ---> SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
It seems that for some reason the send port was removing / nulling the web method parameters comprising datetimes. After a fair amount of work to try an resolve, a colleague suggested I delete the SOAP send port, re-create and re-bind to the parent orchestration. This worked a treat - thanks Fabio :)
Not knowing why re-creating the send ports fixed the problem was keeping me awake at night. To find out what was going on, I exported the bindings from pre-fix and post-fix applications and ran a file compare. I could see that the only difference was in the element <PrimaryTransport><TransportTypeData><TypeName>. I then went back to the configuration page of the SOAP send port. On clicking the "web service" tab the problem became apparent. There's a "Type name: list box with two options; one to use the web reference for the live site and one for the test test stub site. The problem was caused by the fact that, on my integration test server, although I was calling the real 3rd party web service, the "type name" was still set to use the test web reference type. I guess this is an easy mistake to make; you set the target address on the "general" tab of the SOAP port configuration dialog box, whereas the web reference that the port will use for sending data to that address is located on the "web service" tab.
| posted on Friday, November 21, 2008 12:26 PM