problema di deserializzazione WCF
-
mercoledì 16 maggio 2012 08:41
Ciao a tutti, sto cercando di capire perchè non riesco a deserializzare correttamente dei messaggi provenienti da un servizio di terze parti.
Dal trace log di WCF ricevo un messaggio di questo tipo:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2000/10/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tptz="http://www.onvif.org/ver10/ptz/wsdl"> <s:Header xmlns:s="http://www.w3.org/2003/05/soap-envelope"></s:Header> <env:Body> <tptz:GetPresetsResponse> <tptz:PTZPreset token="camctrl_c0_preset_i0"> <tt:Name>test_preset</tt:Name> <tt:PTZPosition> <tt:PanTilt x="inf" y="0.62921" space="http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace"></tt:PanTilt> <tt:Zoom x="0.00000" space="http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace"></tt:Zoom> </tt:PTZPosition> </tptz:PTZPreset> <tptz:PTZPreset token="camctrl_c0_preset_i1"> <tt:Name>test</tt:Name> <tt:PTZPosition> <tt:PanTilt x="inf" y="0.62921" space="http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace"></tt:PanTilt> <tt:Zoom x="0.00000" space="http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace"></tt:Zoom> </tt:PTZPosition> </tptz:PTZPreset> <tptz:PTZPreset token="camctrl_c0_preset_i2"> <tt:Name>asd</tt:Name> <tt:PTZPosition> <tt:PanTilt x="inf" y="0.62921" space="http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace"></tt:PanTilt> <tt:Zoom x="0.00000" space="http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace"></tt:Zoom> </tt:PTZPosition> </tptz:PTZPreset> </tptz:GetPresetsResponse> </env:Body> </env:Envelope>
Le classi sono state create con svcutil e quella a cui fa riferimento il codice xml è definita:
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] [System.ServiceModel.MessageContractAttribute(WrapperName="GetPresetsResponse", WrapperNamespace="http://www.onvif.org/ver10/ptz/wsdl", IsWrapped=true)] public partial class GetPresetsResponse { [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://www.onvif.org/ver10/ptz/wsdl", Order=0)] [System.Xml.Serialization.XmlElementAttribute("Preset")] public PTZPreset[] Preset; public GetPresetsResponse() { } public GetPresetsResponse(PTZPreset[] Preset) { this.Preset = Preset; } }
[System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "3.0.4506.2152")]
public PTZPreset[] GetPresets(string ProfileToken)
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.onvif.org/ver10/schema")]
public partial class PTZPreset
{
private string nameField;
private PTZVector pTZPositionField;
private string tokenField;
private System.Xml.XmlAttribute[] anyAttrField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public string Name
{
get
{
return this.nameField;
}
set
{
this.nameField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
public PTZVector PTZPosition
{
get
{
return this.pTZPositionField;
}
set
{
this.pTZPositionField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlAttributeAttribute()]
public string token
{
get
{
return this.tokenField;
}
set
{
this.tokenField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlAnyAttributeAttribute()]
public System.Xml.XmlAttribute[] AnyAttr
{
get
{
return this.anyAttrField;
}
set
{
this.anyAttrField = value;
}
}
}
{
GetPresetsRequest inValue = new GetPresetsRequest();
inValue.ProfileToken = ProfileToken;
GetPresetsResponse retVal = ((PTZ)(this)).GetPresets(inValue);
return retVal.Preset;
}Purtroppo invece che ricevere l'array dalla funzione GetPreset ricevo sempre null. Inoltre c'è una funzione simile che invece funziona, di seguito tutte le definizioni:
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] [System.ServiceModel.MessageContractAttribute(WrapperName="GetNodesResponse", WrapperNamespace="http://www.onvif.org/ver10/ptz/wsdl", IsWrapped=true)] public partial class GetNodesResponse { [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://www.onvif.org/ver20/ptz/wsdl", Order=0)] [System.Xml.Serialization.XmlElementAttribute("PTZNode")] public PTZNode[] PTZNode; public GetNodesResponse() { } public GetNodesResponse(PTZNode[] PTZNode) { this.PTZNode = PTZNode; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "3.0.4506.2152")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.onvif.org/ver10/schema")] public partial class PTZNode : DeviceEntity { private string nameField; private PTZSpaces supportedPTZSpacesField; private int maximumNumberOfPresetsField; private bool homeSupportedField; private string[] auxiliaryCommandsField; private PTZNodeExtension extensionField; private System.Xml.XmlAttribute[] anyAttrField; /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(Order=0)] public string Name { get { return this.nameField; } set { this.nameField = value; } } /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(Order=1)] public PTZSpaces SupportedPTZSpaces { get { return this.supportedPTZSpacesField; } set { this.supportedPTZSpacesField = value; } } /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(Order=2)] public int MaximumNumberOfPresets { get { return this.maximumNumberOfPresetsField; } set { this.maximumNumberOfPresetsField = value; } } /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(Order=3)] public bool HomeSupported { get { return this.homeSupportedField; } set { this.homeSupportedField = value; } } /// <remarks/> [System.Xml.Serialization.XmlElementAttribute("AuxiliaryCommands", Order=4)] public string[] AuxiliaryCommands { get { return this.auxiliaryCommandsField; } set { this.auxiliaryCommandsField = value; } } /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(Order=5)] public PTZNodeExtension Extension { get { return this.extensionField; } set { this.extensionField = value; } } /// <remarks/> [System.Xml.Serialization.XmlAnyAttributeAttribute()] public System.Xml.XmlAttribute[] AnyAttr { get { return this.anyAttrField; } set { this.anyAttrField = value; } } } public PTZNode[] GetNodes() { GetNodesRequest inValue = new GetNodesRequest(); GetNodesResponse retVal = ((PTZ)(this)).GetNodes(inValue); return retVal.PTZNode; }
dove il codice xml ricevuto è:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2000/10/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tptz="http://www.onvif.org/ver10/ptz/wsdl"> <s:Header xmlns:s="http://www.w3.org/2003/05/soap-envelope"></s:Header> <env:Body> <tptz:GetNodesResponse> <tptz:PTZNode token="camctrl_c0"> <tt:Name></tt:Name> <tt:SupportedPTZSpaces> <tt:AbsolutePanTiltPositionSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:AbsolutePanTiltPositionSpace> <tt:AbsoluteZoomPositionSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:AbsoluteZoomPositionSpace> <tt:RelativePanTiltTranslationSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:RelativePanTiltTranslationSpace> <tt:RelativeZoomTranslationSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:RelativeZoomTranslationSpace> <tt:ContinuousPanTiltVelocitySpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:ContinuousPanTiltVelocitySpace> <tt:ContinuousZoomVelocitySpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:ContinuousZoomVelocitySpace> <tt:PanTiltSpeedSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:PanTiltSpeedSpace> <tt:ZoomSpeedSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>0.0</tt:Max> </tt:XRange> </tt:ZoomSpeedSpace> </tt:SupportedPTZSpaces> <tt:MaximumNumberOfPresets>128</tt:MaximumNumberOfPresets> <tt:HomeSupported>true</tt:HomeSupported> </tptz:PTZNode> <tptz:PTZNode token="camctrl_c0"> <tt:Name></tt:Name> <tt:SupportedPTZSpaces> <tt:AbsolutePanTiltPositionSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:AbsolutePanTiltPositionSpace> <tt:AbsoluteZoomPositionSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:AbsoluteZoomPositionSpace> <tt:RelativePanTiltTranslationSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:RelativePanTiltTranslationSpace> <tt:RelativeZoomTranslationSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:RelativeZoomTranslationSpace> <tt:ContinuousPanTiltVelocitySpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:ContinuousPanTiltVelocitySpace> <tt:ContinuousZoomVelocitySpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:ContinuousZoomVelocitySpace> <tt:PanTiltSpeedSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:PanTiltSpeedSpace> <tt:ZoomSpeedSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>0.0</tt:Max> </tt:XRange> </tt:ZoomSpeedSpace> </tt:SupportedPTZSpaces> <tt:MaximumNumberOfPresets>128</tt:MaximumNumberOfPresets> <tt:HomeSupported>true</tt:HomeSupported> </tptz:PTZNode> <tptz:PTZNode token="camctrl_c0"> <tt:Name></tt:Name> <tt:SupportedPTZSpaces> <tt:AbsolutePanTiltPositionSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:AbsolutePanTiltPositionSpace> <tt:AbsoluteZoomPositionSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:AbsoluteZoomPositionSpace> <tt:RelativePanTiltTranslationSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:RelativePanTiltTranslationSpace> <tt:RelativeZoomTranslationSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:RelativeZoomTranslationSpace> <tt:ContinuousPanTiltVelocitySpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:ContinuousPanTiltVelocitySpace> <tt:ContinuousZoomVelocitySpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:ContinuousZoomVelocitySpace> <tt:PanTiltSpeedSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:PanTiltSpeedSpace> <tt:ZoomSpeedSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>0.0</tt:Max> </tt:XRange> </tt:ZoomSpeedSpace> </tt:SupportedPTZSpaces> <tt:MaximumNumberOfPresets>128</tt:MaximumNumberOfPresets> <tt:HomeSupported>true</tt:HomeSupported> </tptz:PTZNode> <tptz:PTZNode token="camctrl_c0"> <tt:Name></tt:Name> <tt:SupportedPTZSpaces> <tt:AbsolutePanTiltPositionSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:AbsolutePanTiltPositionSpace> <tt:AbsoluteZoomPositionSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:AbsoluteZoomPositionSpace> <tt:RelativePanTiltTranslationSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:RelativePanTiltTranslationSpace> <tt:RelativeZoomTranslationSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:RelativeZoomTranslationSpace> <tt:ContinuousPanTiltVelocitySpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> <tt:YRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:YRange> </tt:ContinuousPanTiltVelocitySpace> <tt:ContinuousZoomVelocitySpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace</tt:URI> <tt:XRange> <tt:Min>-1.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:ContinuousZoomVelocitySpace> <tt:PanTiltSpeedSpace> <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>1.0</tt:Max> </tt:XRange> </tt:PanTiltSpeedSpace> <tt:ZoomSpeedSpace> <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace</tt:URI> <tt:XRange> <tt:Min>0.0</tt:Min> <tt:Max>0.0</tt:Max> </tt:XRange> </tt:ZoomSpeedSpace> </tt:SupportedPTZSpaces> <tt:MaximumNumberOfPresets>128</tt:MaximumNumberOfPresets> <tt:HomeSupported>true</tt:HomeSupported> </tptz:PTZNode> </tptz:GetNodesResponse> </env:Body> </env:Envelope>
Ho provato anche deserializzare il codice xml direttamente ma in entrambi i casi ricevo degli errori. Qualcuno riuscirebbe a darmi una mano ?
grazie
Tutte le risposte
-
mercoledì 16 maggio 2012 20:14
ciao
quali sono gli errori che hai?
come fai la chiamata?
riesci a postarci 1 po di codice??
grazie
ciao
-
giovedì 17 maggio 2012 06:48
Ciao,
istanzio il client wcf e poi effettuo la chiamata
using (PTZClient ptz = new PTZClient()) { PTZPreset[] presets = ptz.GetPresets("Profile1"); PTZNode[] nodes = ptz.GetNodes(); }la getNodes funziona (restituendomi un array) mentre la get preset mi restituisce l'array vuoto. Non ho nessun errore nè warning, il codice xml che avevo postato è preso dal trace di wcf, ma non riesce a deserializzare correttamente. Ho notato inoltre che con altre funzioni che richiedono un parametro in ingresso si manifesta lo stesso comportamento (array vuoto o null), mentre con funzioni senza parametri restituiscono correttamente il valore.
-
sabato 19 maggio 2012 13:54
ciao
prova a testare il servizio con wcftestclient (disponibile digitandone il nome nella console di visual studio command prompt nel menu start)
se wcftestclient funziona, allora dovresti verificare il tuo proxy-client generato:
per testare la procedura di generazione del client che hai fatto tramite svcutil, ti consiglio di rimuovere il tutto e di agganciarti direttamente da visual studio cliccando sulle reference del progetto e selezionando poi "Add Service Reference". se il comportamento non varia, abbiamo la certezza che la procedura da te seguita era corretta
se invece il problema della deserializzazione continua ad avvenire, probabilmente dovrai impostare alcune configurazioni di dettaglio sulla serializzazione nel contratto di servizio: cambiare la configurazione del DataContractSerializer tramite il relativo attributo (http://msdn.microsoft.com/en-us/library/ms576151), o addirittura cambiare il serializzatore nel XmlSerializer con eventualmente le relative configurazioni sempre tramite attributo (http://msdn.microsoft.com/en-us/library/ms586952)
nel tuo caso, entrambi andrebbero messi sull'interfaccia di contratto del client (quella autogenerata tramite VS o svcutil)
prova anche a testare il servizio in soapUI (http://www.soapui.org/) per verificarne il fuzionamento
tienici aggiornati
a presto
-
martedì 22 maggio 2012 07:17
Grazie per i suggerimenti, appena ho altre notizie vi faccio sapere
ciao
-
mercoledì 23 maggio 2012 10:45
Il servizio funziona correttamente e ritorna l'xml che avevo allegato, ho provato anche con soapUI.
Purtroppo non riesco ad aggiungere il servizio da visual studio perchè va in timeout quando tenta di scaricare il contratto, quindi non ho fatto altro che scaricare il wsdl a mano con le definizioni e utilizzare svcutil. Ho notato che su alcune funzioni c'è un avviso:
// CODEGEN: Il parametro 'Preset' richiede informazioni sullo schema aggiuntive che non possono essere acquisite utilizzando la modalità parametro. L'attributo specifico è 'System.Xml.Serialization.XmlElementAttribute'.
non se sia collegato con il problema che ho.
Invece per quanto riguarda gli attributi non ho capito precisamente come dovrei utilizzarli
grazie

