[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'Strange' constructed Webservice. How to process.



Hello all,

I have to use a WS of a new business partner. It uses a construction I
have never seen until now.

The response has several elements that refer to an array for its child
elements.
The 'child' array and the 'parent' element are on the same hierarchy
level (see attached wsdl and example xml).

Eg.: 
      <unitFacilities href="#id2"/>
      <onSiteFacilities href="#id3"/>
Refers to:
      <soapenc:Array id="id2" soapenc:arrayType="xsd:string[6]">
         <Item>Air Conditioning</Item>
         <Item>Ceiling Fans</Item>
         <Item>Air Conditioning (Some)</Item>
         <Item>Balcony</Item>
         <Item>Carpet</Item>
         <Item>Bathrobes</Item>
      </soapenc:Array>
      <soapenc:Array id="id3" soapenc:arrayType="xsd:string[4]">
         <Item>BBQ's / Braai</Item>
         <Item>Billiard Table</Item>
         <Item>Baby Sitting Assistance</Item>
         <Item>ATM</Item>
      </soapenc:Array>

Ofcourse the value of the array id is dynamic. Next request "#id3" might
be for "unitFacilities", depending on the data retrieved.

Is there any support in httpapi (expat) for processing this kind of xml?

Any suggestions on what would be the most intelligent way to program
this, would be very much appreciated! :-)

Regards,
Richard la Croix
Hapimag
Switzerland

http://www.hapimag.com
 

Selber Flüge buchen auf http://flug.hapimag.com
Book flights personally on http://flight.hapimag.com





Diese E-Mail enthält vertrauliche Informationen, die rechtlich geschützt sein können. Sie ist nur für den beabsichtigten Empfänger bestimmt. Bitte benachrichtigen Sie uns umgehend, falls Sie die E-Mail irrtümlich erhalten haben und löschen Sie sie unverzüglich. Besten Dank.

This e-mail contains confidential information that may be privileged. It is for the sole attention and use of the intended recipient. Please notify us at once if you have received it in error and delete it immediately. Thank you.

Les informations contenues dans cet e-mail sont soumises au secret professionnel et ont un caractère strictement confidentiel. Elles sont destinées à l'usage exclusif du destinataire. Si cet e-mail vous est parvenu par erreur, vous voudrez bien nous en aviser immédiatement et le détruire sans délai.  Merci d'avance.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:tns="http://tempuri.org/"; xmlns:types="http://tempuri.org/encodedTypes"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
	<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
		<q1:WSGetLongHaulResortProfileResponse xmlns:q1="urn:daeoverbrandIntf-daeoverbrand">
			<return href="#id1"/>
		</q1:WSGetLongHaulResortProfileResponse>
		<q2:TDAEOBLHResortProfile id="id1" xsi:type="q2:TDAEOBLHResortProfile" xmlns:q2="urn:daeoverbrandIntf">
			<ResortName xsi:type="xsd:string">Beach House Seaside Resort</ResortName>
			<alertNote xsi:type="xsd:string">It is a resort requirement that the guest checking-in must be 18 years or older.   Please note that a valid credit card or cash deposit of $100 is required upon check-in.   Failure to meet these basic requirements will result in refusal of entry to the resort. Beach House Resort is undergoing a refurbishment programme floor by floor.  Please see additional information in the resort profile for details.</alertNote>
			<address1 xsi:type="xsd:string">52-58 Marine Parade</address1>
			<town xsi:type="xsd:string">COOLANGATTA</town>
			<region xsi:type="xsd:string">QLD</region>
			<country xsi:type="xsd:string">Australia</country>
			<unitFacilities href="#id2"/>
			<onSiteFacilities href="#id3"/>
			<areaFacilities href="#id4"/>
			<imagePath1 xsi:type="xsd:string">http://dev.daelive.com/articles/profileimg.ashx?EndpointID=AUS&amp;ResortID=BHOS&amp;No=1</imagePath1>
			<imagePath2 xsi:type="xsd:string">http://dev.daelive.com/articles/profileimg.ashx?EndpointID=AUS&amp;ResortID=BHOS&amp;No=2</imagePath2>
			<website xsi:type="xsd:string">www.classicholidayclub.com.au</website>
			<checkInTime xsi:type="xsd:string">16:00</checkInTime>
			<CheckOutTime xsi:type="xsd:string">10:00</CheckOutTime>
			<areaDescription xsi:type="xsd:string">Beach House Seaside Resort is situated in the most idyllic of locations, Coolangatta. The resort overlooks the magnificent Coolangatta beach and offers extensive views of the shoreline up and down the coast of Kirra and Greenmount. The resort is located within minutes of a host of leisure activities, , shopping centres, restaurants, clubs and the Coolangatta airport.Gold Coast Theme Parks are about 30 minutes away.

There is onsite Activity staff that is readily available to help make your holiday action packed, or you can simply relax in the landscaped gardens or work on your tan by the sparkling swimming pool.

The committed staff at Beach House Seaside Resort will always ensure you make the most of your holiday and with such an extensive range of facilities and activities you can be sure that all your holiday needs are catered for, making your holiday one you will never forget.</areaDescription>
			<airport xsi:type="xsd:string">Brisbane 120km Coolangatta 3km</airport>
			<directions xsi:type="xsd:string">Beach House Seaside Resort is located at the Northern entrance to Coolangatta on the corner of Marine Parade and Mclean Street and directly opposite Coolangatta beach.</directions>
			<unitConfig href="#id5"/>
			<returnCode xsi:type="xsd:string">0</returnCode>
			<errorMessage xsi:type="xsd:string">Success</errorMessage>
		</q2:TDAEOBLHResortProfile>
		<soapenc:Array id="id2" soapenc:arrayType="xsd:string[6]">
			<Item>Air Conditioning</Item>
			<Item>Ceiling Fans</Item>
			<Item>Air Conditioning (Some)</Item>
			<Item>Balcony</Item>
			<Item>Carpet</Item>
			<Item>Bathrobes</Item>
		</soapenc:Array>
		<soapenc:Array id="id3" soapenc:arrayType="xsd:string[4]">
			<Item>BBQ's / Braai</Item>
			<Item>Billiard Table</Item>
			<Item>Baby Sitting Assistance</Item>
			<Item>ATM</Item>
		</soapenc:Array>
		<soapenc:Array id="id4" soapenc:arrayType="xsd:string[3]">
			<Item>Archery</Item>
			<Item>Aeroplane Flights</Item>
			<Item>Bird Watching</Item>
		</soapenc:Array>
		<soapenc:Array id="id5" soapenc:arrayType="xsd:string[1]">
			<Item>2 Bedroom - 1 Bathroom</Item>
		</soapenc:Array>
	</soap:Body>
</soap:Envelope>

Attachment: daeoverbrand.wsdl
Description: daeoverbrand.wsdl

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------