axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <>
Subject RE: namespaces
Date Thu, 14 Oct 2004 12:59:37 GMT
A qname (qualified name) is a name that consists of a namespace prefix (the
characters before the colon) and a local name (the characters after the
colon). For example, in the qname "wsdl:portType", "wsdl" is the namespace
prefix, and "portType" is the local name. A namespace prefix is an
abbreviation for the actual namespace. The prefix must be defined in a
namespace declaration, such as

Hence the true name for wsdl:portType is}portType. 

The purpose of a namespace is to distinguish one XML element from other
elements with the same local name. (You shouldn't give two elements within
the same namespace the same name.)

A namespace is typically created when defining an XML Schema or WSDL
document. For example, a WSDL document starts with:

<wsdl:definitions name="exampleWsdl" targetNamespace="urn:exampleWsdl"
... >

All elements defined within this WSDL document will then belong to the
"urn:exampleWsdl" namespace. 

For documentation about the WSDD file, I suggest you check out 

Here's an example of the beanMapping declaration from the osmoticweb site:

<beanMapping xmlns:ns=""

What you're trying to do here is tell Axis how to map an XML structure to a
Java language type. The qname you specify here identifies the XML structure
that you're trying to map. In this example, The xmlns:ns declaration defines
the namespace that contains the "ArrayOfString" type definition.  

If you have defined an XML type in a schema file, then you need to specify
that type here, and your namespace declaration must reference the
targetNamespace of your schema file. For example:

<beanMapping xmlns:ns1="urn:MyNamespace"


From: Suzy Fynes [] 
Sent: Thursday, October 14, 2004 12:37 PM
Subject: namespaces


Can anyone tell what kind a ns:local is in the <beanMapping qname="ns:local"

I'm not sure how namespaces work exactly, is it something I create myself?


View raw message