Resolving TNS Prefix Issues in Postman WSDL Imports
When importing WSDL files into Postman, you may notice that the request body contains "tns:" prefixes in XML tags. This prefix can cause API requests to fail with 400 or 500 error responses.
Symptoms
- The request body automatically includes "tns:" prefixes in XML tags.
- API calls return 400 Bad Request or 500 Server Error responses.
This issue has been observed in Postman version 11.21 and may affect other versions as well. The problem occurs in both the Postman Desktop Application and the Web version, indicating it's a platform-wide concern rather than being limited to a specific deployment method. Both free and premium account types experience this behavior when working with WSDL imports.
Workaround
- Method 1: Remove TNS prefixes
-
You can remove all "tns:" prefixes from the XML tags in your request body.
- Open the affected request.
- Locate "tns:" prefixes in the request body.
- Remove all instances of "tns:".
- Send the modified request.
- Method 2: Modify the XML Namespace
-
Alternatively, you can append tns to the xmlns:tns attribute in your request body.
- Open the affected request.
- Locate the xmlns:tns attribute in your XML.
- Append tns to the namespace value.
- For example: xmlCopy1xmlns:tns="http://example.com/servicetns.
Both methods should resolve the issue and allow your request to complete successfully with a 200 OK response. Choose the method that best suits your needs and workflow.