Hi!
The scene:

I've a webservice defined in a wsdl. For each port, there is an xsd file defining its type. Ok, now I want to validate this xml against this xsd.
The problem:

My xsd's has no root element. They just define a type of node. for instance:
|
Code:
|
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="..." xmlns:bons0="..." targetNamespace="...">
<xsd:complexType name="MyServiceRequest">
<xsd:sequence>
<xsd:element minOccurs="1" name="MyElement" type="xsd:string">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema> |
but my xml has a root element that is a "MyServiceRequest" node:
|
Code:
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MyService>
<MyElement>my element value</MyElement>
</MyService> |
How can I validate just the "internal" part of the root node against my xsd? or my full xml against the wsdl, if there is a way...
Regards!