Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 14. jún 2025

Súbor: [Platon] / Metafox / lib / soap / generator_wsdl.php (stiahnutie)

Revízia 1.1, Tue May 31 13:04:31 2011 UTC (14 years ago) by igor

added SOAP server,
fixed DEPRECATED function (eregi, set_magic_quotes_runtime)

<?php
    header ("content-type: text/xml; charset=utf-8");
    require_once 'config.php';

    $soap_out = '';
    $soap_out .= '<| "<" |>?xml version="1.0" encoding="utf-8" ?'.'<| ">\n" |>';

     $soap_out .= '
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="'.$namespace.'" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="'.$namespace.'" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Web Service provides data for Android Reader application.&lt;br/&gt; Version: 1.0.0.3 Release Date: January 13, 2010, generated: '.date('Y-m-d H:i:s', Time()).'
    </wsdl:documentation>
    <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="'.$namespace.'">
            <s:element name="GetLatestHeadLinesByCategory">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="nCategoryID" type="s:int" />
                        <s:element minOccurs="1" maxOccurs="1" name="nRowIndex" type="s:int" />
                        <s:element minOccurs="1" maxOccurs="1" name="nCount" type="s:int" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetLatestHeadLinesByCategoryResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="GetLatestHeadLinesByCategoryResult" type="tns:ArrayOfArticle" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:complexType name="ArrayOfArticle">
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="unbounded" name="Article" nillable="true" type="tns:Article" />
                </s:sequence>
            </s:complexType>
            <s:complexType name="Article">
                <s:sequence>
                    <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:long" />
                    <s:element minOccurs="1" maxOccurs="1" name="ID_Author" type="s:long" />
                    <s:element minOccurs="1" maxOccurs="1" name="ID_Category" type="s:long" />
                    <s:element minOccurs="1" maxOccurs="1" name="ReleaseDate" type="s:dateTime" />
                    <s:element minOccurs="0" maxOccurs="1" name="Title" type="s:string" />
                    <s:element minOccurs="0" maxOccurs="1" name="Text" type="s:string" />
                </s:sequence>
            </s:complexType>
            <s:element name="GetLatestHeadLinesByAuthor">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="nAuthorID" type="s:int" />
                        <s:element minOccurs="1" maxOccurs="1" name="nRowIndex" type="s:int" />
                        <s:element minOccurs="1" maxOccurs="1" name="nCount" type="s:int" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetLatestHeadLinesByAuthorResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="GetLatestHeadLinesByAuthorResult" type="tns:ArrayOfArticle" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetLatestHeadLines">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="nRowIndex" type="s:int" />
                        <s:element minOccurs="1" maxOccurs="1" name="nCount" type="s:int" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetLatestHeadLinesResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="GetLatestHeadLinesResult" type="tns:ArrayOfArticle" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetAuthors">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="count" type="s:int" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetAuthorsResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="GetAuthorsResult" type="tns:ArrayOfAuthor" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:complexType name="ArrayOfAuthor">
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="unbounded" name="Author" nillable="true" type="tns:Author" />
                </s:sequence>
            </s:complexType>
            <s:complexType name="Author">
                <s:sequence>
                    <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:long" />
                    <s:element minOccurs="0" maxOccurs="1" name="FirstName" type="s:string" />
                    <s:element minOccurs="0" maxOccurs="1" name="LastName" type="s:string" />
                </s:sequence>
            </s:complexType>
            <s:element name="GetArticle">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" name="articleID" type="s:long" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetArticleResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="GetArticleResult" type="tns:Article" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetCategories">
                <s:complexType />
            </s:element>
            <s:element name="GetCategoriesResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="GetCategoriesResult" type="tns:ArrayOfCategory" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:complexType name="ArrayOfCategory">
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="unbounded" name="Category" nillable="true" type="tns:Category" />
                </s:sequence>
            </s:complexType>
            <s:complexType name="Category">
                <s:sequence>
                    <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:long" />
                    <s:element minOccurs="0" maxOccurs="1" name="CategoryName" type="s:string" />
                </s:sequence>
            </s:complexType>
        </s:schema>
    </wsdl:types>
    <wsdl:message name="GetLatestHeadLinesByCategorySoapIn">
        <wsdl:part name="parameters" element="tns:GetLatestHeadLinesByCategory" />
    </wsdl:message>
    <wsdl:message name="GetLatestHeadLinesByCategorySoapOut">
        <wsdl:part name="parameters" element="tns:GetLatestHeadLinesByCategoryResponse" />
    </wsdl:message>
    <wsdl:message name="GetLatestHeadLinesByAuthorSoapIn">
        <wsdl:part name="parameters" element="tns:GetLatestHeadLinesByAuthor" />
    </wsdl:message>
    <wsdl:message name="GetLatestHeadLinesByAuthorSoapOut">
        <wsdl:part name="parameters" element="tns:GetLatestHeadLinesByAuthorResponse" />
    </wsdl:message>
    <wsdl:message name="GetLatestHeadLinesSoapIn">
        <wsdl:part name="parameters" element="tns:GetLatestHeadLines" />
    </wsdl:message>
    <wsdl:message name="GetLatestHeadLinesSoapOut">
        <wsdl:part name="parameters" element="tns:GetLatestHeadLinesResponse" />
    </wsdl:message>
    <wsdl:message name="GetAuthorsSoapIn">
        <wsdl:part name="parameters" element="tns:GetAuthors" />
    </wsdl:message>
    <wsdl:message name="GetAuthorsSoapOut">
        <wsdl:part name="parameters" element="tns:GetAuthorsResponse" />
    </wsdl:message>
    <wsdl:message name="GetArticleSoapIn">
        <wsdl:part name="parameters" element="tns:GetArticle" />
    </wsdl:message>
    <wsdl:message name="GetArticleSoapOut">
        <wsdl:part name="parameters" element="tns:GetArticleResponse" />
    </wsdl:message>
    <wsdl:message name="GetCategoriesSoapIn">
        <wsdl:part name="parameters" element="tns:GetCategories" />
    </wsdl:message>
    <wsdl:message name="GetCategoriesSoapOut">
        <wsdl:part name="parameters" element="tns:GetCategoriesResponse" />
    </wsdl:message>
    <wsdl:portType name="AndroidServiceSoap">
        <wsdl:operation name="GetLatestHeadLinesByCategory">
            <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Summary: &lt;p&gt;Gets array of latest article headlines from specified category.&lt;/p&gt; &lt;p&gt;Remarks:&lt;/p&gt; &lt;p&gt;Returns the list of latest article headlines. The Article.Text property is set to empty string to conserve bandwidth. Method selects all articles from specified category and sorts them according to their release date descending (newest first). Then skips the first \'nRowIndex\' records and returns \'nCount\' records starting at \'nRowIndex\'.&lt;/p&gt; &lt;p&gt;If \'nCount\' is higher than total amount of articles to be returned, all remaining articles (if any) are returned.&lt;/p&gt; &lt;p&gt;nCategoryID - ID of category which articles to get.&lt;br/&gt; nRowIndex - Index of the row which will be the first article returned. The index is not the \'ID\' of the article, it is rather an index to the result set created by GetLatestHeadLines.&lt;br/&gt; nCount - Amount of articles to return.&lt;/p&gt;
            </wsdl:documentation>
            <wsdl:input message="tns:GetLatestHeadLinesByCategorySoapIn" />
            <wsdl:output message="tns:GetLatestHeadLinesByCategorySoapOut" />
        </wsdl:operation>
        <wsdl:operation name="GetLatestHeadLinesByAuthor">
            <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Summary: &lt;p&gt;Gets array of latest article headlines from specified author.&lt;/p&gt; &lt;p&gt;Remarks:&lt;/p&gt; &lt;p&gt;Returns the list of latest article headlines. The Article.Text property is set to empty string to conserve bandwidth. Method selects all articles from specified author and sorts them according to their release date descending (newest first). Then skips the first \'nRowIndex\' records and returns \'nCount\' records starting at \'nRowIndex\'.&lt;/p&gt; &lt;p&gt;If \'nCount\' is higher than total amount of articles to be returned, all remaining articles (if any) are returned.&lt;/p&gt; &lt;p&gt;nAuthorID - ID of author whose articles to get.&lt;br/&gt; nRowIndex - Index of the row which will be the first article returned. The index is not the \'ID\' of the article, it is rather an index to the result set created by GetLatestHeadLines.&lt;br/&gt; nCount - Amount of articles to return.&lt;/p&gt;
            </wsdl:documentation>
            <wsdl:input message="tns:GetLatestHeadLinesByAuthorSoapIn" />
            <wsdl:output message="tns:GetLatestHeadLinesByAuthorSoapOut" />
        </wsdl:operation>
        <wsdl:operation name="GetLatestHeadLines">
            <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Summary: &lt;p&gt;Gets array of latest article headlines.&lt;/p&gt; &lt;p&gt;Remarks:&lt;/p&gt; &lt;p&gt;Returns the list of latest article headlines. The Article.Text property is set to empty string to conserve bandwidth. Method selects all articles and sorts them according to their release date descending (newest first). Then skips the first \'nRowIndex\' records and returns \'nCount\' records starting at \'nRowIndex\'.&lt;/p&gt; &lt;p&gt;If \'nCount\' is higher than total amount of articles to be returned, all remaining articles (if any) are returned.&lt;/p&gt; &lt;p&gt; nRowIndex - Index of the row which will be the first article returned. The index is not the \'ID\' of the article, it is rather an index to the result set created by GetLatestHeadLines.&lt;br/&gt; nCount - Amount of articles to return.&lt;/p&gt;
            </wsdl:documentation>
            <wsdl:input message="tns:GetLatestHeadLinesSoapIn" />
            <wsdl:output message="tns:GetLatestHeadLinesSoapOut" />
        </wsdl:operation>
        <wsdl:operation name="GetAuthors">
            <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Summary: &lt;p&gt;Gets an array of authors with specified count.&lt;/p&gt; &lt;p&gt; count - Amount of authors to be contained in the array. If this value is 0 then all authors are returned.&lt;/p&gt;
            </wsdl:documentation>
            <wsdl:input message="tns:GetAuthorsSoapIn" />
            <wsdl:output message="tns:GetAuthorsSoapOut" />
        </wsdl:operation>
        <wsdl:operation name="GetArticle">
            <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Summary: &lt;p&gt;Returns article with specified identifier.&lt;/p&gt; &lt;p&gt; articleID - Article identifier to be returned.&lt;/p&gt;
            </wsdl:documentation>
            <wsdl:input message="tns:GetArticleSoapIn" />
            <wsdl:output message="tns:GetArticleSoapOut" />
        </wsdl:operation>
        <wsdl:operation name="GetCategories">
            <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Summary: &lt;p&gt;Gets the list of all categories of articles.&lt;/p&gt;
            </wsdl:documentation>
            <wsdl:input message="tns:GetCategoriesSoapIn" />
            <wsdl:output message="tns:GetCategoriesSoapOut" />
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="AndroidServiceSoap" type="tns:AndroidServiceSoap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="GetLatestHeadLinesByCategory">
            <soap:operation soapAction="'.$namespace.'GetLatestHeadLinesByCategory" style="document" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetLatestHeadLinesByAuthor">
            <soap:operation soapAction="'.$namespace.'GetLatestHeadLinesByAuthor" style="document" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetLatestHeadLines">
            <soap:operation soapAction="'.$namespace.'GetLatestHeadLines" style="document" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetAuthors">
            <soap:operation soapAction="'.$namespace.'GetAuthors" style="document" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetArticle">
            <soap:operation soapAction="'.$namespace.'GetArticle" style="document" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetCategories">
            <soap:operation soapAction="'.$namespace.'GetCategories" style="document" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="AndroidServiceSoap12" type="tns:AndroidServiceSoap">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="GetLatestHeadLinesByCategory">
            <soap12:operation soapAction="'.$namespace.'GetLatestHeadLinesByCategory" style="document" />
            <wsdl:input>
                <soap12:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetLatestHeadLinesByAuthor">
            <soap12:operation soapAction="'.$namespace.'GetLatestHeadLinesByAuthor" style="document" />
            <wsdl:input>
                <soap12:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetLatestHeadLines">
            <soap12:operation soapAction="'.$namespace.'GetLatestHeadLines" style="document" />
            <wsdl:input>
                <soap12:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetAuthors">
            <soap12:operation soapAction="'.$namespace.'GetAuthors" style="document" />
            <wsdl:input>
                <soap12:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetArticle">
            <soap12:operation soapAction="'.$namespace.'GetArticle" style="document" />
            <wsdl:input>
                <soap12:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetCategories">
            <soap12:operation soapAction="'.$namespace.'GetCategories" style="document" />
            <wsdl:input>
                <soap12:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="AndroidService">
        <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Web Service provides data for Android Reader application.&lt;br/&gt; Version: 1.0.0.3 Release Date: January 13, 2010, generated: '.date('Y-m-d H:i:s', Time()).'
        </wsdl:documentation>
        <wsdl:port name="AndroidServiceSoap" binding="tns:AndroidServiceSoap">
            <soap:address location="'.$server_location.'" />
        </wsdl:port>
        <wsdl:port name="AndroidServiceSoap12" binding="tns:AndroidServiceSoap12">
            <soap12:address location="'.$server_location.'" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
';


//    $fp = fopen('server9.wsdl', 'w+');
//    fwrite($fp, $soap_out);
//    fclose($fp);

    //echo $soap_out;
?>

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok