Re: Problem with solicit-response adapter BTS 2004
From: Vladimir Tchalkov (vlado_at_act-soft.nspam.com)
Date: 06/07/04
- Next message: Everett Yang: "Re: BizTalk 2004 SQL Adapter"
- Previous message: Dave Girvitz: "Re: Question"
- In reply to: Kelly Fulks: "Problem with solicit-response adapter BTS 2004"
- Next in thread: Kelly Fulks: "Re: Problem with solicit-response adapter BTS 2004"
- Reply: Kelly Fulks: "Re: Problem with solicit-response adapter BTS 2004"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 7 Jun 2021 20:03:44 +0300
Hi Kelly,
I had similiar problems with my adapter. My mistake was the encoding of the
xml response file.
I used ANSI encoding with code page 1251. I changed this to UTF8 and it
worked.
I think the problem was that I was missing the XML header and the encoding
of the response was not specified.
So try UTF8 or try to add a XML header specifying the encoding.
Best regards,
Vladimir
"Kelly Fulks" <kfulks@knology.net> wrote in message
news:bc02a42a.0406041149.43cbbfe4@posting.google.com...
> I am attempting to build a solicit-response adapter for biztalk 2004.
> I have studied the sample code included with the biztalk SDK and
> believe that I understand what is being done. I have taken the base
> adapter code from the Common section of the Adapter section of the SDK
> and built it into an assembly. My code is written in vb.net as that
> is a requirement of the project and is in a separate assembly.
>
> My adapter will receive the xml from biztalk fine. I am using a
> static document for the return at this time for testing. I am
> preparing the document and then putting it into the response message.
> When the response message gets back into biztalk there is an error as
> shown below:
>
> There was a failure executing the receive pipeline:
> "Microsoft.BizTalk.DefaultPipelines.XMLReceive" Source: "XML
> disassembler" Receive Location:
> "Provider=***; InitialCatalog=***;" Reason: None of the
> components at Disassemble stage can recognize the data.
>
> The XML will validate fine against the schema and I can even use HAT
> to save the message from BizTalk and that message will validate. The
> namespace is correct and verified and is included in the HAT error
> message properly. I have included some code below in hopes that
> someone will see an obvious error in what I am doing. The code is
> from the "EnqueueWorkItem" routine and all XML documents that are
> saved work properly. It is strictly the one that is returned to
> BizTalk that causes a problem.
>
> ----- begin code here -----
> Dim XmlString As String
> XmlString = "<ns0:RimsResults
> xmlns:ns0='http://ingr-isg.com/Palmetto/'>" & _
> "<ns0:RimsResult>" & _
> "<ns0:LRSData County='32' RouteType='4' Route='20'
> RouteAux='1' Dir='1' />" & _
> "<ns0:DynSegData BMP='0.0' EMP='1.0' />" & _
> "<ns0:OutputColumns>" & _
> "<ns0:OutputColumn Name='NbrLanes' Value='2' />" & _
> "</ns0:OutputColumns>" & _
> "</ns0:RimsResult>" & _
> "<ns0:RimsResult>" & _
> "<ns0:LRSData County='32' RouteType='4' Route='20'
> RouteAux='1' Dir='1' />" & _
> "<ns0:DynSegData BMP='1.0' EMP='1.2' />" & _
> "<ns0:OutputColumns>" & _
> "<ns0:OutputColumn Name='NbrLanes' Value='2' />" & _
> "</ns0:OutputColumns>" & _
> "</ns0:RimsResult>" & _
> "<ns0:RimsResult>" & _
> "<ns0:LRSData County='32' RouteType='4' Route='20'
> RouteAux='1' Dir='1' />" & _
> "<ns0:DynSegData BMP='1.2' EMP='1.9' />" & _
> "<ns0:OutputColumns>" & _
> "<ns0:OutputColumn Name='NbrLanes' Value='2' />" & _
> "</ns0:OutputColumns>" & _
> "</ns0:RimsResult>" & _
> "</ns0:RimsResults>"
>
> ' Need to do the real work here - KLF
> ' For now we are using a fixed response to get everything working.
> Dim myResultsDom As System.Xml.XmlDocument
> myResultsDom = New System.Xml.XmlDocument
> myResultsDom.LoadXml(XmlString)
>
> myMsgFactory = Me.TransportProxy.GetMessageFactory
> myResponsePart = myMsgFactory.CreateMessagePart
> myResponse = myMsgFactory.CreateMessage
> myResponse.AddPart("body", myResponsePart, True)
> \myStream = New System.IO.MemoryStream
> myResponse.BodyPart.Data = myStream
>
> ' Save the response to the message and to a file for comparison
> purposes
> ' the file save will go away after debugging - KLF
> myResultsDom.Save(myStream)
> myResultsDom.Save("C:\temp\MyRspDocument.xml")
>
> ' This places the response into BizTalk
> btsBatch = New StandardTransmitBatchHandler(Me.TransportProxy, True)
> btsBatch.SubmitResponseMessage(msg, myResponse, myResultsDom)
> ' This gets the original message out of the message queue within
> BizTalk Server
> btsBatch.DeleteMessage(msg, Nothing)
> btsBatch.Done(Nothing)
> ----- end code here -----
>
> Any ideas? Thanks!
- Next message: Everett Yang: "Re: BizTalk 2004 SQL Adapter"
- Previous message: Dave Girvitz: "Re: Question"
- In reply to: Kelly Fulks: "Problem with solicit-response adapter BTS 2004"
- Next in thread: Kelly Fulks: "Re: Problem with solicit-response adapter BTS 2004"
- Reply: Kelly Fulks: "Re: Problem with solicit-response adapter BTS 2004"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
- Re: Need help on Adapter Framework
... As i dont have any background on Biztalk, i am finding it difficult to follow the samples.
... There's not very much documentation out there. ... If no XML is returned
then this error ... the section 'Developing Custom Adapter'. ... (microsoft.public.biztalk.general) - Re: Adapter Error on non-default host
... When your issue originally came up, did things work okay on the default host for the
BizTalk group but not on other hosts in the group, or did it fail in all cases? ... since
my issue only pops up when the adapter is associated with the non-default host. ... Well
when I looked at the SoapreturnMsg I found that a second xml declaration was being added to the
msg. ... (microsoft.public.biztalk.general) - Re: Problem with solicit-response adapter BTS 2004
... > I am attempting to build a solicit-response adapter for biztalk 2004. ...
> adapter code from the Common section of the Adapter section of the SDK ...
> preparing the document and then putting it into the response message. ... (microsoft.public.biztalk.general) - Problem with solicit-response adapter BTS 2004
... I am attempting to build a solicit-response adapter for biztalk 2004. ...
preparing the document and then putting it into the response message. ... myResponse.AddPart("body",
myResponsePart, True) ... (microsoft.public.biztalk.general) - XML Namespace Required in all XML data?
... It seems like BizTalk 2004 requires the BizTalk Reference Namespace to ... be
in the XML document for both the request and the response when used ... I'm unclear why
it just can't accept XML ... How can I inject the BizTalk schema in the response?
... (microsoft.public.biztalk.general)