Jump to content

Namespace In Schema


jayesh_kadam01
 Share

Recommended Posts

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...