http://qs321.pair.com?node_id=653121

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

I have posted this earlier, see SOAP::Transport::HTTP::Daemon and XML, but I still need help getting SOAP::Lite to return the correct XML information.
This is for a SOAP Server, not the SOAP Client.
Here is the code for the Fake SOAP Server:
use strict; use SOAP::Lite + "trace"; use SOAP::Transport::HTTP; use Data::Dumper; my $serverinfo = { version => "0.1.dev", validTypes => [ filetype => "txt", filetype => "html", ], statistics => { documentsProcessed => 0, }, }; sub FileQueue::getServerInfo { return SOAP::Data->name( info => $serverinfo ); } my $daemon = SOAP::Transport::HTTP::Daemon -> new (LocalPort => 88) -> dispatch_to('FileQueue') ; print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle;
This is the XML that is generated:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/env +elope/" xmlns:namesp2="http://xml.apache.org/xml-soap" xmlns:xsi="htt +p://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schema +s.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSc +hema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encodin +g/"> <SOAP-ENV:Body> <namesp1:getServerInfoResponse xmlns:namesp1="http://www.perlmonks +.org/FileQueue"> <info xsi:type="namesp2:SOAPStruct"> <statistics xsi:type="namesp2:SOAPStruct"> <documentsProcessed xsi:type="xsd:int">0</documentsProcessed +> </statistics> <version xsi:type="xsd:string">0.1.dev</version> <validTypes xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd: +string[4]"> <item xsi:type="xsd:string">filetype</item> <item xsi:type="xsd:string">txt</item> <item xsi:type="xsd:string">filetype</item> <item xsi:type="xsd:string">html</item> </validTypes> </info> </namesp1:getServerInfoResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
I am trying to generate the following XML:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/env +elope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xm +lns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http:/ +/www.w3.org/1999/XMLSchema" xmlns:pmq="http://www.perlmonks.com/FileQ +ueue"> <SOAP-ENV:Body> <pmq:getServerInfoResponse> <info> <version>0.1.dev</version> <validTypes> <filetype>txt</filetype> <filetype>txt</filetype> </validTypes> <statistics> <documentsProcessed>0</documentsProcessed> </statistics> </info> </pmq:getServerInfoResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
How do I get it to generate the XML without the xsi:type attributes?

How do I modify the XML headers? -rppowell