source: trunk/autoquest-plugin-http/src/main/resources/HttpExchangeStructure.xsd @ 2272

Last change on this file since 2272 was 1990, checked in by pharms, 9 years ago
File size: 4.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsd:schema
3  targetNamespace="http://autoquest.informatik.uni-goettingen.de/httpexchange"
4  xmlns:tns="http://autoquest.informatik.uni-goettingen.de/httpexchange"
5  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
6  xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
7  jxb:version="2.0"
8  elementFormDefault="qualified">
9 
10  <xsd:element name="httpExchange" type="tns:HttpExchange" />
11
12  <xsd:complexType name="HttpExchange">
13    <xsd:sequence>
14      <xsd:element name="sender" type="tns:Address" />
15      <xsd:element name="receiver" type="tns:Address" />
16      <xsd:element name="request" type="tns:HttpRequest" />
17      <xsd:element name="response" type="tns:HttpResponse" />
18    </xsd:sequence>
19    <xsd:attribute name="status" use="required" type="tns:Status" />
20  </xsd:complexType>
21
22  <xsd:complexType name="HttpRequest">
23    <xsd:sequence>
24      <xsd:element name="headers" type="tns:Headers" minOccurs="0" maxOccurs="1" />
25      <xsd:element name="cookies" type="tns:Cookies" minOccurs="0" maxOccurs="1" />
26      <xsd:element name="authType" type="xsd:string" minOccurs="0" maxOccurs="1" />
27      <xsd:element name="remoteUser" type="xsd:string" minOccurs="0" maxOccurs="1" />
28      <xsd:element name="requestedSessionId" type="xsd:string" minOccurs="0" maxOccurs="1" />
29      <xsd:element name="content" type="tns:Content" minOccurs="0" maxOccurs="1" />
30    </xsd:sequence>
31    <xsd:attribute name="method" use="required" type="tns:Method" />
32    <xsd:attribute name="protocol" use="required" type="tns:Protocol" />
33    <xsd:attribute name="url" use="required" type="xsd:anyURI" />
34    <xsd:attribute name="query" type="xsd:string" />
35    <xsd:attribute name="orderingId" type="xsd:long" />
36  </xsd:complexType>
37
38  <xsd:complexType name="HttpResponse">
39    <xsd:sequence>
40      <xsd:element name="headers" type="tns:Headers" minOccurs="0" maxOccurs="1" />
41      <xsd:element name="content" type="tns:Content" minOccurs="0" maxOccurs="1" />
42    </xsd:sequence>
43    <xsd:attribute name="status" use="required" type="xsd:integer" />
44    <xsd:attribute name="orderingId" type="xsd:long" />
45  </xsd:complexType>
46
47  <xsd:complexType name="Address">
48    <xsd:sequence>
49      <xsd:element name="ip" type="xsd:string" />
50      <xsd:element name="host" type="xsd:string" />
51      <xsd:element name="port" type="xsd:integer" />
52    </xsd:sequence>
53  </xsd:complexType>
54
55  <xsd:complexType name="Cookies">
56    <xsd:sequence>
57      <xsd:element name="cookie" type="tns:Cookie" minOccurs="1" maxOccurs="unbounded" />
58    </xsd:sequence>
59  </xsd:complexType>
60
61  <xsd:complexType name="Cookie">
62    <xsd:attribute name="comment" type="xsd:string" />
63    <xsd:attribute name="domain" type="xsd:string" />
64    <xsd:attribute name="maxAge" type="xsd:integer" />
65    <xsd:attribute name="name" type="xsd:string" />
66    <xsd:attribute name="path" type="xsd:string" />
67    <xsd:attribute name="isHttpOnly" type="xsd:boolean" />
68    <xsd:attribute name="isSecure" type="xsd:boolean" />
69    <xsd:attribute name="value" type="xsd:string" />
70    <xsd:attribute name="version" type="xsd:integer" />
71  </xsd:complexType>
72
73  <xsd:complexType name="Headers">
74    <xsd:sequence>
75      <xsd:element name="header" type="tns:Header" minOccurs="1" maxOccurs="unbounded" />
76    </xsd:sequence>
77  </xsd:complexType>
78
79  <xsd:complexType name="Header">
80    <xsd:attribute name="key" use="required" type="xsd:string" />
81    <xsd:attribute name="value" use="required" type="xsd:string" />
82  </xsd:complexType>
83
84  <xsd:complexType name="Content">
85    <xsd:sequence>
86      <xsd:element name="data" type="xsd:string" />
87    </xsd:sequence>
88    <xsd:attribute name="encoding" use="required" type="xsd:string" />
89    <xsd:attribute name="type" use="required" type="xsd:string" />
90    <xsd:attribute name="length" use="required" type="xsd:long" />
91  </xsd:complexType>
92
93  <xsd:simpleType name="Method">
94    <xsd:restriction base="xsd:string">
95      <xsd:enumeration value="OPTIONS"/>
96      <xsd:enumeration value="GET"/>
97      <xsd:enumeration value="HEAD"/>
98      <xsd:enumeration value="POST"/>
99      <xsd:enumeration value="PUT"/>
100      <xsd:enumeration value="DELETE"/>
101      <xsd:enumeration value="TRACE"/>
102      <xsd:enumeration value="CONNECT"/>
103    </xsd:restriction>
104  </xsd:simpleType>
105
106  <xsd:simpleType name="Protocol">
107    <xsd:restriction base="xsd:string">
108      <xsd:enumeration value="HTTP/1.0"/>
109      <xsd:enumeration value="HTTP/1.1"/>
110    </xsd:restriction>
111  </xsd:simpleType>
112
113  <xsd:simpleType name="Status">
114    <xsd:restriction base="xsd:string">
115      <xsd:enumeration value="success"/>
116      <xsd:enumeration value="failure"/>
117      <xsd:enumeration value="timeout"/>
118    </xsd:restriction>
119  </xsd:simpleType>
120
121</xsd:schema>
Note: See TracBrowser for help on using the repository browser.