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

SOAP-Lite and MS .NET interoperability

Expand Messages
  • Weidong Wang
    I just used MS s Visual Studio.NET and built the HelloWorld web service (with both C# and VB). It runs with the MS tools (using GET/POST), but not a SOAP call.
    Message 1 of 2 , Aug 3, 2001
    • 0 Attachment
      I just used MS's Visual Studio.NET and built the HelloWorld web service
      (with both C# and VB).

      It runs with the MS tools (using GET/POST), but not a SOAP call.

      So I wrote a small soap-lite script to make the call, making sure to modify
      the SOAPAction field. Using debug, I can tell that the client sends the
      request and the sever responds with the result. However, there are three
      extra bytes in front of <?xml ....>, and soap-lite does not like it. The
      debug output is attached below.

      Has anyone seen this before? With a network monitor, I can see that those 3
      characters's hex code are:

      EF BB BF

      Thanks.

      Weidong



      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
      Cache-Control: private, max-age=0
      Date: Fri, 03 Aug 2001 18:03:01 GMT
      Server: Microsoft-IIS/5.0
      Content-Length: 409
      Content-Type: text/xml; charset=utf-8
      Client-Date: Fri, 03 Aug 2001 18:03:01 GMT
      Client-Peer: 127.0.0.1:8080

      ???<?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
      <HelloWorldResponse xmlns="http://tempuri.orgt/webservices/">
      <HelloWorldResult>Hello World</HelloWorldResult>
      </HelloWorldResponse>
      </soap:Body>
      </soap:Envelope>
      SOAP::Deserializer::deserialize: ()
      SOAP::Parser::decode: ()

      unclosed token at line 8, column 2695, byte 3088 at
      C:/Perl/site/lib/XML/Parser.pm line 185
    • Paul Kulchenko
      Hi, Weidong! ... It s BOM (byte order mark). Expat has bug in handling BOMs in combination with UTF-8 encoding, so SOAP::Lite chokes on it. Here is the code
      Message 2 of 2 , Aug 3, 2001
      • 0 Attachment
        Hi, Weidong!

        > Has anyone seen this before? With a network monitor, I can see that
        > those 3 characters's hex code are:
        >
        > EF BB BF
        It's BOM (byte order mark). Expat has bug in handling BOMs in
        combination with UTF-8 encoding, so SOAP::Lite chokes on it. Here is
        the code that fixes that, but you should use it only with BOMs on
        utf-8 encoding.

        # drop BOM, so XML::Parser won't choke on it
        use SOAP::Lite +trace => [transport => sub {
        if (UNIVERSAL::isa($_[0] => 'HTTP::Response')) {
        my $c = $_[0]->content;
        $_[0]->content($c) if $c =~ s/^[^<]{2,3}</</;
        }
        }];

        Latest Expat (1.95.2, released couple of days ago) should not have
        this problem.

        Best wishes, Paul.

        --- Weidong Wang <wwang@...> wrote:
        > I just used MS's Visual Studio.NET and built the HelloWorld web
        > service
        > (with both C# and VB).
        >
        > It runs with the MS tools (using GET/POST), but not a SOAP call.
        >
        > So I wrote a small soap-lite script to make the call, making sure
        > to modify
        > the SOAPAction field. Using debug, I can tell that the client sends
        > the
        > request and the sever responds with the result. However, there are
        > three
        > extra bytes in front of <?xml ....>, and soap-lite does not like
        > it. The
        > debug output is attached below.
        >
        > Has anyone seen this before? With a network monitor, I can see that
        > those 3
        > characters's hex code are:
        >
        > EF BB BF
        >
        > Thanks.
        >
        > Weidong
        >
        >
        >
        > SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
        > Cache-Control: private, max-age=0
        > Date: Fri, 03 Aug 2001 18:03:01 GMT
        > Server: Microsoft-IIS/5.0
        > Content-Length: 409
        > Content-Type: text/xml; charset=utf-8
        > Client-Date: Fri, 03 Aug 2001 18:03:01 GMT
        > Client-Peer: 127.0.0.1:8080
        >
        > ???<?xml version="1.0" encoding="utf-8"?>
        > <soap:Envelope
        > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
        > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        > <soap:Body>
        > <HelloWorldResponse xmlns="http://tempuri.orgt/webservices/">
        > <HelloWorldResult>Hello World</HelloWorldResult>
        > </HelloWorldResponse>
        > </soap:Body>
        > </soap:Envelope>
        > SOAP::Deserializer::deserialize: ()
        > SOAP::Parser::decode: ()
        >
        > unclosed token at line 8, column 2695, byte 3088 at
        > C:/Perl/site/lib/XML/Parser.pm line 185
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Make international calls for as low as $.04/minute with Yahoo! Messenger
        http://phonecard.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.