I have exactly the same problem.

The thing is that SOAP::Lite uses the wrong namespace in the envelope here.

The funny thing is that if you do this:

my $soap = SOAP::Lite->service("http://www.webservicex.net/globalweath +er.asmx?WSDL"); print Dumper($soap->serializer->{_namespaces});
you can see that the proper namespace is actually registered but it later seems to get overwritten in the serializer...
Explicitely calling register_ns does not change a thing, so I really think it is a bug.

I finally got it working (without WSDL alas) like this:

use strict; use SOAP::Lite +trace => "debug"; my $address = 'http://www.webservicex.net/globalweather.asmx'; my $action = "http://www.webserviceX.NET/GetCitiesByCountry"; my $namespace = 'http://www.webserviceX.NET'; my $call = "GetCitiesByCountry"; my $soap = SOAP::Lite ->uri($namespace) ->on_action(sub { $action } ) ->proxy($address); my $arg = SOAP::Data->name(CountryName => "Singapore"); $soap->call($call => $arg);
Quite a lot of work for such a simple thing - is this because .NET is quirky or is it that SOAP::Lite (I have 0.710.10) has problems with WSDL (or am I simply being stupid?).

In reply to Re: SOAP::Lite & WSDL Problem by morgon
in thread SOAP::Lite & WSDL Problem by rr2000

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.