How to convert json to xml for soap api requests
- Step 1Paste or upload the JSON payload — Paste the JSON object representing your SOAP request body. Nested objects become child elements; arrays become repeated sibling elements with the same tag name as the JSON key.
- Step 2Set the root element name and namespace prefix — Enter the root element name (e.g. CreateOrderRequest) and the namespace prefix (e.g. ord) that matches your WSDL service definition. The converter generates the xmlns attribute automatically.
- Step 3Wrap the output in a SOAP envelope — Copy the generated XML and embed it inside your SOAP envelope: <soap:Body><ord:CreateOrderRequest> followed by the tool output, then the closing tags. Most HTTP clients accept this as the POST body with Content-Type: text/xml.
- Step 4POST to the SOAP endpoint — Send the envelope using curl --header 'Content-Type: text/xml' --data @request.xml https://service.example.com/api, or use your HTTP client's raw body mode with text/xml content type.
Frequently asked questions
How are JSON arrays mapped to XML elements?+
By default, each array element becomes a repeated element with the same tag name as the parent JSON key — so { "items": ["a", "b"] } produces <items>a</items><items>b</items>. If the WSDL contract requires a wrapper element containing repeated children, enable the 'wrap arrays' option to produce <Items><Item>a</Item><Item>b</Item></Items>.
Can I emit JSON values as XML attributes instead of child elements?+
Yes. Use the attribute-prefix convention: any JSON key starting with @ (e.g. @id) is emitted as an XML attribute on its parent element rather than as a child element. This is useful for SOAP headers and elements that mix attributes with text content.
Does the JSON payload leave my browser?+
No. Conversion runs entirely client-side using a browser-local XML serializer. API credentials, order data, and any customer information in the JSON are never transmitted to JAD Apps servers.
Privacy first
Conversion runs locally in your browser. No file is uploaded — only metadata counters are saved for signed-in dashboard stats.