Resources for IT Professionals >
Forums Home
>
BizTalk Server Forums
>
BizTalk Server Adapters and Adapter Pack
>
WCF to HIS 2009 Transaction Integrator - Receiving error -_(1508) The input buffer has been exhausted while attempting to convert ...
WCF to HIS 2009 Transaction Integrator - Receiving error -_(1508) The input buffer has been exhausted while attempting to convert ...
- We have an application that is working correctly with HIS 2000 using COM+ with a security callback. I'm trying to convert to HIS 2009 and call using WCF. I use the same import, converting the recordsets to structs, and/or an array of structs. I receive the following error. "- (1508) The input buffer has been exhausted while attempting to convert ABEND_DATA in Execute. The end of the input buffer has been reached and Transaction Integrator is expecting to perform data conversions on one or more parameters. Check the server program. If it is correct verify, that the correct Transaction Integrator-created component library is deployed.} System.Exception {System.ServiceModel.FaultException<System.ServiceModel.ExceptionDetail>}"
I've tried initializing all data items, filling with spaces where no values are needed. In C#, the method call.
private void btnWCF_Click(object sender, EventArgs e)
{
try
{
using (WCF.ChargeListClient client = new HIS2009WinTestApp.WCF.ChargeListClient())
{
WCF.CASE_DATA c = HISStructInit.NewCaseData();
WCF.COUNT_DATA[] count = HISStructInit.NewCountData();
WCF.ABEND_DATA abend = HISStructInit.NewAbendData();
WCF.ClientContext context = new HIS2009WinTestApp.WCF.ClientContext();
context.User = "XXXXXXXX";
context.Password = "XXXXXXXX";
c.CASE_NO = "0123456";
c.HIS_TYPE = "E";
client.Execute(ref c, ref count, out abend,ref context);
}
}
catch (Exception ex)
{
System.Diagnostics.Debug.Print(ex.Message);
}
}
Here is the initialization class, which will give you an idea of structures.
public static class HISStructInit
{
public static WCF.ABEND_DATA NewAbendData()
{
WCF.ABEND_DATA abendData = new WCF.ABEND_DATA();
Pad(ref abendData);
return abendData;
}
public static WCF.CASE_DATA NewCaseData()
{
WCF.CASE_DATA caseData = new WCF.CASE_DATA();
Pad(ref caseData);
return caseData;
}
public static WCF.COUNT_DATA[] NewCountData()
{
WCF.COUNT_DATA[] countData = new WCF.COUNT_DATA[25];
for (int i = 0; i < 25; i++)
{
Pad(ref countData[i]);
}
return countData;
}
public static void Pad(ref WCF.ABEND_DATA abendData)
{
abendData.ABEND_NUMBER= Pad(4);
abendData.ABEND_PROGRAM= Pad(8);
abendData.ABEND_CODE= Pad(4);
abendData.ABEND_MESSAGE= Pad(80);
abendData.ABEND_DFHEIBLK= Pad(189);
abendData.ABEND_PCB= Pad(100);
abendData.ABEND_SQLCA= Pad(187);
}
public static void Pad(ref WCF.COUNT_DATA[] countData)
{
if (countData == null)
{
throw new ArgumentNullException("ref WCF.COUNT_DATA[] countData");
}
else
{
for (int i=0; i < countData.Length;i++ )
{
Pad(ref countData[i]);
//countData[i].COUNT = Pad(2);
//countData[i].TRS = Pad(4);
//countData[i].DA_OFFENSE_CODE = Pad(6);
//countData[i].AON = Pad(8);
//countData[i].CIT = Pad(18);
//countData[i].AOL = Pad(25);
//countData[i].LDA = Pad(2);
//countData[i].GOCA = Pad(1);
//countData[i].DOA = Pad(10);
}
}
}
public static void Pad(ref WCF.COUNT_DATA count)
{
//char pad = Convert.ToChar(" ");
count.COUNT= Pad(2);
count.TRS= Pad(4);
count.DA_OFFENSE_CODE= Pad(6);
count.AON= Pad(8);
count.CIT= Pad(18);
count.AOL= Pad(25);
count.LDA= Pad(2);
count.GOCA= Pad(1);
count.DOA= Pad(10);
}
public static void Pad(ref WCF.CASE_DATA caseData)
{
//char pad = Convert.ToChar(" ");
caseData.CASE_NO= Pad(7);
caseData.TRN= Pad(10);
caseData.DOO= Pad(10);
caseData.HIS_TYPE= Pad(1);
caseData.NUMBER_OF_COUNTS= Pad(2);
}
public static string Pad(int number)
{
string value = "";
for (int i = 1; i <= number; i++)
value += " ";
return value;
}
}
I can provide any more code, etc., as necessary.
Thanks in advance,
Martin
Answers
- I found the issue. One of our mainframe people showed me what was being sent. I had the Meta Data property set on the Execute method. Once I changed it to none, everything worked correctly. The meta data caused the transaction to not function correctly, so the return buffer/comm area was empty.
Thanks everyone for your help,
Martin
P/S: I will have to check out the KB article. Our old COMTI stuff uses the security callback mechanism. If we have to keep it COM+, that will be fun :-)- Marked As Answer bymkmccreary Tuesday, November 17, 2009 6:04 PM
All Replies
- It looks like WCF is working fine - you are getting an HIS error wrapped by the System.ServiceModel (WCF) error.
I do not see the Execute method. Can you post the relevant piece of this?
Thanks,
If this answers your question, please use the "Answer" button to say so | Ben Cline Hi Martin,
When you have a perfect working COMTI for HIS 2000 you may have a look at the following KB article 886300
This one is telling about migration from old COMTI to new TI project. Even when it´s for HIS 2004 it will probably work for HIS 2009 as well.
Give it a try
Thanks
ErnstThis posting is provided "AS IS" with no warranties, and confers no rights.
- I found the issue. One of our mainframe people showed me what was being sent. I had the Meta Data property set on the Execute method. Once I changed it to none, everything worked correctly. The meta data caused the transaction to not function correctly, so the return buffer/comm area was empty.
Thanks everyone for your help,
Martin
P/S: I will have to check out the KB article. Our old COMTI stuff uses the security callback mechanism. If we have to keep it COM+, that will be fun :-)- Marked As Answer bymkmccreary Tuesday, November 17, 2009 6:04 PM

