BizTalk Server General - Channel won't translate doc. (Err: Specified cast not valid.)

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > February 2004 > Channel won't translate doc. (Err: Specified cast not valid.)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Channel won't translate doc. (Err: Specified cast not valid.)
WWalden

2004-02-08, 8:37 am


I am using a .NET Windows Service that submits documents
to a Channel for translation and delivery to an MSMQ
queue. Below is some sample code (uses the BizTalk Primary
Interop Assemblies):

--------------------------------------------------------

BTSInterchange interchange = new BTSInterchange(
BIZTALK_OPENNESS_TYPE.BIZTALK_OPENNESS_TYPE_NOTOPEN
,
"",
"",
"",
"",
"",
channelName,
"",
"",
0);

interchange.SubmitSync(documentXML, ref responseXML);

--------------------------------------------------------

I keep getting: 'Specified cast is not valid.'

I have opened my map in the BizTalk Mapper and tested an
instance of my document, and works fine. I don't know what
cast it's trying to do that would cause this.

Any ideas? Thanks.
Jan Eliasen

2004-02-08, 8:37 am

On Thu, 8 Jan 2004 14:43:30 -0800, "WWalden"
<waldo_walden@hotmail.com> wrote:

I am on shaky ground here, but it seemt to me that you should have all
your parameters in the submitsync-call and not in the construcrot for
an Interchange.

>
>I am using a .NET Windows Service that submits documents
>to a Channel for translation and delivery to an MSMQ
>queue. Below is some sample code (uses the BizTalk Primary
>Interop Assemblies):
>
>--------------------------------------------------------
>
>BTSInterchange interchange = new BTSInterchange(
> BIZTALK_OPENNESS_TYPE.BIZTALK_OPENNESS_TYPE_NOTOPEN
>,
> "",
> "",
> "",
> "",
> "",
> channelName,
> "",
> "",
> 0);
>
>interchange.SubmitSync(documentXML, ref responseXML);
>
>--------------------------------------------------------
>
>I keep getting: 'Specified cast is not valid.'
>
>I have opened my map in the BizTalk Mapper and tested an
>instance of my document, and works fine. I don't know what
>cast it's trying to do that would cause this.
>
>Any ideas? Thanks.


--
Jan Eliasen, representing himself and not the company he works for
larry franks

2004-02-08, 8:37 am

The problem here is in the interop assembly. You are calling a submit sync
to a channel that returns nothing. So the interop assembly gets a dbnull
value back. Take a look at this thread:
http://groups.google.com/groups?hl=...hreadm=N5z9Ost6
BHA.2000%40cpmsftngxa08&rnum=3&prev=/groups%3Fq%3Dlarry%2Bfranks%2Bdbnull%26
ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den
for a discussion on this along with a fix you can add to the interop
assembly in the .net toolkit.

Larry Franks

This posting is provided "AS IS" with no warranties,and confers no rights.
Subscribe at
http://support.microsoft.com/defaul...msdn/nospam.asp
&SD=msdn
--------------------
| Content-Class: urn:content-classes:message
| From: "WWalden" <waldo_walden@hotmail.com>
| Sender: "WWalden" <waldo_walden@hotmail.com>
| Subject: Channel won't translate doc. (Err: Specified cast not valid.)
| Date: Thu, 8 Jan 2004 14:43:30 -0800
| Lines: 32
| Message-ID: <062701c3d638$d68f6420$a101280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| thread-index: AcPWONaPNlrR/1zDRMq4UQFp9ifkeA==
| Newsgroups: Microsoft.public.biztalk.general
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.biztalk.general:12326
| NNTP-Posting-Host: tk2msftngxa09.phx.gbl 10.40.1.161
| X-Tomcat-NG: microsoft.public.biztalk.general
|
|
| I am using a .NET Windows Service that submits documents
| to a Channel for translation and delivery to an MSMQ
| queue. Below is some sample code (uses the BizTalk Primary
| Interop Assemblies):
|
| --------------------------------------------------------
|
| BTSInterchange interchange = new BTSInterchange(
| BIZTALK_OPENNESS_TYPE.BIZTALK_OPENNESS_TYPE_NOTOPEN
| ,
| "",
| "",
| "",
| "",
| "",
| channelName,
| "",
| "",
| 0);
|
| interchange.SubmitSync(documentXML, ref responseXML);
|
| --------------------------------------------------------
|
| I keep getting: 'Specified cast is not valid.'
|
| I have opened my map in the BizTalk Mapper and tested an
| instance of my document, and works fine. I don't know what
| cast it's trying to do that would cause this.
|
| Any ideas? Thanks.
|

WWalden

2004-02-08, 8:37 am

Thats exactly what it is. The PIA's seem to have two
different objects to represent the BizTalk interchange. I
used the other one, and the error stopped.
(I still want to call submit sync because the code isn't
supposed to know what kind of channel it's being sent to,
so I always expect a response document)

Thanks!


>-----Original Message-----
>The problem here is in the interop assembly. You are

calling a submit sync
>to a channel that returns nothing. So the interop

assembly gets a dbnull
>value back. Take a look at this thread:
>http://groups.google.com/groups?hl=...e=UTF-8&oe=UTF-

8&threadm=N5z9Ost6
>BHA.2000%40cpmsftngxa08&rnum=3&prev=/groups%3Fq%3Dlarry%

2Bfranks%2Bdbnull%26
>ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den
>for a discussion on this along with a fix you can add to

the interop
>assembly in the .net toolkit.
>
>Larry Franks
>
>This posting is provided "AS IS" with no warranties,and

confers no rights.
>Subscribe at
>http://support.microsoft.com/default.aspx?

scid=/servicedesks/msdn/nospam.asp
>&SD=msdn
>--------------------
>| Content-Class: urn:content-classes:message
>| From: "WWalden" <waldo_walden@hotmail.com>
>| Sender: "WWalden" <waldo_walden@hotmail.com>
>| Subject: Channel won't translate doc. (Err: Specified

cast not valid.)
>| Date: Thu, 8 Jan 2004 14:43:30 -0800
>| Lines: 32
>| Message-ID: <062701c3d638$d68f6420$a101280a@phx.gbl>
>| MIME-Version: 1.0
>| Content-Type: text/plain;
>| charset="iso-8859-1"
>| Content-Transfer-Encoding: 7bit
>| X-Newsreader: Microsoft CDO for Windows 2000
>| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>| thread-index: AcPWONaPNlrR/1zDRMq4UQFp9ifkeA==
>| Newsgroups: Microsoft.public.biztalk.general
>| Path: cpmsftngxa07.phx.gbl
>| Xref: cpmsftngxa07.phx.gbl

microsoft.public.biztalk.general:12326
>| NNTP-Posting-Host: tk2msftngxa09.phx.gbl 10.40.1.161
>| X-Tomcat-NG: microsoft.public.biztalk.general
>|
>|
>| I am using a .NET Windows Service that submits

documents
>| to a Channel for translation and delivery to an MSMQ
>| queue. Below is some sample code (uses the BizTalk

Primary
>| Interop Assemblies):
>|
>| --------------------------------------------------------
>|
>| BTSInterchange interchange = new BTSInterchange(
>| BIZTALK_OPENNESS_TYPE.BIZTALK_OPENNESS_TYPE_NOTOPEN
>| ,
>| "",
>| "",
>| "",
>| "",
>| "",
>| channelName,
>| "",
>| "",
>| 0);
>|
>| interchange.SubmitSync(documentXML, ref responseXML);
>|
>| --------------------------------------------------------
>|
>| I keep getting: 'Specified cast is not valid.'
>|
>| I have opened my map in the BizTalk Mapper and tested

an
>| instance of my document, and works fine. I don't know

what
>| cast it's trying to do that would cause this.
>|
>| Any ideas? Thanks.
>|
>
>.
>

larry franks

2004-02-08, 8:38 am

If you look at the thread I posted a link to, there should be a line of
code you can add to the PIA we ship in the .net toolkit, then just
recompile and use that version. It should correctly check for dbnull
values and should not error.

Unfortuantely since the .Net toolkit is an SDK level release there is no
current hotfix for this issue. However it's fairly easy to just modify the
code we ship and recompile to fix it.

Let me know if you have questions on this.

Larry Franks

This posting is provided "AS IS" with no warranties,and confers no rights.
Subscribe at
http://support.microsoft.com/defaul...msdn/nospam.asp
&SD=msdn
--------------------
| Content-Class: urn:content-classes:message
| From: "WWalden" <waldo_walden@hotmail.com>
| Sender: "WWalden" <waldo_walden@hotmail.com>
| References: <062701c3d638$d68f6420$a101280a@phx.gbl>
<mdpDcyr1DHA.3088@cpmsftngxa07.phx.gbl>
| Subject: RE: Channel won't translate doc. (Err: Specified cast not valid.)
| Date: Tue, 13 Jan 2004 04:19:42 -0800
| Lines: 96
| Message-ID: <03ac01c3d9cf$86319580$a001280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcPZz4YxFBjXGcODTK2w1O/cIrGXcg==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.biztalk.general
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.biztalk.general:12366
| NNTP-Posting-Host: tk2msftngxa08.phx.gbl 10.40.1.160
| X-Tomcat-NG: microsoft.public.biztalk.general
|
| Thats exactly what it is. The PIA's seem to have two
| different objects to represent the BizTalk interchange. I
| used the other one, and the error stopped.
| (I still want to call submit sync because the code isn't
| supposed to know what kind of channel it's being sent to,
| so I always expect a response document)
|
| Thanks!
|
|
| >-----Original Message-----
| >The problem here is in the interop assembly. You are
| calling a submit sync
| >to a channel that returns nothing. So the interop
| assembly gets a dbnull
| >value back. Take a look at this thread:
| >http://groups.google.com/groups?hl=...e=UTF-8&oe=UTF-
| 8&threadm=N5z9Ost6
| >BHA.2000%40cpmsftngxa08&rnum=3&prev=/groups%3Fq%3Dlarry%
| 2Bfranks%2Bdbnull%26
| >ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den
| >for a discussion on this along with a fix you can add to
| the interop
| >assembly in the .net toolkit.
| >
| >Larry Franks
| >
| >This posting is provided "AS IS" with no warranties,and
| confers no rights.
| >Subscribe at
| >http://support.microsoft.com/default.aspx?
| scid=/servicedesks/msdn/nospam.asp
| >&SD=msdn
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "WWalden" <waldo_walden@hotmail.com>
| >| Sender: "WWalden" <waldo_walden@hotmail.com>
| >| Subject: Channel won't translate doc. (Err: Specified
| cast not valid.)
| >| Date: Thu, 8 Jan 2004 14:43:30 -0800
| >| Lines: 32
| >| Message-ID: <062701c3d638$d68f6420$a101280a@phx.gbl>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| thread-index: AcPWONaPNlrR/1zDRMq4UQFp9ifkeA==
| >| Newsgroups: Microsoft.public.biztalk.general
| >| Path: cpmsftngxa07.phx.gbl
| >| Xref: cpmsftngxa07.phx.gbl
| microsoft.public.biztalk.general:12326
| >| NNTP-Posting-Host: tk2msftngxa09.phx.gbl 10.40.1.161
| >| X-Tomcat-NG: microsoft.public.biztalk.general
| >|
| >|
| >| I am using a .NET Windows Service that submits
| documents
| >| to a Channel for translation and delivery to an MSMQ
| >| queue. Below is some sample code (uses the BizTalk
| Primary
| >| Interop Assemblies):
| >|
| >| --------------------------------------------------------
| >|
| >| BTSInterchange interchange = new BTSInterchange(
| >| BIZTALK_OPENNESS_TYPE.BIZTALK_OPENNESS_TYPE_NOTOPEN
| >| ,
| >| "",
| >| "",
| >| "",
| >| "",
| >| "",
| >| channelName,
| >| "",
| >| "",
| >| 0);
| >|
| >| interchange.SubmitSync(documentXML, ref responseXML);
| >|
| >| --------------------------------------------------------
| >|
| >| I keep getting: 'Specified cast is not valid.'
| >|
| >| I have opened my map in the BizTalk Mapper and tested
| an
| >| instance of my document, and works fine. I don't know
| what
| >| cast it's trying to do that would cause this.
| >|
| >| Any ideas? Thanks.
| >|
| >
| >.
| >
|

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com