shibs has asked for the wisdom of the Perl Monks concerning the following question:

Hi i'n new with web servers and soap lite and i'm trying to make a dancer web server that can access be by a soap client is this possible? or is there a better approch to implement this. Below is my test soap client

use SOAP::Lite +trace; my $client = SOAP::Lite->new(); $client->uri('urn:Hello'); $client->proxy('tcp://localhost:5000'); my $som = $client->hello("Test"); my $output = $som->result; print $output . "\n";
Below is the soap:lite trace
SOAP::Transport::new: () SOAP::Serializer::new: () SOAP::Deserializer::new: () SOAP::Parser::new: () SOAP::Lite::new: () SOAP::Transport::TCP::Client::new: () SOAP::Lite::call: () SOAP::Serializer::envelope: () SOAP::Serializer::envelope: hello Test SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Transport::TCP::Client::send_receive: <?xml version="1.0" encodi +ng="UTF-8"?><soap:Envelope soap:encodingStyle="http://schemas.xmlsoap +.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/enve +lope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmln +s:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org +/2001/XMLSchema-instance"><soap:Body><hello xmlns="urn:Hello"><c-gens +ym3 xsi:type="xsd:string">Test</c-gensym3></hello></soap:Body></soap: +Envelope> SOAP::Transport::TCP::Client::send_receive: HTTP/1.0 400 Bad request Content-Type: text/html Content-Length: 193 <html> <head> <title>Bad Request</title> </head> <body> <h1>Bad Request</h1> <p>Your browser sent a request which this web server could not grok.</p> </body> </html> SOAP::Deserializer::deserialize: () SOAP::Parser::decode: () not well-formed (invalid token) at line 1, column 4, byte 4 at /usr/li +b/perl5/XML/Parser.pm line 187 HTTP/1.0 400 Bad request Content-Type: text/html Content-Length: 193 <html> <head> <title>Bad Request</title> </head> <body> <h1>Bad Request</h1> <p>Your browser sent a request which this web server could not grok.</p> </body> </html> at ./SoapTcpClient.pl line 8 SOAP::Lite::DESTROY: () SOAP::Serializer::DESTROY: () SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Deserializer::DESTROY: () SOAP::Parser::DESTROY: () SOAP::Transport::DESTROY: () SOAP::Transport::TCP::Client::DESTROY: ()

Replies are listed 'Best First'.
Re: Perl Dancer with soap client
by Anonymous Monk on Dec 02, 2013 at 08:18 UTC
Re: Perl Dancer with soap client
by kcott (Archbishop) on Dec 02, 2013 at 07:09 UTC

    G'day shibs,

    Welcome to the monastery.

    You posted in the wrong section. I've moved your post from "Perl Monks Discussion" (where you originally posted) to "Seekers of Perl Wisdom" (where you should have posted).

    At the top of each section you'll see a description of what's appropriate to post in that section. This is described in greater detail in "Where should I post X?" and "PerlMonks Sections".

    Don't panic! Nothing bad happens as a result of this: you made a mistake on your first posting. Just bear it in mind for future reference.

    -- Ken