Hello Techies,
Below is the code snippet of the WCF proxy that I created with "SvcUtil" with XmlSerializer. I call the "upload" method using the proxy class and the method returns "uploadResponse" object. Within this object the "informations" object is always null. I verfied with fiddler and I noticed my call had valid Request and Response SOAP XML.
- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- [System.ServiceModel.MessageContractAttribute(WrapperName="uploadResponse", WrapperNamespace="http://services.ws.svgeda.bdf.fr/", IsWrapped=true)]
- public partial class uploadResponse
- {
-
- [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://services.ws.svgeda.bdf.fr/", Name = "informations")]
- [System.Xml.Serialization.XmlElement(Namespace = "http://services.ws.svgeda.bdf.fr/", ElementName= "informations")]
- public ResponseUpload informations;
-
- public uploadResponse()
- {
- }
-
- public uploadResponse(ResponseUpload informations)
- {
- this.informations = informations;
- }
- }
I tried tweaking the proxy by adding "Name" element to the "MessageBodyMemberAttribute" And I set the value for the namespace which was empty. And I also added XmlElement to see if it changes something.
Below is the XML snippet that's returned by the WCF calls to the method "upload" of the WS.
- <?xml version='1.0' encoding='UTF8'?>
- <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
- <soapenv:Body>
- <rpcOp:uploadResponse xmlns:xsi='http://www.w3.org/2001/XMLSchemainstance' xmlns:rpcOp='http://services.ws.svgeda.bdf.fr/'>
- <informations xmlns:ns2='http://services.ws.svgeda.bdf.fr/'>
- <idSource>?</idSource>
- <idGeda>{E08AEC690000CB1D96BEB5C2299E9E4E}</idGeda>
- </informations>
- </rpcOp:uploadResponse>
- </soapenv:Body>
- </soapenv:Envelope>
Any idea why the informations object is empty? All the other methods in the Web service(delete, update) return a response object which also contains a property named "informations" but with different types.
Thanks & Regards,
Clement