Getting '405 Not Allowed' for PUT/POST Methods in postman in mule 4 - mule4

I have created a mule application with client_id and client_secret, TLS keystore and deployed on cloudhub. I am able to run application locally but cannot run with cloudhub url.
URL: https://system.us-e2.cloudhub.io/api/refund with PUT method with json body.
It is throwing '405 Not Allowed'
Thanks in advance

Probably you are not pointing to the right application. The error is coming from CloudHub load balancer, indicating that it didn't reach your application. Check that the URL used is the right one for the application. Also that the application is listening in the right port. For CloudHub an HTTPS listening application has to listen in port 8082.
You can try to troubleshoot by contacting directly the application's worker. For example: https://mule-worker-system.us-e2.cloudhub.io/api/refund:8082/...
Your application should have an HTTP Listener configuration like:
<http:listener-connection host="0.0.0.0" port="8082" protocol="HTTPS">
<tls:context>
<tls:trust-store path="keystore.jks" password="123456"/>
</tls:context>
</http:listener-connection>
Note that in this configuration the port used is "8082".

Related

C# gRPC client - name resolution failure

A client is running our C# gRPC client on a corporate network, behind an HTTP proxy. The http_proxy environment variable is configured, but nevertheless he sees an error message Name resolution failure when attempting to connect to the server on the internet.
DNS resolution from the same machine works fine using nslookup.
Any ideas what I can do to investigate this problem?
You can use the following three lines at application startup to configure the detailed logging that #JanTattermusch suggested:
Environment.SetEnvironmentVariable("GRPC_TRACE", "api");
Environment.SetEnvironmentVariable("GRPC_VERBOSITY", "debug");
Grpc.Core.GrpcEnvironment.SetLogger(new Grpc.Core.Logging.ConsoleLogger());
In order to connect a C# gRPC client on a corporate network, behind an HTTP proxy, add this on the client main method works:
Environment.SetEnvironmentVariable("NO_PROXY", "127.0.0.1");

What are the differences between Launch URL and App URL?

What is the difference between App URL and Launch URL from ASP.NET Core?
With these settings, I can access my app, both over HTTP on port 4099 and over HTTPS on port 44363, but first it launches on HTTPS. I'm using VS 2017. If I use the same URL for App and Launch I get:
An error occurred attempting to determine the process id of dotnet.exe which is hosting your application. One or more errors occurred.
If I remove Launch URL and keep App URL with HTTPS I get the same error.
What is the difference between them and how do I redirect every HTTP request to HTTPS?
Microsoft is not helping right now: link to microsoft docs
As far as i can tell:
Launch Url is the url you host your dotnet core application on and to which port the kestrel server is listening.
Websettings, AppUrl is the url IIS is listening to. IIS (which is basically a reverse proxy here) will forward all the http request comming from the AppUrl to the Launch URL.
If you remove the Launch URL kestrel has no port to listen to, and will throw an error on startup, or fallback to port 5000.

WSO2 /token resource not found

I'm trying to get a token to use in a call to a service published through WSO2 API Gateway and for that I'm calling the /token resource on https://:8243/token with a POST method and "grant_type=client credentials" and the correct Authorization header but the server returns 404 resource /token not available
If I use the Curl call generated using the "store" application I get the same error.
If I use the resource through the carbon application everything works though, I make the call to https://:9443/oauth2/token and I get the token back
Could anybody help me getting the application on the 8243 port to work?
Thanks
apimanger serves https api calls in port 8243 and http api call in port 8280 and it is defined under transportReceiver in the axis2.xml /repository/conf/axis2/axis2.xml).
Even though it is listening 8243 , if that port is not opened to outside from your server, then you will not be able to access via port 8243.So
Check whether port 8243 is opened in your server where apimanger gateway runs .You can use telnet command and check whether you are able to connect to it.
Check if in < APIM > /repository/deployment/server/synapse-configs/default/api you find the _ TokenAPI _ .xml
I had the same issue and found the file renamed with .back. Removing the .back extension and restarting the server worked.

SoapUI and web service testing with windows authentication

Blockquote
I'm trying to test an already deployed web service through SoapUI. The service URL is https://hostname:82/Service.asmx. I modified the test Endpoint to reflect this. Web requests go through a proxy that uses Windows Authentication.
First I attempted to run the test directly but without success. All I got was an error:
401 - Unauthorized: Access is denied due to invalid credentials
Next, I entered proxy details and domain username/password into SoapUI proxy settings. This creates another error:
status# HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. Forefront TMG is not configured to allow
SSL requests from this port. Most Web browsers use port 443 for SSL requests. )
I wasn't really paying attention to this until now so I ignored the error and went on to install Burp Suite hoping that this would help with Windows Authentication. I got the Internet working through Burp Suite but soapUI still doesn't do anything and I can't run any tests. This time the error is a bit different:
XML Parsing Error: syntax error Location:
https://hostname:82/Service.asmx Line Number 1, Column 1:Burp proxy
error: failed to connect to IP.
What am I doing wrong? :)
Figured it out in the end. I configured Burp proxy the wrong way. Instead of redirecting to my WS server, I was redirecting to our internet proxy which of course didn't know what to do.

Flex AIR Application Connecting to RemoteObject Through Proxy

I am having some issues trying to make an AIR application connect to a RemoteObject when the application is run in a domain that has proxy servers for outbound connection.
The error provided is as below:
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://myTestService.org:8080/default/message/amf'"]
Any ideas? I think the proxy server may be preventing the application from accessing the Remote Object. How do I work around this?
Thanks.
Edit:
I saw a quite similar post to this:
Remoting with AIR
And I did declared the endpoint and destination to my RemoteObject.
In application/WEB-INF/flex/services-config.xml give only relative paths, do not use ip address and port number. You can look here for detail moving to production server
And here send failed error
In your case channel url should be
"/default/message/amf"
Drupal RPC Fault looks to be some what same as your problem and has issues with crossdomain.xml
Do check it.

Resources