11

ScreenShotI've written a simple SOAP service which returns an object having among others a data member of type string. Everything works just fine when i consume the service through a written test client, however when I test the service through the Visual Studio WCF test client, for some reason when the string data member exceeds exactly 81 characters, the client cuts and then concatenates the string again.... as follows:

Instead of displaying: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis purus leo volutpatctorem ipsum dolor"

Test Client displays "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis purus leo volutpatc" + "torem ipsum dolor"

This is not a problem but just very interesting, can anyone tell me why WCF tetst client does this?

user3364673
  • 111
  • 4
  • Try out specifying limits explicitly ` ` – sll Feb 28 '14 at 12:10
  • Thanks for your response! I've looked at that but I still can't understand what is significant about the 81 bytes, and why the string gets broken and concatenated again... – user3364673 Feb 28 '14 at 12:14
  • Can you show a screenshot? – CodeCaster Feb 28 '14 at 12:20
  • Ok screenshot is up top – user3364673 Feb 28 '14 at 13:04
  • 3
    I'm running into this now, and I don't think it has anything to do with the readerQuotas. I think it is just how WCF Test Client formats the Response. Not sure if there is any way to change it. – Zack Sep 03 '14 at 21:02
  • Howdy! Can you share the ServiceMethod that is returning this information and the configuration file? Have you verified if until the point your code hit the return clause the string is still in one single piece? If you call it from your client is the result different? – dandev486 Oct 07 '17 at 14:04

1 Answers1

0

I believe the author of WCF test client wanted its users to be able to copy the output into a .cs class file for the purpose of testing and mocking the data. I looked for a source for where I heard this couldn't find a reference. However, I know devs use it for that reason sometimes.

Rhyous
  • 6,510
  • 2
  • 44
  • 50