Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » WSDL XSD and XML Catalog
WSDL XSD and XML Catalog [message #229641] Wed, 25 March 2009 19:28 Go to next message
Richard is currently offline RichardFriend
Messages: 1
Registered: July 2009
Junior Member
Hi,

I am trying to use XML catalogs with WSDL to resolve a schema. The xml
editor is resolving the schema and giving me code completion but the WSDL
validator is not resolving the schema and showing errors.

Catalog and schema are in same directory,

Can anyone point me in the right direction?

Thanks

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/Test/">
<xsd:element name="NewOperation">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="NewOperationResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions name="Test"
targetNamespace="http://www.example.org/TestService/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:types="http://www.example.org/Test/"
xmlns:tns="http://www.example.org/TestService/"
>

<wsdl:types>
<!--
<xsd:schema targetNamespace="http://www.example.org/Test/">
<xsd:include schemaLocation="../main/resources/Test.xsd" />
</xsd:schema>
-->
<xsd:schema targetNamespace="http://www.example.org/Test/">
<xsd:include schemaLocation="http://www.example.org/Test/" />
</xsd:schema>
</wsdl:types>

<wsdl:message name="NewOperationRequest">
<wsdl:part element="types:NewOperation" name="parameters" />
</wsdl:message>

<wsdl:message name="NewOperationResponse">
<wsdl:part element="types:NewOperationResponse" name="parameters" />
</wsdl:message>

<wsdl:portType name="Test">
<wsdl:operation name="NewOperation">
<wsdl:input message="tns:NewOperationRequest" />
<wsdl:output message="tns:NewOperationResponse" />
</wsdl:operation>
</wsdl:portType>

<wsdl:binding name="TestSOAP" type="tns:Test">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="NewOperation">
<soap:operation
soapAction="http://www.example.org/Test/NewOperation" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>

<wsdl:service name="Test">
<wsdl:port binding="tns:TestSOAP" name="TestSOAP">
<soap:address location="http://www.example.org/" />
</wsdl:port>
</wsdl:service>

</wsdl:definitions>

<!DOCTYPE catalog
PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"

" http://www.oasis-open.org/committees/entity/release/1.0/cata log.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
prefer="public">

<public publicId="http://www.example.org/Test/" uri="./Test.xsd"/>

</catalog>
Re: WSDL XSD and XML Catalog [message #229870 is a reply to message #229641] Mon, 30 March 2009 20:26 Go to previous message
Lawrence Mandel is currently offline Lawrence MandelFriend
Messages: 486
Registered: July 2009
Senior Member
First off, the fact that you're getting different behaviour from the XML
editor and WSDL validator makes me think there's at least a problem with
the consistency of these tools.

There is one issue that sticks out to me in your example. As I recall, a
schemaLocation is treated by the tools as a reference to a system
location. In your catalog entry you've specified the location as a
publicId, which corresponds with a namespace. Try changing the catalog
entry to use a systemId instead and see if the WSDL validator can locate
the schema in this case.

Lawrence
Previous Topic:Javascript libs not resolved
Next Topic:Facet version not detected correctly
Goto Forum:
  


Current Time: Tue Mar 19 11:08:17 GMT 2024

Powered by FUDForum. Page generated in 0.03118 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top