on 03-06-2017 9:47 AM
i have Structure in Wsdl like:
<ns0:Root>
<header>
</A>
</header>
<Body>
</B>
</Body>
<ns0:/Root>
How to generate xsd with namespace.
Regards,
Aditya
Hello Aditya,
You have to set below two parameters in your XSD which will make your XSD fully qualified.
attributeFormDefault="qualified" elementFormDefault="qualified"
XML:
<ns0:Root xmlns:ns0="http://test.com">
<ns0:Header>
<ns0:H1>Hii</ns0:H1>
</ns0:Header>
<ns0:Record>
<ns0:R1>Hello</ns0:R1>
</ns0:Record>
</ns0:Root>
XSD:
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://test.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Root">
<xs:complexType>
<xs:sequence>
<xs:element name="Header">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="H1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Record">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="R1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.