I am trying to define a wsdl that is importing an xsd file that is not changeable (customer provided), it in turn is including another file that is unchangeable. The issue I am having is that these xsd files contain no namespace/targetNamespace. I have searched the web for most of the day trying to find a similar situation. I've put together two sample xsds and a wsdl to show the issue.
When I try to validate the wsdl with soapui it is telling me: Could not solve name 'library' from namespace {library.status} to a defined schema element.
It seems I do not know how to pull in schema from without a namespace into the target namespace. I hope someone can give me some advice.
Here is the wsdl:
Here are the two schema files:
SomeSchema.xsd:
and very-simple-2-ns-ppl-nons.xsd:
Any help would be greatly appreciated.
When I try to validate the wsdl with soapui it is telling me: Could not solve name 'library' from namespace {library.status} to a defined schema element.
It seems I do not know how to pull in schema from without a namespace into the target namespace. I hope someone can give me some advice.
Here is the wsdl:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<definitions
targetNamespace="library.status"
xmlns="[URL unfurl="true"]http://schemas.xmlsoap.org/wsdl/"[/URL]
xmlns:soap="[URL unfurl="true"]http://schemas.xmlsoap.org/wsdl/soap/"[/URL]
xmlns:http="[URL unfurl="true"]http://schemas.xmlsoap.org/wsdl/http/"[/URL]
xmlns:xs="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL]
xmlns:soapenc="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/encoding/"[/URL]
xmlns:tns="library.status" >
<xs:schema>
<xs:import schemaLocation="SomeSchema.xsd"/>
</xs:schema>
<message name="RequestLibraryStatus">
<part name="requestLibraryStatus" element="tns:library"/>
</message>
<message name="LibraryStatusReport">
<part name="libStatus" element="xs:string"/>
</message>
<portType name="LibraryStatusPort">
<operation name="ProvideLibraryStatus">
<input message="tns:RequestLibraryStatus"/>
<output message="tns.LibraryStatusReport"/>
</operation>
</portType>
<binding name="LibraryRequestStatusBinding" type="tns:LibraryStatusPort">
<soap:binding style="document" transport="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/http"/>[/URL]
<operation name="ProvideLibraryStatus">
<soap:operation style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="LibraryStatusService">
<port name="LibraryStatusService" binding="tns:LibraryRequestStatusBinding">
<soap:address location="[URL unfurl="true"]http://someplace.com"/>[/URL]
</port>
</service>
</definitions>
Here are the two schema files:
SomeSchema.xsd:
Code:
<?xml version="1.0"?>
<xs:schema xmlns:xs="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL]
elementFormDefault="unqualified">
<xs:include schemaLocation="very-simple-2-ns-ppl-nons.xsd"/>
<xs:element name="library">
<xs:complexType>
<xs:sequence>
<xs:element name="book" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="bookType">
<xs:sequence> <xs:element name="title" type="xs:string"/>
<xs:element name="authors">
<xs:complexType>
<xs:sequence>
<xs:element ref="person"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
</xs:schema>
and very-simple-2-ns-ppl-nons.xsd:
Code:
<?xml version="1.0"?>
<xs:schema xmlns:xs="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] elementFormDefault="qualified">
<xs:element name="person" type="personType"/>
<xs:complexType name="personType">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
</xs:schema>
Any help would be greatly appreciated.