У меня есть ссылка на wsdl файл. Как мне получить данные по заданному url? Я делаю так:
public static HttpWebRequest CreateWebRequest(string url)
{
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.Headers.Add("SOAP:Action");
webRequest.ContentType = "text/xml;charset=\"utf-8\"";
webRequest.Accept = "text/xml";
webRequest.Method = "POST";
return webRequest;
}
HttpWebRequest request = CreateWebRequest("https://71.29.167.165/client/OneTouch/test/NationalAgentAPI?wsdl");
using (Stream stream = request.GetRequestStream())
{
}
Но что дальше, не понятно.
Вид wsdl:
<WL5G3N0:definitions xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/" xmlns:WL5G3N1="http://partnerapi.windstream.com" xmlns:WL5G3N2="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://partnerapi.windstream.com">
<WL5G3N0:types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://partnerapi.windstream.com" xmlns:intf="http://partnerapi.windstream.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://partnerapi.windstream.com">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<xsd:complexType name="requesterInfo">
<xsd:sequence>
<xsd:element name="transactionId" type="xsd:string"/>
<xsd:element name="applicationName" type="xsd:string"/>
<xsd:element name="applicationId" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ServiceabilityName">
<xsd:sequence>
<xsd:element name="firstName" type="xsd:string"/>
<xsd:element name="middleInitial" nillable="true" type="xsd:string"/>
<xsd:element name="lastName" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
Нужно было просто подключить в References и всё доступно.
References ПКМ -> Add Service Referenc... Потом вставить ссылку в Address и нажать Go
После этого доступны классы и свойства
ЗадачаЕсть база фильмов (фильм имеет различные поля, в данном контексте не имеет значение какие)
Есть папка которая содержит ещё папки и файлы! Как получить данные из всех файлов находящихся в главной папке?
Есть такое дело - при отправке POST данных на сервр после истечения сессии - возникает данное исключениеНу или если на другой странице сделать...