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

SOAP::Lite getting this error when invoking a soap method "CircuitDesignId can not be null or 0 or an empty list." but works find if invoked from soapui with this xml below is soapui xml and code

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envel +ope/" xmlns:mis="http://www.paetec.com/oss/misis/" xmlns:sch="http:// +www.paetec.com/oss/misis/schema"> <soapenv:Header/> <soapenv:Body> <mis:RequestCircuitInfoByCircuitDesignIdRequest> <sch:UserId>xxx</sch:UserId> <!--Optional:--> <sch:Type>?</sch:Type> <!--Zero or more repetitions:--> <sch:SubType>CONTACTMASTERINFO</sch:SubType> <!--1 or more repetitions:--> <sch:CircuitDesignId>5633874</sch:CircuitDesignId> </mis:RequestCircuitInfoByCircuitDesignIdRequest> </soapenv:Body> </soapenv:Envelope> here is the code #!/usr/bin/perl -w use SOAP::Lite; my $soap = SOAP::Lite->new( proxy => 'http://<xxx out for security>:80 +80/axis2MISIS/services/misis/'); $soap->readable(1); # $soap->default_ns('urn:RequestCircuitInfoByCircuitDesignId'); my $som = $soap->call('RequestCircuitInfoByCircuitDesignId', SOAP::Data->name('UserId')->value('xxx'), SOAP::Data->name('SubType')->value('CONTACTMASTERINFO'), SOAP::Data->name('CircuitDesignId')->value(5633874)->type('long')); + die $som->faultstring if ($som->fault); $tmp = $som->result; print "$tmp\n"; print "";

Replies are listed 'Best First'.
Re: SOAP::Lite problem
by Corion (Patriarch) on Aug 05, 2013 at 21:04 UTC

    When adding +trace, as documented in SOAP::Trace, I get the following XML, which seems to be close to your "working" XML:

    <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <RequestCircuitInfoByCircuitDesignId> <UserId xsi:type="xsd:string">xxx</UserId> <SubType xsi:type="xsd:string">CONTACTMASTERINFO</SubType> <CircuitDesignId xsi:type="xsd:long">5633874</CircuitDesignId> </RequestCircuitInfoByCircuitDesignId> </soap:Body> </soap:Envelope>

    If this XML doesn't work, find out the differences and then (re)read SOAP::Lite to find out how to make SOAP::Lite send the appropriate XML.

Re: SOAP::Lite problem
by Anonymous Monk on Aug 06, 2013 at 00:29 UTC