Модераторы: Aliance, skyboy, MoLeX, ksnk
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> Помогите составить WSDL, php5, perlv5.14, SOAP::Lite 
:(
    Опции темы
tishaishii
Дата 29.7.2012, 13:58 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Создатель
***


Профиль
Группа: Завсегдатай
Сообщений: 1262
Регистрация: 14.2.2006
Где: Москва

Репутация: нет
Всего: 8



WSDL:
Код

<definitions
    name="XXX-XXX-Encoder"
    targetNamespace="http://192.168.1.35/Package/Package"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:control="http://192.168.1.35/Package/Package"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soapenv="http://schemas.xmlsoap.org/wsdl/envelope/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://192.168.1.35/Package/Package"
elementFormDefault="qualified" attributeFormDefault="qualified">
        <element name="login-Type">
            <simpleType>
                <element name="login" type="string"/>
            </simpleType>
        </element>
        <element name="password-Type">
            <simpleType>
                <element name="password" type="string"/>
            </simpleType>
        </element>
        <element name="login-Request-Type">
            <complexType>
                <all>
                    <element name="login" type="string"/>
                    <element name="password" type="string"/>
                </all>
            </complexType>
        </element>
        <element name="login-Response-Type">
            <complexType>
                <all>
                    <element name="errorCode" type="control:status" nillable="true"/>
                    <element name="error" type="string" nillable="true"/>
                    <element name="ticket" type="control:uuid" nillable="false"/>
                </all>
            </complexType>
        </element>
    </schema>

    <message name="loginMessageRequest">
        <part name="login" element="control:login-Type"/>
        <part name="password" element="control:password-Type"/>
    </message>
    <message name="loginMessageResponse">
        <part name="login" element="control:login-Response-Type"/>
    </message>

    <portType name="XXX-XXX-Encoding-Port-Type">
        <operation name="login">
            <documentation><![CDATA[Авторизация через паспорт, по аналогии с авторизацией агентов]]></documentation>
            <input message="control:loginMessageRequest"/>
            <output message="control:loginMessageResponse"/>
        </operation>
    </portType>
    <binding name="XXX-XXX-Binding" type="control:XXX-XXX-Encoding-Port-Type">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="login">
            <soap:operation soapAction="http://192.168.1.35/Package/Package#login"/>
            <input>
                <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </input>
            <output>
                <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </output>
        </operation>
    </binding>
    <service name="XXX-XXX-Service">
        <documentation>XXX web-service</documentation>
        <port name="XXX-XXX-Port" binding="control:XXX-XXX-Binding">
            <soap:address location="http://192.168.1.35/soap"/>
        </port>
    </service>
</definitions>


Код PHP:
Код
<?php
    $client = new SoapClient ( 'http://192.168.1.35:80/get/wsdl.xml' ) ;
    $client -> login(
        array(
            'login'     => 'test' ,
            'password'  => 'test'
        )
    ) ;
?>


Вывод:
Код
PHP Fatal error:  Uncaught SoapFault exception: [soap:Client]
SOAPAction shall match 'uri#method' if present (got 'http://192.168.1.35/Package/Package#login', expected '#login'


Как сделать так, чтобы expected было не "#login", а "http://192.168.1.35/Package/Package#login"?

Это сообщение отредактировал(а) tishaishii - 29.7.2012, 22:17
PM MAIL ICQ Skype   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | PHP: Libraries | Следующая тема »


 




[ Время генерации скрипта: 0.0473 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.