SOAP::Lite and .wsdl files

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I'm struggling with SOAP::Lite and using .wsdl files.  Given the
configuration shown below, what should be in these sections of the .wsdl

    <operation name="testWsdl">
    <soap:operation soapAction="??????????????????????????????????"/>
    <soap:address location=" "/>

Are there other aspects of Test.wsdl that aren't properly configured?

I've tried many variations for the above and whatever I use I always get
"Unrecognized method 'testWsdl'. List of available method(s):"
with no list of available methods.  I've also used +trace on SOAP::Lite
and don't really get anything meaningful, at least to me.

The only reason it's important to me to use the .wsdl files is that the
service is intended for a .NET client.


d underscore roesler at agilent dot com


use strict;
use warnings;
use SOAP::Lite;

my $var = $ARGV[0];

# This works
my $soap = SOAP::Lite
    -> proxy(' ')
    -> uri('/MyPkgs/TestPkg');
my $result = $soap->testWsdl($var);

# This doesn't
#my $result = SOAP::Lite
#   -> service(' ')
#   -> testWsdl('Hello World');

unless ($result->fault) {
    print $result->result();
} else {
    print join ', ',


package MyPkgs::TestPkg;

use strict;
use warnings;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(testWsdl);

sub testWsdl {
    my ($class, $var) = @_;

    return SOAP::Data->name('Test')
                     ->value("Test Passed: $var");



use strict;
use warnings;
use SOAP::Transport::HTTP;
use lib '/opt/sdo/soap';
use MyPkgs::TestPkg;

    -> dispatch_to('/opt/sdo/soap', 'MyPkgs::TestPkg')
    -> handle;

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="TestWsdl"
    xmlns=" /"
    xmlns:soap=" /"
    xmlns:tns=" "
    targetNamespace=" "
    xmlns:xsd=" ">

    <message name="TestRequest">
       <part name="var" type="xsd:string"/>

    <message name="TestResponse">
       <part name="result" type="xsd:string"/>

    <portType name="TestPortType">
       <operation name="testWsdl">
          <input message="tns:TestRequest"/>
          <output message="tns:TestResponse"/>

    <binding name="TestBinding" type="tns:TestPortType">
       <binding style="rpc"                                 
transport=" "/>
       <operation name="testWsdl">
             <soap:body use="literal"/>
             <soap:body use="literal"/>

    <service name="testWsdl">
       <documentation>Testing Web Services with wsdl</documentation>
       <port name="TestPortType" binding="tns:TestBinding">
          <soap:address location=" "/>

Site Timeline