0
votes

i have a soap web services and i need to connect and get result from it in PHP the request is:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Booking xmlns="http://tempuri.org/">
      <myOrder>
        <FromDate>dateTime</FromDate>
        <ToDate>dateTime</ToDate>
        <Price>decimal</Price>
        <siteCommission>decimal</siteCommission>
        <HotelPriceIncentive>decimal</HotelPriceIncentive>
        <Count>int</Count>
        <PriceId>int</PriceId>
        <HotelId>int</HotelId>
        <Add_ID>int</Add_ID>
        <Create_net_booking>int</Create_net_booking>
        <OrderRooms>
          <ClOrderRooms>
            <capacityName>string</capacityName>
            <BaseTypeName>string</BaseTypeName>
            <RoomsTypeName>string</RoomsTypeName>
            <SessionId>string</SessionId>
            <AmountBruto>decimal</AmountBruto>
            <AmountNetto>decimal</AmountNetto>
            <Price>decimal</Price>
            <Count>int</Count>
            <BaseTypeId>int</BaseTypeId>
            <RoomTypeId>int</RoomTypeId>
            <Adults>int</Adults>
            <Child>int</Child>
            <Infants>int</Infants>
          </ClOrderRooms>
          <ClOrderRooms>
            <capacityName>string</capacityName>
            <BaseTypeName>string</BaseTypeName>
            <RoomsTypeName>string</RoomsTypeName>
            <SessionId>string</SessionId>
            <AmountBruto>decimal</AmountBruto>
            <AmountNetto>decimal</AmountNetto>
            <Price>decimal</Price>
            <Count>int</Count>
            <BaseTypeId>int</BaseTypeId>
            <RoomTypeId>int</RoomTypeId>
            <Adults>int</Adults>
            <Child>int</Child>
            <Infants>int</Infants>
          </ClOrderRooms>
        </OrderRooms>
        <GeneralAreaName>string</GeneralAreaName>
        <HotelName>string</HotelName>
        <GeneralAreaId>string</GeneralAreaId>
        <CancelBooking_Cancelled>boolean</CancelBooking_Cancelled>
        <CancelBooking_CancellationDays>int</CancelBooking_CancellationDays>
        <CancelBooking_Policy>string</CancelBooking_Policy>
        <SourcePrice>int</SourcePrice>
        <ExternalPriceID>int</ExternalPriceID>
        <CustomerPriceRemark>string</CustomerPriceRemark>
        <DocketId>int</DocketId>
        <FirstName>string</FirstName>
        <LastName>string</LastName>
        <Email>string</Email>
        <Tz>string</Tz>
        <PhoneNum>string</PhoneNum>
        <CellNumber>string</CellNumber>
        <Address>string</Address>
        <CreditCardNum>string</CreditCardNum>
        <Credit_Tashlumim>string</Credit_Tashlumim>
        <Credit_ExpMont>string</Credit_ExpMont>
        <Credit_ExpYear>string</Credit_ExpYear>
        <Credit_CVV>string</Credit_CVV>
        <Comments>string</Comments>
        <Travellers>
          <clTraveller>
            <FirstName>string</FirstName>
            <LastName>string</LastName>
            <Title>string</Title>
            <DateBirthday>string</DateBirthday>
          </clTraveller>
          <clTraveller>
            <FirstName>string</FirstName>
            <LastName>string</LastName>
            <Title>string</Title>
            <DateBirthday>string</DateBirthday>
          </clTraveller>
        </Travellers>
        <ConfigParam>
          <AmountMarkup>string</AmountMarkup>
          <APP_AgencyXmlBaseUrl>string</APP_AgencyXmlBaseUrl>
          <DocketType>string</DocketType>
          <SystemTypeId>int</SystemTypeId>
          <AgencyId>int</AgencyId>
          <UserName>string</UserName>
          <Password>string</Password>
          <SubSite>int</SubSite>
        </ConfigParam>
        <Result>
          <XmlAfterRegistration>string</XmlAfterRegistration>
          <DocketId>int</DocketId>
          <BUNDLE_ID>string</BUNDLE_ID>
          <Reserv_Num>
            <string>string</string>
            <string>string</string>
          </Reserv_Num>
        </Result>
      </myOrder>
    </Booking>
  </soap:Body>
</soap:Envelope>

i try with php soapclient but i don't relay know how to do that right. the error i get is: Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://web14.agency2000.co.il/bytechws/pricessearch.asmx?WSDL' : failed to load external entity "https://web14.agency2000.co.il/bytechws/pricessearch.asmx?WSDL" in C:\xampp\htdocs\credit2000\booking.php:96 Stack trace: #0 C:\xampp\htdocs\credit2000\booking.php(96): SoapClient->SoapClient('https://web14.a...', Array) #1 C:\xampp\htdocs\credit2000\booking.php(81): callData('Booking', Object(stdClass)) #2 {main} thrown in C:\xampp\htdocs\credit2000\booking.php on line 96 any help please???

1

1 Answers

0
votes

The WSDL URL you are using does not exist. Without the correct URL you will never succeed with the request. PHP needs the WSDL to create the proper data structure.