Recent

Author Topic: Web Service Toolkit view request XML  (Read 3098 times)

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Web Service Toolkit view request XML
« on: January 04, 2019, 02:48:09 pm »
Hi, when I execute a method with WST I got

"Server was unable to read request. ---> There is an error in XML document (24, 47). ---> Input string was not in a correct format."

But I don't know wich string is, because I can't access the XML sent. I used the WSDL importer to create all the classes.

Any ideas on how I can access the XML document?

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Web Service Toolkit view request XML
« Reply #1 on: January 04, 2019, 08:30:35 pm »
Is hard to debug without the ability to see the XML is being sent, but I solved it filling some fields with different values that I was sending (float values).

CCRDude

  • Hero Member
  • *****
  • Posts: 596
Re: Web Service Toolkit view request XML
« Reply #2 on: January 07, 2019, 01:33:02 pm »
I recommend Charles or Fiddler for such things. With proper setup, they can monitor even https connections and do display traffic nicely (Ethereal would be an option as well that does not require to set it up as proxy, but setting up https monitoring is way more difficult there).

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Web Service Toolkit view request XML
« Reply #3 on: January 07, 2019, 05:59:29 pm »
I solved the problem, it was that the generated structure of classes made by the WST importer uses Double in floating point parameters, but the server I'm connecting has a strict format on it, using a different decimal separator that the one is beign used by the WST serializer.

I changed by hand the auto generated classes to use string instead of double and now it works.

Renat.Su

  • Full Member
  • ***
  • Posts: 230
    • Renat.Su
Re: Web Service Toolkit view request XML
« Reply #4 on: January 18, 2019, 12:58:16 pm »
There was the same problem. Found only to read the XML request
1) Add "client_filters" to the "uses" clause,
2) call RegisterLogFilter();
3) Then, only then, register  the logger as in
"TRANSPORT_STRING=HTTP:address=http://127.0.0.1/services/IMyService;FilterString=LogFilter,OutputDir>c:\the\path\you\want"
4) Use the web service,
5) request.log and response.log will saved to the specified folder.
How to configure the request itself did not understand. I generate manually without wst

 

TinyPortal © 2005-2018