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

Re: [soaplite] VersionMismatch error (0.55)

Expand Messages
  • Paul Kulchenko
    Hi Nelson, ... don t do it. It will set to use the same prefix for two (encoding and envelope) namespaces. You don t need to use them at all, and if you do
    Message 1 of 2 , Nov 24, 2002
    • 0 Attachment
      Hi Nelson,

      > $soap->namespace('soap');
      > $soap->encodingspace('soap');
      don't do it. It will set to use the same prefix for two (encoding and
      envelope) namespaces. You don't need to use them at all, and if you
      do want to use them, specify different values.

      Best wishes, Paul.

      --- reply2nelson <reply2nelson@...> wrote:
      > Hi all...
      > Trying to get first SOAP::Lite code up and running against a
      > .Net server. I am getting "VersionMismatch" which is related
      > to a namespace issue of:
      > xmlns:soap="http://schemas.xmlsoap.org/soap/encoding/
      > being used instead of:
      > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/
      > How do I poke in the correct namespace? Please go easy
      > on me :-) I am new to SOAP/XML.
      > Thanks.
      >
      > ------------- CODE -------------
      >
      > #!/usr/bin/perl
      > #
      > use SOAP::Lite;
      >
      > my $soap = new SOAP::Lite;
      >
      > $soap->namespace('soap');
      > $soap->encodingspace('soap');
      > $soap->xmlschema('http://www.w3.org/2001/XMLSchema');
      > $soap
      > -> on_action(sub{join '/', 'http://www.foobar.com/Authenticator',
      > $_
      > [1]})
      > -> uri('http://www.foobar.com/Authenticator')
      > -> proxy('http://www.foobar.com/authenticator.asmx')
      > ;
      > my $method = SOAP::Data->name('Logon');
      > my @params = (
      > SOAP::Data->name(Username => 'foo'),
      > SOAP::Data->name(Password => 'bar')
      > );
      > my $result = $soap->call($method => @params);
      >
      > unless ($result->fault) {
      > print $result->result();
      > } else {
      > print join ', ',$result->faultcode,$result->faultstring;
      > }
      >
      > ------- ERRORS WITH -----
      > soap:VersionMismatch, Possible SOAP version mismatch: Envelope
      > namespace http://schemas.xmlsoap.org/soap/encoding/ was unexpected.
      >
      > Expecting http://schemas.xmlsoap.org/soap/envelope/.
      >
      >
      > ------------------------ 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!?
      Yahoo! Mail Plus � Powerful. Affordable. Sign up now.
      http://mailplus.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.