Created
June 13, 2017 11:11
-
-
Save Gemorroj/350dd553888cc0c74cbaf77eb680770c to your computer and use it in GitHub Desktop.
php bug #74679
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$client = new SoapClient(__DIR__ . '/test.wsdl', array( | |
'trace' => true, | |
'exceptions' => true, | |
'cache_wsdl' => WSDL_CACHE_NONE, | |
)); | |
$client->receiveEDIMessages(); | |
echo $client->__getLastResponse(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$server = new SoapServer(__DIR__ . '/test.wsdl', array( | |
'cache_wsdl' => WSDL_CACHE_MEMORY // <- problem here | |
)); | |
$server->setClass(Api::class); | |
$server->handle(); | |
class Api | |
{ | |
public function receiveEDIMessages() | |
{ | |
return array( | |
'head' => null, | |
'body' => array( | |
'message' => 'text', | |
'from' => '2352457999993', | |
'to' => '2352456999994', | |
'id' => 54370 | |
), | |
); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<definitions xmlns:tns="urn:private" 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/" name="private" targetNamespace="urn:private"> | |
<types> | |
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:private"> | |
<xsd:complexType name="confirmReceiveEDIMessagesResponse"> | |
<xsd:sequence> | |
<xsd:element name="head" type="tns:headResponse"/> | |
</xsd:sequence> | |
</xsd:complexType> | |
<xsd:complexType name="headResponse"> | |
<xsd:sequence> | |
<xsd:annotation> | |
<xsd:documentation xml:lang="ru">Код и описание ошибки. Если все хорошо, то код ошибки 0, описания ошибки нету.</xsd:documentation> | |
</xsd:annotation> | |
<xsd:element name="code" type="xsd:int"/> | |
<xsd:element name="message" type="xsd:string" nillable="true"/> | |
</xsd:sequence> | |
</xsd:complexType> | |
<xsd:complexType name="bodyMessagesResponse"> | |
<xsd:complexContent> | |
<xsd:restriction base="soapenc:Array"> | |
<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="tns:messageResponse[]"/> | |
</xsd:restriction> | |
</xsd:complexContent> | |
</xsd:complexType> | |
<xsd:complexType name="messageResponse"> | |
<xsd:sequence> | |
<xsd:element name="message" type="xsd:string"/> | |
<xsd:element name="from" type="xsd:string"/> | |
<xsd:element name="to" type="xsd:string"/> | |
<xsd:element name="id" type="xsd:integer"/> | |
</xsd:sequence> | |
</xsd:complexType> | |
<xsd:complexType name="receiveEDIMessagesResponse"> | |
<xsd:sequence> | |
<xsd:element name="head" type="tns:headResponse"/> | |
<xsd:element name="body" type="tns:bodyMessagesResponse" minOccurs="0"/> | |
</xsd:sequence> | |
</xsd:complexType> | |
</xsd:schema> | |
</types> | |
<message name="receiveEDIMessages"/> | |
<message name="receiveEDIMessagesResponse"> | |
<part name="receiveEDIMessagesReturn" type="tns:receiveEDIMessagesResponse"/> | |
</message> | |
<portType name="ApiPortType"> | |
<documentation>Приватный Web-сервис</documentation> | |
<operation name="receiveEDIMessages"> | |
<documentation>Отправка исходящих EDI сообщений</documentation> | |
<input message="tns:receiveEDIMessages"/> | |
<output message="tns:receiveEDIMessagesResponse"/> | |
</operation> | |
</portType> | |
<binding name="ApiBinding" type="tns:ApiPortType"> | |
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> | |
<operation name="receiveEDIMessages"> | |
<soap:operation soapAction="urn:ApiAction"/> | |
<input> | |
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:interface"/> | |
</input> | |
<output> | |
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:interface"/> | |
</output> | |
</operation> | |
</binding> | |
<service name="interfacePrivateService"> | |
<port name="ApiPort" binding="tns:ApiBinding"> | |
<soap:address location="http://test.loc/server.php"/> <!-- CHANGE THIS --> | |
</port> | |
</service> | |
</definitions> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment