I am calling SOAP web services by using Perl with the SOAP::Lite
module as follows:
my $soap = SOAP::Lite->on_action( sub { join '/', @_ } )
->readable( 1 )
->uri( $uri )
->proxy( $proxy )
->ns( $ns );
$soap->call(
'method' => ( SOAP::Data->name( ... ) )
);
Is there any way of calling customer web service by using XML definition displayed at SOAPUI instead of writing SOAP::Data
etc? It would be easier if there is an option to do this.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:int="xxx">
<soapenv:Header/>
<soapenv:Body>
<int:method>
<!--Optional:-->
<int:userName>?</int:userName>
<!--Optional:-->
<int:password>?</int:password>
<!--Optional:-->
...
</int:method>
</soapenv:Body>
</soapenv:Envelope>
For example, is something below possible?
my $xml_string = qq((<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:int="xxx">
<soapenv:Header/>
<soapenv:Body>
<int:method>
<!--Optional:-->
<int:userName>$username</int:userName>
<!--Optional:-->
<int:password>$password</int:password>
<!--Optional:-->
............
...........
</int:method>
</soapenv:Body>
</soapenv:Envelope>
));
$xml_string->process;