Forum Discussion

webserviceAutom's avatar
webserviceAutom
Occasional Contributor
12 years ago

SOAP UI removes Carriage Returns and Line Feeds

Hi,

I am trying to send following request as HTTP POST to a Biztalk server

I have declared a Content-Type header. Although the request looks like a multipart form data my development team told me to send this as a text/xml


----------071713084016098
Content-Disposition: form-data; name="parameterA"

${TestInput#parmA}
----------071713084016098
Content-Disposition: form-data; name="parameterB"

${TestInput#parmB}
----------071713084016098
Content-Disposition: form-data; name="parameterC"

${TestInput#parmC}
----------071713084016098--


When biztalk server recieves this request, the request comes as one line of text.

----------071713084016098Content-Disposition:form-data;name="parameterA"${TestInput#parmA}----------071713084016098Content-Disposition: form-data; name="parameterB"${TestInput#parmB}----------071713084016098Content-Disposition: form-data;name="parameterC"
${TestInput#parmC}----------071713084016098--


Any idea why SOAP UI is sending all this in one line.
  • webserviceAutom's avatar
    webserviceAutom
    Occasional Contributor
    I have managed to use ${="\r"} at the end of each line. Now request is coming in different lines but I am not able to add a white space between two lines. I have tried adding ${="\r"}${="\n"} at the end of each line but the server doesn't receive the new line.

    Any hints? Please
    • sergiy's avatar
      sergiy
      Occasional Contributor

      Thank you very much! The ${="\r"} - helps me a lot!

      I have mocked response, and it is like yours, I mean my response also contains boundaries.

       

      My problem was that SoapUI saves mock xml file, and as a break-line it uses "\n" (LF), at least in Windows 10, but I need normal windows "\r\n" (my response is consuming by some another service, and this service is looking for "\r\n", bot not for only "\n").

       

      So, I go to SoapUI [Preferences] - [UI Settings] and checked there "Normalize line-break". After that Soap UI began using "\r\n" (CR LF) as a line-break.

       

      But it did not solve my problem, because my Soap UI mock service (which was deployed to the Tomcat server) continued to reply me the xml with ONLY "\n".

       

      And only when I added ${="\r\n"} - it started reply with correct line-break (that is precedes "\n")! I don't know whether it is a bug or just some magic, but I spent three days trying to solve it. And I would like to wish nobody will face this problem, or if they will, they can find my message.

       

      P.S. I checked line-breaks with the help of Notepad++ ([View] - [Show Symbol] check Show All Characters)