Jump to content

Namespace In Schema


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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...