Problems with uploading files
When you are submitting a request through the Web Gateway to upload a file, you might receive an HTTP error code and a WebSphere® MQ File Transfer Edition error message. The following examples show some possible causes of errors received when requesting a file upload.
Failing to specify an MQMD user ID
If you request a file upload using the Web Gateway and there is no WebSphere MQ Message Descriptor (MQMD) user ID defined, the transfer fails with an HTTP response code of 403. For more information about the HTTP response codes returned by the Web Gateway, see the topic HTTP response codes. If you have enabled trace for the application server hosting the Web Gateway, the following information is written to the trace file:
BFGWI0056E: User fte-user is not permitted to access the system due to an MQMD
user identifier not being available.
In the example above, fte-user is the user submitting the file upload request. For instructions on configuring trace in your application server, see Enabling trace for the Web Gateway.
To successfully submit file transfer requests through the Web Gateway, you must define the MQMD user ID to use for the transfer. You can either define a specific MQMD user ID for each user, or define a default MQMD user ID.
To define a set of mappings between web user ID and MQMD user ID, use the Web Gateway administration API. For more details, see the topics Example: Mapping web user IDs to MQMD user IDs and XML format for mapping web user ID to an MQMD user ID. If a user who does not have an MQMD user ID defined submits a file upload request, the value of the defaultMQMDUserID parameter is used. For instructions on setting this parameter, see the topics Preparing to deploy the Web Gateway with WebSphere Application Server Community Edition and Deploying the Web Gateway with WebSphere Application Server Version 7.0.
Failing to specify a destination agent
- This HTTP request submits a request to upload a file without specifying
a destination agent:
POST HTTP/1.1 /file/agent/ Host: example.com User-Agent: mozilla Content-Type: multi-part/form-data; boundary=Aa6b74 x-fte-checksum: MD5 --Aa6b74 Content-Disposition: form-data; name="files"; filename="myfile.txt" Content-Type: text/plain Account No, Balance 123456, 100.00 234567, 1022.00 345678, 2801.00 456789, 16.75 --Aa6b74
- The Web Gateway returns an HTTP response with the following format:
HTTP/1.1 400 Bad Request Server: WAS/6.0 Content-length: 62 Content-type: text/plain BFGWI0002E: URI is incomplete: missing destination agent name.
POST HTTP/1.1 /file/agent/ACCOUNTS Host: example.com User-Agent: mozilla Content-Type: multi-part/form-data; boundary=Aa6b74 x-fte-checksum: MD5 --Aa6b74 Content-Disposition: form-data; name="files"; filename="myfile.txt" Content-Type: text/plain Account No, Balance 123456, 100.00 234567, 1022.00 345678, 2801.00 456789, 16.75 --Aa6b74
If you receive an HTTP response with a status code other than 200, see the HTTP Response Codes topic for more information.