I am using JDEV11.1.1.7.0. I am new to Webservices and SOAP. I am creating a web service from an existing WSDL.
i.e. I create XSD and WSDL and then create a web service above it. I can check the web service. I get the result as needed. But, when I check the XML on XSD, it has an error.
XSD prepared by citing the very popular blog
http://one-size-doesnt-fit-all.blogspot.in/2008/11/creating-jax-ws-web-services-via-wsdl.html
XML request taken from an HTTP parser:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:ns1="http://www.sagecomputing.com.au">
<env:Header/>
<env:Body>
<ns1:formInput>
<ns1:inputField1>1</ns1:inputField1>
<ns1:inputField2>Morning</ns1:inputField2>
</ns1:formInput>
</env:Body>
</env:Envelope>
XML response taken from HTTP parser:
<?xml version = '1.0' encoding = 'UTF-8'?>
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
<S:Body>
<formOutput xmlns="http://www.sagecomputing.com.au">
<outputField1>6</outputField1>
<outputField2>Morning: Welcome!</outputField2>
<outputField3>This is your reply</outputField3>
</formOutput>
</S:Body>
</S:Envelope>
XSD:
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.sagecomputing.com.au"
elementFormDefault="qualified">
<xsd:element name="formInput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="inputField1" type="xsd:integer"/>
<xsd:element name="inputField2" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="formOutput">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="outputField1" type="xsd:integer"/>
<xsd:element name="outputField2" type="xsd:string"/>
<xsd:element name="outputField3" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
When XML is checked on XSD, I get the following error.
Cvc-elt.1: Cannot Find The Declaration Of Element 'S:Envelope'.. Line '1', Column '63'
I have compared using Free Online XML Validator versus XSD schema - http://www.freeformatter.com/xml-validator-xsd.html
-, , , ?
- , ?