Re: error with web service

From: Jan Tielens (jan_at_no.spam.please.leadit.be)
Date: 02/24/04


Date: Tue, 24 Feb 2004 10:26:36 +0100

See the thread below:
Hi,
    I have solved this problem by converting the data to unicode format
before passing to Web Service and in the Web Service convert the data back
to ASCII.

Regards,
Srikanth.

"Srikanth" <bryn@nospam.bryn.com.au> wrote in message
news:%23Tlyfjd%23DHA.488@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I have a winforms application which passes data to a Web Service. The
string
> data is read from a file and passed on to the Web Service.
>
> Before passing, the string looks like:
>
>
"HEAD~5302143~99~59073341483~AUMEL~20-02-2004~E~O~1670~4~2\r\nLINE~1~AAAAEGX
> 9Y~~700~2~5908089083~Some Name~Goods
>
description~MY\r\nLINE~2~~EXPE~900~~6876876433~Owner1~Description1~NZ\r\nLIN
> E~3~AAAAEFLE7~~70~~~~~\r\nLINE~4~AAAHK45G3~~~2~~~~"
>
> Please notice the bold characters.
>
>
>
> In the Web Method, the above string is received as:
>
"HEAD~5302143~99~59073341483~AUMEL~20-02-2004~E~O~1670~4~2\nLINE~1~AAAAEGX9Y
> ~~700~2~5908089083~Some Name~Goods
>
description~MY\nLINE~2~~EXPE~900~~6876876433~Owner1~Description1~NZ\nLINE~3~
> AAAAEFLE7~~70~~~~~\nLINE~4~AAAHK45G3~~~2~~~~"
>
> Please notice the bold characters.
>
>
>
> The "Carriage returns " are getting removed. My application requires that
> the
>
> carriage returns are included in the string as the Web Service submits
this
> string to
>
> BizTalk server which requires carriage returns for parsing.
>
>
>
> I have to solve this problem very urgently for my project.
>
> Any help is appreciated.
>
>
>
> Thanks & Regards,
>
> Srikanth.
>
>
>

--
Greetz
Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
"Montaque[.NET MVP]" <montaque@citiz.net> wrote in message
news:e9#uC6p#DHA.3284@TK2MSFTNGP09.phx.gbl...
> I have a class and one of the properties is a string.
>
> Stored in this string is the contents of a multiline
> textbox.
>
> All is fine except for when the class object is passed to
> a webservice to be saved in the database.  Once passed to
> the webservice all instances of \r\n (Environment.NewLine)
> in the objects string property are replaced with \n  -
> how can happen?
>
>


Relevant Pages

  • Re: How do I create an object?
    ... The webservice exposes a WSDL document for that vary purpose. ... >I have the almost the same question, but it's regarding a web service ... It has a method such as SetInfo(int age, string firstName, ...
    (microsoft.public.dotnet.framework)
  • Re: text gets destroyed
    ... >> It seems like "\r" is cleared from the string when you sent it to a web ... >> In the call to my webservice i changed field3 to the following: ... Tried to do the messagebox trick just before calling the webservice. ... What does your web service look like? ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: How do I create an object?
    ... terrible if I did this with each call to the web service, but in practice, I ... > the end of the URL and it will return the valid schema for the webservice. ... It has a method such as SetInfo(int age, string ... >> could loop through the parameters collection and learn their names. ...
    (microsoft.public.dotnet.framework)
  • Re: WSE 3.0, usernameOverTransportSecurity, custom Token Manager w/ securityTokenManager,
    ... I've added the web service call directly to my Data binding method ... expected but not present in the security header of the incoming ... the username token to the message. ... protected override string AuthenticateToken(UsernameToken token) ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Consume Web Service...
    ... to call a web service in my orchestration. ... Xml parameters as string datatypes and processes this Xml and returns ... ignoreCommit, XMessage msg) ...
    (microsoft.public.biztalk.general)