Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 10, 2007 07:50 AM by ngruson
Participant
990 Points
199 Posts
Jan 10, 2007 07:50 AM|LINK
I have a XML file which gives the following error in XMLSpy: Could not validate element 'ik_om_cor:bpm_cancel_order_om'. No type definition was found.
The XML looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?> <clientsystems xmlns="http://schemaserver/schemas/1.0/" xmlns:ik_om_cor="http://schemaserver/schemas/1.0/ik_om_cor" xmlns:ik_dmt="http://schemaserver/schemas/1.0/ik_dmt" xmlns:ik_om_dmt="http://schemaserver/schemas/1.0/ik_om_dmt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemaserver/schemas/1.0/ http://schemaserver/schemas/1.0/schema-cs-commercial_services.xsd" schemaVersion="1.0"> <control_area> <message_type>BPM_CANCEL_ORDER_OM</message_type> <source>GAM</source> <source_send_date>2004-01-14T12:54:00</source_send_date> <user_name>Danny</user_name> <message_id>1234567</message_id> <correlation_id>GAM_CID_28503</correlation_id> </control_area> <data_area> <ik_om_cor:bpm_cancel_order_om> <ik_om_cor:version_number>String</ik_om_cor:version_number> <ik_om_cor:cancel_request> <ik_om_dmt:email_addres_confirmation>.@aa.a</ik_om_dmt:email_addres_confirmation> <ik_om_dmt:order_nr>1000000000</ik_om_dmt:order_nr> <ik_om_dmt:request_date_time>2000-01-01T00:00:00x0Z</ik_om_dmt:request_date_time> <ik_om_dmt:bank_account> <ik_om_dmt:bankaccount_nr>0</ik_om_dmt:bankaccount_nr> <ik_om_dmt:bankaccount_type>B</ik_om_dmt:bankaccount_type> <ik_om_dmt:bankaccountholder_city>String</ik_om_dmt:bankaccountholder_city> <ik_om_dmt:bankaccountholder_name>String</ik_om_dmt:bankaccountholder_name> </ik_om_dmt:bank_account> </ik_om_cor:cancel_request> <ik_om_cor:maintenance_node> <ik_dmt:message_timestamp>2000-01-01T00:00:00x000Z</ik_dmt:message_timestamp> <ik_dmt:order_nr>1000000000</ik_dmt:order_nr> </ik_om_cor:maintenance_node> </ik_om_cor:bpm_cancel_order_om> </data_area> </clientsystems>
The schemas for this XML file look like this:
schema-cs-commercial_services.xsd:
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:cs="http://schemaserver/schemas/1.0/" targetNamespace="http://schemaserver/schemas/1.0/" elementFormDefault="qualified" attributeFormDefault="unqualified"> <include schemaLocation="http://schemaserver/schemas/1.0/schema-cs-control_area.xsd"/> <include schemaLocation="http://schemaserver/schemas/1.0/schema-cs-data_area.xsd"/> <include schemaLocation="http://schemaserver/schemas/1.0/schema-cs-error_area.xsd"/> <include schemaLocation="http://schemaserver/schemas/1.0/schema-cs-attachment_area.xsd"/> <!-- klantsystemen --> <element name="clientsystems"> <annotation> <documentation>Schemaset version 1.0.16.1</documentation> </annotation> <complexType> <sequence> <element ref="cs:control_area"/> <element ref="cs:data_area"/> <element ref="cs:error_area" minOccurs="0"/> <element ref="cs:attachment_area" minOccurs="0"/> </sequence> <attribute name="schemaVersion" type="string" default="1.0"/> </complexType> </element> </schema>
schema-cs-data_area.xsd:
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ik_om_cor="http://schemaserver/schemas/1.0/ik_om_cor" xmlns:ik_om_coa="http://schemaserver/schemas/1.0/ik_om_coa" targetNamespace="http://schemaserver/schemas/1.0/" elementFormDefault="qualified" attributeFormDefault="unqualified"> <import namespace="http://schemaserver/schemas/1.0/ik_om_cor" schemaLocation="bpm_cancel_order_om.xsd"/> <import namespace="http://schemaserver/schemas/1.0/ik_om_coa" schemaLocation="bpm_cancel_order_om_answer.xsd"/> <!-- data_area--> <element name="data_area"> <complexType> <choice minOccurs="0"> <element ref="ik_om_cor:bpm_cancel_order_om"/> <element ref="ik_om_coa:bpm_cancel_order_om_answer"/> </choice> </complexType> </element> </schema>
bpm_cancel_order_om.xsd:
<?xml version="1.0" encoding="ISO-8859-1"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ik_om_cor="http://schemaserver/schemas/1.0/ik_om_cor" xmlns:ik_om_dmt="http://schemaserver/schemas/1.0/ik_om_dmt" xmlns:ik_dmt="http://schemaserver/schemas/1.0/ik_dmt" targetNamespace="http://schemaserver/schemas/1.0/ik_om_cor" elementFormDefault="qualified" attributeFormDefault="qualified" version="1.0"> <xs:import namespace="http://schemaserver/schemas/1.0/ik_dmt" schemaLocation="INET_DOMAIN_TYPES.xsd"/> <xs:import namespace="http://schemaserver/schemas/1.0/ik_om_dmt" schemaLocation="bpm_domain_types_om.xsd"/> <xs:element name="bpm_cancel_order_om" type="ik_om_cor:bpm_cancel_order_om"/> <xs:complexType name="bpm_cancel_order_om"> <xs:sequence> <xs:element name="version_number" type="ik_dmt:Version_Number"> </xs:element> <xs:element name="cancel_request" type="ik_om_dmt:Cancel_Request"/> <xs:element name="maintenance_node" type="ik_dmt:Maintenance_Node"/> </xs:sequence> </xs:complexType> </xs:schema>
When I make an XML with data_area as root node, it validates ok. When I have clientsystems as root node, it does not. The following XML validates fine:
<?xml version="1.0" encoding="UTF-8"?> <data_area xmlns="http://schemaserver/schemas/1.0/" xmlns:ik_om_coa="http://schemaserver/schemas/1.0/ik_om_coa" xmlns:ik_om_cor="http://schemaserver/schemas/1.0/ik_om_cor" xmlns:ik_dmt="http://schemaserver/schemas/1.0/ik_dmt" xmlns:ik_om_dmt="http://schemaserver/schemas/1.0/ik_om_dmt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemaserver/schemas/1.0/ http://schemaserver/schemas/1.0/schema-cs-data_area.xsd"> <ik_om_cor:bpm_cancel_order_om> <ik_om_cor:version_number>String</ik_om_cor:version_number> <ik_om_cor:cancel_request> <ik_om_dmt:email_addres_confirmation>.@aa.a</ik_om_dmt:email_addres_confirmation> <ik_om_dmt:order_nr>1000000000</ik_om_dmt:order_nr> <ik_om_dmt:request_date_time>2000-01-01T00:00:00x0Z</ik_om_dmt:request_date_time> <ik_om_dmt:bank_account> <ik_om_dmt:bankaccount_nr>0</ik_om_dmt:bankaccount_nr> <ik_om_dmt:bankaccount_type>B</ik_om_dmt:bankaccount_type> <ik_om_dmt:bankaccountholder_city>String</ik_om_dmt:bankaccountholder_city> <ik_om_dmt:bankaccountholder_name>String</ik_om_dmt:bankaccountholder_name> </ik_om_dmt:bank_account> </ik_om_cor:cancel_request> <ik_om_cor:maintenance_node> <ik_dmt:message_timestamp>2000-01-01T00:00:00x000Z</ik_dmt:message_timestamp> <ik_dmt:order_nr>1000000000</ik_dmt:order_nr> </ik_om_cor:maintenance_node> </ik_om_cor:bpm_cancel_order_om> </data_area>
Can anyone tell me what's the problem here?
Greets,
Nils Gruson
ngruson
Participant
990 Points
199 Posts
No type definition was found
Jan 10, 2007 07:50 AM|LINK
I have a XML file which gives the following error in XMLSpy: Could not validate element 'ik_om_cor:bpm_cancel_order_om'. No type definition was found.
The XML looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<clientsystems xmlns="http://schemaserver/schemas/1.0/" xmlns:ik_om_cor="http://schemaserver/schemas/1.0/ik_om_cor" xmlns:ik_dmt="http://schemaserver/schemas/1.0/ik_dmt" xmlns:ik_om_dmt="http://schemaserver/schemas/1.0/ik_om_dmt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemaserver/schemas/1.0/ http://schemaserver/schemas/1.0/schema-cs-commercial_services.xsd" schemaVersion="1.0">
<control_area>
<message_type>BPM_CANCEL_ORDER_OM</message_type>
<source>GAM</source>
<source_send_date>2004-01-14T12:54:00</source_send_date>
<user_name>Danny</user_name>
<message_id>1234567</message_id>
<correlation_id>GAM_CID_28503</correlation_id>
</control_area>
<data_area>
<ik_om_cor:bpm_cancel_order_om>
<ik_om_cor:version_number>String</ik_om_cor:version_number>
<ik_om_cor:cancel_request>
<ik_om_dmt:email_addres_confirmation>.@aa.a</ik_om_dmt:email_addres_confirmation>
<ik_om_dmt:order_nr>1000000000</ik_om_dmt:order_nr>
<ik_om_dmt:request_date_time>2000-01-01T00:00:00x0Z</ik_om_dmt:request_date_time>
<ik_om_dmt:bank_account>
<ik_om_dmt:bankaccount_nr>0</ik_om_dmt:bankaccount_nr>
<ik_om_dmt:bankaccount_type>B</ik_om_dmt:bankaccount_type>
<ik_om_dmt:bankaccountholder_city>String</ik_om_dmt:bankaccountholder_city>
<ik_om_dmt:bankaccountholder_name>String</ik_om_dmt:bankaccountholder_name>
</ik_om_dmt:bank_account>
</ik_om_cor:cancel_request>
<ik_om_cor:maintenance_node>
<ik_dmt:message_timestamp>2000-01-01T00:00:00x000Z</ik_dmt:message_timestamp>
<ik_dmt:order_nr>1000000000</ik_dmt:order_nr>
</ik_om_cor:maintenance_node>
</ik_om_cor:bpm_cancel_order_om>
</data_area>
</clientsystems>
The schemas for this XML file look like this:
schema-cs-commercial_services.xsd:
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:cs="http://schemaserver/schemas/1.0/" targetNamespace="http://schemaserver/schemas/1.0/" elementFormDefault="qualified" attributeFormDefault="unqualified">
<include schemaLocation="http://schemaserver/schemas/1.0/schema-cs-control_area.xsd"/>
<include schemaLocation="http://schemaserver/schemas/1.0/schema-cs-data_area.xsd"/>
<include schemaLocation="http://schemaserver/schemas/1.0/schema-cs-error_area.xsd"/>
<include schemaLocation="http://schemaserver/schemas/1.0/schema-cs-attachment_area.xsd"/>
<!-- klantsystemen -->
<element name="clientsystems">
<annotation>
<documentation>Schemaset version 1.0.16.1</documentation>
</annotation>
<complexType>
<sequence>
<element ref="cs:control_area"/>
<element ref="cs:data_area"/>
<element ref="cs:error_area" minOccurs="0"/>
<element ref="cs:attachment_area" minOccurs="0"/>
</sequence>
<attribute name="schemaVersion" type="string" default="1.0"/>
</complexType>
</element>
</schema>
schema-cs-data_area.xsd:
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ik_om_cor="http://schemaserver/schemas/1.0/ik_om_cor" xmlns:ik_om_coa="http://schemaserver/schemas/1.0/ik_om_coa" targetNamespace="http://schemaserver/schemas/1.0/" elementFormDefault="qualified" attributeFormDefault="unqualified">
<import namespace="http://schemaserver/schemas/1.0/ik_om_cor" schemaLocation="bpm_cancel_order_om.xsd"/>
<import namespace="http://schemaserver/schemas/1.0/ik_om_coa" schemaLocation="bpm_cancel_order_om_answer.xsd"/>
<!-- data_area-->
<element name="data_area">
<complexType>
<choice minOccurs="0">
<element ref="ik_om_cor:bpm_cancel_order_om"/>
<element ref="ik_om_coa:bpm_cancel_order_om_answer"/>
</choice>
</complexType>
</element>
</schema>
bpm_cancel_order_om.xsd:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ik_om_cor="http://schemaserver/schemas/1.0/ik_om_cor" xmlns:ik_om_dmt="http://schemaserver/schemas/1.0/ik_om_dmt" xmlns:ik_dmt="http://schemaserver/schemas/1.0/ik_dmt" targetNamespace="http://schemaserver/schemas/1.0/ik_om_cor" elementFormDefault="qualified" attributeFormDefault="qualified" version="1.0">
<xs:import namespace="http://schemaserver/schemas/1.0/ik_dmt" schemaLocation="INET_DOMAIN_TYPES.xsd"/>
<xs:import namespace="http://schemaserver/schemas/1.0/ik_om_dmt" schemaLocation="bpm_domain_types_om.xsd"/>
<xs:element name="bpm_cancel_order_om" type="ik_om_cor:bpm_cancel_order_om"/>
<xs:complexType name="bpm_cancel_order_om">
<xs:sequence>
<xs:element name="version_number" type="ik_dmt:Version_Number">
</xs:element>
<xs:element name="cancel_request" type="ik_om_dmt:Cancel_Request"/>
<xs:element name="maintenance_node" type="ik_dmt:Maintenance_Node"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
When I make an XML with data_area as root node, it validates ok. When I have clientsystems as root node, it does not. The following XML validates fine:
<?xml version="1.0" encoding="UTF-8"?>
<data_area xmlns="http://schemaserver/schemas/1.0/" xmlns:ik_om_coa="http://schemaserver/schemas/1.0/ik_om_coa" xmlns:ik_om_cor="http://schemaserver/schemas/1.0/ik_om_cor" xmlns:ik_dmt="http://schemaserver/schemas/1.0/ik_dmt" xmlns:ik_om_dmt="http://schemaserver/schemas/1.0/ik_om_dmt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemaserver/schemas/1.0/
http://schemaserver/schemas/1.0/schema-cs-data_area.xsd">
<ik_om_cor:bpm_cancel_order_om>
<ik_om_cor:version_number>String</ik_om_cor:version_number>
<ik_om_cor:cancel_request>
<ik_om_dmt:email_addres_confirmation>.@aa.a</ik_om_dmt:email_addres_confirmation>
<ik_om_dmt:order_nr>1000000000</ik_om_dmt:order_nr>
<ik_om_dmt:request_date_time>2000-01-01T00:00:00x0Z</ik_om_dmt:request_date_time>
<ik_om_dmt:bank_account>
<ik_om_dmt:bankaccount_nr>0</ik_om_dmt:bankaccount_nr>
<ik_om_dmt:bankaccount_type>B</ik_om_dmt:bankaccount_type>
<ik_om_dmt:bankaccountholder_city>String</ik_om_dmt:bankaccountholder_city>
<ik_om_dmt:bankaccountholder_name>String</ik_om_dmt:bankaccountholder_name>
</ik_om_dmt:bank_account>
</ik_om_cor:cancel_request>
<ik_om_cor:maintenance_node>
<ik_dmt:message_timestamp>2000-01-01T00:00:00x000Z</ik_dmt:message_timestamp>
<ik_dmt:order_nr>1000000000</ik_dmt:order_nr>
</ik_om_cor:maintenance_node>
</ik_om_cor:bpm_cancel_order_om>
</data_area>
Can anyone tell me what's the problem here?
Greets,
Nils Gruson
Microsoft .NET Consultant (MCPD)
Logica
You don't have to be sick to get better.
Please remember to click “Mark as Answer” on the post that helped you keep your job.