Jump to content

padmagvs

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About padmagvs

  • Rank
    Newbie
  1. I am not clear about the <complexcontent> ,<extension> tagslike if i have <prod id="123">abcd</prod>the schema for this complex element is something like this<element name prod><complexType><simplecontent><extension base=string>.......here extension tag is used to describe the body content abcd is stringbut how ever in complex content when we use this tag i couldn't understandsay example in w3schools<xs:element name="employee" type="fullpersoninfo"/><xs:complexType name="personinfo"> <xs:sequence> <xs:element name="firstname" type="xs:string"/> <xs:element name="lastname" type="xs:string"/> </xs:sequence></xs:complexType><xs:complexType name="fullpersoninfo"> <xs:complexContent> <xs:extension base="personinfo"> <xs:sequence> <xs:element name="address" type="xs:string"/> <xs:element name="city" type="xs:string"/> <xs:element name="country" type="xs:string"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>here what extension mean like can i relate this to java inheritance like fullpersoninfo has address ncity,country and alsopersoninfo like firstname,lastname elements also get here, is it somthing like this <xs:complexType name="fullpersoninfo"> <xs:complexContent> <xs:sequence> <xs:element name="address" type="xs:string"/> <xs:element name="city" type="xs:string"/> <xs:element name="country" type="xs:string"/> < xs:element name="firstname" type="xs:string"/> <xs:element name="lastname" type="xs:string"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>am i right please explain
  2. 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
×
×
  • Create New...