on 02-17-2015 8:03 AM
1. I created Web Service ZWS_SQRT, based on WSDL, which uses function module Z_SQRT, which calculates the square root of a given input parameter:
FUNCTION Z_SQRT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(NUMBER) TYPE F
*" EXPORTING
*" VALUE(RESULT) TYPE F
*" EXCEPTIONS
*" NEGATIVE_ARGUMENT
*"----------------------------------------------------------------------
if number >= 0.
data outNumber type f.
CALL METHOD cl_foev_builtins=>square_root
EXPORTING
im_number = number
IMPORTING
ex_result = outNumber.
result = outNumber.
else.
raise negative_argument.
endif.
ENDFUNCTION.
2. Then, in SOAMANAGER transaction I configured the service. The service works well locally in SE80 transaction
3. In the last step, I made a C# program in Visual Studio, which calls the service. The program is correct (WebReference is created web service reference):
WebReference.ZWS_SQRT root = new WebReference.ZWS_SQRT();
root.Credentials = new NetworkCredential("<username>", "<password>");
WebReference.ZSqrt x = new WebReference.ZSqrt();
WebReference.ZSqrtResponse y = new WebReference.ZSqrtResponse();
y = root.ZSqrt(x);
But the problem is that, when calling the service, I usualy (but not always) get an error "The request was aborted: The request was canceled". If I wrap the statement y = root.ZSqrt(x) in while loop like this:
int i=0;
Boolean b=true;
while (b)
{
try
{
y = root.ZSqrt(x);
b=false;
}
catch
{
}
i++;
if (i==20) break;
}
the program works, but this surely is not the right solution.
So, the error must somewhere in Web Service Configuration of SOA Management (the picture is below, surely it is not enough, but I must start somewhere).
Please help me to solve this.
Thanks in advance
Miran
Hi,
Please have a look at 1737707 - .Net client loses connection to Application Server
Try setting the parameter icm/HTTP/expect_100_close_on_error to false and check.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I was trying to solve the problem according to your kind advice, but
1. the note 1737707 cannot be applied on our Kernel version (there is no parameter icm/HTTP/expect_100_close_on_error)
2. workaround does not work:
Cursor.Current = Cursors.WaitCursor;
var req = (HttpWebRequest)WebRequest.Create("http://guediserr.durs.si:8010/sap/bc/srt/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/rfc/sap/zws_sqrt/...");
req.ServicePoint.Expect100Continue = false;
req.KeepAlive = false;
req.ProtocolVersion = HttpVersion.Version10;
WebReference.ZWS_SQRT root = new WebReference.ZWS_SQRT();
root.Credentials = new NetworkCredential("GORENMI1", "tlaxcala3");
WebReference.ZSqrt x = new WebReference.ZSqrt();
WebReference.ZSqrtResponse y = new WebReference.ZSqrtResponse();
x.Number = 25;
y = root.ZSqrt(x);
textBox9.Text = y.Result.ToString();
Cursor.Current = Cursors.Default;
I get an error
Web service processing error; more details in the web service error log on provider side (UTC timestamp 20150220075532; Transaction ID 54E4BD639123DA34E10000000A04063D)
I cannot find no other help, that's why I am writing to you. Can you help me ?
thanks in advance
best regards
Miran
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.