You need to sign in to do that
Don't have an account?
DanSykes
Outbound Messaging - System.Web.Services.Protocols.SoapException: Server was unable to read request.
Hi i am having problems with outbound messaging.
I have a web service at my end that i have tested and it works and returns me an ack value of true when i hit it in my test program, When i try and hit it from salesforce by making a change to a contact, i get this error.
System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> System.InvalidOperationException: There is
Has anyone else seen this and solved it? I can provide my code if its needed. I am using .NET 1.1 and VB.
Thanks Dan
Have you seen http://www.pocketsoap.com/weblog/2007/02/1740.html and in particular the part about having to modify rather than subclass the generated code on .NET 1.1 ?
Hi Simon,
Firstly thank you for your response. Yeah i did follow that page, (some of the instructions dont appear in ie ;) but were there in firefox which threw me a little), i think i have pretty much the same as you documented.
One thing i did have to change was the name of the Contact class in the autogenerated code to sfContact as we already have a contact class in our project. If this is essential then i can create this in its own project, but do not want to do this unless it is really essential.
This works when i add a web reference a test preoject, although it is saying i am using temp.org as the namespace whaiach i am not, i do not know if this has anything to do with it.
In my Notification Service i have (at the momnet i just want to get an ack from the page):
<System.Web.Services.WebServiceBindingAttribute(Name:="NotificationBinding", [Namespace]:="http://soap.sforce.com/2005/09/outbound"), _
System.Xml.Serialization.XmlIncludeAttribute(GetType(sObject))> _
Public Class NotificationService
Inherits System.Web.Services.WebService
'<remarks/>
<System.Web.Services.WebMethodAttribute(), _
System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Bare)> _
Public 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
Dim r As notificationsResponse = New notificationsResponse
r.Ack = True
Return r
End Function
End Class
in my asmx i have :
<%@ WebService Language="vb" Codebehind="NotificationService.asmx.vb" class="NotificationService" %>
Thanks again
Dan
Hi simon,
Thanks again, yeah that kind of makes sense although it is a bit of a pain to get the webservice working like this. I had to add the service to its own project and compile it, then add its dll into the bin. Then i reference it like this:
Hi Simon,
Got it going thanks for all your help. Still not 100% sure what the problem was but all seems good now.;)
Thanks Again
Dan