Perl SOAP::LITE服务在方法中生成存根方法

Perl SOAP::LITE服务在方法中生成存根方法,perl,web-services,wsdl,soaplite,Perl,Web Services,Wsdl,Soaplite,我有一个SOAP::Lite客户端,它使用服务方法获取wsdl。这需要用一个操作和方法调用一个webservice,而不需要任何参数。它导致了一个嵌套的方法调用,提供者告诉我这个调用是错误的。我对SOAP::Lite或Web服务不是很了解。谢谢你的建议 my $lookup = SOAP::Lite->service('http://hostname.com/path/SpringVerifierWebServicePort?wsdl') -> proxy("$theURL"

我有一个SOAP::Lite客户端,它使用服务方法获取wsdl。这需要用一个操作和方法调用一个webservice,而不需要任何参数。它导致了一个嵌套的方法调用,提供者告诉我这个调用是错误的。我对SOAP::Lite或Web服务不是很了解。谢谢你的建议

my $lookup = SOAP::Lite->service('http://hostname.com/path/SpringVerifierWebServicePort?wsdl')
    -> proxy("$theURL") ;
$response = $lookup->verifySpring('');
这就是在调用时生成这个存根

<?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://webservice.springverifier.toolslang.fedins.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">    <soap:Body>
      <tns:verifySpring>
         <verifySpring xsi:nil="true" xsi:type="tns:verifySpring" />
      </tns:verifySpring>    </soap:Body></soap:Envelope>

SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x167bee8)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error

SOAP::Transport::HTTP::Client::发送\接收:HTTP::响应=哈希(0x1678)
SOAP::Transport::HTTP::Client::发送\接收:HTTP/1.1500内部服务器错误
该Web服务的提供者告诉我500错误是由于调用中嵌套的verifySpring造成的。我是否需要以不同的方式调用它,或者WSDL是否无效并破坏了SOAP::Lite?我对SOAP和Web服务了解不够,无法判断问题是WSDL,还是需要在SOAP::LITE中以不同的方式调用它。谁能告诉我一些方向吗

提供程序WSDL如下所示:

<?xml version="1.0" encoding="UTF-8" ?> 
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://webservice.springverifier.toolslang.fedins.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="SpringVerifierWebServiceService" targetNamespace="http://webservice.springverifier.toolslang.fedins.com">
  <wsdl:types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://webservice.springverifier.toolslang.fedins.com" targetNamespace="http://webservice.springverifier.toolslang.fedins.com" version="1.0">
      <xs:element name="verifySpring" type="tns:verifySpring" /> 
      <xs:element name="verifySpringResponse" type="tns:verifySpringResponse" /> 
      <xs:complexType name="verifySpring">
        <xs:sequence /> 
      </xs:complexType>
      <xs:complexType name="verifySpringResponse">
        <xs:sequence>
          <xs:element minOccurs="0" name="return" type="tns:environmentInfo" /> 
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="environmentInfo">
        <xs:sequence>
          <xs:element minOccurs="0" name="dbRegion" type="xs:string" /> 
          <xs:element minOccurs="0" name="jndi" type="xs:string" /> 
          <xs:element minOccurs="0" name="springProfile" type="xs:string" /> 
          <xs:element minOccurs="0" name="systemDate" type="xs:string" /> 
        </xs:sequence>
      </xs:complexType>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="verifySpringResponse">
    <wsdl:part element="tns:verifySpringResponse" name="parameters" /> 
  </wsdl:message>
  <wsdl:message name="verifySpring">
    <wsdl:part element="tns:verifySpring" name="parameters" /> 
  </wsdl:message>
  <wsdl:portType name="SpringVerifierWebService">
    <wsdl:operation name="verifySpring">
      <wsdl:input message="tns:verifySpring" name="verifySpring" /> 
      <wsdl:output message="tns:verifySpringResponse" name="verifySpringResponse" /> 
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="SpringVerifierWebServiceServiceSoapBinding" type="tns:SpringVerifierWebService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
    <wsdl:operation name="verifySpring">
      <soap:operation soapAction="" style="document" /> 
      <wsdl:input name="verifySpring">
        <soap:body use="literal" /> 
      </wsdl:input>
      <wsdl:output name="verifySpringResponse">
        <soap:body use="literal" /> 
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SpringVerifierWebServiceService">
    <wsdl:port binding="tns:SpringVerifierWebServiceServiceSoapBinding" name="SpringVerifierWebServicePort">
      <soap:address location="http://dev1.spring.service.fedins.com/fedservice/toolslang/springverifier/webservice/services/SpringVerifierWebServicePort" /> 
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

''是实际值(空字符串),请使用
verifySpring()和非
验证弹簧(“”)
范例

#/usr/bin/perl--
严格使用;
使用警告;
使用SOAP::Lite;
my$soap=soap::Lite
->uri('http://127.0.0.1/MyModule')
->代理('http://127.0.0.1:1203')
;;;;;;;;;
$soap->readable(1);
$soap->transport->add_处理程序(“请求_发送”,sub{print$0]->as_字符串,“\n”;return});
eval{$soap->verifySpring(“”);1}或打印“$@\n”;
求值{$soap->verifySpring();1}或打印“$@\n”;
__结束__
邮递http://127.0.0.1:1203 HTTP/1.1
接受:text/xml
接受:多部分/*
接受:应用程序/soap
用户代理:SOAP::Lite/Perl/1.11
内容长度:522
内容类型:text/xml;字符集=utf-8
SOAPAction:“http://127.0.0.1/MyModule#verifySpring"
500无法在第11行连接到127.0.0.1:1203。
邮递http://127.0.0.1:1203 HTTP/1.1
接受:text/xml
接受:多部分/*
接受:应用程序/soap
用户代理:SOAP::Lite/Perl/1.11
内容长度:475
内容类型:text/xml;字符集=utf-8
SOAPAction:“http://127.0.0.1/MyModule#verifySpring"
500无法在第12行连接到127.0.0.1:1203。
#!/usr/bin/perl --
use strict;
use warnings;
use SOAP::Lite;
my $soap = SOAP::Lite
    -> uri('http://127.0.0.1/MyModule')
    -> proxy('http://127.0.0.1:1203')
;;;;;;;;;
$soap->readable(1);
$soap->transport->add_handler("request_send",  sub { print $_[0]->as_string,"\n"; return } );
eval { $soap->verifySpring(''); 1 } or print "$@\n";
eval { $soap->verifySpring();   1 } or print "$@\n";
__END__
POST http://127.0.0.1:1203 HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
User-Agent: SOAP::Lite/Perl/1.11
Content-Length: 522
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://127.0.0.1/MyModule#verifySpring"

<?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>
    <verifySpring xmlns="http://127.0.0.1/MyModule">
      <c-gensym3 xsi:type="xsd:string" />
          </verifySpring>
  </soap:Body>
</soap:Envelope>

500 Can't connect to 127.0.0.1:1203 at - line 11.

POST http://127.0.0.1:1203 HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
User-Agent: SOAP::Lite/Perl/1.11
Content-Length: 475
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://127.0.0.1/MyModule#verifySpring"

<?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>
    <verifySpring xmlns="http://127.0.0.1/MyModule" xsi:nil="true" />
      </soap:Body>
</soap:Envelope>

500 Can't connect to 127.0.0.1:1203 at - line 12.