<?xml version="1.0"?>
<definitions
    name="RNN"
    targetNamespace="http://rnn.sourceforge.jp/cgi-bin/soap"
    xmlns:tns="http://rnn.sourceforge.jp/cgi-bin/soap"
    xmlns:txd="http://rnn.sourceforge.jp/cgi-bin/soap"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

  <types>
    <schema
	xmlns="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://rnn.sourceforge.jp/cgi-bin/soap">

      <complexType name="RnnArticle">
  	<all>
    	  <element name="storyid" type="int"/>
	  <element name="title" type="string"/>
    	  <element name="topicid" type="int"/>
	  <element name="created" type="dateTime"/>
	  <element name="published" type="dateTime"/>
	  <element name="hometext" type="string"/>
	  <element name="bodytext" type="string"/>
  	</all>
      </complexType>

      <complexType name="RnnComment">
  	<all>
    	  <element name="comment_id" type="int"/>
    	  <element name="pid" type="int"/>
	  <element name="item_id" type="int"/>
	  <element name="subject" type="string"/>
	  <element name="date" type="dateTime"/>
	  <element name="comment" type="string"/>
  	</all>
      </complexType>

      <complexType name="RnnTopic">
  	<all>
    	  <element name="topic_id" type="int"/>
    	  <element name="topic_pid" type="int"/>
    	  <element name="topic_title" type="string"/>
  	</all>
      </complexType>

      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      <complexType name="RnnArticleArray">
	<complexContent>
  	  <restriction base="soapenc:Array">
  	    <attribute ref="soapenc:arrayType" wsdl:arrayType="txd:RnnArticle[]"/>
  	  </restriction>
	</complexContent>
      </complexType>

      <complexType name="RnnTopicArray">
	<complexContent>
  	  <restriction base="soapenc:Array">
  	    <attribute ref="soapenc:arrayType" wsdl:arrayType="txd:RnnTopic[]"/>
  	  </restriction>
	</complexContent>
      </complexType>

      <complexType name="RnnCommentArray">
	<complexContent>
  	  <restriction base="soapenc:Array">
  	    <attribute ref="soapenc:arrayType" wsdl:arrayType="txd:RnnComment[]"/>
  	  </restriction>
	</complexContent>
      </complexType>
    </schema>
  </types>

  <message name="listRequest">
    <part name="pos" type="xsd:int"/>
    <part name="n" type="xsd:int"/>
    <part name="topicid" type="xsd:int"/>
  </message>
  <message name="listResponse">
    <part name="return" type="txd:RnnArticleArray"/>
  </message>

  <message name="articleRequest">
    <part name="id" type="xsd:int"/>
  </message>
  <message name="articleResponse">
    <part name="return" type="txd:RnnArticle"/>
  </message>

  <message name="commentsRequest">
    <part name="id" type="xsd:int"/>
  </message>
  <message name="commentsResponse">
    <part name="return" type="txd:RnnCommentArray"/>
  </message>

  <message name="recent_articlesRequest">
    <part name="days" type="xsd:int"/>
    <!-- topic? topicid? -->
    <part name="topicid" type="xsd:int"/>
  </message>
  <message name="recent_articlesResponse">
    <part name="return" type="txd:RnnArticleArray"/>
  </message>

  <message name="recent_commentsRequest">
    <part name="days" type="xsd:int"/>
  </message>
  <message name="recent_commentsResponse">
    <part name="return" type="txd:RnnCommentArray"/>
  </message>

  <message name="topicsRequest"/>
  <message name="topicsResponse">
    <part name="return" type="txd:RnnTopicArray"/>
  </message>

  <message name="submitRequest">
    <part name="title" type="xsd:string"/>
    <part name="text" type="xsd:string"/>
    <part name="topicid" type="xsd:int"/>
  </message>
  <message name="submitResponse">
    <part name="return" type="xsd:anySimpleType"/>
  </message>

  <message name="post_commentRequest">
    <part name="item_id" type="xsd:int"/>
    <part name="pid" type="xsd:int"/>
    <part name="subject" type="xsd:string"/>
    <part name="comment" type="xsd:string"/>
  </message>
  <message name="post_commentResponse">
    <part name="return" type="xsd:anySimpleType"/>
  </message>

  <portType name="RnnBaseServicePortType">
    <operation name="list"
	parameterOrder="pos n topicid">
      <input message="tns:listRequest"/>
      <output message="tns:listResponse"/>
    </operation>

    <operation name="article"
	parameterOrder="id">
      <input message="tns:articleRequest"/>
      <output message="tns:articleResponse"/>
    </operation>

    <operation name="comments"
	parameterOrder="id">
      <input message="tns:commentsRequest"/>
      <output message="tns:commentsResponse"/>
    </operation>

    <operation name="recent_articles"
	parameterOrder="days topicid">
      <input message="tns:recent_articlesRequest"/>
      <output message="tns:recent_articlesResponse"/>
    </operation>

    <operation name="recent_comments"
	parameterOrder="days">
      <input message="tns:recent_commentsRequest"/>
      <output message="tns:recent_commentsResponse"/>
    </operation>

    <operation name="topics"
	parameterOrder="">
      <input message="tns:topicsRequest"/>
      <output message="tns:topicsResponse"/>
    </operation>

    <operation name="submit"
	parameterOrder="title text topicid">
      <input message="tns:submitRequest"/>
      <output message="tns:submitResponse"/>
    </operation>

    <operation name="post_comment"
	parameterOrder="item_id pid subject comment">
      <input message="tns:post_commentRequest"/>
      <output message="tns:post_commentResponse"/>
    </operation>
  </portType>

  <binding name="RnnBaseServicePortBinding" type="tns:RnnBaseServicePortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

    <operation name="list">
      <soap:operation soapAction=""/>
      <input>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </input>
      <output>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </output>
    </operation>

    <operation name="article">
      <soap:operation soapAction=""/>
      <input>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </input>
      <output>
	<soap:body use="comments"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </output>
    </operation>

    <operation name="comments">
      <soap:operation soapAction=""/>
      <input>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </input>
      <output>
	<soap:body use="comments"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </output>
    </operation>

    <operation name="recent_articles">
      <soap:operation soapAction=""/>
      <input>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </input>
      <output>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </output>
    </operation>

    <operation name="recent_comments">
      <soap:operation soapAction=""/>
      <input>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </input>
      <output>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </output>
    </operation>

    <operation name="topics">
      <soap:operation soapAction=""/>
      <input>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </input>
      <output>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </output>
    </operation>

    <operation name="submit">
      <soap:operation soapAction=""/>
      <input>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </input>
      <output>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </output>
    </operation>

    <operation name="post_comment">
      <soap:operation soapAction=""/>
      <input>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </input>
      <output>
	<soap:body use="encoded"
	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
	    namespace="http://rnn.sourceforge.jp/cgi-bin/soap"/>
      </output>
    </operation>
  </binding>

  <service name="RnnService">
    <port name="RnnBaseServicePort" binding="tns:RnnBaseServicePortBinding">
      <soap:address location="http://localhost:10080"/>
    </port>
  </service>
</definitions>
