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

Hi,
I am trying to access a .Net Webservice using perl, i have the respective WSDL file saved locally.
here is the code
use strict; use SOAP::Lite +trace => 'all'; my ($req,$res,$FromCurrency,$ToCurrency,%hash,$method); $FromCurrency= SOAP::Data->name(FromCurrency=>'USD')->uri('http://www. +webserviceX.NET/'); $ToCurrency = SOAP::Data->name(ToCurrency=>'INR')->uri('http://www.web +serviceX.NET/'); $res = SOAP::Lite->service('file:./CurrencyConvertor.wsdl')->Conversi +onRate($FromCurrency,$ToCurrency); if ($res->fault) { print $res->faultstring(); } else { print $res->result; }

Observed that namespace attribute for the service method is not set in the request (xmlns attribute).
could some one tell me how to set the attribute for the method being called.
Thanks,
Siva.

  • Comment on How to set an "xmlns" attribute for a method while calling it using a wsdl file which is stored locally?
  • Download Code

Replies are listed 'Best First'.
Re: How to set an "xmlns" attribute for a method while calling it using a wsdl file which is stored locally?
by Herkum (Parson) on Jun 02, 2007 at 21:04 UTC
    You might have to just generate a request manually instead of using the SOAP::Data module to do it. SOAP::Lite is great at handling responses and requests. It is not as flexible for generating XML documents for specific services.