By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,376 Members | 1,581 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,376 IT Pros & Developers. It's quick & easy.

Validating Soap Envelope

P: n/a

I have a big Problem with validating a Soap Envelope. I have
downloaded the xsd for a soap envelope from

The validation succeeds as lonng as i don't use elements in body with
a xsi:type attribute!

The Problem is that foo:person is an abstract type and foo:driver is
dervived from it. So using a foo:person is not allowed until specifing
the type of person per xsi:type. The below example demonstrates this
problem. When i try to validate this with the saxonica validator
following error occurs

Validation error on line 6 column 60 of test xml:
Unknown type {foo:driver} specified in xsi:type attribute SAXON from Saxonica validate complete

The definition of of sopa body says

<xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"

So when elements from other namespacas are found, try to find a schema
defintion otherwise don't care

In my example there is no schema defintion for "foo:driver" because
the soap schema can not know about the schema where "foo:driver" is
defined! I have no possibility at this stage of validation to include
the schema defintion for those types. I need the xsi:type attribute
coz the sopa body elements will be validatet at later stage. Dont
specfifing the xsi:type attribute whill pass the soap envelope
validation but not thr later body elements validation! How can i solve

My Sample Soap Request

<env:Envelope xmlns:env=""
xmlns:enc="" xmlns:xs="http://" xmlns:xsi="
<foo:person xmlns:foo="http://foo" xsi:type="foo:driver">

Oct 14 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.