<quote>The code you posted doesn't show any code from the guide, or a client. </quote> - I intentionally left out the guide code since I didn't get it to work, to "start from scratch" so to speak. Regarding the client, I left it out since I didn't think it was needed - I know how the data should look like. But I guess it should've been included for the possibility to recreate the problem.
I tried to add
BEGIN {
package MySerializer;
@MySerializer::ISA = 'SOAP::Serializer';
sub envelope {
$_[2] =~ s/Response$// if $_[1] =~ /^(?:method|response)$/;
shift->SUPER::envelope(@_);
}
in the end of MyModule, but it doesn't seem to do anything. Maybe because I'm not using the Daemon approach, but rather the "cgi-server" approach?
My client code:
#!/usr/bin/perl
use SOAP::Lite +trace => 'debug';
use Data::Dumper;
$HOST = "http://path/to/server.pl";
$NS = "urn:MyModule";
$PHRASE = shift; # read from the command line
my $soap = SOAP::Lite
->readable(1)
->uri($NS)
->proxy($HOST);
my $som = $soap->product_info_request(
SOAP::Data->name("version"
+ => "1.0"),
SOAP::Data->name("prod_no"
+ => "$PHRASE")
);
$res = $som->result;
print Dumper($som);
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|