Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: SOAP::Lite anyone knows how to specify an envelope?

by Anonymous Monk
on Mar 15, 2010 at 21:40 UTC ( #828798=note: print w/replies, xml ) Need Help??

in reply to SOAP::Lite anyone knows how to specify an envelope?

  • put code/errors/input data... in code tags (ex: <c> insert code / data /error here </c>)
  • post a minimal program that reproduces your error ( see How (Not) To Ask A Question)
  • I'm guessing all you need to do is specify earlier version: $serial->soapversion('1.1');

Replies are listed 'Best First'.
Re^2: SOAP::Lite anyone knows how to specify an envelope?
by PerlBroker (Acolyte) on Mar 15, 2010 at 23:47 UTC
    Here is code, and after change to 1.1. I got: Couldn\'t create SOAP message. Expecting Envelope in namespace, but got null I appreciate all suggestions to get this sample begin of SOAP to work. If I get it to work, I can do the rest.
    #!/usr/bin/perl -w use strict; use warnings; use Data::Dumper; use SOAP::Lite 'autodispatch'; my $namespace = ' +0'; my $soap = new SOAP::Lite uri => $namespace, proxy => [ '', credentials => [ '', 'api', 'myusrname' => 'mypass' ] ] ; $soap->serializer(SOAP::Serializer->new()); $soap->uri($namespace); $soap->default_ns($namespace); $soap->autotype(0); $soap->readable(1); $soap->soapversion('1.2'); $SOAP::Constants::DEFAULT_HTTP_CONTENT_TYPE= "application/soap+xml"; my $xml = qq{ <soap:Envelope xmlns:soap="" xmlns:typ="{$namespace}"> <soap:Header/> <soap:Body> <typ:updateDomainRequest domainName=""> <typ:displayString>Hello this is SOAP::Lite test</typ:displayString> </typ:updateDomainRequest> </soap:Body> </soap:Envelope> }; #my $soap_data = new SOAP::Data->type('xml' => $xml); my $soap_data = new SOAP::Data ->name('listRecordsRequest') ->attr({ 'xmlns' => $soap->default_ns, }); my $response = $soap->call($soap_data); print Dumper $response;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://828798]
[Corion]: 1nickt: I imagine (heh) that Agile done somewhat right will make the process (and why we postpone things) somewhat more explicit to the outsider, or at least the "who do we ask to postpone X"

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2017-12-11 12:08 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (290 votes). Check out past polls.