首頁  >  文章  >  後端開發  >  国政通的接口soapclient不成功

国政通的接口soapclient不成功

WBOY
WBOY原創
2016-06-23 13:59:08888瀏覽

如题

具体情况是我有一台生产机一台测试机  生产机上一切正常 测试机上

$soap = new SoapClient ("http://gboss.id5.cn/services/QueryValidatorServices?wsdl" );

就不成功

漫长的等待后提示:

SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://gboss.id5.cn/services/QueryValidatorServices?wsdl' 


测试机和生产机环境基本上一致 soap扩展都开了


回复讨论(解决方案)

你的 url 对吗?怎么连浏览器也访问不到?

直接访问的结果是

This XML file does not appear to have any style information associated with it. The document tree is shown below.<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://app.service.validator.businesses.gboss.id5.cn" xmlns:intf="http://app.service.validator.businesses.gboss.id5.cn" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://app.service.validator.businesses.gboss.id5.cn"><!--WSDL created by Apache Axis version: 1.4Built on Apr 22, 2006 (06:55:48 PDT)--><wsdl:types><schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://app.service.validator.businesses.gboss.id5.cn"><element name="querySingle"><complexType><sequence><element name="userName_" type="xsd:string"/><element name="password_" type="xsd:string"/><element name="type_" type="xsd:string"/><element name="param_" type="xsd:string"/></sequence></complexType></element><element name="querySingleResponse"><complexType><sequence><element name="querySingleReturn" type="xsd:string"/></sequence></complexType></element><element name="queryBatch"><complexType><sequence><element name="userName_" type="xsd:string"/><element name="password_" type="xsd:string"/><element name="type_" type="xsd:string"/><element name="param_" type="xsd:string"/></sequence></complexType></element><element name="queryBatchResponse"><complexType><sequence><element name="queryBatchReturn" type="xsd:string"/></sequence></complexType></element></schema></wsdl:types><wsdl:message name="queryBatchResponse"><wsdl:part element="impl:queryBatchResponse" name="parameters"/></wsdl:message><wsdl:message name="queryBatchRequest"><wsdl:part element="impl:queryBatch" name="parameters"/></wsdl:message><wsdl:message name="querySingleResponse"><wsdl:part element="impl:querySingleResponse" name="parameters"/></wsdl:message><wsdl:message name="querySingleRequest"><wsdl:part element="impl:querySingle" name="parameters"/></wsdl:message><wsdl:portType name="QueryValidatorServices"><wsdl:operation name="querySingle"><wsdl:input message="impl:querySingleRequest" name="querySingleRequest"/><wsdl:output message="impl:querySingleResponse" name="querySingleResponse"/></wsdl:operation><wsdl:operation name="queryBatch"><wsdl:input message="impl:queryBatchRequest" name="queryBatchRequest"/><wsdl:output message="impl:queryBatchResponse" name="queryBatchResponse"/></wsdl:operation></wsdl:portType><wsdl:binding name="QueryValidatorServicesSoapBinding" type="impl:QueryValidatorServices"><wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="querySingle"><wsdlsoap:operation soapAction=""/><wsdl:input name="querySingleRequest"><wsdlsoap:body use="literal"/></wsdl:input><wsdl:output name="querySingleResponse"><wsdlsoap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="queryBatch"><wsdlsoap:operation soapAction=""/><wsdl:input name="queryBatchRequest"><wsdlsoap:body use="literal"/></wsdl:input><wsdl:output name="queryBatchResponse"><wsdlsoap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="QueryValidatorServicesService"><wsdl:port binding="impl:QueryValidatorServicesSoapBinding" name="QueryValidatorServices"><wsdlsoap:address location="http://gboss.id5.cn/services/QueryValidatorServices"/></wsdl:port></wsdl:service></wsdl:definitions>

你参考下这个看行不行?

经多次访问尝试,确认该 url 不可访问
若你处可以访问,则可能他限制了访问来源或 dns 没有传递到


我们都打不开阿 是不是对外网作了限制?防火墙?

经多次访问尝试,确认该 url 不可访问
若你处可以访问,则可能他限制了访问来源或 dns 没有传递到


我们都打不开阿 是不是对外网作了限制?防火墙?

非常感谢两位的帮助  我分析可能是国政通的接口限制了IP  之前没有考虑到这一点 

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn