Loading ...
Sorry, an error occurred while loading the content.

6481Deserialization problem with URL and < bracket in soap message

Expand Messages
  • keith5000g
    Jul 8, 2010
      I'm able to send SOAP messages to a .NET WCF service via SOAP Lite successfully, unless the message meets these 2 criteria:
      - contains a less-than bracket <
      - contains a URL beginning with http://

      In this scenario, I get the following error on the line where I invoke the service method:
      a:DeserializationFailed: The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'ProcessLog'. The ' ' character, hexadecimal value 0x20, cannot be included in a name. Line 1, position 419. at ./test.pl line 27.

      To generate this error, I simply passed the following string (minus quotes) to my service method, and this is the only parameter I'm passing:
      " a< Go to http://google.com ok now"

      The problem is not with the ' ' character as it suggests. (Depending on what else is in the message it will complain about other characters, for example the @ sign.) But I have nailed it down to the 2 criteria mentioned above.

      This does not happen in the latest SOAP Lite. I must be using an older version though I don't know how to figure out what that is. (If you need to know, please let me know how to figure it out on a Linux box :) )

      My code is below. I'm not doing anything fancy as you can see. I'm assuming I either have to do some extra encoding or there is a bug in this version of SOAP Lite. Any ideas?

      use SOAP::Lite;

      my $line = ' a< Go to http://google.com ok now';
      my $oSoap = SOAP::Lite
      -> uri('http://tempuri.org/')
      -> on_action(sub{sprintf '%sILogService/%s', @_})
      -> proxy('http://mycomputer/MyService/LogService.svc?wsdl');

      my $oResponse = $oSoap->ProcessLog(SOAP::Data->new(name => 'logEntryText', value => $line));
    • Show all 3 messages in this topic