cancel
Showing results for 
Search instead for 
Did you mean: 

"Messages" problem after importing .xsd file as external definition

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello Raj,

thank you very much for your screenshots! I tried it again and it worked. I am not sure what I had done wrong before. Thanks a lot to everyone who helped and sorry for the trouble!

Best regards,

Peter

Answers (6)

Answers (6)

Former Member
0 Kudos

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

former_member200962
Active Contributor
0 Kudos

Sorry

prateek
Active Contributor
0 Kudos

Dummy shouldn't be added. What is the use od that simpleType there? If not required, try removing it.

Regards,

Prateek

Former Member
0 Kudos

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

prateek
Active Contributor
0 Kudos

Paste your XSD structure and I will look into it.

Regards,

Prateek

Former Member
0 Kudos

Hello Prateek,

I can't because it exceeds the maximum length of 15000 characters!

Thank you though for your help.

Best regards,

Peter

Former Member
0 Kudos

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

rajasekhar_reddy14
Active Contributor
0 Kudos

This message was moderated.

former_member181962
Active Contributor
0 Kudos
Former Member
0 Kudos

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

prateek
Active Contributor
0 Kudos

Prakasu, after the schema tag, there should be element tag with the rootnode name.

Directly adding complexType would make it suitable only for datatype not for External Definition.

Regards,

Prateek

former_member200962
Active Contributor
0 Kudos
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.

prateek
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Sorry, this doesn't work because the TOP node is <xsd:schema>.

There is no TOP <xsd:element> which would become my message in the "Messages" tab.

Best regards,

Peter