本文整理汇总了Java中org.example.ticketagent.ObjectFactory.createListFlightsRequest方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectFactory.createListFlightsRequest方法的具体用法?Java ObjectFactory.createListFlightsRequest怎么用?Java ObjectFactory.createListFlightsRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.example.ticketagent.ObjectFactory
的用法示例。
在下文中一共展示了ObjectFactory.createListFlightsRequest方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: listFlights
import org.example.ticketagent.ObjectFactory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public List<BigInteger> listFlights() {
ObjectFactory factory = new ObjectFactory();
TListFlights tListFlights = factory.createTListFlights();
JAXBElement<TListFlights> request = factory.createListFlightsRequest(tListFlights);
JAXBElement<TFlightsResponse> response = null;
try {
response = (JAXBElement<TFlightsResponse>) webServiceTemplate.marshalSendAndReceive(request);
return response.getValue().getFlightNumber();
} catch (Exception e) {
LOGGER.error(e.getMessage());
// TODO handle the exception
return new ArrayList<>();
}
}
示例2: listFlights
import org.example.ticketagent.ObjectFactory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public List<BigInteger> listFlights() {
ObjectFactory factory = new ObjectFactory();
TListFlights tListFlights = factory.createTListFlights();
JAXBElement<TListFlights> request = factory.createListFlightsRequest(tListFlights);
JAXBElement<TFlightsResponse> response = (JAXBElement<TFlightsResponse>) webServiceTemplate
.marshalSendAndReceive(request, new WebServiceMessageCallback() {
public void doWithMessage(WebServiceMessage message) {
TransportContext context = TransportContextHolder.getTransportContext();
HttpUrlConnection connection = (HttpUrlConnection) context.getConnection();
connection.getConnection().addRequestProperty("Authorization",
BasicAuthenticationUtil.generateBasicAutenticationHeader(clientConfig.getUserName(),
clientConfig.getUserPassword()));
}
});
return response.getValue().getFlightNumber();
}
示例3: listFlights
import org.example.ticketagent.ObjectFactory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public List<BigInteger> listFlights() {
ObjectFactory factory = new ObjectFactory();
TListFlights tListFlights = factory.createTListFlights();
JAXBElement<TListFlights> request = factory.createListFlightsRequest(tListFlights);
JAXBElement<TFlightsResponse> response =
(JAXBElement<TFlightsResponse>) webServiceTemplate.marshalSendAndReceive(request);
return response.getValue().getFlightNumber();
}
示例4: listFlights
import org.example.ticketagent.ObjectFactory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public List<BigInteger> listFlights() {
ObjectFactory factory = new ObjectFactory();
TListFlights tListFlights = factory.createTListFlights();
JAXBElement<TListFlights> request = factory.createListFlightsRequest(tListFlights);
// use SoapActionCallback to add the SOAPAction
JAXBElement<TFlightsResponse> response =
(JAXBElement<TFlightsResponse>) webServiceTemplate.marshalSendAndReceive(request,
new SoapActionCallback("http://example.com/TicketAgent/listFlights"));
return response.getValue().getFlightNumber();
}
示例5: listFlights
import org.example.ticketagent.ObjectFactory; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public List<BigInteger> listFlights() {
ObjectFactory factory = new ObjectFactory();
TListFlights tListFlights = factory.createTListFlights();
JAXBElement<TListFlights> request = factory.createListFlightsRequest(tListFlights);
JAXBElement<TFlightsResponse> response =
(JAXBElement<TFlightsResponse>) webServiceTemplate.marshalSendAndReceive(request);
return response.getValue().getFlightNumber();
}