in reply to Syntax used by SOAP::Lite
in thread Syntax used by SOAP::Lite

Actually, it will be clearer still if I show you what SOAP::Lite is actually generating:

If I execute this:

my $req = $soap->getPhone('phoneName' => 'SEP000000000000');

then it sends this request to the call manager's soap handler:

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="ht +tp://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP- +ENV="http://schemas.xmlsoap.org/soap/envelope/" xm lns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="htt +p://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <namesp1:getPhone xmlns:namesp1="http://www.cisco.com/AXL/1.0"> <c-gensym3 xsi:type="xsd:string">phoneName</c-gensym3> <c-gensym5 xsi:type="xsd:string">SEP000000000000</c-gensym5> </namesp1:getPhone> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

And the call manager complains that it doesn't know what a c-gensym3 is (output from Data::Dumper)

$VAR1 = { 'error' => { 'request' => 'getPhone', 'message' => ' Unexpected element. Found <c-gensym3>, expecting <phoneName> or <phone +Id>..', 'code' => '5005' } };

Replies are listed 'Best First'.
Re^2: Syntax used by SOAP::Lite
by smeenz (Sexton) on Jun 03, 2005 at 22:59 UTC
    Ah.. got it. Although it feels weird posting replies to my own question, it does stop other people wasting their time answering something I've already figured out.

    I found the answer in an old mailing list archive. To avoid variables being genericaly labelled as c-gensym#, you have to pass them through a SOAP::Data object, for example:

    my $req = $soap->getPhone( SOAP::Data->name(phoneName => 'SEP000000000000') )

    I hope this helps anyone else that may be having the same problem.

      Before you go to far (and subsequently end up banging your head against the wall, as so much of it seems to make no sense), you might want to take a look at the articles that Byrne Reese (the current SOAP::Lite maintainer) has written ... they'll save you a lot of headaches.

      http://www.majordojo.com/soaplite/