PHP에서 비누 서버를 설정하려고합니다. WSD1 없이는 제대로 작동하는 것 같습니다. 나는 WSDL에 서버를 가리킬 때 나에게 다음과 같은 오류를 제공합니다 :PHP - WSDL : 사용할 수있는 바인딩 서비스를 찾을 수 없습니다.
Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.
나는 가능한 솔루션을위한 웹을 검색했지만 답변 중 어느 것도 도움이되지 않습니다. 내 테스트 WSDL 다음
:
<?xml version='1.0' encoding='UTF-8'?>
<definitions name="WSDLExample" targetNamespace="urn:WSDLExample" xmlns:typens="urn:WSDLExample" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="doHello">
<part name="yourName" type="xsd:string"></part>
</message>
<message name="doHelloResponse">
<part name="doHelloReturn" type="xsd:string"></part>
</message>
<message name="index"></message>
<message name="indexResponse">
<part name="indexReturn" type="xsd:boolean"></part>
</message>
<portType name="ApiPortType">
<operation name="doHello">
<documentation>Gives your name back</documentation>
<input message="typens:doHello"></input>
<output message="typens:doHelloResponse"></output>
</operation>
<operation name="index">
<documentation>This is awesome1</documentation>
<input message="typens:index"></input>
<output message="typens:indexResponse"></output>
</operation>
</portType>
<binding name="ApiBinding" type="typens:ApiPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding>
<operation name="doHello">
<soap:operation soapAction="urn:ApiAction"></soap:operation>
<input>
<soap:body namespace="urn:WSDLExample" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"></soap:body>
</input>
<output>
<soap:body namespace="urn:WSDLExample" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"></soap:body>
</output>
</operation>
<operation name="index">
<soap:operation soapAction="urn:ApiAction"></soap:operation>
<input>
<soap:body namespace="urn:WSDLExample" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"></soap:body>
</input>
<output>
<soap:body namespace="urn:WSDLExample" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"></soap:body>
</output>
</operation>
</binding>
<service name="WSDLExampleService">
<port name="ApiPort" binding="typens:ApiBinding">
<soap:address></soap:address>
</port>
</service>
</definitions>
감사합니다!
편집: 그렇지 올바르게 설정 한 서비스 나는 그 문제를 발견
했다. 이제 오류는 다음과 같습니다
[WSDL] SOAP-오류 : 구문 분석 WSDL : 없음 위치 내가 아직도 서비스와 관련된 어떤 추측
과 관련이 없습니다.
error_reporting(0);
require_once(APPPATH . "/libraries/wsdl/WSDLCreator.php"); //Path to the library
$test = new WSDLCreator("WSDLExample", "http://localhost/soapWrap/wsdl");
$test->setClassesGeneralURL("http://localhost/soapWrap");
$test->includeMethodsDocumentation(TRUE);
$test->addFile(APPPATH . "controllers/api.php");
$test->addURLToClass("api", 'http://localhost/soapWrap/');
$test->addURLToTypens("XMLCreator", "http://localhost/soapWrap");
$test->createWSDL();
$test->printWSDL(true); // print with headers
나는 또한 새 것으로 WSDL을 업데이트 한 다음은
는 서버 코드입니다.감사합니다.
wsdl을 호출 할 때 코드를 게시 할 수 있습니까? – Matheno
방금 새로운 정보로 mex를 편집했습니다. 이제 다른 오류가 발생합니다. 이전 문제는 서비스 태그와 관련이있었습니다. 감사합니다 – Andrea
나는 문제를 해결했다. 나는 stackOverflow 규칙으로 인해 지금 당장은 할 수 없기 때문에 몇 시간 만에 질문에 대답 할 것이다. – Andrea