You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failing to forward a SOAP request using 'Forwarded' status should result in a 502 error, rather than a 500 'Internal Server Error'.
To Reproduce
Steps to reproduce the behavior:
Configure any SOAP (REST untested) endpoint as a 'Forwarded' endpoint to an unavailable SOAP server.
Send in a request - a JSON response will be received with a statusCode 500 'Internal Server Error'.
Viewing the logs will show the following message:
2022-11-30 11:17:31.930 ERROR 1 --- [nio-8080-exec-2] o.s.b.w.s.s.ErrorPageFilter : Forwarding to error page from request [/mock/soap/project/K1FFaC/imcesp] due to exception [Unable to forward request to configured endpoint]
com.castlemock.web.mock.soap.model.SoapException: Unable to forward request to configured endpoint
at com.castlemock.web.mock.soap.controller.mock.AbstractSoapServiceController.process(AbstractSoapServiceController.java:142) ~[web-mock-soap-1.63.jar:?]
at com.castlemock.web.mock.soap.controller.mock.SoapServiceController.postMethod(SoapServiceController.java:67) ~[web-mock-soap-1.63.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
Expected behavior
A statusCode 502 indicating an upstream gateway problem, and an error message indicating as such.
Desktop (please complete the following information):
OS: Official Docker image running on Windows 11
Browser: N/A
Version: 1.63
WSDL files or other resource attachments:
Unable to share due to company policy.
The text was updated successfully, but these errors were encountered:
Hi @Evynglais!
The first thing I would recommend you to try is to change the mocked service setting to mocked and then verify that the client actually can invoke that service.
If the mocked service works and it is just to forwarding functionality that does not work then it could be any of these problems:
Invalid forwarded URL
No access to the forwarded URL
The forwarded URL is using a self-signed SSL certificate. Java could block request towards services that are using self-signed SSL certificates.
Hope you find this answer helpful. Have a nice day!
Sorry if I wasn't clear. The failure is expected; the issue is that castlemock returns a 500 status code rather than the correct 502 indicating an upstream gateway problem.
Describe the bug
Failing to forward a SOAP request using 'Forwarded' status should result in a 502 error, rather than a 500 'Internal Server Error'.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A statusCode 502 indicating an upstream gateway problem, and an error message indicating as such.
Desktop (please complete the following information):
WSDL files or other resource attachments:
Unable to share due to company policy.
The text was updated successfully, but these errors were encountered: