jbhesl |
Newbie |
|
NL |
|
|
None Specified |
|
Thursday, July 24, 2014 |
Friday, July 25, 2014 11:46:52 AM |
5 [0.03% of all post / 0.00 posts per day] |
|
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
|
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).
|
vlad wrote:Why so complicated? Why don't you take this file itself and give it to MapForce directly - it will create a schema for you automatically. xcuse me, i closed too early.
problem is that the second xsd doesnt work, errors show up. about envelop names etc.
when i change them in a way it is accepted, i am getting an empty result.
|
vlad wrote:Why so complicated? Why don't you take this file itself and give it to MapForce directly - it will create a schema for you automatically. Thats what I always do indeed, and usually that works great. But with this file I file I gte two xsd's: an almost empty one, and the one with the tags etc.
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:import namespace="http://connect1.transwise.eu/TboxService/" schemaLocation="transsmart-boeking-bymapforce1.xsd"/> <xs:import namespace="http://schemas.xmlsoap.org/soap/envelope/"/> </xs:schema>
and
<?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> <xs:sequence> <xs:element name="customerId" type="xs:string"/> <xs:element name="costcenter"> <xs:complexType/> </xs:element> <xs:element name="carrier" type="xs:string"/> <xs:element name="executingCarrier" type="xs:string"/> <xs:element name="reference" type="xs:string"/> <xs:element name="awb" type="xs:byte"/> <xs:element name="description"> <xs:complexType/> </xs:element> <xs:element name="instruction" type="xs:string"/> <xs:element name="value" type="xs:string"/> <xs:element name="valueCurrency" type="xs:string"/> <xs:element name="pickupDate" type="xs:string"/> <xs:element name="pickupTime" type="xs:int"/> <xs:element name="pickupTimeTo" type="xs:int"/> <xs:element name="requestedDeliveryDate" type="xs:int"/> <xs:element name="requestedDeliveryTime" type="xs:int"/> <xs:element name="requestedDeliveryTimeTo" type="xs:int"/> <xs:element name="plannedDeliveryDate" type="xs:int"/> <xs:element name="plannedDeliveryTime" type="xs:int"/> <xs:element name="service" type="xs:string"/> <xs:element name="serviceLevelTime" type="xs:string"/> <xs:element name="serviceLevelOther"> <xs:complexType/> </xs:element> <xs:element name="incoterms" type="xs:string"/> <xs:element name="inbound" type="xs:byte"/> <xs:element name="noOfPackages" type="xs:byte"/> <xs:element name="weight" type="xs:string"/> <xs:element name="weightUom" type="xs:string"/> <xs:element name="price" type="xs:decimal"/> <xs:element name="salesPrice"> <xs:complexType/> </xs:element> <xs:element name="currency" type="xs:string"/> <xs:element name="trackingUrl"> <xs:complexType/> </xs:element> <xs:element name="shipmentStatusCode" type="xs:string"/> <xs:element name="additionalReferences"> <xs:complexType/> </xs:element> <xs:element name="shipmentLines"> <xs:complexType> <xs:sequence> <xs:element name="shipmentLine"> <xs:complexType> <xs:sequence> <xs:element name="sequence" type="xs:byte"/> <xs:element name="lineNo" type="xs:byte"/> <xs:element name="shipmentLineId"> <xs:complexType/> </xs:element> <xs:element name="awb" type="xs:int"/> <xs:element name="packageType" type="xs:string"/> <xs:element name="description" type="xs:string"/> <xs:element name="quantity" type="xs:byte"/> <xs:element name="genericStatusCode" type="xs:string"/> <xs:element name="carrierStatusCode"> <xs:complexType/> </xs:element> <xs:element name="carrierStatusDescription"> <xs:complexType/> </xs:element> <xs:element name="acceptedBy"> <xs:complexType/> </xs:element> <xs:element name="measurements"> <xs:complexType> <xs:sequence> <xs:element name="length" type="xs:decimal"/> <xs:element name="width" type="xs:decimal"/> <xs:element name="height" type="xs:decimal"/> <xs:element name="weight" type="xs:decimal"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="addresses"> <xs:complexType> <xs:sequence> <xs:element name="address" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="type" type="xs:string"/> <xs:element name="name" type="xs:string"/> <xs:element name="street1" type="xs:string"/> <xs:element name="street2"> <xs:complexType/> </xs:element> <xs:element name="city" type="xs:string"/> <xs:element name="zipCode" type="xs:string"/> <xs:element name="state"> <xs:complexType/> </xs:element> <xs:element name="countryCode" type="xs:string"/> <xs:element name="contact" type="xs:string"/> <xs:element name="telNo" type="xs:string"/> <xs:element name="faxNo"> <xs:complexType/> </xs:element> <xs:element name="email" type="xs:string"/> <xs:element name="accountNo" type="xs:string"/> <xs:element name="VATNumber"> <xs:complexType/> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
|
Hi all!
I am not experienced in xml-issues. o maybe this is a simple question. I hope it is. Problem is, I have a xml file with soap-envelopes in it. When I use XMLSpy to make an xsd of it, it gives me two files. Neither of them I can use in a Mapforce mapping to create a mapping.
I'v done this many times with XML's without envelopes, but now I am completely stuck.
Or, Help! Would be greatly appreciated from Holland :) How can I make avalid .xsd of this file in such a way I can use it in a Mapforce mapping?
This is the base xml file concerned:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tbox="http://connect1.transwise.eu/TboxService/"> <SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/> <soap:Body> <tbox:carrierBooking> <tbox:carrierBookingInfo> <tbox:version>2.0</tbox:version> <tbox:status>OK</tbox:status> <tbox:description/> </tbox:carrierBookingInfo> <tbox:shipments> <tbox:shipmentInfo> <tbox:customerId>KRUIZINGA</tbox:customerId> <tbox:costcenter/> <tbox:carrier>BEN</tbox:carrier> <tbox:executingCarrier>BEN</tbox:executingCarrier> <tbox:reference>302172</tbox:reference> <tbox:awb>0000000070</tbox:awb> <tbox:description/> <tbox:instruction>vandaag leveren met caddy normaal tarief zoals vanmorgen besprok</tbox:instruction> <tbox:value>0.00 EUR</tbox:value> <tbox:valueCurrency>EUR</tbox:valueCurrency> <tbox:pickupDate>20140717 van 08:00 tot 16:30</tbox:pickupDate> <tbox:pickupTime>080000</tbox:pickupTime> <tbox:pickupTimeTo>163000</tbox:pickupTimeTo> <tbox:requestedDeliveryDate>20140718</tbox:requestedDeliveryDate> <tbox:requestedDeliveryTime>080000</tbox:requestedDeliveryTime> <tbox:requestedDeliveryTimeTo>170000</tbox:requestedDeliveryTimeTo> <tbox:plannedDeliveryDate>20140718</tbox:plannedDeliveryDate> <tbox:plannedDeliveryTime>170000</tbox:plannedDeliveryTime> <tbox:service>NON-DOCS</tbox:service> <tbox:serviceLevelTime>STANDARD</tbox:serviceLevelTime> <tbox:serviceLevelOther/> <tbox:incoterms>CPT</tbox:incoterms> <tbox:inbound>0</tbox:inbound> <tbox:noOfPackages>1</tbox:noOfPackages> <tbox:weight>123.00 KG</tbox:weight> <tbox:weightUom>KG</tbox:weightUom> <tbox:price>0.00</tbox:price> <tbox:salesPrice/> <tbox:currency>EUR</tbox:currency> <tbox:trackingUrl/> <tbox:shipmentStatusCode>NEW</tbox:shipmentStatusCode> <tbox:additionalReferences/> <tbox:shipmentLines> <tbox:shipmentLine> <tbox:sequence>1</tbox:sequence> <tbox:lineNo>1</tbox:lineNo> <tbox:shipmentLineId/> <tbox:awb>0000000070001</tbox:awb> <tbox:packageType>PALLET</tbox:packageType> <tbox:description>transportsupplies</tbox:description> <tbox:quantity>1</tbox:quantity> <tbox:genericStatusCode>NEW</tbox:genericStatusCode> <tbox:carrierStatusCode/> <tbox:carrierStatusDescription/> <tbox:acceptedBy/> <tbox:measurements> <tbox:length>0.00</tbox:length> <tbox:width>0.00</tbox:width> <tbox:height>0.00</tbox:height> <tbox:weight>123.00</tbox:weight> </tbox:measurements> </tbox:shipmentLine> </tbox:shipmentLines> <tbox:addresses> <tbox:address> <tbox:type>SEND</tbox:type> <tbox:name>Perensoep B.V.</tbox:name> <tbox:street1>Zeelaan 15</tbox:street1> <tbox:street2/> <tbox:city>Wapenveld</tbox:city> <tbox:zipCode>8191 JH</tbox:zipCode> <tbox:state/> <tbox:countryCode>NL</tbox:countryCode> <tbox:contact>Dhr. Kees Kater</tbox:contact> <tbox:telNo>0031 88 1234567</tbox:telNo> <tbox:faxNo/> <tbox:email>kees@kater.nl</tbox:email> <tbox:accountNo>411159</tbox:accountNo> <tbox:VATNumber/> </tbox:address> <tbox:address> <tbox:type>RECV</tbox:type> <tbox:name>Balein B.V.</tbox:name> <tbox:street1>Nieuwegracht 12</tbox:street1> <tbox:street2/> <tbox:city>SOEST</tbox:city> <tbox:zipCode>3763 LB</tbox:zipCode> <tbox:state/> <tbox:countryCode>NL</tbox:countryCode> <tbox:contact/> <tbox:telNo>035-7400740</tbox:telNo> <tbox:faxNo/> <tbox:email/> <tbox:accountNo/> <tbox:VATNumber/> </tbox:address> </tbox:addresses> </tbox:shipmentInfo> </tbox:shipments> </tbox:carrierBooking> </soap:Body> </soap:Envelope>
Thank you very much!
|
|