on 05-29-2009 9:36 AM
Hello,
I received an .xsd file from a customer and need to import it as an "External Definition" in order to create the "Message Interface". The structure of the xsd looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:px="http://www.opentrans.org/XMLSchema/1.0" targetNamespace="http://www.opentrans.org/XMLSchema/1.0" elementFormDefault="qualified">
<xsd:element name="ORDER">
...
</xsd:element>
<xsd:element name="ADDRESS">
...
</xsd:element>
<xsd:element name="ARTICLE_ID">
...
</xsd:element>
</xsd:schema>
After importing and looking at the tab "Messages" I get numerous entries, for each <xsd:element> I get one message! But I basically only need one "Message" that holds my complete xsd-file.
I tried inserting <xsd:element name="COMPLETEORDER"> right after the <xsd:schema>-Tag but that didn't work either. Somehow I need to sum up all the <xsd:elements>.
Does anyone have an idea? Thank you very much!
Peter
Hi Peter,
What you provided XSD is correct and its valid and weel formed.
you no need to add any element to hold entire XSD,select ORDER element from messages it will hold all mesage in message mapping level.
i sent mail to you with scree shots i hope it will help you.
cheers,
raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for your answers.
At the end of my XSD - file though before </xsd:schema> there is a </xsd:simpleType>.
I saw that after </xsd:simpleType> there cannot be </xsd:sequence>.
So I inserted a dummy element <xsd:element name="dummy" />
</xsd:simpleType>
<xsd:element name="dummy" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
But my document is still not valid. E.g. when I click on the tab "WSDL" it says
<<xsd:schema><xsd:element><xsd:complexType><xsd:sequence><xsd:simpleType>> is not allowed.
But I inserted the dummy-element - that should solve it I thought!
Could you please give me hints again - Thank you very much!
Best regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Prateek Raj Srivastava,
Even after removing it it says
"<xsd:schema><xsd:element><xsd:complexType><xsd:sequence><xsd:simpleType>".
The simpleType restricts the supplier article ID to a length of 50. I think I could do without it but I still get the error message. I will check if anywhere else sequence and simpleType are right next to each other!
Best regards,
Peter
Hello Prateek, Hello everyone,
I now know what the problem is. I downloaded XMLspy and checked on the structure:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:px="http://www.opentrans.org/XMLSchema/1.0" targetNamespace="http://www.opentrans.org/XMLSchema/1.0" elementFormDefault="qualified">
<xsd:element name="ORDER">
...
</xsd:element>
<xsd:element name="ADDRESS">
...
</xsd:element>
<xsd:element name="ARTICLE_ID">
...
</xsd:element>
<xsd:simpleType name="dtBOOLEAN">
...
</xsd:simpleType>
<xsd:simpleType name="dtCOUNTRIES">
...
</xsd:simpleType>
<xsd:element name="SUPPLIER_AID">
...
</xsd:element>
<xsd:simpleType name="typeSUPPLIER_AID">
...
</xsd:simpleType>
</xsd:schema>
Between the long list of <xsd:element> tags there are some simpleTypes on the same
level. Now if I insert
<xsd:element name="COMPLETEORDER">
<xsd:complexType>
<xsd:sequence>
on top, the <xsd:sequence> would be on the same level as the simpleTypes - which is not valid!
But can I just move all the simpleTypes, e.g. into an <xsd:element>??
That would be changing the customer's structure which I think is not a good thing!?
Thank you again for your help! I really appreciate it!
Best regards,
Peter
YOu can refer these sample XSD files and edit your xsd accordingly:
http://msdn.microsoft.com/en-us/library/ms764613(VS.85).aspx
http://www.quantum-simulation.org/schemas/annotated_sample_schema.pdf
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the xsd add the tag like below.
<xsd:complexType name="COMPLETEORDER">
<xsd:sequence>
-
Xsd--
</xsd:sequence>
</xsd:complexType>
You should add this values after schema.
Regards,
Prakasu.M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried inserting <xsd:element name="COMPLETEORDER"> right after the <xsd:schema>-Tag but
that didn't work either. Somehow I need to sum up all the <xsd:elements>.
Some more settings are required.
Open the XSD in some tool (can even use Notepad)....tool because you can check the formatting and it helps build the XSD....like Stylus Studio......
Now create a root element (say CompleteOrder).....now under this declare all the XSD elements that you see as individual (in the present XSD given by client)...it will be a complex as it is having many elements under it....
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried inserting <xsd:element name="COMPLETEORDER">
You did it correct but after <element> you should also add <complexType> and <sequence>. Dont forget to close these tags at the end. I would sugest to use some free tools like Altova or XMLSpy to edit the xsd.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if you have sample XML file check the TOP node in that XML file and the same node will be XSD also. and when u import the XSD u can see all the nodes present in the XSD then just click the TOP node that u have observed in the XSD. hope this will solve u r problem
Thank You,
Madhav
Note: Points If Useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.