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
skipperSwedeskipperSwede 

Outbound Message WSDL used in .Net

Greetings,
 
I am having trouble using the SalesForce generated WSDL thru its wizard (GUI).  I have a test WebService on a local server,
with a specific Port (socket) setup for listening.  I turned on IIS logging and can indeed see that there is a POST - the message is received, and there is a
Content-Length.  However, due the SoapAction header = "" the error message returned is [ Server did not recognize the value of HTTP Header SOAPAction: . ] .
 
After some searching online,  I found that someone had found a solution whereby explicitly adding in a SoapDocumentAttribute - in BizTalk - and I went on my merry way to implement this.  No such luck in .Net (."Not")!
 
I understand the WebService is to expose a method for consumption.  However I am not clear (based on the WSDL) on what those exact signatures are?
What are the Inputs/Outputs?  Are these simply OneWay requests?
 
I see a reference to a 'notifications' method with an Id + SObject, but not sure if this is the WebMethod to define on the Service.  Also I see a reference to a 'notificationsResponse' using a boolean 'Ack' a the return datatype.
 
Any help or clarification would be much appreciated.
 
 
SuperfellSuperfell
The API docs include a step by step guide for building a listener in .NET. (the important thing is to start by running wsdl.exe /server theSfdcWsdl.wsdl)
skipperSwedeskipperSwede

Thanks for the quick response.

And yes I have read the API guide, and yes I did use the wsdl.exe to generate the Proxy -like always...

 

SuperfellSuperfell
and you used the /server switch ?
SuperfellSuperfell
And to be clear, I'm talking about this Outbound Messaging specific part of the API doc
http://www.salesforce.com/us/developer/docs/api/index_CSH.htm#sforce_api_om_outboundmessaging_listener.htm
skipperSwedeskipperSwede
Thanks Simon. I will research  :| ....
skipperSwedeskipperSwede
Simon,
 
I rebuilt the Proxy (and yes I use the /server switch) and what I did differently this time is I Override the 'notifications' Method in the Proxy when implementing it in the .asmx file.  Furthermore I do Set the .Ack property in the ReturnValue. 
 
Here is the Signature of the method in the .asmx:
...
<WebMethod(Description:="-This is the BISS WebService listener used for receiving WorkFlow Messages from SalesForce.")> _
Public Overrides Function notifications(ByVal pObjNotifications As notifications) As notificationsResponse
...
 
Here is the Signature of the method in the Proxy NotificationService Class:
...
<System.Web.Services.WebMethodAttribute(), _
System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Bare)> _
Public MustOverride Function notifications(<System.Xml.Serialization.XmlElementAttribute("notifications", [Namespace]:="http://soap.sforce.com/2005/09/outbound")> ByVal notifications1 As notifications) As <System.Xml.Serialization.XmlElementAttribute("notificationsResponse", [Namespace]:="http://soap.sforce.com/2005/09/outbound")> notificationsResponse
...
 
 
 
 
I still get the same error:  Server did not recognize the value of HTTP Header SOAPAction: .
 
And in the IIS Log there is simply a Http 500 -error (Internal ServerError or someother enumerated error),   due to the SoapAction header = ""  ???
 
Have you read the Thread by a Thomas Canter:
His advice was to add a SOAP Document Attribute -

[SoapDocumentServiceAttribute(RoutingStyle=SoapServiceRoutingStyle.RequestElement)]

I tried this but to no avail...
SuperfellSuperfell
What version of .NET are you using ?
skipperSwedeskipperSwede
-Using:
 
 .NET FrameWork v.2.0.50727  SP1 ;  VisualStudio 2005; and IIS 5.1;
 
 
 
SuperfellSuperfell
Have you tried the C# version from the docs ? That worked fine for me on .NET 2.0. Perhaps this is something weird between c# and VB.NET ?
skipperSwedeskipperSwede

Simon,

I used the /serverinterface switch instead of the /server  switch and Implemented the Interface instead of inheriting it.

It works!  I do appreciate you helping me eliminate all possible venues.

 

skipperSwede

KanakaRajuRajuBiztalk2013KanakaRajuRajuBiztalk2013

Hi,

can you help me to get the data from saleforce to Biztalk with out using Windows Azure. I followed the code snippet from MSDN to fetch the data when action is triggered in Salesforce Biztalk will receive the data, but using windows azure account I need the same but with out windows azure.

Here is the MSDN code

http://code.msdn.microsoft.com...


SimonF wrote:
Have you tried the C# version from the docs ? That worked fine for me on .NET 2.0. Perhaps this is something weird between c# and VB.NET ?