|
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).
|
|
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...
|
|
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
|
|
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.
|
|
guest |