Calling functions with parameters using SOAP with Perl

前端 未结 3 376
遇见更好的自我
遇见更好的自我 2021-02-03 15:26

I am attempting to access a web service using SOAP through Perl and am having issues calling the service\'s functions that require parameters. The XSD that dictates the SOAP cal

3条回答
  •  无人及你
    2021-02-03 16:02

    You can try using SOAP::Lite if you are having problems with the WSDL:

    remember, you can always use:

    use SOAP::Lite qw(trace);
    

    to see the exact XML you are sending to see how close you are.

    I don't have time to test this out, but here is my best guess off the top of my head:

    my $soap = SOAP::Lite
     -> uri($uri)
     -> on_action(sub { sprintf '"Call by on_action: %s"',shift})
     -> proxy('http://192.168.1.100:8688/MyService/services/MyService.MyServicePort/');
    
    my $id = SOAP::Data->type('int')->name('entityId')->value(0);
    my $type= SOAP::Data->type('EntityType')->name('entityType')->value(NODE);
    $soap->enumerateEntities($id, $param);
    

提交回复
热议问题