发送请求并使用soap在php中获取响应

时间:2013-09-30 10:32:34

标签: php soap

有人可以给我这个代码...我尝试使用nusoap分配但钢铁没有得到结果

我经历了很多php网站和论坛,但没有找到解决方案。 。 。 。 ........................ 这就是我要的 ..................... .......

AvailabilityRequest: 

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
<soap:Header>
<ns1:clsSecurity soap:mustUnderstand="false" xmlns:ns1="http://tempuri.org/
WsHermes/Service1">
<ns1:WebProviderLoginId>hermestest</ns1:WebProviderLoginId>
<ns1:WebProviderPassword>hermestest </ns1:WebProviderPassword>
<ns1:IsAgent>false</ns1:IsAgent>
</ns1:clsSecurity>
 </soap:Header>
<soap:Body>
<AirGetAvailability xmlns="http://tempuri.org/HERMESAPI/AirInventory">
<pobjSecurity>
<WebProviderLoginId>arzoo</WebProviderLoginId>
<WebProviderPassword>arzoo123</WebProviderPassword>
<IsAgent>false</IsAgent>
</pobjSecurity>
<PstrInput><AvailabilityRequest><BookingType>O</BookingType> 
<JryDetails><Item><Origin>BLR</Origin><Destination> 
BOM</Destination><TravelDate>10/31/2013</TravelDate> 
</Item></JryDetails><ClassType>Economy</ClassType> 
<AirlineCode>6E,SG,</AirlineCode><AdultCount>1 
</AdultCount><ChildCount>0</ChildCount><InfantCount> 
0</InfantCount><ResidentofIndia>1</ResidentofIndia> 
<DirectAccess>0</DirectAccess><TransFeeFlag>0 
</TransF eeFlag></AvailabilityRequest> 
</PstrInput>
<PstrFinalOutPut />
<pstrError />
</AirGetAvailability>
</soap:Body> 
</soap:Envelope>

........................................................ 
AvailabilityResponse: 

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<AirGetAvailabilityResponse xmlns="http://tempuri.org/HERMESAPI/AirInventory">
<AirGetAvailabilityResult xsi:type="xsd:boolean">true</AirGetAvailabilityResult>
<PstrFinalOutPut><?xml version="1.0" encoding="utf-8" standalone="no"?> 
<AvailabilityResponse><UserTrackId>RMYOI97999869995927986939247264785431192
</UserTrackId><ResultCode><Status>1</Status></ResultCode><AvailableFlights><O
ngoingFlights><FlightSegments><SegmentDetails><FlightId>11</FlightId><AirlineCod
e>SG</AirlineCode><FlightNumber>344</FlightNumber><AirCraftType>737</AirCraft
Type><Origin>BLR</Origin><Destination>BOM</Destination><DepartureDateTime> 
31/10/2013 10:15:00</DepartureDateTime><ArrivalDateTime>31/10/2013 11:55:00 
</ArrivalDateTime><Duration>01Hrs 40 Mins</Duration><NumberofStops>0 
</NumberofStops><Via /><CurrencyCode>INR</CurrencyCode> 
<Currency_Conversion_Rate /><PaxFareDetails><ClassCode>F</ClassCode> 
<ClassType>Economy</ClassType><FewSeatIndicator /><Adult> 
<BasicAmount>450</BasicAmount><FareBasis /> 
<FareType>F Refundable</FareType><FuelSurcharge>2150</FuelSurcharge> 
<GrossAmount>3214</GrossAmount><Commission /><Value1 /><Value2 /> 
</Adult></PaxFareDetails></SegmentDetails></FlightSegments></OngoingFlights> 
<ReturnFlights /></AvailableFlights></AvailabilityResponse 
</PstrFinalOutPut>
<pstrError />
</AirGetAvailabilityResponse>
</soap:Body>
</soap:Envelope>

0 个答案:

没有答案