Hi there I am trying to publish a message from WSO2 to rabbitmq but when I call the API it show me this error The system cannot infer the transport information from the -> url to rabbit with the credentials
Anybody knows what I am doing wrong? Thanks in advance.
This is the xml of my api.
enter image description here
Just in case someone have the same error, I found out that the deployment.toml file should be have a property like this sender_enable = true by default it is in the file but is comment all you have to do is uncomment it by removing the # character
Related
Sometimes response of a service is too large that swagger cannot get and beautify response as json.
if we try with "curl" command, we get response very fast. I think this is because of "Syntax highlighting" configuration of swagger.
In this url, we can understand that one way is change this config:
springdoc.swagger-ui.syntaxHighlight.activated=false
Do you have any idea in wso2 apim 4.1.0?
Can we change API Definition for this? or we have to change core configs of wso2?
With advanced UI customization you should be able to get this done. Please refer - https://apim.docs.wso2.com/en/latest/reference/customize-product/customizations/advanced-ui-customization/
You will have to customize the Swagger UI and add the springdoc.swagger-ui.syntaxHighlight.activated property there.
In[1], it is added springdoc.swagger-ui.validatorUrl for the Swagger UI.
[1] -
https://github.com/wso2/apim-apps/blob/main/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/SwaggerUI.jsx#L32
Hi everyone I am new using WSO2 ESB, here is the issue I made a integration project to learn but I have not been able to read the body of my request when I try I see this warning "Json Payload is empty"
enter image description here
Here is how I am trying to read the body <filter regex="[1-9]" source="json-eval($.test)">
enter image description here
And finally here is my request, I already set the header application/json
enter image description here
If anyone could help me, I would be very grateful. Thanks in advance
The request needs to be a POST to see the payload hit the ESB.
With GET it will just do a GET request without it.
Technically you can do GET with body but it's not a very common scenario.[1]
[1]https://docs.wso2.com/display/EI611/Unusual+Scenarios+for+HTTP+Methods+in+REST#UnusualScenariosforHTTPMethodsinREST-UsingGETwithaBody
That is because the GET method in wso2 does not allow the body payload. You can read in wso2 documentation:
Typically, a GET request does not contain a body, and the ESB profile does not support these types of requests. When it receives a GET request that contains a body, it drops the message body (...)
From doc: Using GET with a Body
Additional it is not good practice to do that, refer to this question: HTTP GET with request body
So you should use POST request.
I follow this doc to enable wso2is to sent email for self user registration :
https://docs.wso2.com/display/IS520/Self+Sign+Up+and+Account+Confirmation
But I am not receiving any email.
I would like to investigate but there is no message in the log althoug I add the following logger in log4j.properties :
log4j.logger.org.apache.axis2.transport.mail=DEBUG
log4j.logger.com.sun.mail=DEBUG
And also put -Dmail.debug=true in server.sh but nothing about smtp error or mail execption shows up in the log...
How can I fix it and investiguate ?
Regards
If you are using a gmail account for sending emails, you have to go to [1] and select "Turn on" option for allowing 3rd party apps to send emails using gmail.
However if that is not the case, you can enable debug logs for following.
log4j.logger.org.wso2.carbon.identity.mgt=DEBUG
and identify the issue based on the logs.
[1] https://www.google.com/settings/security/lesssecureapps
It might even be that a virusscanner blocks the gmail port (587) for spamming.
Using DevNullSmtp.jar helps to see what is going out.
See also
https://www.yenlo.com/blog/wso2easy-errors-sending-otp-emails-in-wso2-identity-server
I have published API in WSO2 using swagger JSON. After publish I am trying to call rest api using swagger in APP Console. It says
Response Body no content
Response Code 0
Response Headers {
"error": "no response from server"
}
There is no any error on server which will help me to understand problem.
Here is the request URL which I am using in local server : https://192.168.1.118:8243/api/2.0/questions/1/answers?start=1&end=1&fields=answerId%2CanswerDescription%2CcreateDate
In my API there are some custom header parameter. Because of this custom header parameter it was not working. I have added custom header parameter in api-manager.xml file.
<Access-Control-Allow-Headers>authorization,Access-Control-Allow-Origin,Content-Type,loggedInUserId,accessToken,clientToken</Access-Control-Allow-Headers>
I have faced a similar issue. I have edited the URL(from apicreator login) after it was published for first time and published it again. But the changes were never reflected. WSO2 was pointing to the old URL. Check the logs for error at "WSO2 HOME\repository\logs\wso2-apigw-errors" . Create another version and publish again and it should work.
The error is real, but misleading. In most likelihood, you've set the spec so that it returns a specific content type (say, application/json) but you actually return plain text (like a string or a number). swagger-ui expects it to be a JSON, tries to parse it and fails, giving you the wrong error message. However, it does mean your spec does not match what your API actually does.
I have a service in wso2.
For example,the endpoint is http://localhost:9000/services/SimpleStockQuoteService, and the request message is:
<m:getQuote xmlns:m="http://services.samples">
<m:request>
<m:symbol></m:symbol>
</m:request>
</m:getQuote>
If the symbol value is null. I do not want to send this request to the endpoint. I can use request message as response or send an error message out. I try to set property RESPONSE=true,but no use. How to do this in wso2? Someone can help me? Best regards.
You can use filter mediator to filterout the messages..Check the sample here[1] If particular filed is empty, then drop the message/execute fault sequence else allow it..
[1]http://wso2.org/project/esb/java/4.0.3/docs/mediators/filter.html
Use makefault mediator in your fault sequence.. Check the following post
http://techfeast-hiranya.blogspot.com/2010/04/wso2-esb-tips-tricks-05-error-handling.html