[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

extra charecters are present even though they r not passed to the wcf service.

Posted on 2011-10-14
5
Medium Priority
?
229 Views
Last Modified: 2013-12-16
Hi

When I pass string from .net client application to Biztalk server, on the server side some extra charecters are present. The string I am passing to the service is long and multiline.

My input string is:
ISA*00*          *00*          *ZZ*AZWEB276       *ZZ*BCBSAZ         *110216*2320*}*00501*123456789*0*T*>~
GS*HR*AZWEB276OOA*BCBSAZ*20110216*2320*123456789*X*005010X212~
ST*276*002687103*005010X212~

and on the server side, it is received as

ISA*00*          *00*          *ZZ*AZWEB276       *ZZ*BCBSAZ         *110216*2320*}*00501*123456789*0*T*>~
GS*HR*AZWEB276OOA*BCBSAZ*20110216*2320*123456789*X*005010X212~
ST*276*002687103*005010X212~

Why is this happening and how to avoid this?

Thank You
0
Comment
Question by:sangeetaandkarthik
  • 3
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
regevha earned 2000 total points
ID: 36972462
Your data has at the end of line (EOL), 2 characters CR and LF (ASCII codes 13 and 10 respectively).
To avoid this, you should remove all CRs (which are "translated" to "
") before calling BizTalk using:
myString.Replace("\r","");
or
myString.Replace('\r','');

If the problem is not solved, please attach a file with the exact data in the string you would like to send to BizTalk and I will investigate it further.
0
 

Author Comment

by:sangeetaandkarthik
ID: 36973428
hi regevha,

thank you for the response. i tried replacing CR AND GREATER THAN symbols in the input string but didnt work. Below is my complete input string.

ISA*00*          *00*          *ZZ*AZWEB276       *ZZ*BCBSAZ         *110216*2320*}*00501*123456789*0*T*>~

GS*HR*AZWEB276OOA*BCBSAZ*20110216*2320*123456789*X*005010X212~

ST*276*002687103*005010X212~

BHT*0010*13*REFEREENCEIDENTIFICATION*20110216*1200~

HL*1**20*1~

NM1*PR*2*BCBSAZ*****PI*53589~

HL*2*1*21*1~

NM1*41*2*BCBSAZ INET*****46*860632718~

HL*3*2*19*1~

NM1*1P*1*ZIPPERER*WILLIAM****XX*1013007533~

HL*4*3*22*0~

DMG*D8*19721226*F~

NM1*IL*1*BREWER*HOPE****MI*FBOXZ4456584~

TRN*1*277R1-276TPBTHOST-040~

REF*1K*53020100782033900~

AMT*T3*380~

DTP*472*RD8*20100314-20100314~

SE*16*002687103~

GE*1*123456789~

IEA*1*123456789~


Thank You
0
 

Author Closing Comment

by:sangeetaandkarthik
ID: 36973568
Thank You.
0
 

Author Comment

by:sangeetaandkarthik
ID: 36973612
hi regevha,

Still i am facing the same issue. could you please suggest any thing on this?

thank you
0
 
LVL 6

Expert Comment

by:regevha
ID: 36973848
What is the current problem you are facing ?

To convert EDI text to valid XML String, you may use the XmlEncoder class described in the post - http://bytes.com/topic/net/answers/172584-how-do-i-convert-string-xml-string
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Integration Management Part 2
Loops Section Overview
Suggested Courses
Course of the Month19 days, 13 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question