on 04-24-2012 10:40 AM
Hi,
I am developing a C# tool which is calling BAPIs via SOAP Webservice calls. The tool is being successfully implemented at a number of customers. However, one customer has detected that sometimes a webservice call throws an exception, while many other webservice calls runs successfully. There is no pattern detectable, why the exception is thrown.
This is the stack trace:
System.Net.WebException: System.Net.WebException: The request was aborted: The request was canceled
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at MyTools.RFC_READ_TABLE.RFC_READ_TABLEService.RFC_READ_TABLE(TAB512[]& DATA, String DELIMITER, RFC_DB_FLD[]& FIELDS, String NO_DATA, RFC_DB_OPT[]& OPTIONS, String QUERY_TABLE, Int32 ROWCOUNT, Boolean ROWCOUNTSpecified, Int32 ROWSKIPS, Boolean ROWSKIPSSpecified)
Unfortunately, no further reason is given for the cancellation of the request.
What can I do to debug this error? Is there a logging mechanism inside the SAP server which maybe has some more error details?
By the way: I know NCo3.0 and may be the SOAP webservice interface will be replaced by NCo 3.0, but I have to solve the problem in less time 😉
Best regards,
Stefan
If the error was on the SAP server, see transaction SRT_UTIL
I cant see enough of the stack trace to see what the problem is.
based on your description... some work some dont, it is most likely a content issue for the specific service call. More details inside SRT_UTIL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your answer.
Based on a (german) blogpost I could get a workaround for the problem.
http://www.markusreich.at/?p=546
The blogpost mentioned a problem might occur with the keep alive settings of the web services. A solution is to alter the Reference.cs class of each service and overwriting the GetWebRequest method with the following code:
public
partial
class
xyzService : System.Web.Services.Protocols.SoapHttpClientProtocol {
...
protected
override
System.Net.WebRequest GetWebRequest(Uri uri)
{
System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)
base
.GetWebRequest(uri);
request.KeepAlive =
false
;
request.ProtocolVersion = System.Net.HttpVersion.Version10;
return
request;
}
...
}
works for me 🙂
We were running into this problem also, but didn't want to set the keep-alive timeout to false for the workaround. SAP actually provides a solution for this in SAP Note 1737707, it involves a KERNEL patch and setting the following parameter in the instance profile:
icm/HTTP/expect_100_close_on_error = false.
Hopefully this helps anyone else encountering this error.
Two other related and applicable notes are 1662376, and its follow-up 1713675.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.