Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a simple SOAP program that returns information about commercial flights fr

ID: 3671569 • Letter: W

Question

Write a simple SOAP program that returns information about commercial flights from the XML Schema

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:FI="http://www.travelinfo.com/FlightInfo"

targetNamespace="http://www.travelinfo.com/FlightInfo">

<xsd:element name="FlightInfo">

<xsd:complexType>

<xsd:sequence>

<!--Mandatory Fields-->

<xsd:element name="DepartureCity" type="xsd:string" minOccurs="1" maxOccurs="1" />

<xsd:element name="ArrivalCity" type="xsd:string" minOccurs="1" maxOccurs="1" />

<xsd:element name="DepartureDate" type="xsd:date" minOccurs="1" maxOccurs="1" />

<xsd:element name="ReturnDate" type="xsd:date" minOccurs="0" maxOccurs="1" />

<xsd:element name="NumberofPassengers" type="integer" minOccurs="1" maxOccurs="1" />

<xsd:element name="Passengers" type="FI:PassengerType" minOccurs="1" maxOccurs="1" />

<!--Optional Fields-->

<xsd:element name="FlightTime" type=

"FI:TimeType" minOccurs="0" />

<xsd:element name="ConnectingCity" type="xsd:string" minOccurs="0" />

<xsd:element name="FlightType" minOccurs="0">

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:enumeration value="Nonstop" />

<xsd:enumeration value="1-stop" />

<xsd:enumeration value="Any" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

<xsd:element name="Airline" type="xsd:string" minOccurs="0" />

<xsd:element name="BookingClass" minOccurs="0">

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:enumeration value="FirstClass" />

<xsd:enumeration value="BusinessClass" />

<xsd:enumeration value="EconomyClass" />

<xsd:enumeration value="Any" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:complexType name="PassengerType">

<xsd:all>

<xsd:element name="Adult" type="xsd:integer" minOccurs="1" maxOccurs="1"/>

<xsd:element name="Children" type="xsd:integer" minOccurs="0" maxOccurs="1" />

</xsd:all>

</xsd:complexType>

<xsd:complexType name="TimeType">

<xsd:choice>

<xsd:element name="TimeRange">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="From" type="xsd:time"/>

<xsd:element name="To" type="xsd:time" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="TimeOfDay" type="xsd:time"/>

</xsd:choice>

</xsd:complexType>

</xsd:schema>

Explanation / Answer

From xml Schema Airline data convert into SOAP

<definitions name="Flight Info"

   xmlns="http://schemas.xmlsoap.org/wsdl/"

   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

   targetNamespace="http://www.travelinfo.com/FlightInfo""

   xmlns:xsd="http://www.w3.org/2001/XMLSchema"

   xmlns:FI="http://www.travelinfo.com/FlightInfo">

<complexType>

      <part name="DepartureCity" type="xsd:string"/>

      <part name="ArrivalCity" type="xsd:string"/>

     <part name="DepartureDate" type="xsd:string"/>

     <part name="ReturnDate" type="xsd:string"/>

      <part name="NumberofPassengers" type="xsd:string"/>

     <part name="Passengers" type="xsd:string"/>

<element name="ConnectingCity">

         <simpleType>

            <all>

               <element name="FlightType" type="string"/>

            </all>

         </simpleType>

      </element>

<element name="Airline">

         <simpleType>

            <all>

               <element name="BookingClass" type="string"/>

            </all>

         </simpleType>

      </element>

</complexType>

  

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote