function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
conversenconversen 

Outbound Message listener issue?

Hi, I have created workflow rule & outbound message using metadata api & .Net code and it works fine. when oubound message trigger my webservice I dont get all the fields which I setup in outbound message. which WSDL I should use? either partner or metadata wsdl? Can you please send me sample code for both wsdl. Thanks Mangesh
conversenconversen

can anybody will help me.

SuperfellSuperfell

You get the subset of fields you defined in your outbound message, there's a specific wsdl generated for your OM setup.

mcclurecmcclurec

Can you share the code that is working? I am having some problems and would love a little help. I want to build an ashx page to consume the xml that Salesforce sends me from the workflow. Thanks!

mcclurecmcclurec

Not sure if this is the best way to do it, but I ended up building an ashx page with the following code:

 


public void ProcessRequest(HttpContext context)
        {
            context.Request.ContentType = "text/xml";
            context.Request.ContentEncoding = System.Text.Encoding.UTF8;
           
            HttpRequest request = null;
            request = context.Request;

            string sfXMLPayload = "";
          
                Stream strm = response.InputStream;
                StreamReader sr = new StreamReader(strm);
                string sfXML = sr.ReadToEnd();
                       
                sfXMLPayload = sfXML;

                WriteTextFile( sfXMLPayload);
          
  }

public void WriteTextFile(string inputStr)
        {

            string text = inputStr;
            System.IO.File.WriteAllText(@"C:\temp\sfXML.xml", text);
           
        }