Loading ...
Sorry, an error occurred while loading the content.

4167Problem with SOAP::Lite 0.65 beta 2

Expand Messages
  • pfconrey
    Nov 9, 2004
    • 0 Attachment
      I am having trouble using a Perl client with a .NET server. This
      code worked just fine with 0.60a, but fails with 0.65 beta 2. Given
      the following code:

      use SOAP::Lite;
      use SOAP::DateTime;

      $SOAP::Constants::DO_NOT_USE_CHARSET = 1;

      my $uri = "http://tempuri.org/TEST/Service1";
      my $proxy = "http://10.12.37.2/apps/Test/currencyinfo.asmx";
      my $wsdl = "$proxy?WSDL";

      my $client = SOAP::Lite->service( $wsdl )
      ->proxy( $proxy )
      ->on_action( sub{join('/', @_);} )
      ->on_fault( sub{die "Transport Error: " . $_
      [1]->faultstring;} );

      my @params = ( SOAP::Data->name("BusDate")->type("date")->value
      (ConvertDate("11/1/2004"))->uri($uri) );
      Debug::Dump( \@params );
      my $method = SOAP::Data->name( 'GetCurrencyData2' )->attr( {xmlns =>
      $uri} );
      my $result = $client->call( $method => @params )->result();


      Trace output shows the message sent to the .NET server is
      (prettified for readability):

      <?xml version="1.0" encoding="UTF-8"?>
      <soap:Envelope
      soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
      <GetCurrencyData2
      xmlns="http://tempuri.org/GPMTEST/Service1"
      xsi:type="xsd:string">
      SCALAR(0x31ae48)
      </GetCurrencyData2>
      </soap:Body>
      </soap:Envelope>

      Notice the "SCALAR(0x31ae48)" in place of the actual value in
      the "GetCurrencyData2" element. Even calling:

      $client->GetCurrencyData2( "11/1/2004" )

      Yeilds the same result.

      Any suggestions?