How to POST a XSD request in my body - Getting error 415

Hi,

I’m new here and I’m trying to send a POST request that has an XSD request.
The XSD request that I put in the Body (raw - XML(text/xml)) looks like that:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version=“1.0” xmlns:xs=“http://www.w3.org/2001/XMLSchema”>

  • <xs:schema version=“1.0” xmlns:xs=“http://www.w3.org/2001/XMLSchema”>*
  • <xs:complexType name=“createSrFolderRequestBean”>*
  •    <xs:sequence>*
    
  •        <xs:element name="Folder name" type="xs:string"/>*
    
  •        <xs:element name="Parent folder name" type="xs:long"/>*
    
  •    </xs:sequence>*
    
  • </xs:complexType>*
    </xs:schema>

What I see in all the tutorials is that the body use “soapenv:...” instead of “xs:...”.
I don’t find a single example in the Internet where the body uses “xs:...”.

GETs are working fine.

Could you please help me with this??
Thanks!!

Hi @Cris.Crisss! Been a while since I last worked with XSD… :sweat_smile: Could you provide a little more info about what is going wrong when you try running the request? One thing that might be worth checking is what header is actually being sent - I believe Postman will default to sending “application/xml” rather than “text/xml” although you can override that by deselecting the automated header and adding a new one manually.

Thank you very much, SueSmith!!

I just made it work! One just need to conver the XSD (XML Schema Definitio) to an XML with, for example “http://xsd2xml.com” and all works then great!

Thanks a lot for reading me!!
Regards,
Cris.

1 Like