[rt-devel] rt SOAP server

Jesse Vincent jesse at bestpractical.com
Sat Jun 28 12:27:23 EDT 2003




On Sat, Jun 28, 2003 at 06:17:52PM +0200, Michael Lausch wrote:
> On Sat, 2003-06-28 at 17:52, Jesse Vincent wrote:
> > I'm somewhat of a SOAP newbie, so I apologize if I've gotten it wrong.
> > Would it be possible to see a chunk of a WSDL file for what we're doing
> > now and what we "should" be doing?
> >       
> >       Thanks,
> >       Jesse
> 
> what i've done is to define a XML schema for a ticket (it's not complete
> yet, but a start)
> 
> <xsd:complexType name="Ticket">
>  <xsd:sequence>

Ow. no. that was never intended to be a sequence. I'm terribly sorry
about that.


> type="xsd:string"/>
>  </xsd:sequence>
> </xsd:complexType>
> 
> 
> then i'm able to define the createTicketRequest message like this:
> <message name="ticketCreateRequest">
>         <part name="ticket" type="xsd:Ticket"/>
> </message>
> 
> and use the same type for  the response message of the getTickets()
> function and as  the input parameter for updateTicket() 

*nod* Ok. That's much more what I intended. I've attached a start at a
WSDL file I had a while ago, just for trying to think things through.
Though I'll note that the WSDL designer I used also seemed to have a bit
of a mind of its own.



> 
> this means that the type (or XML Schema) 'Ticket' can be reused for 
> different functions (input and output parameters). It's also easier to
> define a 'ListofTickets type. 
> 
> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel
> 

-- 
http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.
-------------- next part --------------
<?xml version="1.0" encoding="UTF-8"?>
<definitions
    name="rt3.0"
    targetNamespace="http://www.bestpractical.com/rt3.0.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://www.bestpractical.com/rt3.0.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsd1="http://www.bestpractical.com/rt3.0.xsd1">
    <types>
        <xsd:schema
            targetNamespace="http://www.bestpractical.com/rt3.0.xsd1"
            xmlns="http://schemas.xmlsoap.org/wsdl/"
            xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xsd1="http://www.bestpractical.com/rt3.0.xsd1">
            <xsd:complexType name="RT__Ticket">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="1" name="id" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="Subject" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="Status" type="xsd:string"/>
                    <xsd:elemsent maxOccurs="1" minOccurs="0" name="Owner" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="RT__User">
                <xsd:all>
                    <xsd:element maxOccurs="1" minOccurs="0" name="id" type="xsd:int"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="Name" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="EmailAddress" type="xsd:string"/>
                </xsd:all>
            </xsd:complexType>
            <xsd:complexType name="RT__Ticket2">
                <xsd:all>
                    <xsd:element maxOccurs="1" minOccurs="1" name="id" type="xsd:integer"/>
                    <xsd:element
                        maxOccurs="unbounded"
                        minOccurs="1"
                        name="Requestors"
                        type="xsd1:RT__User"/>
                    <xsd:element maxOccurs="unbounded" minOccurs="1" name="Cc" type="xsd1:RT__User"/>
                </xsd:all>
            </xsd:complexType>
        </xsd:schema>
    </types>
    <message name="getTicketRequest">
        <part name="id" type="xsd:integer"/>
    </message>
    <message name="NewMessageRequest">
        <part name="arg1" type="xsd:string"/>
    </message>
    <message name="NewMessageResponse">   </message>
    <message name="getTicketResponse">
        <part name="Ticket" type="xsd1:RT__Ticket"/>
    </message>
    <portType name="rt3.0PortType">
        <operation name="NewOperation">
            <input message="tns:NewMessageRequest"/>
            <output message="tns:NewMessageResponse"/>
        </operation>
        <operation name="getTicket">
            <documentation>gets a ticket</documentation>
            <input message="tns:getTicketRequest"/>
            <output message="tns:getTicketResponse"/>
        </operation>
    </portType>
    <binding name="rt3.0Binding" type="tns:rt3.0PortType">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="NewOperation">
            <soap:operation soapAction="capeconnect:rt3.0:rt3.0PortType#NewOperation"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
        <operation name="getTicket">
            <soap:operation soapAction="capeconnect:rt3.0:rt3.0PortType#getTicket"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
    </binding>
    <service name="rt3.0">
        <port binding="tns:rt3.0Binding" name="rt3.0Port">
            <soap:address location="http://localhost:8000/ccx/rt3.0"/>
        </port>
    </service>
</definitions>


More information about the Rt-devel mailing list