I have rest service to upload files and it is working fine.Now I created API in API manager and also given the same file upload service as the production endpoint. But now I am getting an error in my backed server while uploading the file using API manager endpoint.
I got the solution,Need to enable Binary Relay builders in axis2.xml file to use the multipart/form-data message formatting and also ensure that there is no custom header with request to handle multipart data.
<messageBuilder contentType="multipart/form-data"
class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
<messageFormatter contentType="multipart/form-data"
class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
Related
How to upload multipart form data in wso2 esb without using class mediator. uploading pdf file in wso2 ESB using choose file option in postman
In axis2.xml file uncomment multipart/form-data if commented,for both message formatter and message builder.
I am using s3-bucket to store app config data for multi tenant application. I need tenant info saved in public file(.json) in s3-bucket before client is logged in to the application. For example, app config data might be client logo and some custom title/sub-title for each tenant and etc. I am trying to fetch file content based on sub-domain.
So, I need to fetch the client data, while rendering the login component itself. I am using aws-sdk tool in client side, but am facing 'missing credentials` error.
I am not getting, How to achieve this??
thanks and regards
SHASHIDHAR N K
The AWS SDK for Javascript uses the S3 rest API in such a way that it requires a GET request to be authorized. This is because it uses request parameters to override response header values and for these the rest API documentation for GET says:
Note - You must sign the request, either using an Authorization header or a pre-signed URL, when using these parameters. They cannot be used with an unsigned (anonymous) request.
However, you don't need to use S3 to get a public file, you can make a standard http request using XMLHttpRequest or suchlike.
How can I configure WSO2 API Manager to handle Multiple Authentication API Keys in the store's API Console? I would like it show fields: Authentication and clientId, for example. But it only shows the field for Authentication despite of I built my swagger file with both headers in .
I do handle this Auth headers in my application backend. And I am testing my swagger file in the swagger-editor and works fine (Swagger Editor asking for two API Keys Headers).
Swagger can handle a lot itself, it's only a definition file. It doesn't mean a (any) product must support all options.
WSO2AM reads only the authorization header (Authorization by default, can be changed). The header is cleared before sending to the backend.
If you want to be able sending a custom header to the backend from the API Store, you can define a header parameter (not as an api key)
WSO2AM can be configured to send a JWT token to the backend with client information, that's how backend can get and validate the identity information.
Hi I have imported an existing soap wsdl using wso2 api 2.1.0 manager.
I have the option to download the wsdl, to my local machine.
But what i want is to be able to access the newly created wsdl using an url.
How is this possible ?
Got the url from the
{you host name}/registry/resource/_system/governance/apimgt/applicationdata/wsdls/{your api name}.wsdl
you can also change the file type to text/xml in the metadata of the wsdl , so that it's directly viewable from the browser.
I have a post restful client which I need to publish.I am able to publish the same and post subscription, what would be the payload parameters as its a restful client.As I go through the WSO2 docs, they all refer to SOAP requests.
You do not have to send SOAP requests to WSO2 api manager. You can configure api manager to build the message to send to the backend service using you incoming request body (either json or SOAP request)
for example try this sample. This shows how a JSON request is converted to a SOAP payload to access SOAP web service backend. Here payload factory mediator is used to convert the JSON message to SOAP message. if you do not use that mediators, you would be able to send the incomming JSON body directly to backend service (if backend accepts JSON)