that is silly, so I leave you with this, I'm out

#!/usr/bin/perl -- use strict; use warnings; use Proc::Background; Main( @ARGV ); exit( 0 ); sub Main { my( $cos ) = @_; if( $cos ){ GoServer() if $cos == 1; GoClient() if $cos == 2; } else { GoGo(); } } sub GoGo { my $serv = Proc::Background->new( $^X, __FILE__, 1 => 'GoServer' ) +; sleep 1; my $cli = Proc::Background->new( $^X, __FILE__, 2 => qw'Go Client' + ); sleep 1; $cli->die; $serv->die; } sub GoServer { require MyModule; require SOAP::Transport::HTTP; SOAP::Lite->import( readable => 1 ); my $daemon = SOAP::Transport::HTTP::Daemon->new( LocalAddr => '127.0.0.1', LocalPort => 1203, Reuse => 1 ) ->dispatch_to('MyModule'); print "SOAP server started at ", $daemon->url, "\n"; $daemon->handle; } sub GoClient { require SOAP::Lite; SOAP::Lite->import( readable => 1, 'trace' => 'debug' ); my $soap = SOAP::Lite -> uri('http://127.0.0.1/MyModule') -> proxy('http://127.0.0.1:1203'); $soap->product_info_request("one","two","three"); } BEGIN { package MyModule; use strict; use warnings; require SOAP::Lite; require Data::Dump; SOAP::Lite->import( trace => 'debug', readable => 1 ); use vars qw(@ISA); @ISA = qw( SOAP::Server::Parameters ); sub product_info_request { #~ warn Data::Dump::pp( \@_ ); my $self = shift @_; my $envelope = pop @_; warn Data::Dump::pp( $envelope->body, ); warn Data::Dump::pp( '@_' ,\@_ ); warn Data::Dump::pp( '$envelope->context', $envelope->context, + ); warn Data::Dump::pp( '$envelope->context->request->content', $ +envelope->context->request->content, ); my ( @args ) = @_; return SOAP::Data->name('createRequestResponse')->value( SOAP::Data->name( 'requestNumber' => int(@args).' '."@args +" ) ); } BEGIN { $INC{'MyModule.pm'} = __FILE__; } 1; } __END__

In reply to Re^5: Caturing incoming XML from SOAP server by Anonymous Monk
in thread Caturing incoming XML from SOAP server by gackles

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.