powered by simpleCommunicator - 2.0.54     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / WinForms, .Net Framework [игнор отключен] [закрыт для гостей] / Ошибка десериализации помоги разабраться
8 сообщений из 8, страница 1 из 1
Ошибка десериализации помоги разабраться
    #37331534
2king2
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Есть Веб служба, где то в интернете мне не подвластная. Пытаюсь отправить ей данные, в ответ на мою попытку получаю следующее

Код: plaintext
1.
2.
3.
4.
5.
6.
<?xml version="1.0" encoding="utf-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <SendProbeDataRequestResponse xmlns="http://probewebservices.traffic.com/schemas/v1_0/Probe" />
  </soapenv:Body>
</soapenv:Envelope>

и на него ругается визуал студия вот такой ошибкой

Код: plaintext
1.
2.
Ошибка десериализации тела ответного сообщения для операции "sendProbeData". Ожидался элемент End "Body" из пространства
имен "http://schemas.xmlsoap.org/soap/envelope/". Найден элемент "SendProbeDataRequestResponse" из пространства имен
"http://probewebservices.traffic.com/schemas/v1_0/Probe". Строка 1, позиция 322.

Как решить мне эту проблему? Подскажите пожалуйста.
...
Рейтинг: 0 / 0
Ошибка десериализации помоги разабраться
    #37331945
Фотография pation
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
2king2,

код в студию
...
Рейтинг: 0 / 0
Ошибка десериализации помоги разабраться
    #37332108
2king2
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
pation2king2,

код в студию

Вот то что с генерировала студия при подключении к службе
код №1
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.235
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Service_NoJava_ConsoleApplication.ServiceProbe {


[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(Namespace=" http://probewebservices.traffic.com/services/v1_0/Probe", ConfigurationName="ServiceProbe.ProbePortType")]
public interface ProbePortType {

// CODEGEN: Контракт генерации сообщений с операцией sendProbeData не является ни RPC, ни упакованным документом.
[System.ServiceModel.OperationContractAttribute(IsOneWay=false, Action=" http://probewebservices.traffic.com/sendProbeData%22)%5D]http://probewebservices.traffic.com/sendProbeData")]
[System.ServiceModel.FaultContractAttribute(typeof(string), Action=" http://probewebservices.traffic.com/sendProbeData", Name="WebServiceFault", Namespace=" http://probewebservices.traffic.com/schemas/v1_0/WebService%22)%5D]http://probewebservices.traffic.com/schemas/v1_0/WebService")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
void sendProbeData(Service_NoJava_ConsoleApplication.ServiceProbe.sendProbeData request);

// CODEGEN: Контракт генерации сообщений с операцией pingProbe не является ни RPC, ни упакованным документом.
[System.ServiceModel.OperationContractAttribute(Action=" http://probewebservices.traffic.com/pingProbe", ReplyAction="*")]
[System.ServiceModel.FaultContractAttribute(typeof(string), Action=" http://probewebservices.traffic.com/pingProbe", Name="WebServiceFault", Namespace=" http://probewebservices.traffic.com/schemas/v1_0/WebService%22)%5D]http://probewebservices.traffic.com/schemas/v1_0/WebService")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
Service_NoJava_ConsoleApplication.ServiceProbe.pingProbeResponse pingProbe(Service_NoJava_ConsoleApplication.ServiceProbe.pingProbeRequest request);
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.225")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace=" http://probewebservices.traffic.com/schemas/v1_0/WebServiceClientContext%22)%5D]http://probewebservices.traffic.com/schemas/v1_0/WebServiceClientContext")]
public partial class WebServiceClientContext : object, System.ComponentModel.INotifyPropertyChanged {

private string ticketField;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public string ticket {
get {
return this.ticketField;
}
set {
this.ticketField = value;
this.RaisePropertyChanged("ticket");
}
}

public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.225")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace=" http://probewebservices.traffic.com/schemas/v1_0/Probe%22)%5D]http://probewebservices.traffic.com/schemas/v1_0/Probe")]
public partial class GeoLocation : object, System.ComponentModel.INotifyPropertyChanged {

private float latitudeField;

private float longitudeField;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public float latitude {
get {
return this.latitudeField;
}
set {
this.latitudeField = value;
this.RaisePropertyChanged("latitude");
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
public float longitude {
get {
return this.longitudeField;
}
set {
this.longitudeField = value;
this.RaisePropertyChanged("longitude");
}
}

public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.225")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace=" http://probewebservices.traffic.com/schemas/v1_0/Probe%22)%5D]http://probewebservices.traffic.com/schemas/v1_0/Probe")]
public partial class GlobalPosition : object, System.ComponentModel.INotifyPropertyChanged {

private GeoLocation geoLocField;

private System.Nullable<int> headingField;

private bool headingFieldSpecified;

private System.Nullable<int> speedField;

private bool speedFieldSpecified;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public GeoLocation geoLoc {
get {
return this.geoLocField;
}
set {
this.geoLocField = value;
this.RaisePropertyChanged("geoLoc");
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)]
public System.Nullable<int> heading {
get {
return this.headingField;
}
set {
this.headingField = value;
this.RaisePropertyChanged("heading");
}
}

/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool headingSpecified {
get {
return this.headingFieldSpecified;
}
set {
this.headingFieldSpecified = value;
this.RaisePropertyChanged("headingSpecified");
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)]
public System.Nullable<int> speed {
get {
return this.speedField;
}
set {
this.speedField = value;
this.RaisePropertyChanged("speed");
}
}

/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool speedSpecified {
get {
return this.speedFieldSpecified;
}
set {
this.speedFieldSpecified = value;
this.RaisePropertyChanged("speedSpecified");
}
}

public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.225")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace=" http://probewebservices.traffic.com/schemas/v1_0/Probe%22)%5D]http://probewebservices.traffic.com/schemas/v1_0/Probe")]
public partial class ProbeData : object, System.ComponentModel.INotifyPropertyChanged {

private string deviceAddressField;

private string deviceTypeField;

private string deviceSubTypeField;

private string sourceIdField;

private GlobalPosition globalPositionField;

private System.String collectionTimeGMTField;

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public string deviceAddress {
get {
return this.deviceAddressField;
}
set {
this.deviceAddressField = value;
this.RaisePropertyChanged("deviceAddress");
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)]
public string deviceType {
get {
return this.deviceTypeField;
}
set {
this.deviceTypeField = value;
this.RaisePropertyChanged("deviceType");
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)]
public string deviceSubType {
get {
return this.deviceSubTypeField;
}
set {
this.deviceSubTypeField = value;
this.RaisePropertyChanged("deviceSubType");
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=3)]
public string sourceId {
get {
return this.sourceIdField;
}
set {
this.sourceIdField = value;
this.RaisePropertyChanged("sourceId");
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=4)]
public GlobalPosition globalPosition {
get {
return this.globalPositionField;
}
set {
this.globalPositionField = value;
this.RaisePropertyChanged("globalPosition");
}
}

/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=5)]
public System.String collectionTimeGMT {
get {
return this.collectionTimeGMTField;
}
set {
this.collectionTimeGMTField = value;
this.RaisePropertyChanged("collectionTimeGMT");
}
}

public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class sendProbeData {

[System.ServiceModel.MessageHeaderAttribute(Namespace=" http://probewebservices.traffic.com/schemas/v1_0/WebServiceClientContext%22)%5D]http://probewebservices.traffic.com/schemas/v1_0/WebServiceClientContext")]
public Service_NoJava_ConsoleApplication.ServiceProbe.WebServiceClientContext WebServiceClientContextElement;

[System.ServiceModel.MessageBodyMemberAttribute(Namespace=" http://probewebservices.traffic.com/schemas/v1_0/Probe", Order=0)]
[System.Xml.Serialization.XmlArrayItemAttribute("probeData", IsNullable=false)]
public ProbeData[] SendProbeDataRequest;

public sendProbeData() {
}

public sendProbeData(Service_NoJava_ConsoleApplication.ServiceProbe.WebServiceClientContext WebServiceClientContextElement, ProbeData[] SendProbeDataRequest) {
this.WebServiceClientContextElement = WebServiceClientContextElement;
this.SendProbeDataRequest = SendProbeDataRequest;
}
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class pingProbeRequest {

[System.ServiceModel.MessageHeaderAttribute(Namespace=" http://probewebservices.traffic.com/schemas/v1_0/WebServiceClientContext%22)%5D]http://probewebservices.traffic.com/schemas/v1_0/WebServiceClientContext")]
public Service_NoJava_ConsoleApplication.ServiceProbe.WebServiceClientContext WebServiceClientContextElement;

[System.ServiceModel.MessageBodyMemberAttribute(Namespace=" http://probewebservices.traffic.com/schemas/v1_0/WebService", Order=0)]
public string PlaceHolder;

public pingProbeRequest() {
}

public pingProbeRequest(Service_NoJava_ConsoleApplication.ServiceProbe.WebServiceClientContext WebServiceClientContextElement, string PlaceHolder) {
this.WebServiceClientContextElement = WebServiceClientContextElement;
this.PlaceHolder = PlaceHolder;
}
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class pingProbeResponse {

[System.ServiceModel.MessageBodyMemberAttribute(Namespace=" http://probewebservices.traffic.com/schemas/v1_0/WebService", Order=0)]
public string Ping;

public pingProbeResponse() {
}

public pingProbeResponse(string Ping) {
this.Ping = Ping;
}
}

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public interface ProbePortTypeChannel : Service_NoJava_ConsoleApplication.ServiceProbe.ProbePortType, System.ServiceModel.IClientChannel {
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class ProbePortTypeClient : System.ServiceModel.ClientBase<Service_NoJava_ConsoleApplication.ServiceProbe.ProbePortType>, Service_NoJava_ConsoleApplication.ServiceProbe.ProbePortType {

public ProbePortTypeClient() {
}

public ProbePortTypeClient(string endpointConfigurationName) :
base(endpointConfigurationName) {
}

public ProbePortTypeClient(string endpointConfigurationName, string remoteAddress) :
base(endpointConfigurationName, remoteAddress) {
}

public ProbePortTypeClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress) {
}

public ProbePortTypeClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress) {
}

[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
void Service_NoJava_ConsoleApplication.ServiceProbe.ProbePortType.sendProbeData(Service_NoJava_ConsoleApplication.ServiceProbe.sendProbeData request) {
base.Channel.sendProbeData(request);
}

public void sendProbeData(Service_NoJava_ConsoleApplication.ServiceProbe.WebServiceClientContext WebServiceClientContextElement, ProbeData[] SendProbeDataRequest) {
Service_NoJava_ConsoleApplication.ServiceProbe.sendProbeData inValue = new Service_NoJava_ConsoleApplication.ServiceProbe.sendProbeData();
inValue.WebServiceClientContextElement = WebServiceClientContextElement;
inValue.SendProbeDataRequest = SendProbeDataRequest;
((Service_NoJava_ConsoleApplication.ServiceProbe.ProbePortType)(this)).sendProbeData(inValue);
}

[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
Service_NoJava_ConsoleApplication.ServiceProbe.pingProbeResponse Service_NoJava_ConsoleApplication.ServiceProbe.ProbePortType.pingProbe(Service_NoJava_ConsoleApplication.ServiceProbe.pingProbeRequest request) {
return base.Channel.pingProbe(request);
}

public string pingProbe(Service_NoJava_ConsoleApplication.ServiceProbe.WebServiceClientContext WebServiceClientContextElement, string PlaceHolder) {
Service_NoJava_ConsoleApplication.ServiceProbe.pingProbeRequest inValue = new Service_NoJava_ConsoleApplication.ServiceProbe.pingProbeRequest();
inValue.WebServiceClientContextElement = WebServiceClientContextElement;
inValue.PlaceHolder = PlaceHolder;
Service_NoJava_ConsoleApplication.ServiceProbe.pingProbeResponse retVal = ((Service_NoJava_ConsoleApplication.ServiceProbe.ProbePortType)(this)).pingProbe(inValue);
return retVal.Ping;
}
}
}



Мое творение
код №2
static void Main(string[] args)
{
var table = new DataTable();
table.Columns.Add("1", typeof(string));
table.Columns.Add("2", typeof(string));
table.Columns.Add("3", typeof(string));
table.Columns.Add("4", typeof(string));
table.Columns.Add("5", typeof(string));
table.Columns.Add("6", typeof(string));
table.Columns.Add("7", typeof(string));
var r = table.NewRow();
r["1"] = "50748165";
r["2"] = "55,90425";
r["3"] = "37,76128";
r["4"] = "35";
r["5"] = "50";
r["6"] = "2011-06-30T11:42:06.000Z";
table.Rows.Add(r);

var authentication = new ServiceAuthentication.AuthenticationPortTypeClient("Authentication");
var param = new ServiceAuthentication.AuthenticateWebServiceClient();
var points = new List<ServiceProbe.ProbeData>();

param.userName = "";
param.password = "";
param.domain = "";

string sourceId = "";
var probecontext = new ServiceProbe.WebServiceClientContext();

using (var probe = new ServiceProbe.ProbePortTypeClient("Probe"))
{
probecontext.ticket = authentication.authenticateWebServiceClient(param).ticket;
try
{
int lineNumber = 0;
foreach (DataRow line in table.Rows)
{
ServiceProbe.ProbeData probeData = buildPoint(sourceId, line);
lineNumber++;
points.Add(probeData);
if (lineNumber == table.Rows.Count)
{
ServiceProbe.ProbeData[] data = new ServiceProbe.ProbeData[table.Rows.Count];
int index = 0;
foreach (ServiceProbe.ProbeData iterator in points)
data[index++] = iterator;
probe.sendProbeData(probecontext, data);
points.Clear();
lineNumber = 0;
}
}

}
catch (Exception e)
{

}

}
}
...
Рейтинг: 0 / 0
Ошибка десериализации помоги разабраться
    #37332760
2king2
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Блин, все перепробовал что знал, и ничего ...
...
Рейтинг: 0 / 0
Ошибка десериализации помоги разабраться
    #37332805
2king2
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
pation,

Вот еще *.wsdl сервиса

Код wsdl
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Probe"
                  xmlns:def1="http://probewebservices.traffic.com/definitions/v1_0/WebServiceClientContext" 
                  xmlns:def2="http://probewebservices.traffic.com/definitions/v1_0/WebService" 
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
                  xmlns:tns="http://probewebservices.traffic.com/services/v1_0/Probe" 
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                  xmlns:xsd1="http://probewebservices.traffic.com/schemas/v1_0/Probe" 
                  targetNamespace="http://probewebservices.traffic.com/services/v1_0/Probe">
	<wsdl:documentation>This file is the property of Traffic.com, Inc.  Any copying or duplication of this information, in any way, without the expressed written consent of Traffic.com, Inc is strictly prohibited.  Copyright 2007 by Traffic.com, Inc. All rights reserved.</wsdl:documentation>
	<wsdl:import location="WebServiceClientContext.wsdl" namespace="http://probewebservices.traffic.com/definitions/v1_0/WebServiceClientContext"/>
	<wsdl:import location="WebService.wsdl" namespace="http://probewebservices.traffic.com/definitions/v1_0/WebService"/>
	<wsdl:types>
    <xsd:schema targetNamespace="http://probewebservices.traffic.com/schemas/v1_0/WebServiceClientContext"
                xmlns:tns="http://probewebservices.traffic.com/schemas/v1_0/WebServiceClientContext"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:include schemaLocation="WebServiceClientContext.xsd"/>
    </xsd:schema>
    <xsd:schema targetNamespace="http://probewebservices.traffic.com/schemas/v1_0/Probe"
                xmlns:tns="http://probewebservices.traffic.com/schemas/v1_0/Probe"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:include schemaLocation="Probe.xsd"/>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="SendProbeDataIn">
		<wsdl:part name="request" element="xsd1:SendProbeDataRequest"/>
	</wsdl:message>
	<wsdl:portType name="ProbePortType">
		<wsdl:operation name="sendProbeData">
			<wsdl:input message="tns:SendProbeDataIn"/>
			<wsdl:fault message="def2:WebServiceFault" name="ServiceExceptionFault"/>
		</wsdl:operation>		
    <wsdl:operation name="pingProbe">
      <wsdl:input message="def2:PlaceHolderRequest"/>
      <wsdl:output message="def2:PingResponse"/>
      <wsdl:fault message="def2:WebServiceFault" name="ServiceExceptionFault"/>
    </wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="Probe" type="tns:ProbePortType">
		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="sendProbeData">
			<soap:operation soapAction="http://probewebservices.traffic.com/sendProbeData"/>
			<wsdl:input>
				<soap:body use="literal"/>
				<soap:header message="def1:WebServiceClientContext_request" part="webServiceContext" use="literal"/>
			</wsdl:input>
			<wsdl:fault name="ServiceExceptionFault">
				<soap:fault name="ServiceExceptionFault" use="literal"/>
			</wsdl:fault>
		</wsdl:operation>
    <wsdl:operation name="pingProbe">
      <soap:operation soapAction="http://probewebservices.traffic.com/pingProbe"/>
      <wsdl:input>
        <soap:body  use="literal"/>
        <soap:header message="def1:WebServiceClientContext_request" part="webServiceContext" use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body  use="literal"/>
      </wsdl:output>
      <wsdl:fault name="ServiceExceptionFault">
        <soap:fault name="ServiceExceptionFault" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="ProbeWebService">
		<wsdl:port name="Probe" binding="tns:Probe">
			<soap:address location="http://probewebservices.traffic.com/services/v1_0/Probe"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>

...
Рейтинг: 0 / 0
Ошибка десериализации помоги разабраться
    #37333535
2king2
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Как я понимаю при десериализации должно было вернутся вот такой ответ от службы согласно автосгенерированому коду по *.wsdl и .xsd

Код: plaintext
1.
2.
3.
4.
5.
<?xml version="1.0" encoding="utf-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
  </soapenv:Body>
</soapenv:Envelope>

А венулось не пустое тело, а с элементом SendProbeDataRequestResponse
Код: plaintext
1.
2.
3.
4.
5.
6.
<?xml version="1.0" encoding="utf-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <SendProbeDataRequestResponse xmlns="http://probewebservices.traffic.com/schemas/v1_0/Probe" />
  </soapenv:Body>
</soapenv:Envelope>

Рассуждая логически, то наверно можно на стороне моего клиента что то где-то поправить, то есть мне надо познакомить клиента с SendProbeDataRequestResponse. Подскажите где?
...
Рейтинг: 0 / 0
Ошибка десериализации помоги разабраться
    #37335013
Фотография pation
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
2king2Как я понимаю при десериализации должно было вернутся вот такой ответ от службы согласно автосгенерированому коду по *.wsdl и .xsd

Код: plaintext
1.
2.
3.
4.
5.
<?xml version="1.0" encoding="utf-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
  </soapenv:Body>
</soapenv:Envelope>

А венулось не пустое тело, а с элементом SendProbeDataRequestResponse
Код: plaintext
1.
2.
3.
4.
5.
6.
<?xml version="1.0" encoding="utf-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <SendProbeDataRequestResponse xmlns="http://probewebservices.traffic.com/schemas/v1_0/Probe" />
  </soapenv:Body>
</soapenv:Envelope>

Рассуждая логически, то наверно можно на стороне моего клиента что то где-то поправить, то есть мне надо познакомить клиента с SendProbeDataRequestResponse. Подскажите где?

именно,
сделайте чтоб метод sendProbeData возвращал SendProbeDataRequestResponse
SendProbeDataRequestResponse - просто пустой класс.
но вообщето это проблема поставщиков сервиса, спросите у них почему они не придерживаются своей же спецификации
...
Рейтинг: 0 / 0
Период между сообщениями больше года.
Ошибка десериализации помоги разабраться
    #38882879
Anjey Gostwicki
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Этим ведает флажок IsWrapped он у вас True, а должен быть False
...
Рейтинг: 0 / 0
8 сообщений из 8, страница 1 из 1
Форумы / WinForms, .Net Framework [игнор отключен] [закрыт для гостей] / Ошибка десериализации помоги разабраться
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]