0
votes

I have a SOAP response XML and I need a XSD for that XML. I have tried online conversions, XMLBeans and java but I am not getting an appropiate XSD for my XML. Can anyone tell me how can I do the conversion. The SOAP response XML is below:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
    <ns1:sessionID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="http://ws.polarion.com/session">-1897751301705602409</ns1:sessionID>
</soapenv:Header>
<soapenv:Body>
    <logInResponse xmlns="http://ws.polarion.com/SessionWebService-impl"/>
</soapenv:Body>

</soapenv:Envelope>

1

1 Answers

0
votes

Getting an "appropriate" XSD is something only a human being can do: you need to understand the data model represented by the XML. For example, in your example, the logInResponse element is empty, but only you can decide whether it will always be empty.

If you don't really care about what the validation rules are, but just need a schema for the sake of ticking a box, then you can always use a generic schema that allows anything. Unfortunately though, that's not as easy as it should be, because a strict schema validator insists on the schema having an explicit global element declaration for the outermost element. So the minimal schema is something like

<xs:element name="logInResponse"/>

(in the right targetNamespace, of course).