Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

The way that I have done this in the past is to create my own class that inherits from Apache::SOAP and incorporates a new constructor that includes the call to the serializer function.

For example:

package My::SOAP; use Apache::SOAP; use strict; use vars qw( @ISA $VERSION ); # This class inherits from the Apache::SOAP class and is intended to + provide # functionality relating to the SOAP server itself, rather than the +exposed # web services. @ISA = qw( SOAP::Transport::HTTP::Apache ); my $server = __PACKAGE__->new; sub new { my $self = shift; unless( ref $self ) { $self = __PACKAGE__->SUPER::new( @_ ); $self->serializer( My::SOAP::Serialiser->new ); # The following on_action handler is intended to make this w +eb service .NET # friendly by modifying the SOAPAction header to fit the for +m of URI#method # (the form preferred by SOAP::Lite) where the SOAPAction he +ader is of the # form URI/method (that employed by the .NET framework). $self->on_action( sub { ( my $action = shift ) =~ s/^("?)(.*)\1$/$2/; if( $action && $action ne join( '#', @_ ) && $action ne join( '/', @_ ) && ( substr( $_[0], -1, 1 ) ne '/' || $action ne join( '', @_ ))) { $self->action( join '#', @_ ); } } ); } return $self; } 1; __END__

(This code, although slightly modified to protect the innocent, is from an Apache::SOAP server implementation that was developed for interface from .NET solution components and shows one way to implement your own serialiser within Apache::SOAP derived solutions).


perl -le "print unpack'N', pack'B32', '00000000000000000000001000000000'"

In reply to Re: Custom serializer and Apache2::SOAP by rob_au
in thread Custom serializer and Apache2::SOAP by john_oshea

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others browsing the Monastery: (2)
    As of 2020-08-07 03:44 GMT
    Find Nodes?
      Voting Booth?
      Which rocket would you take to Mars?

      Results (43 votes). Check out past polls.