OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   SOAP and XML Schema validation?

[ Lists Home | Date Index | Thread Index ]
  • From: David Orchard <orchard@pacificspirit.com>
  • To: xml-dev@xml.org
  • Date: Mon, 14 Aug 2000 15:07:10 -0700

Apologies if this question has been answered before, an answer by reference
would be as good as by value :-)

My question is about the use of Schema validation of multiple namespaces, in
particular SOAP content on a server.  I'm trying to create an extension on
the SOAP Body element for my particular schema.  Problem is, using
base="tns:Body" for the complexType I'm creating doesn't seem to work.

I have created an schema for the getLastTradePrice SOAP example, and I want
to extend the SOAP Body to specify my content.

I tweaked the SOAP schema at http://schemas.xmlsoap.org/soap/envelope/ so
that it would work in xmlspy, particularly: 1) change uri-reference to
uriReference; 2) removed the default value for mustUnderstand

The schema I created is:

<schema targetNamespace="Some-URI"
	xmlns="http://www.w3.org/1999/XMLSchema"
	xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:m="Some-URI">

	<import schemaLocation="../SOAPSchema.xsd"
namespace="http://schemas.xmlsoap.org/soap/envelope/"/>

	<element name="GetLastTradePrice" type="m:GetLastTradePriceType"/>

	<complexType name="GetLastTradePriceType" derivedBy="extension"
base="tns:Body" >
		<element name="symbol" type="string"/>
	</complexType>

</schema>

XML Spy says undefined value for 'base' encountered, yet tns:Body sure is
defined.

My guess - to no surprise - is that it's a namespace issue, and I've missed
some declaration.  I think that the import of the SOAP schema should keep
the  full Qname for the soap elements and attributes.  I tried removing the
import/namespace attribute, removing the xmlns:tns attribute, and adding an
xmlns:tns attribute to the complexType declaration.

My 2nd guess is that it's a bug in xmlspy.

Any help?

Dave Orchard
XML Architect
Jamcracker, Inc.
935 Stewart Dr.
Sunnyvale, CA 94086
p: 408.830.1886
f: 408.328.0936

Named to Red Herring's list of 100 Most Important Companies:
www.redherring.com/mag/issue79/herring100/jamcracker.html

Named to Fortune's list of Cool Companies 2000:
http://www.fortune.com/fortune/cool/coo.html





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS