Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

How to manipulate SOAP::Lite Server answer to special format ?

by physi (Friar)
on Mar 17, 2010 at 09:50 UTC ( [id://829132]=perlquestion: print w/replies, xml ) Need Help??

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

Hello fellow monks,
I got a question about SOAP::Lite, which I can't fiddle out:
my $daemon = SOAP::Transport::HTTP::Daemon -> new (LocalPort => 8088, Reuse => 1) -> on_action(sub {}) -> dispatch_to('ServiceError'); print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle; sub ServiceError { print "ServiceError\n"; return SOAP::Data->name('ResponseType')->value('ACKNOWLEDGE'); }
This returns the following SOAP-XML to the client:
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/enc +oding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s +oapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http:// +www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soa +p/envelope/"> <soap:Body> <ServiceErrorResponse xmlns="http://DataModel_v4.xxxxxxxxx.com"> <ResponseType xsi:type="xsd:string">ACKNOWLEDGE</ResponseType +> </ServiceErrorResponse> </soap:Body> </soap:Envelope>
but this one I need to send to the client :
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/enc +oding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s +o +apenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://w +ww.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap +/ +envelope/"> <soapenv:Body> <ResponseType>ACKNOWLEDGE</ResponseType> </soapenv:Body> </soapenv:Envelope>
Is there a way to tell SOAP::Lite to suppress the  <ServiceErrorResponse> Tags around my single-line message?

Thanks for any hints !

Cheers,
Christian

-----------------------------------
--the good, the bad and the physi--
-----------------------------------

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://829132]
Approved by Corion
Front-paged by keszler
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2026-02-10 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.