07-11-2013, 04:34 PM
Hi,
I would like to send the following soap request
To the following wsdl
Using QTP. I would prefer to not use the object repository as it is important that the tests are portable.I also want the request to be done in a single QTP test ( no need to read xml in from external file).
Thanks in advance.
I would like to send the following soap request
Code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://sita.aero/pts/bcs/sif/schemas">
<soapenv:Header/>
<soapenv:Body>
<sch:SIFRequest>?</sch:SIFRequest>
</soapenv:Body>
</soapenv:Envelope>
To the following wsdl
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://sita.aero/pts/bcs/sif/schemas" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://sita.aero/pts/bcs/sif/schemas" targetNamespace="http://sita.aero/pts/bcs/sif/schemas">
- <wsdl:types>
+ <xs:schema xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" jaxb:version="2.0" targetNamespace="http://sita.aero/pts/bcs/sif/schemas">
- <xs:annotation>
- <xs:appinfo>
- <jaxb:globalBindings>
<jaxb:javaType name="java.util.Calendar" parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime" printMethod="javax.xml.bind.DatatypeConverter.printDateTime" xmlType="xs:dateTime" />
</jaxb:globalBindings>
</xs:appinfo>
</xs:annotation>
<xs:element name="SIFRequest" />
- <xs:element name="SIFResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="TravellerAlert">
- <xs:complexType>
- <xs:sequence>
<xs:element name="FlightCode" type="xs:string" />
<xs:element name="ArrAirportCode" type="xs:string" />
<xs:element name="ArrSchDatetime" type="xs:dateTime" />
<xs:element name="TravellerName" type="xs:string" />
<xs:element name="BirthDate" type="xs:dateTime" />
<xs:element name="Nationality" type="xs:string" />
<xs:element name="DocType" type="xs:string" />
<xs:element name="DocNumber" type="xs:string" />
- <xs:element name="Notes">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element maxOccurs="1" name="ServiceStatus" nillable="false">
- <xs:simpleType>
- <xs:restriction base="xs:integer">
<xs:pattern value="[0-2]" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
- <wsdl:message name="SIFResponse">
<wsdl:part element="tns:SIFResponse" name="SIFResponse" />
</wsdl:message>
- <wsdl:message name="SIFRequest">
<wsdl:part element="tns:SIFRequest" name="SIFRequest" />
</wsdl:message>
- <wsdl:portType name="TravellerAlert">
- <wsdl:operation name="SIF">
<wsdl:input message="tns:SIFRequest" name="SIFRequest" />
<wsdl:output message="tns:SIFResponse" name="SIFResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="TravellerAlertSoap11" type="tns:TravellerAlert">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="SIF">
<soap:operation soapAction="" />
- <wsdl:input name="SIFRequest">
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output name="SIFResponse">
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="TravellerAlertService">
- <wsdl:port binding="tns:TravellerAlertSoap11" name="TravellerAlertSoap11">
<soap:address location="http://cadev2:80/sif-interface/travellerAlertService/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Using QTP. I would prefer to not use the object repository as it is important that the tests are portable.I also want the request to be done in a single QTP test ( no need to read xml in from external file).
Thanks in advance.