File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Namespace based element identification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Namespace based element identification" Watch "Namespace based element identification" New topic

Namespace based element identification

Kingsly Theodar

Joined: Feb 21, 2004
Posts: 19
In the below XML, which one is tns:MyMessage? Is it the blue one or green one? The red ones refers the blue one or green one? I think it refers to the green one always, since that is within the XSD:schema element. If that is the case, then how do we refer to the Blue MyMessage from the Red colored references? Please clarify.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap=""
xmlns:xsd="" name="WhatSoEver"
<xsd:schema xmlns="urn:xmlns:mynamespace"

<xsd:import namespace="urn:xmlns:mynamespace"

<xsd:element name="MyMessage" type="MyMessageType" />


<wsdl:message name="MyMessage">
<wsdl:part element="tns:MyMessage" name="parameters" />
<wsdl:portType name="WhatSoEver">
<wsdl:operation name="MyMessage">
<wsdl:input message="tns:MyMessage" />


I agree. Here's the link:
subject: Namespace based element identification
It's not a secret anymore!