Error in processing soap fault with http 500 error in DataPower - soap

I am new to DataPower.
I have created Multi Protocol Gateway (MPG) and create a processing policy with 3 rules.
1) Request Rule
2) Response Rule
3) Error Rule
All rules are having '*' in the matching action.
Whenever I am getting 'http 500' error with soap fault. Process to go to Error rule. Response rule is getting executed.
Is there any thing I have to change in matching action for response rule.
I have tried to change the sequence of rules in policy.

You have to turn off 'Process Backend Errors' under 'Advanced' tab for MPG.
if it is on, Response rule process the errors also

Related

Grafana8.3 webhook way to send test then get "Webhook response status 500 INTERNAL SERVER ERROR"

when i login the grafana server then found the logs covers some "error level" like:
"msg=Missing receiver logger=alerting.notifier.webhook"
"msg=Missing group labels logger=alerting.notifier.webhook"
Is there anyone had solved this kind of problems or have any ideas, in the grafana7 this way
works.

HTTP status code for failed serialization

I have a GET /v2/developer/jhUxad8 endpoint which get developer from database and serialize it to json.
What http status code should I return when serialization fail?
https://www.codetinkerer.com/2015/12/04/choosing-an-http-status-code.html
What http status code should I return when serialization fail?
If I'm understanding you correctly, the server understands the request, and is trying to fulfill it, but because of a data problem is unable to do so.
500 Internal Server Error
The 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

How to prevent BizTalk 2013/R2 WCF-WebHttp Rest SendPort from Suspending on Http Status=400

I'm calling a vendor's REST service from a BizTalk orchestration using a WCF-WebHttp SendPort.
Even though I capture this System.Exception in an orchestration with a scope.exception, the SendPort remains suspended. Is there anyway to prevent the Susepend (WCF-CustomBehavior or Binding?) How do most BizTalk consumers of external REST services deal with this?
There are many different errors, some for security, some for data/configuration that might be returned with a 400 status, here is one example:
A message sent to adapter "WCF-WebHttp" on send port "spP44WebHttp"
with URI "https://test.abc.com/api/v3" is suspended. Error details:
System.Net.WebException: The remote server returned an unexpected
response: (400) Bad Request. {"httpStatusCode":400,"httpMessage":"Bad
Request","errorMessage":"Unable to handle shipment
request","errors":[{"severity":"ERROR","message":"Customer-X does not
support these accessorials:
AIRPU","source":"SYSTEM"}],"supportReferenceId":"e0117674-9f83-4b42-b861-2e9b9f636323"}
When you have a Scope/Exception around any other two-way WCF send, such as WCF-SQL, it doesn't leave the SendPort suspended when you catch the error, does it?
Related: BizTalk Catch Http Response Code
Update 1: I found this TechNet Post which seems to be on target:
https://social.technet.microsoft.com/wiki/contents/articles/33238.biztalk-server-2013-r2-handle-exceptions-from-rest-services-in-orchestration.aspx
However, it states they could not catch the errors. I can catch the 400 errors, but what I don't like is the Suspended SendPort.
Update 2: I'm trying a custom behavior, where I was going to reset the status code in the BeforeSendReply. But using the debugger, I see the following methods run: Validate(), AddBindingParameters(), ApplyClientBehaviors(), BeforeSendRequest(), BUT - I never see the BeforeSendReply() run. So if BizTalk adapter doesn't like the 400 status, does that stop it from getting back into the Custom Behavior?

SoapUI endpoint error randomly

I don't understand something about SoapUI and his mockservice's behaviour.
I'm using the client of SoapUI (testcase) and a Java EE application with JAX-RPC.
My problem is :
when I'm trying to call any webservice, from my Java Client, or the testcase of SoapUI, the mockservice return a well message at first call, and the error below at the second call, with the same call or not.
But if I'm waiting, It works ...
So, I have enabled the option in SOAPui : "close HTTP connection after each SOAP request" and it works all the time...
So my question is :
"Is it a normal behaviour of the mockservice, and how to implement this with my java client ?"
Thank you all.
<soapenv:Fault>
<faultcode>Server</faultcode>
<faultstring>Missing operation for soapAction [] and body element [null] with SOAP Version [SOAP 1.1]</faultstring>
</soapenv:Fault>
OK,
I found a solution on the forum of SoapUI : http://www.soapui.org/forum/viewtopic.php?t=5648
It is when you have the settings flag "HTTP Settings/Logs wire content of all mock requests" set to true.
=> Uncheck the flag and it works fine!
Thanks a lot !
I had the same problem, using SoapUI 5.1.2 Pro.
After receiving first asynchronous response to the MockService, the MockService
stopped and could not receive any more responses for the request I sent.
The error message was:
Thu Jul 02 12:59:44 CEST 2015:ERROR:An error occurred [Missing operation for soapAction [XXXX] and body element [null] with SOAP Version [SOAP 1.1]], see error log for details
In SoapUI Settings:
File->Preferences->Http Settings: "Enable Mock HTTP log", uncheck box:
"Logs wire content of all mock requests".
Now I receive several asynchronous responses in a row, and give response back on them.
The same problem may happen when two mock services run with the same endpoint address (including port and path) on SoapUI.

SOAP "error fetching http headers": how do I do suspected solution of disabling keep-alive?

I'm troubleshooting an existing webservice. It previously worked just fine, but now SOAP-based requests to the postgreSQL database result in an "unknown error: Error Fetching http headers" error.
In looking up this problem, I come across the following tip:
When you get errors like: "Fatal error: Uncaught SoapFault exception:
[HTTP] Error Fetching http headers in" after a few (time intensive)
SOAP-Calls, check your webserver-config.
Sometimes the webservers "KeepAlive"-Setting tends to result in this
error. For SOAP-Environments I recommend you to disable KeepAlive.
Hint: It might be tricky to create a dedicated vhost for your
SOAP-Gateways and disable keepalive just for this vhost because for
normal webpages Keepalive is a nice speed-boost.
I haven't been able to figure out exactly how you disable KeepAlive or where this parameter would be set. I've tried grep -i "keepalive" /usr/share/tomcat5/conf/*, result negative.
Perhaps due to the variability of server environments this is a question for my sysadmin, but I do have root privileges.
Thanks for your help, stack!
In your Tomcat's server.xml file, set the maxKeepAliveRequests attribute to 1 on your HTTP connectors to effectively disable keep alive.
For more information:
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html#Standard_Implementation