padmagvs 0 Report post Posted March 10, 2008 I have a wsdl something like this<?xml version="1.0" ?><definitions targetNamespace="http://abc.com/namespace/wsif/samples/abc" xmlns:tns="http://abc.com/namespace/wsif/samples/abc" xmlns:typens="urn:xml-soap-address-demo" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <!-- type defs --> <types> <xsd:schema xmlns="urn:xml-soap-address-demo" targetNamespace="urn:xml-soap-address-demo" elementFormDefault="qualified"> <xsd:complexType name="phone"> <xsd:element name="areaCode" type="xsd:int"/> <xsd:element name="exchange" type="xsd:string"/> <xsd:element name="number" type="xsd:string"/> </xsd:complexType> <xsd:complexType name="address"> <xsd:element name="streetNum" type="xsd:int"/> <xsd:element name="streetName" type="xsd:string"/> <xsd:element name="city" type="xsd:string"/> <xsd:element name="state" type="xsd:string"/> <xsd:element name="zip" type="xsd:int"/> <xsd:element name="phoneNumber" type="typens:phone"/> </xsd:complexType> </xsd:schema> </types>.......</definitions>My doubt is as elements declared in schema are in default name space is below delartion valid<xsd:element name="phoneNumber" type="phone"/> instead of<xsd:element name="phoneNumber" type="typens:phone"/>Can any one please confirm me ?Can we declare names spaces again (here declared in schema) apart from the one declared in root element here <definition> element Quote Share this post Link to post Share on other sites
boen_robot 105 Report post Posted March 10, 2008 That's an interesting question. And one that I have yet to answer myself. But I believe non-qualified names are associated with the target namespace. In your case, this is "urn:xml-soap-address-demo" which is the same as the typens URI, so I think that, yes, they are both possible and have the same effect. Quote Share this post Link to post Share on other sites