code_junkie

How to modify webservice proxy to get Raw XML

Nov 14th, 2011
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. /// <remarks/>
  2. [System.Web.Services.Protocols.SoapHeaderAttribute("CallOptionsValue")]
  3. [System.Web.Services.Protocols.SoapHeaderAttribute("MruHeaderValue")]
  4. [System.Web.Services.Protocols.SoapHeaderAttribute("SessionHeaderValue")]
  5. [System.Web.Services.Protocols.SoapHeaderAttribute("QueryOptionsValue")]
  6. [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace = "urn:partner.soap.sforce.com", ResponseNamespace = "urn:partner.soap.sforce.com", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
  7. [return: System.Xml.Serialization.XmlElementAttribute("result")]
  8. public QueryResult query(string queryString)
  9. {
  10. object[] results = this.Invoke("query", new object[] {
  11. queryString});
  12. return ((QueryResult)(results[0]));
  13. }
  14.  
  15. MemoryStream stm = new MemoryStream();
  16. XmlSerializer xmlSer = new XmlSerializer(typeof(QueryResult));
  17. xmlSer.Serialize(stm, queryResult);
Add Comment
Please, Sign In to add comment