I need a way to remove SOAP-ENV from my SOAP request (and change it to just soap). So SOAP-ENV:Header will be soap:Header.

Here is my current request:

POST http://ews.expoexchange.com/RealTimeServices/export.asmx Accept: text/xml Accept: multipart/* Content-Length: 1210 Content-Type: text/xml; charset=utf-8 SOAPAction: http://expoexchange.com/realtimeservices/PullRegistrantLis +t <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instanc +e" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:S +OAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http:/ +/www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xm +lsoap.org/soap/encoding/" > <SOAP-ENV:Header > <DataExportHeader xmlns="http://expoexchange.com/realtimeservices/ +" > <HeaderShowCode >Code</HeaderShowCode> <HeaderUsername >User</HeaderUsername> <HeaderPassword >pass</HeaderPassword> <HeaderSQLEnvironment >PROD</HeaderSQLEnvironment> <PagedResultsPageSize >1</PagedResultsPageSize> <FTPUsername >ExhibInvites</FTPUsername> <FTPFileExportType >CSV</FTPFileExportType></DataExportHeader></SOAP-ENV:Header> <SOAP-ENV:Body > <PullRegistrantList xmlns="http://expoexchange.com/realtimeservice +s/" > <BeginDate >2007-01-12</BeginDate> <EndDate >2009-01-12</EndDate> <pageToken >10</pageToken> <currentPage >1</currentPage></PullRegistrantList></SOAP-ENV:Body></SOAP-ENV: +Envelope>

But i need this form:

POST /RealTimeServices/export.asmx HTTP/1.1 Host: ews.expoexchange.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://expoexchange.com/realtimeservices/PullRegistrantLi +st" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x +mlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schema +s.xmlsoap.org/soap/envelope/"> <soap:Header> <DataExportHeader xmlns="http://expoexchange.com/realtimeservices/ +"> <HeaderShowCode>string</HeaderShowCode> <HeaderUsername>string</HeaderUsername> <HeaderPassword>string</HeaderPassword> <HeaderSQLEnvironment>PROD or QA or DEV or RD</HeaderSQLEnvironm +ent> <PagedResultsPageSize>int</PagedResultsPageSize> <FTPUsername>string</FTPUsername> <FTPFileExportType>None or CSV</FTPFileExportType> </DataExportHeader> </soap:Header> <soap:Body> <PullRegistrantList xmlns="http://expoexchange.com/realtimeservice +s/"> <BeginDate>dateTime</BeginDate> <EndDate>dateTime</EndDate> <pageToken>string</pageToken> <currentPage>int</currentPage> </PullRegistrantList> </soap:Body> </soap:Envelope>

And here is my code:

#!/usr/bin/perl -w use strict; use SOAP::Lite +"trace"; my $uri = "http://expoexchange.com/realtimeservices/PullRegistrantList +"; my $proxy = "http://ews.expoexchange.com/RealTimeServices/export.asmx" +; my %info = ( HeaderShowCode => "Code", HeaderUsername => "User", HeaderPassword => "pass", HeaderSQLEnvironment => "PROD", PagedResultsPageSize => 1, FTPUsername => "User", FTPFileExportType => "CSV" ); my $client = SOAP::Lite ->on_action( sub { join '', @_; } ) ->readable(1) ->uri($uri) ->proxy($proxy); $client->autotype(0); my $HeaderShowCode = SOAP::Header->name( HeaderShowCode => $info{Heade +rShowCode} ); my $HeaderUsername = SOAP::Header->name( HeaderUsername => $info{Heade +rUsername} ); my $HeaderPassword = SOAP::Header->name( HeaderPassword => $info{Heade +rPassword} ); my $HeaderSQLEnvironment = SOAP::Header->name( HeaderSQLEnvironment => + $info{HeaderSQLEnvironment} ); my $PagedResultsPageSize = SOAP::Header->name( PagedResultsPageSize => + $info{PagedResultsPageSize} ); my $FTPUsername = SOAP::Header->name( FTPUsername => $info{FTPUsername +} ); my $FTPFileExportType = SOAP::Header->name( FTPFileExportType => $info +{FTPFileExportType} ); my $DataExportHeader = SOAP::Header->name('DataExportHeader') ->attr( { 'xmlns' => 'http://expoexchange.com/realtimeservices +/' } ) ->value(\SOAP::Header->value( $HeaderShowCode, $HeaderUsername +, $HeaderPassword, $HeaderSQLEnvironment, $PagedResultsPageSize, $FTP +Username, $FTPFileExportType )); my $BeginDate = SOAP::Data->name( BeginDate => "2007-01-12" ); my $EndDate = SOAP::Data->name( EndDate => "2009-01-12" ); my $pageToken = SOAP::Data->name( pageToken => "10" ); my $currentPage = SOAP::Data->name( currentPage => "1" ); my @parameters = ( $BeginDate, $EndDate, $pageToken, $currentPage, $Da +taExportHeader ); print $client->call( SOAP::Data->name('PullRegistrantList')->attr( { x +mlns => 'http://expoexchange.com/realtimeservices/' } ) => @parameter +s )->result;

In reply to SOAP::Lite and SOAP-ENV by Gangabass

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.