title: Error: Validating XML against XSD in JDev 11g
body: <p>I am using JDEV11.1.1.7.0. I am a newbie to Webservices and SOAP. I am building a Web Service from an Existing WSDL.</p>
  
  <p>i.e. I create an XSD and WSDL and then creating a Web Service over it. I am able to test the web service. I am getting the output as required. But, when i validate the XML against the XSD, it has an error.</p>
  
  <p>The XSD is prepared by referring to a very popular blog 
  <a href="http://one-size-doesnt-fit-all.blogspot.in/2008/11/creating-jax-ws-web-services-via-wsdl.html" rel="nofollow noreferrer">http://one-size-doesnt-fit-all.blogspot.in/2008/11/creating-jax-ws-web-services-via-wsdl.html</a></p>
  
  <p><strong>Request XML taken from HTTP Analyzer:</strong></p>
  
  <pre><code>&lt;env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" 
                xmlns:ns1="http://www.sagecomputing.com.au"&gt;  
     &lt;env:Header/&gt;  
     &lt;env:Body&gt;  
        &lt;ns1:formInput&gt;  
           &lt;ns1:inputField1&gt;1&lt;/ns1:inputField1&gt;  
           &lt;ns1:inputField2&gt;Morning&lt;/ns1:inputField2&gt;  
        &lt;/ns1:formInput&gt;  
     &lt;/env:Body&gt;  
  &lt;/env:Envelope&gt; 
  </code></pre>
  
  <p><strong>Response XML taken from HTTP Analyzer:</strong></p>
  
  <pre><code>&lt;?xml version = '1.0' encoding = 'UTF-8'?&gt;  
  &lt;S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"&gt;  
     &lt;S:Body&gt;  
        &lt;formOutput xmlns="http://www.sagecomputing.com.au"&gt;  
           &lt;outputField1&gt;6&lt;/outputField1&gt;  
           &lt;outputField2&gt;Morning: Welcome!&lt;/outputField2&gt;  
           &lt;outputField3&gt;This is your reply&lt;/outputField3&gt;  
        &lt;/formOutput&gt;  
     &lt;/S:Body&gt;  
  &lt;/S:Envelope&gt;
  </code></pre>
  
  <p><strong>XSD:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="windows-1252" ?&gt;  
  &lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"  
    targetNamespace="http://www.sagecomputing.com.au"  
    elementFormDefault="qualified"&gt;  
    &lt;xsd:element name="formInput"&gt;  
      &lt;xsd:complexType&gt;  
        &lt;xsd:sequence&gt;  
          &lt;xsd:element name="inputField1" type="xsd:integer"/&gt;  
        &lt;xsd:element name="inputField2" type="xsd:string"/&gt;  
        &lt;/xsd:sequence&gt;  
      &lt;/xsd:complexType&gt;  
    &lt;/xsd:element&gt;  
    &lt;xsd:element name="formOutput"&gt;  
      &lt;xsd:complexType&gt;  
        &lt;xsd:sequence&gt;  
          &lt;xsd:element name="outputField1" type="xsd:integer"/&gt;  
          &lt;xsd:element name="outputField2" type="xsd:string"/&gt;  
          &lt;xsd:element name="outputField3" type="xsd:string"/&gt;  
        &lt;/xsd:sequence&gt;  
      &lt;/xsd:complexType&gt;  
    &lt;/xsd:element&gt;  
  &lt;/xsd:schema&gt;
  </code></pre>
  
  <p>When the XML is validated against the XSD, I get the below error.</p>
  
  <pre><code>Cvc-elt.1: Cannot Find The Declaration Of Element 'S:Envelope'.. Line '1', Column '63'
  </code></pre>
  
  <p>I compared using Free Online XML Validator Against XSD Schema - <a href="http://www.freeformatter.com/xml-validator-xsd.html" rel="nofollow noreferrer">http://www.freeformatter.com/xml-validator-xsd.html</a></p>
  
  <p>Can someone please tell me, what is the mistake I am doing?</p>
  
  <p>Is there any imports that I am missing?</p>