Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Курсовая работа.docx
Скачиваний:
0
Добавлен:
20.01.2026
Размер:
1.75 Mб
Скачать

Приложение в. Soap и http post документация

Веб - метод GetMonth

SOAP 1.1

В следующем примере показаны запрос и ответ SOAP 1.1. Вместо элементов-заполнителей следует подставить фактические значения.

POST /WebSite/Service.asmx HTTP/1.1

Host: localhost

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "http://tempuri.org/GetMonth"

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetMonth xmlns="http://tempuri.org/" />

</soap:Body>

</soap:Envelope>

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetMonthResponse xmlns="http://tempuri.org/">

<GetMonthResult>

<string>string</string>

<string>string</string>

</GetMonthResult>

</GetMonthResponse>

</soap:Body>

</soap:Envelope>

SOAP 1.2

В следующем примере показаны запрос и ответ SOAP 1,2. Вместо элементов-заполнителей следует подставить фактические значения.

POST /WebSite/Service.asmx HTTP/1.1

Host: localhost

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">

<soap12:Body>

<GetMonth xmlns="http://tempuri.org/" />

</soap12:Body>

</soap12:Envelope>

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">

<soap12:Body>

<GetMonthResponse xmlns="http://tempuri.org/">

<GetMonthResult>

<string>string</string>

<string>string</string>

</GetMonthResult>

</GetMonthResponse>

</soap12:Body>

</soap12:Envelope>

HTTP POST

В следующем примере показан HTTP-запрос POST и ответ на него. Вместо элементов-заполнителей следует подставить фактические значения.

POST /WebSite/Service.asmx/GetMonth HTTP/1.1

Host: localhost

Content-Type: application/x-www-form-urlencoded

Content-Length: length

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<ArrayOfString xmlns="http://tempuri.org/">

<string>string</string>

<string>string</string>

</ArrayOfString>

Веб - метод GetDate

SOAP 1.1

В следующем примере показаны запрос и ответ SOAP 1.1. Вместо элементов-заполнителей следует подставить фактические значения.

POST /WebSite/Service.asmx HTTP/1.1

Host: localhost

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "http://tempuri.org/GetDate"

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetDate xmlns="http://tempuri.org/">

<month>string</month>

</GetDate>

</soap:Body>

</soap:Envelope>

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetDateResponse xmlns="http://tempuri.org/">

<GetDateResult>

<xsd:schema>schema</xsd:schema>xml</GetDateResult>

</GetDateResponse>

</soap:Body>

</soap:Envelope>

SOAP 1.2

В следующем примере показаны запрос и ответ SOAP 1,2. Вместо элементов-заполнителей следует подставить фактические значения.

POST /WebSite/Service.asmx HTTP/1.1

Host: localhost

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">

<soap12:Body>

<GetDate xmlns="http://tempuri.org/">

<month>string</month>

</GetDate>

</soap12:Body>

</soap12:Envelope>

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">

<soap12:Body>

<GetDateResponse xmlns="http://tempuri.org/">

<GetDateResult>

<xsd:schema>schema</xsd:schema>xml</GetDateResult>

</GetDateResponse>

</soap12:Body>

</soap12:Envelope>

HTTP POST

В следующем примере показан HTTP-запрос POST и ответ на него. Вместо элементов-заполнителей следует подставить фактические значения.

POST /WebSite/Service.asmx/GetDate HTTP/1.1

Host: localhost

Content-Type: application/x-www-form-urlencoded

Content-Length: length

month=string

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<DataSet xmlns="http://tempuri.org/">

<schema xmlns="http://www.w3.org/2001/XMLSchema">schema</schema>xml</DataSet>

Веб - метод GetDate1

SOAP 1.1

В следующем примере показаны запрос и ответ SOAP 1.1. Вместо элементов-заполнителей следует подставить фактические значения.

POST /WebSite/Service.asmx HTTP/1.1

Host: localhost

Content-Type: text/xml; charset=utf-8

Content-Length: length

SOAPAction: "http://tempuri.org/GetDate1"

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetDate1 xmlns="http://tempuri.org/">

<month>string</month>

</GetDate1>

</soap:Body>

</soap:Envelope>

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<GetDate1Response xmlns="http://tempuri.org/">

<GetDate1Result>

<xsd:schema>schema</xsd:schema>xml</GetDate1Result>

</GetDate1Response>

</soap:Body>

</soap:Envelope>

SOAP 1.2

В следующем примере показаны запрос и ответ SOAP 1,2. Вместо элементов-заполнителей следует подставить фактические значения.

POST /WebSite/Service.asmx HTTP/1.1

Host: localhost

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">

<soap12:Body>

<GetDate1 xmlns="http://tempuri.org/">

<month>string</month>

</GetDate1>

</soap12:Body>

</soap12:Envelope>

HTTP/1.1 200 OK

Content-Type: application/soap+xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">

<soap12:Body>

<GetDate1Response xmlns="http://tempuri.org/">

<GetDate1Result>

<xsd:schema>schema</xsd:schema>xml</GetDate1Result>

</GetDate1Response>

</soap12:Body>

</soap12:Envelope>

HTTP POST

В следующем примере показан HTTP-запрос POST и ответ на него. Вместо элементов-заполнителей следует подставить фактические значения.

POST /WebSite/Service.asmx/GetDate1 HTTP/1.1

Host: localhost

Content-Type: application/x-www-form-urlencoded

Content-Length: length

month=string

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<DataSet xmlns="http://tempuri.org/">

<schema xmlns="http://www.w3.org/2001/XMLSchema">schema</schema>xml</DataSet>