jayesh_kadam01 Posted September 7, 2011 Share Posted September 7, 2011 Hello Experts, I have one xsd which is having structure like Body createResponseResult ID Success Errors Message statuscode. the xsd code is as below. <?xml version="1.0" encoding="UTF-8"?><xs:schema id="Envelope" targetNamespace="http://schemas.xmlsoap.org/soap/envelope/"xmlns:mstns="http://schemas.xmlsoap.org/soap/envelope/"'>http://schemas.xmlsoap.org/soap/envelope/"xmlns:mstns="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xs="http://www.w3.org/2001/XMLSchema"'>http://schemas.xmlsoap.org/soap/envelope/"xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"attributeFormDefault="qualified" elementFormDefault="qualified" xmlns:app1="urn:enterprise.soap.sforce.com"msdata:schemafragmentcount="2"><!-- Generated using Flame-Ware Solutions XML-2-XSD v2.0 athttp://www.flame-ware.com/Products/XML-2-XSD/ --> <xs:import namespace="urn:enterprise.soap.sforce.com" /> <xs:element name="Envelope" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msdata:Prefix="soapenv"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="Body" msdata:Prefix="soapenv"> <xs:complexType> <xs:sequence> <xs:element ref="app1:createResponse" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="result" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="id" type="xs:string" minOccurs="0" /> <xs:element name="success" type="xs:boolean" minOccurs="0" /> <xs:element name="errors" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="message" type="xs:string" minOccurs="0" /> <xs:element name="statusCode" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType></xs:element></xs:choice> </xs:complexType> </xs:element> </xs:schema> Now I want to amend this structure as Body createResponse Result ID Success Errors Message statuscode I am trying to create xsd for this structure but createResponse is associated with namesapace in above xsd code (<xs:element ref="app1:createResponse" />). I want to create createResponse as a node with that namespace but not getting success. here is the code I have created. <?xml version="1.0" encoding="UTF-8"?><xs:schema id="Envelope" targetNamespace="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mstns="http://schemas.xmlsoap.org/soap/envelope/"xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"attributeFormDefault="qualified" elementFormDefault="qualified" xmlns:app1="urn:enterprise.soap.sforce.com" msdata:schemafragmentcount="2"><!-- Generatedusing Flame-Ware Solutions XML-2-XSD v2.0 at http://www.flame-ware.com/Products/XML-2-XSD/ --> <xs:import namespace="urn:enterprise.soap.sforce.com" /> <xs:element name="Envelope" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msdata:Prefix="soapenv"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="Body" msdata:Prefix="soapenv"> <xs:complexType> <xs:sequence> <xs:element name="createResponse"> <xs:complexType> <xs:sequence> <xs:element name="result" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="id" type="xs:string" minOccurs="0" /> <xs:element name="success" type="xs:boolean" minOccurs="0" /> <xs:element name="errors" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="message" type="xs:string" minOccurs="0" /> <xs:element name="statusCode" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType></xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> Experts please help me to acchive this. Regards,Jayesh.9970154802. Link to comment Share on other sites More sharing options...
jayesh_kadam01 Posted September 7, 2011 Author Share Posted September 7, 2011 In current xsd createResponse is a element undetr node Body and ID,Success,Errors are the element under node Result. Now I want to create createResponse as a node and Result as its subnode. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.