IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

how to deal with multiple xsd's in one mapping Options · View
jbhesl
Posted: Friday, July 25, 2014 6:34:39 AM
Rank: Newbie

Joined: 7/24/2014
Posts: 5
Location: NL
Hi there, desperate dutch here!

Something I have been dancing around for several months but it really needs a solution now.

I have an xml file with two (other xml's even more) namespaces.
I can create an xsd of that in XML-Spy, or by simply placing the file in a Mapforce project which then creates it own xsd's.

But when I use these xsd's in Mapforce it simply wont work. Mapforce gives me a warning:
The selected root element of component transsmart-boeking-bymapforce1 is '{http://connect1.transwise.eu/TboxService/}carrierBooking'. But the input file contains the root element '{http://schemas.xmlsoap.org/soap/envelope/}Envelope'. No data will be selected.

I have been trying to manually change the xsd namespace, but i never get it in such a way that all data is shown. I keep getting empty results.

What is the way to handle cases like this?


(Also asked this in the DTD/Schema forum, but maybe its better to solve this issue through Mapforce since Mapforce breaks the original xml in two or more xsd's which I cant use, thats why I am asking this question here).



File Attachment(s):
transsmart-boeking-3024938-4039172.xml (4kb) downloaded 1,279 time(s).
transsmart-boeking-bymapforce1.xsd (7kb) downloaded 1,065 time(s).
transsmart-boeking-bymapforce.xsd (1kb) downloaded 974 time(s).


ultrabeet
Posted: Friday, July 25, 2014 8:40:34 AM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
jbhesl,

In your case, I would probably download the soap envelope schema off the internet and alter the Body element.
By default it is xs:any, but you can change that to reference eg. <xs:element ref="ns1:carrierBooking" minOccurs="0" maxOccurs="unbounded"/>

Although I am using a pretty old version mapforce, so maybe there is an easier way of sorting out your problem in the latest release...
jbhesl
Posted: Friday, July 25, 2014 9:53:29 AM
Rank: Newbie

Joined: 7/24/2014
Posts: 5
Location: NL
ultrabeet wrote:
jbhesl,

In your case, I would probably download the soap envelope schema off the internet and alter the Body element.
By default it is xs:any, but you can change that to reference eg. <xs:element ref="ns1:carrierBooking" minOccurs="0" maxOccurs="unbounded"/>

Although I am using a pretty old version mapforce, so maybe there is an easier way of sorting out your problem in the latest release...


Hi Ultrabeet,

thx for the answer!

what do you mean with 'download the soap envelope schema off the internet and alter the Body element'?
i tried already to extract an xsd from an online service on inet, that gave me two xsd's again.

mapforce didnt eat that either, it said sth about a syntax error ('= is not allowed')
no idea which '=' was meant.

the body element looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://connect1.transwise.eu/TboxService/" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="carrierBooking">
<xs:complexType>
<xs:sequence>
<xs:element name="carrierBookingInfo">
<xs:complexType>
<xs:sequence>
<xs:element name="version" type="xs:decimal"/>
<xs:element name="status" type="xs:string"/>
<xs:element name="description">
<xs:complexType/>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="shipments">
<xs:complexType>
<xs:sequence>
<xs:element name="shipmentInfo">
<xs:complexType>
.. etc

Where exactly should i change what? I tried some but that didnt work.

Thx again for taking the time to answer this!

Btw, I am using mapforce 2012 rel 2 sp1
ultrabeet
Posted: Friday, July 25, 2014 10:54:08 AM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
jbhesl,

XMLspy is pretty powerful tool and you should be able to sort out your errors easily with it.

Try looking at http://www.tutorialspoint.com/soap/soap_body.htm first. It might give you an idea on how the change should look like.
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.