我必须做一个简单的脚本(unix/linux 目标)来关闭打印后台处理程序的 log_file
假脱机程序提供了通过肥皂调用函数的机会,但我对此一无所知
这是功能:
- <!-- VPSX System Close Account file Command request
-->
- <message name="VPSX_SystemCloseAcct">
<part name="SessID" type="xsd:string" />
<part name="VPSID" type="xsd:string" />
</message>
- <!-- VPSX System close account file Command request/response
-->
- <operation name="VPSX_SystemCloseAcct">
<input message="lrs:VPSX_SystemCloseAcct" />
<output message="lrs:VPSX_SystemCmdResponse" />
</operation>
<!-- VPSX System close account file Command request/response
-->
- <operation name="VPSX_SystemCloseAcct">
<soap:operation soapAction="" />
- <input>
<soap:body use="encoded" namespace="http://www.lrs.com"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
- <output>
<soap:body use="encoded" namespace="http://www.lrs.com"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
有没有一种简单的方法(python?php?java?)来做到这一点?
我已经在 perl 中尝试过
#!/usr/bin/perl
use SOAP::Lite;
my $WSDL= 'http://myserver:81/lrs/webconnect/vpsx?trid=vpsx';
my $soap = SOAP::Lite->on_fault(\&SoapFault)
->service($WSDL);
my $logon = $soap->Logon
(
SOAP::Data->type('string')->name('Server')->value("VSVK1"),
SOAP::Data->type('string')->name('UserID')->value("serv"),
SOAP::Data->type('string')->name('Password')->value("serv")
);
$sessionID = $logon->result();
#my $chiusura = $soap->VPSX_SystemCloseAcct
#(
# SOAP::Data->type('string')->name('SessID')->value($sessionID),
# SOAP::Data->type('string')->name('VPSID')->value("")
#);
my $logoff = $soap->Logoff
(
SOAP::Data->type('string')->name('SessID')->value($sessionID)
);
但得到这个错误
String value expected instead of SOAP::Data reference