Validating XML documents against schemas nested inside wsdl:types - ruby

I have XML files that I need to validate against XSDs that are nested inside a <wsdl:types></wsdl:types> in a WSDL file retrieved from a web service.
Inside the <wsdl:types></wsdl:types> there are several <xs:schema>s. I am using the ruby gem nokogiri to load the XML files and validate them against said XSDs, however, I am getting following error when I run the program:
Element '{http://schemas.xmlsoap.org/soap/envelope/}Envelope': No
matching global declaration available for the validation root.
So far I have extracted out the <xs:schema>s (all 4 of them) and copied them into a schema.xsd file.
Code:
require 'rubygems'
require 'nokogiri'
def validate(document_path, schema_path)
schema = Nokogiri::XML::Schema(File.read(schema_path))
document = Nokogiri::XML(File.read(document_path))
schema.validate(document)
end
validate('data.xml', 'schema.xsd').each do |error|
puts error.message
end
So basically my schema.xsd has multiple <xs:schema>s in there, which I do not think in and of itself is a problem because nokogiri didn't throw errors when I instantiated the schema object.
schema.xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
<xs:element name="anyType" nillable="true" type="xs:anyType"/>
<xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
<!-- data in here -->
</xs:schema>
<!-- three more xs:schema tags removed for brevity -->
data.xml
<?xml version='1.0' ?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header />
<env:Body>
<CreatePerson xmlns="https://person.example.com/">
<oMessageType xmlns:epa="http://schemas.datacontract.org/2004/07/whatever" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:array="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<person:bodyField>
<!-- data in here -->
</person:bodyField>
<!-- more data in here -->
</oMessageType>
</CreatePerson>
</env:Body>
</env:Envelope>

Yes, WSDL not the XSD scheam so you need to extract the schema partial manually or automatic by programming.
Here is the sample code, you need to refactor it and using in your codes.
str = <<EOF
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.examples.com/wsdl/HelloService.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloService" targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
<element name="anyType" nillable="true" type="anyType"/>
<element name="anyURI" nillable="true" type="anyURI"/>
<!-- data in here -->
</schema>
</types>
<message name="SayHelloRequest">
<part name="firstName" type="xsd:string"/>
</message>
<message name="SayHelloResponse">
<part name="greeting" type="xsd:string"/>
</message>
<portType name="Hello_PortType">
<operation name="sayHello">
<input message="tns:SayHelloRequest"/>
<output message="tns:SayHelloResponse"/>
</operation>
</portType>
<binding name="Hello_Binding" type="tns:Hello_PortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sayHello">
<soap:operation soapAction="sayHello"/>
<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:examples:helloservice"/>
</input>
<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:examples:helloservice"/>
</output>
</operation>
</binding>
<service name="Hello_Service">
<documentation>WSDL File for HelloService</documentation>
<port name="Hello_Port" binding="tns:Hello_Binding">
<soap:address location="http://www.examples.com/SayHello/"/>
</port>
</service>
</definitions>
EOF
require 'rubygems'
require 'nokogiri'
doc = Nokogiri::XML(str)
doc.root.children.each do |child|
if child.node_name == 'types'
types = child
# p types.inner_html
xsd_doc = Nokogiri::XML(types.inner_html)
# p xsd_doc.root
xsd = Nokogiri::XML::Schema.from_document xsd_doc.root
end
end

Related

XML Schema 1.0 - qualified versus unqualified: what specifically changes in a valid instance?

Say I have a valid XML instance file ("1") that contains only elements in the targetNamespace of its schema (Schema "A"). The instance is valid per this schema. Instance 1 has the correct namespace declaration for its schema on its (1's) root node, and nowhere else.
Now I take the same instance 1 and try to validate it against Schema "B".
B is identical to A except I changed elementFormDefault="unqualified" to elementFormDefault="qualified".
I am seeing 1 failing to validate against B. Why? What do I need to change in 1 (producing instance "2") to make it valid again against B?
Is the "qualified" flavor of an XML schema just for instances with an explicit namespace prefix on every single element?
Example schemas: All based on a minimal XML structure for communicating some data structures like file/record/info1. Unfortunately these seem to behave differently again from my real-world examples (which are too big to post here).
A: UNqualified schema
<?xml version="1.0" encoding="UTF-8"?>
<!-- The UNqualified version -->
<xs:schema elementFormDefault="unqualified" targetNamespace="http://example.com/xsd-prefixes-test"
xmlns:test="http://example.com/xsd-prefixes-test" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="file">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="test:record" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="record">
<xs:complexType>
<xs:sequence>
<xs:element ref="test:info1" />
<xs:element ref="test:info2" />
</xs:sequence>
<xs:attribute name="id" type="xs:integer" use="required" />
<xs:attribute name="status" type="xs:NCName" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="info1">
<xs:complexType />
</xs:element>
<xs:element name="info2">
<xs:complexType />
</xs:element>
</xs:schema>
B: QUALIFIED schema
<?xml version="1.0" encoding="UTF-8"?>
<!-- The QUALIFIED version -->
<xs:schema elementFormDefault="qualified" targetNamespace="http://example.com/xsd-prefixes-test"
xmlns:test="http://example.com/xsd-prefixes-test" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="file">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="test:record" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="record">
<xs:complexType>
<xs:sequence>
<xs:element ref="test:info1" />
<xs:element ref="test:info2" />
</xs:sequence>
<xs:attribute name="id" type="xs:integer" use="required" />
<xs:attribute name="status" type="xs:NCName" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="info1">
<xs:complexType />
</xs:element>
<xs:element name="info2">
<xs:complexType />
</xs:element>
</xs:schema>
Example schema instances:
Instance 1 - prefixes for the targetNamespace on all elements; validates against both schemas
<?xml version="1.0" encoding="UTF-8"?>
<!-- ALL prefixes -->
<test:file xmlns:test="http://example.com/xsd-prefixes-test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://example.com/xsd-prefixes-test xsd-prefixes-test_qualified.xsd">
<!-- validates against xsd-prefixes-test_UNqualified.xsd AND xsd-prefixes-test_qualified.xsd -->
<test:record id="1" status="ok">
<test:info1 />
<test:info2 />
<!-- etc... -->
</test:record>
<test:record id="1" status="ok">
<test:info1 />
<test:info2 />
<!-- etc... -->
</test:record>
<test:record id="1" status="duplicate_deprecated">
<test:info1 />
<test:info2 />
<!-- etc... -->
</test:record>
</test:file>
Instance 2: - no namespace prefixes anywhere but still validates against A and B!
<?xml version="1.0" encoding="UTF-8"?>
<!-- NO prefixes anywhere -->
<file xmlns="http://example.com/xsd-prefixes-test" xmlns:test="http://example.com/xsd-prefixes-test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://example.com/xsd-prefixes-test xsd-prefixes-test_qualified.xsd">
<!-- validates against BOTH xsd-prefixes-test_UNqualified.xsd AND xsd-prefixes-test_qualified.xsd -->
<record id="1" status="ok">
<info1 />
<info2 />
<!-- etc... -->
</record>
<record id="1" status="ok">
<info1 />
<info2 />
<!-- etc... -->
</record>
<record id="1" status="duplicate_deprecated">
<info1 />
<info2 />
<!-- etc... -->
</record>
</file>
Instance 3 - does not validate against either A or B - why not?
<?xml version="1.0" encoding="UTF-8"?>
<!-- NO prefixes anywhere -->
<test:file xmlns:test="http://example.com/xsd-prefixes-test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://example.com/xsd-prefixes-test xsd-prefixes-test_qualified.xsd">
<!-- validates against NEITHER xsd-prefixes-test_UNqualified.xsd NOR xsd-prefixes-test_qualified.xsd -->
<record id="1" status="ok">
<info1 />
<info2 />
<!-- etc... -->
</record>
<record id="1" status="ok">
<info1 />
<info2 />
<!-- etc... -->
</record>
<record id="1" status="duplicate_deprecated">
<info1 />
<info2 />
<!-- etc... -->
</record>
</test:file>
Error messages (same with both schemas A and B):
Instance 3 - cvc-complex-type.2.4.a: Invalid content was found starting with element 'record'. One of '{"http://example.com/xsd-prefixes-test":record}' is expected.
I am seeing this error or very similar with instance files along the pattern of both 1 and 2, when used with the schema of the "opposite" flavor (an instance with prefixes against a schema with unqualified).
Conversely I am seeing instances of style 3 that do validate against the qualified type schema.
Is there a dependency on what language/parser/validation engine is used?

XSD - validation

My requirement is like, consider the following sample xml
<user key="username" value="Test"/>
<user key="age" value="27"/>
<user key="email" value="my#my.com"/>
In this case all the element having same name, same number of attributes and same attribute names too..
but i need to validate the value attribute according to key. For example here first key is username and its value is a string type, second key is age and its value must be a positive integer and third key is email so the value should be an email address.
is there any way to achieve this.
I have come across similar question many times,
here are my accepted answers to the following post:
Restricting XML Elements Based on Another Element via XSD
XSD: How to validate the XML file according to value of some tag?
You can translate your XML data with a XSL transformation into a form which can be validated with a XSD schema. This does not require any special custom tools.
Your input data:
<?xml version="1.0" encoding="UTF-8"?>
<users>
<user key="username" value="Test"/>
<user key="age" value="27"/>
<user key="email" value="my#my.com"/>
</users>
Can be translated with the following transformation:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/users">
<users>
<xsl:apply-templates/>
</users>
</xsl:template>
<xsl:template match="//user">
<xsl:variable name="key" select="#key"/>
<xsl:variable name="value" select="#value"/>
<xsl:element name="{$key}">
<xsl:value-of select="$value"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
into the following form:
<?xml version="1.0" encoding="UTF-8"?>
<users>
<username>Test</username>
<age>27</age>
<email>my#my.com</email>
</users>
And that can easily be validated with a standard XSD schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="users">
<xs:complexType>
<xs:sequence>
<xs:element name="username" type="xs:string"/>
<xs:element name="age" type="xs:positiveInteger"/>
<xs:element name="email">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value=".+#.+\.[^.]+"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XSD doesn't support this kind of conditional validation. You need to use Schematron.

JAXB2 parsing WSDL containing soap encoded type

I have a problem with jaxb2 in my spring WS.
the Spring ws has to parse a wsdl file (no xsd) containing soap encoded types (Array).What maven plugin can i use to be able to marshall the wsdl file with JAXB2?
Here is the wsdl file:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://xml.cibg.org/irisbox/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:impl="http://xml.cibg.org/irisbox/" xmlns:intf="http://xml.cibg.org/irisbox/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.cibg.org/irisbox/">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="soap-encoding.xsd"/>
<xsd:complexType name="ArrayOf_xsd_anyType">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ExternalIdsResponse">
<xsd:sequence>
<xsd:element name="externalIdsResponse" nillable="true" type="impl:ArrayOf_xsd_anyType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<message name="getExternalIdsRequest">
<part name="organizationCode" type="xsd:string"/>
<part name="externalModuleName" type="xsd:string"/>
<part name="fromDate" type="xsd:dateTime"/>
<part name="toDate" type="xsd:dateTime"/>
</message>
<message name="getExternalIdsResponse">
<part name="getExternalIdsReturn" type="impl:ExternalIdsResponse"/>
</message>
<portType name="ExternalIdsService">
<operation name="getExternalIds" parameterOrder="organizationCode externalModuleName fromDate toDate">
<input name="getExternalIdsRequest" message="impl:getExternalIdsRequest"/>
<output name="getExternalIdsResponse" message="impl:getExternalIdsResponse"/>
</operation>
</portType>
<binding name="ExternalIdsSoapBinding" type="impl:ExternalIdsService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getExternalIds">
<wsdlsoap:operation soapAction=""/>
<input name="getExternalIdsRequest">
<wsdlsoap:body use="encoded" namespace="http://xml.cibg.org/irisbox/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output name="getExternalIdsResponse">
<wsdlsoap:body use="encoded" namespace="http://xml.cibg.org/irisbox/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="ExternalIdsServiceService">
<port name="ExternalIds" binding="impl:ExternalIdsSoapBinding">
<wsdlsoap:address location="http://172.31.50.155:8988/irisbox/anonymous/services/ExternalIds"/>
</port>
</service>
</wsdl:definitions>

How to assign array in a BPEL process

I have a simple string as input and after calling a web service which adds the string to an array.Now i have to assign the array to the output(which i have set as a string array in the schema).The enterprise manager gives a fault and says the result contains multiple nodes for the XPath expression given.The Assign activity is shown as pending.So basically how do i assign an array or a list to the output variable which is also set as an array.The wsdl file used is:
<?xml version = '1.0' encoding = 'UTF-8'?>
<definitions
name="ReturnTypeService"
targetNamespace="http://examples2/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://examples2/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
<types>
<xsd:schema>
<xsd:import namespace="http://examples2/" schemaLocation="http://localhost:7101/Examples2-Examples2-context-root/ReturnTypePort?xsd=1"/>
</xsd:schema>
</types>
<message name="display">
<part name="parameters" element="tns:display"/>
</message>
<message name="displayResponse">
<part name="parameters" element="tns:displayResponse"/>
</message>
<portType name="ReturnType">
<operation name="display">
<input message="tns:display"/>
<output name="displayResponse"
message="tns:displayResponse"/>
</operation>
</portType>
<binding name="ReturnTypePortBinding" type="tns:ReturnType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="display">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="ReturnTypeService">
<port name="ReturnTypePort" binding="tns:ReturnTypePortBinding">
<soap:address location="http://localhost:7101/Examples2-Examples2-context-root/ReturnTypePort"/>
</port>
</service>
</definitions>
#vanto Is there a way to assign an array from input variable to invoke_input variable?The problem is there are multiple inputs in my web service so i am not able to copy the wrapping element in input variable to wrapping variable in invoke variable.Will copy the snippet of the code here :
<assign name="Assign1">
<copy>
<from variable="inputVariable" part="payload"
query="/ns2:process/ns2:dsaName"/>
<to variable="Invoke1_processList_InputVariable"
part="parameters" query="/ns1:processList/dsaName"/>
</copy>
<copy>
<from variable="inputVariable" part="payload"
query="/ns2:process/ns2:linesOfData"/>
<to variable="Invoke1_processList_InputVariable"
part="parameters" query="/ns1:processList/linesOfData"/>
</copy>
<copy>
<from variable="inputVariable" part="payload"
query="/ns2:process/ns2:description"/>
<to variable="Invoke1_processList_InputVariable"
part="parameters" query="/ns1:processList/description"/>
</copy>
<copy>
<from variable="inputVariable" part="payload"
query="/ns2:process/ns2:application"/>
<to variable="Invoke1_processList_InputVariable"
part="parameters" query="/ns1:processList/application"/>
</copy>
</assign>
The problem is only one is of list type all others are of string type.The XML for this is:
<element name="process">
<complexType>
<sequence>
<element name="dsaName" type="string" minOccurs="0"/>
<element name="linesOfData" type="string" minOccurs="0" maxOccurs="unbounded"/>
<element name="description" type="string" minOccurs="0"/>
</sequence>
</complexType>
</element>
<element name="processResponse">
<complexType>
<sequence>
<element name="result" type="string" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
</schema>
A from-spec and to-spec must not select more than one element or attribute. In your case it appears to select all <return> elements in your variable's part (i.e. the items of the array). Try to copy the element that wraps the items (i.e. the ns1:displayResponse element) and copy this element to ns2:processResponse (the wrapping element in the to-variable).
Since both source and target elements seem to be in different namespaces and are of different types, you probably need to run it through an XSLT script (using doXSLTransform) to translate it from the source schema to the target schema.

How to customize the schema inlined inside an imported WSDL

I have a.wsdl & b.wsdl where a.wsdl imports b.wsdl.
Now I have to customize the schema inside b.wsdl using wsimport and JAXB. but using below customization is giving error that "XPath evaluation of "wsdl:definitions/wsdl:types/xsd:schema[#targetNamespace='b']" results in an empty target node
I am not able to find a way to customize the inlined schema in imported b.wsdl when generating the client code using wsimport.
<jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:schema[#targetNamespace='b']"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<jaxb:globalBindings>
<jaxb:javaType name="java.util.Calendar" xmlType="xsd:dateTime"
parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
printMethod="javax.xml.bind.DatatypeConverter.printDateTime" />
</jaxb:globalBindings>
</jaxws:bindings>
A.wsdl
<definitions targetNamespace="a"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:interface="b">
<import location="b.wsdl" namespace="b"/>
<service name="Service">
<port binding="interface:Binding" name="Port">
<soap:address location="https://localhost/sdk/vpxdService" />
</port>
</service>
</definitions>
B.wsdl
<definitions targetNamespace="b"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:b="b"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<types>
<schema
targetNamespace="b"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:b="b"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<complexType name="XYZ">
<sequence>
<element name="dynamicType" type="xsd:string" minOccurs="0" />
<element name="val" type="xsd:anyType" maxOccurs="unbounded" />
</sequence>
</complexType>
</types>
</schema>
</definitions>
After going through given website I modified the external binding file to use wsdlLocation="b.wsdl" instead of node="wsdl:definitions/wsdl:types/xsd:schema[#targetNamespace='b']" which did the magic.
This will make sure that the inline schema defined in WSDL will customized as required.
<bindings
xmlns="http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl"
version="2.0">
<bindings wsdlLocation="b.wsdl">
<globalBindings>
<javaType name="java.util.Calendar" xmlType="xsd:dateTime"
parseMethod="javax.xml.bind.DatatypeConverter.parseDate"
printMethod="javax.xml.bind.DatatypeConverter.printDate"
/>
</globalBindings>
</bindings>
</bindings>
http://fusesource.com/docs/framework/2.1/jaxws/JAXWSCustomTypeMappingOverview.html
Have you tried adding the following attributes to the <jaxws:bindings> element?
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
and
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
You're referencing the xsd and wsdl namespaces in your xpath expression, but until you define the URI's for them, they won't match up with the URI's in the target documents.

Resources