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

Last change on this file since 1526 was 1437, checked in by pharms, 11 years ago
  • changed name spaces as they do not seem to work on some platforms
File size: 4.5 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:complexType>
36
37  <xsd:complexType name="HttpResponse">
38    <xsd:sequence>
39      <xsd:element name="headers" type="tns:Headers" minOccurs="0" maxOccurs="1" />
40      <xsd:element name="content" type="tns:Content" minOccurs="0" maxOccurs="1" />
41    </xsd:sequence>
42    <xsd:attribute name="status" use="required" type="xsd:integer" />
43  </xsd:complexType>
44
45  <xsd:complexType name="Address">
46    <xsd:sequence>
47      <xsd:element name="ip" type="xsd:string" />
48      <xsd:element name="host" type="xsd:string" />
49      <xsd:element name="port" type="xsd:integer" />
50    </xsd:sequence>
51  </xsd:complexType>
52
53  <xsd:complexType name="Cookies">
54    <xsd:sequence>
55      <xsd:element name="cookie" type="tns:Cookie" minOccurs="1" maxOccurs="unbounded" />
56    </xsd:sequence>
57  </xsd:complexType>
58
59  <xsd:complexType name="Cookie">
60    <xsd:attribute name="comment" type="xsd:string" />
61    <xsd:attribute name="domain" type="xsd:string" />
62    <xsd:attribute name="maxAge" type="xsd:integer" />
63    <xsd:attribute name="name" type="xsd:string" />
64    <xsd:attribute name="path" type="xsd:string" />
65    <xsd:attribute name="isHttpOnly" type="xsd:boolean" />
66    <xsd:attribute name="isSecure" type="xsd:boolean" />
67    <xsd:attribute name="value" type="xsd:string" />
68    <xsd:attribute name="version" type="xsd:integer" />
69  </xsd:complexType>
70
71  <xsd:complexType name="Headers">
72    <xsd:sequence>
73      <xsd:element name="header" type="tns:Header" minOccurs="1" maxOccurs="unbounded" />
74    </xsd:sequence>
75  </xsd:complexType>
76
77  <xsd:complexType name="Header">
78    <xsd:attribute name="key" use="required" type="xsd:string" />
79    <xsd:attribute name="value" use="required" type="xsd:string" />
80  </xsd:complexType>
81
82  <xsd:complexType name="Content">
83    <xsd:sequence>
84      <xsd:element name="data" type="xsd:string" />
85    </xsd:sequence>
86    <xsd:attribute name="encoding" use="required" type="xsd:string" />
87    <xsd:attribute name="type" use="required" type="xsd:string" />
88    <xsd:attribute name="length" use="required" type="xsd:long" />
89  </xsd:complexType>
90
91  <xsd:simpleType name="Method">
92    <xsd:restriction base="xsd:string">
93      <xsd:enumeration value="OPTIONS"/>
94      <xsd:enumeration value="GET"/>
95      <xsd:enumeration value="HEAD"/>
96      <xsd:enumeration value="POST"/>
97      <xsd:enumeration value="PUT"/>
98      <xsd:enumeration value="DELETE"/>
99      <xsd:enumeration value="TRACE"/>
100      <xsd:enumeration value="CONNECT"/>
101    </xsd:restriction>
102  </xsd:simpleType>
103
104  <xsd:simpleType name="Protocol">
105    <xsd:restriction base="xsd:string">
106      <xsd:enumeration value="HTTP/1.0"/>
107      <xsd:enumeration value="HTTP/1.1"/>
108    </xsd:restriction>
109  </xsd:simpleType>
110
111  <xsd:simpleType name="Status">
112    <xsd:restriction base="xsd:string">
113      <xsd:enumeration value="success"/>
114      <xsd:enumeration value="failure"/>
115      <xsd:enumeration value="timeout"/>
116    </xsd:restriction>
117  </xsd:simpleType>
118
119</xsd:schema>
Note: See TracBrowser for help on using the repository browser.