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
JMallingJMalling 

Outbound Message error - (405)Method Not Allowed

Hi all,

 

I am trying to get my app to call an external webservice. I'm fairly new with outbound messaging, and unfortunately, so far I've had nothing but issues with it.

 

Therefore I created a dummy webservice and outbound message that follows this guide exactly, just to try getting it to work:  http://wiki.developerforce.com/index.php/Creating_an_Outbound_Messaging_Notification_Service_with_CSharp_and_.Net_Framework_2.0 

 

In the Message Delivery Status however, I get the (405)Method Not Allowed error.

 

I've searched the forums and couldn't find that anyone has this issue when just trying to call a plain webservice. Therefore I'm thinking that I am perhaps overseeing something very basic. I've tried support and devsupport but no reply so far (weeks).

 

So, does anyone know what typically set off this error, or does anyone have any ideas as to what could be the issue here?

 

Thanks,

 

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

Outbound messaging uses SOAP, SOAP uses HTTP POST requests, your server is configured to disallow POSTs to that URL, I like curl for testing things like this.

 

bigmac:~ simon$ curl -v -d foo -X POST http://dem01.cfhcompany.com/Accounts

* About to connect() to dem01.cfhcompany.com port 80 (#0)

*   Trying 67.192.231.131... connected

* Connected to dem01.cfhcompany.com (67.192.231.131) port 80 (#0)

> POST /Accounts HTTP/1.1

> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3

> Host: dem01.cfhcompany.com

> Accept: */*

> Content-Length: 3

> Content-Type: application/x-www-form-urlencoded

< HTTP/1.1 405 Method Not Allowed

< Allow: OPTIONS, TRACE, GET, HEAD

< Content-Length: 1564

< Content-Type: text/html

< Server: Microsoft-IIS/6.0

< MicrosoftOfficeWebServer: 5.0_Pub

< X-Powered-By: ASP.NET

< Date: Wed, 25 Mar 2009 17:39:56 GMT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<HTML><HEAD><TITLE>The page cannot be displayed</TITLE>

<.....[rest of the error page] 

 

 

Typically Web Services written in ASP.NET have a ..../something.asmx url. 

 

All Answers

SuperfellSuperfell
make sure you're using a publicly resolvable host name for your service, what's the URL of the listener you setup in workflow ?
JMallingJMalling

Hi Simon,

 

We are using a publicly resolvable server host name. 

 

Are you referring to the endpoint URL? If so, it is http://dem01.cfhcompany.com/Accounts

 

Thanks. 

Message Edited by JMalling on 03-25-2009 10:40 AM
SuperfellSuperfell

Outbound messaging uses SOAP, SOAP uses HTTP POST requests, your server is configured to disallow POSTs to that URL, I like curl for testing things like this.

 

bigmac:~ simon$ curl -v -d foo -X POST http://dem01.cfhcompany.com/Accounts

* About to connect() to dem01.cfhcompany.com port 80 (#0)

*   Trying 67.192.231.131... connected

* Connected to dem01.cfhcompany.com (67.192.231.131) port 80 (#0)

> POST /Accounts HTTP/1.1

> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3

> Host: dem01.cfhcompany.com

> Accept: */*

> Content-Length: 3

> Content-Type: application/x-www-form-urlencoded

< HTTP/1.1 405 Method Not Allowed

< Allow: OPTIONS, TRACE, GET, HEAD

< Content-Length: 1564

< Content-Type: text/html

< Server: Microsoft-IIS/6.0

< MicrosoftOfficeWebServer: 5.0_Pub

< X-Powered-By: ASP.NET

< Date: Wed, 25 Mar 2009 17:39:56 GMT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<HTML><HEAD><TITLE>The page cannot be displayed</TITLE>

<.....[rest of the error page] 

 

 

Typically Web Services written in ASP.NET have a ..../something.asmx url. 

 

This was selected as the best answer
JMallingJMalling

Hi Simon,

 

The asmx url is http://dem01.cfhcompany.com/Accounts/AccountNotificationService.asmx.

 

We are able to call the webservice from our test programs, on our local PCs, but the issue occurs when trying to call it through an outbound message in Salesforce.

 

We are running IIS - what setting would you recommend to allow POSTs?

SuperfellSuperfell
Just put the full URL in the outbound message endpointURL and you should be good to go.
JMallingJMalling
Got it working by configuring the server to allow POST... Thanks!