I made a small web service using JAX-WS. The WSDL file has TYPES element like this.
<types>
<xsd:schema>
<xsd:import namespace="http://ws.poc.mawia/" schemaLocation="http://localhost:777/ws/hello?xsd=1"/>
</xsd:schema>
</types>
The URL for web service is http://localhost:777/ws/hello?wsdl
and XSD is http://localhost:777/ws/hello?xsd=1
.
The XSD Schema file in different location has the data type definitions like this.
...
...
<xs:complexType name="student">
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="0"/>
<xs:element name="rollNo" type="xs:int"/>
</xs:sequence>
</xs:complexType>
...
...
Most of the WSDL files I have seen usually has the complete XSD definitions inside the WSDL file itself but JAX-WS is placing it in a different location.
Is this how it should be? How can I configure JAX-WS to place all XSD definitions in one WSDL file?