Monday, November 26, 2012

opentravel web services client test suite


If you're a travel industry developer writing an opentravel service on any platform or language, you will need a test web services client as part of your development infrastructure. Your client will send various messages to your service and then verify that the responses are correct.

The open source JiBX project contains tools for web services development, including a complete xml to java binding for the opentravel message schema.

When you combine the JiBX tools with all the of tools available for the java platform you have an excellent platform for testing your opentravel messaging.

Let's start with the JiBX web services client framework. The client framework is very flexible. It can be used by your client application, or used as a test platform. We'll be running our tests using the maven framework, but you can easily use straight java or run your tests in an OSGi container.

Now we're ready to customize our test code. Let's start with the code from our repository at: https://github.com/jibx/schema-library/tree/master/org.opentravel/_2012A/opentravel-ws/opentravel-hotel-ws-test-client. You should download this project and use it as your starting point.

Take a look at this source code here. Notice this source code in the start method:

Properties properties = new Properties();
properties.setProperty(ENDPOINT, endpoint);
properties.setProperty(FILENAME, "/OTA_HotelResRQ.xml");
properties.setProperty(CLASSNAME, ResRQ.class.getName());
runTest(properties); // By default, run the test once with no properties


This code is using the framework's ability to read a local message and marshal it to a Java object. You will see that all that is needed is the java class name and the message location (You will find these xml messages in the project's resource directory).

If you prefer unit tests, this project also contains a maven junit test. The source code is here.

If you scroll to the bottom of this code, you will see the checkResponseMessage method. You will notice that this method converts the java object to an xml string and prints it. It also converts the message to a DOM tree and does a test. The last line does an XPath test on the xml message.

This client code inherits code from the web services Utilities java class. Take a look at this code for the available tools.


This should be everything you need to write a web services client or a web services client test suite.
Don Corley
don@tourgeek.com

29 comments:

Sara Soratia said...


In order to remain competitive and efficient in this fierce competition, we need to keep on updating ourselves, especially when you belong to the technology domain. Luckily I have one site called HeatherR or call it BackupPro, which informs and educate about loads of stuff in technology.

Unknown said...

The information you have provided is exceptional. I was pointed such type of topic since long but lastly nowadays my search is over and special thanks to you. Your blog is not only instructive but useful toofacebook apps developers dubai

Unknown said...

This article provides excellent information to understand the whole process. This is a good post for every reader.
Event Apps iPhone

Unknown said...

Excellent post!!! Java is most popular and efficient programming language available in the market today. It helps developers to create stunning desktop/web applications loaded with stunning functionalities. J2EE Training in Chennai | JAVA Training in Chennai

Unknown said...

Great and Useful Article.

Java Web Services Training

Java Web Services Training

Unknown said...

The expansion of internet and other business intelligence leads to large volume of data. Industries are looking for talented professionals to maintain and process huge volume of data with latest tools available in the market. Taking Hadoop Training in Chennai | Big Data Training in Chennai will ensure better career prospects for talented professionals.

Unknown said...

That’s a great article. But there is more to do if you learn Android. Just try visiting our page

Regards,
CCNA Training in Chennai | CCNA Training Institute in Chennai | Best CCNA Training in Chennai

IT said...

I have read your blog its very attractive and impressive. I like it your blog.


JavaEE Training in Chennai JavaEE Training in Chennai

Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

Java Online Training Java Online Training Core Java 8 Training in Chennai Java 8 Training in Chennai

IT said...

Java Web Services Training in Chennai Java Web Services Training in Chennai Java Web Services Online Training Java Web Services Training in Chennai

IT said...

Hibernate Online Training Hibernate Online Training Hibernate Training in Chennai Hibernate Training in Chennai Java Online Training Java Online Training Hibernate Training Institutes in ChennaiHibernate Training Institutes in Chennai

IT said...

JMS Training Institutes in Chennai JMS Training Institutes in Chennai | JSP Training Institutes in Chennai | Spring Training Institutes in Chennai Spring Training Institutes in ChennaiMicroServices Training Institutes In Chennai Java MicroServices Training Institutes In Chennai
Java EE Training Institutes in Chennai Java EE Training Institutes in Chennai

KB said...

This is very useful post. I found so many interesting stuff in your post. Really its great article.
eCommerce Service Providers

norhan said...


الرائد افضل شركات تنظيف خزانات المياه يسعدنا ان نقدم لكم افضل خدمات
شركة غسيل خزانات بالمدينة المنورة تنظيف خزانات بالمدينة المنورة
افضل شركة تنظيف منازل بالمدينة المنورة شركة تنظيف بيوت بالمدينة المنورة

Nora Pittman said...

Crypto-currency as a modern form of the digital asset has received a worldwide acclaim for easy and faster financial transactions and its awareness among people have allowed them to take more interest in the field thus opening up new and advanced ways of making payments. Crypto.com Referral Code with the growing demand of this global phenomenon more,new traders and business owners are now willing to invest in this currency platform despite its fluctuating prices however it is quite difficult to choose the best one when the market is full. In the list of crypto-currencies bit-coins is one of the oldest and more popular Crypto.com Referral Code for the last few years. It is basically used for trading goods and services and has become the part of the so-called computerized block-chain system allowing anyone to use it thus increasing the craze among the public, Crypto.com Referral Code.

Common people who are willing to purchase BTC can use an online wallet system for buying them safely in exchange of cash or credit cards and in a comfortable way from the thousands of BTC foundations around the world and keep them as assets for the future. Due to its popularity, many corporate investors are now accepting them as cross-border payments and the rise is unstoppable. With the advent of the internet and mobile devices,information gathering has become quite easy as a result the BTC financial transactions are accessible and its price is set in accordance with people’s choice and preferences thus leading to a profitable investment with Crypto.com Referral Code. Recent surveys have also proved that instability is good for BTC exchange as if there is instability and political unrest in the country due to which banks suffer then investing in BTC can surely be a better option. Again bit-coin transaction fees are pretty cheaper and a more convenient technology for making contracts thus attracting the crowd. The BTC can also be converted into different fiat currencies and is used for trading of securities, for land titles, document stamping, public rewards and vice versa.

Another advanced block-chain project is Ethereumor the ETH which has served much more than just a digital form of crypto-currency Crypto.com Referral Code and its popularity in the last few decades have allowed billions of people to hold wallets for them. With the ease of the online world,the ETH have allowed the retailers and business organizations to accept them for trading purposes, therefore, can serve as the future of the financial system.

Nora Pittman said...

Health Experts have proven that regular exercise coupled with a good diet allow you to live longer and healthier. In this busy day and age, not everyone has the time to go to the gym - resulting to a lot of overweight people that desperately need to exercise. A healthy alternative is for you to Buy Home Gym Equipments that you can store in your own home or even at your office. Here are some tips when buying home gym equipment.

First, know your fitness goals and keep these goals in mind when you are buying home gym equipment. One of the biggest mistakes that people make is buying the biggest or trendiest fitness machine simply because they like how it looks. More often than not, these end up gathering dust in your storage rooms or garage because you never end up using them. It is important to take note of what particular type of physical activity you want or enjoy doing before you buy your exercise machine. If you are looking to loose a few pounds and you enjoy walking or hiking, a treadmill is the best option for you. If you are looking to tone your lower body while burning calories a stationary bike is your obvious choice. Similarly, Special Equipments for Core Strength Exercises, Strength Training Weight Vests, Core Strength & Abdominal Trainers, Home Cardio Training, Strength Training Power Cages, Strength Training Racks & More.

Second, set aside a budget before Buying Home Gym Equipments. Quality exercise machines do not come cheap. They are constantly exposed to wear and tear when they are used properly. So, pick machines that are built to last and have passed quality certifications to get the most out of your money. If you are operating on a tight budget, think about investing in several weights, We can Provide you High Quality Home Gym Equipments at Very Low Prices for your Complete Uses: Core Strength Exercises, Strength Training Weight Vests, Core Strength & Abdominal Trainers, Home Cardio Training, Strength Training Power Cages, Strength Training Racks & More.

Its the Right Time to Buy Home Gym Equipments for you at Very Low Prices.

rj said...

Archie 420 Dispensary is a trusted Cannabis dispensary base in Los Angeles California USA. It is one of the top dispensary in this part of the country. They do deliver Marijuana in the USA and to over 25 countries in the world. Blackberry kush weed for sales You can always visit their dispensary in Los Angeles using the address on their website. Place your order and get served by the best dispensary in the planet. Have fun.

freya maya said...

Crystal online pharmacy is a trusted online drug store with a wide range of products to suit the needs of our clients. Buy pills online Crystal Pharmacy do strive to offer the best service and ship products world wide. All the products listed on our website are Ava in stock. Expect your order to be processed Immediately when you send us your request. We deal with varieties of drugs for our customers satisfaction. We cross barriers with our products and struggle hard to meet human satisfaction. When shopping with us, Be safe and secured and you will realize how swift we are with our services.

Rubel hossen said...

Universal Gun sales is a trusted Firearm company base in Los Angeles California USA. It is one of the top Firearms Company in this part of the country. Buy CCI Mini mag 22LR 36GR HP 100 RD They do offer the best firearms deal in the USA and to over 25 countries in the world. You can always visit their shop in Los Angeles using the address on their website. Place your order and get served by the best Firearm Company in the planet. Have fun.

Nora Pittman said...

Oferecemos os melhores serviços para seguidores, curtidas, comentários e visualizações no Instagram. Os serviços são entregues de forma rápida, segura e por um preço honesto e barato.
Todos os serviços são iniciados de forma automática e você pode fazer um teste grátis de seguidores, curtidas e visualizações no Instagram.

O Go Followers surgiu em 2015 e durante alguns anos foi o melhor e maior site para comprar seguidores, curtidas e comentários no instagram. Com o passar dos anos evoluímos e em 2021 lançamos um novo site simples e intuitivo para aumentar a experiência dos mais de 150.000 clientes atendidos.

Nossa ferramenta envia seguidores brasileiros reais e ativos em sua grande maioria para qualquer perfil do Instagram. Escolha o melhor pacote para comprar seguidores instagram de alta qualidade. Você poderá escolher alguns pacotes como seguidores com curtidas, seguidores masculinos, seguidores femininos e seguidores automáticos.
Todos os pedidos são feitos de forma automática e iniciam em poucos minutos após a compra, tá esperando o que?

Nora Pittman said...

PG SLOT มีเกมหลากหลายให ้เลือก พรอ้ มกราฟฟิกแอนนเิมชนั่ สวยงามทสี่ ดุ ในยคุ นี้แจ็คพอตแตกง่าย pgslot โปรโมชนั่ พเิศษส าหรับทงั้สมาชก เกา่ และสมาชกิ ใหม่ ระบบฝาก-ถอนเงินออโต ้เงินเข ้าเร็วทันใจมีแอดมิ ดูแลตลอด 24 ชวั่ โมง ต ้องที่ pgslot.bid มั่นคงจ่ายจริง ไม่ว่าคุณจะถอนเงิ มากมายเท่าไหร่ ทางเว็บจ่ายเต็มไม่มีหัก pgslot ปั่นง่ายแตกง่าย

PG SLOT ผู ้ให ้บริการเว็บตรง ที่แตกง่ายที่สุด ปั่นสนุก ฝากเงินรับเครดิตฟร สูงสุด 15000 บาท สมัคร พีจีสล็อต หรือ PGSLOT กับเราเพื่อความมั่นคงของคุณเอง.

sr said...

토토사이트 이용을 하다 보면 먹튀 피해에 대한 두려움이 갑자기 생기거나 두려움을 가지고 이용하는 경우가 대반사입니다. 토토마추자는 그러한 두려움을 없애드리기 위해 만들어진 먹튀검증커뮤니티 입니다. 다양한 검증 활동을 통하여 축적된 데이터로 방문해 주시는 모든 회원님들께 무료로 제공해드리고 있습니다. 토토사이트를 이용 하는 회원님들은 메이저사이트를 이용하고 싶은 마음이 크다는 걸 알 수 있습니다. 하지만 해당 토토사이트가 메이저인지 아닌지 확인할 방법은 민간인에게 어려움이 있다는 걸 알 수 있습니다. 이용전 꼭 토토마추자를 통하여 먹튀검증 서비스를 받아보시기 바랍니다안전놀이터.
국내에 합법 토토사이트는 배트맨토토 에서 발매하는 정식서비스만 이용을 할 수 있으나 배팅금액 제한이 있기에 우후죽순 사설토토사이트가 생겨나고 있습니다. 대체적으로 이를 방지를 하려면 배트맨토토 자체에서 배팅금액 한도를 늘리는 수밖에 없다고 생각됩니다.

Anonymous said...

Merkur Progress Progress Merkur Progress Adjustable Safety Razor
Merkur Progress 메리트카지노 Progress Progress Adjustable Safety Razor. Merkur is 1XBET the world's first adjustable safety razor. It is also a perfect balance 바카라사이트 of

Click here for more said...

พวกเราหลายคนเคยเล่นสล็อตแมชชีนในชีวิตของเรา แต่เกมนี้เกี่ยวกับอะไรกันแน่? สล็อตแมชชีนเป็นอุปกรณ์ที่สร้างตัวเลขสุ่มที่สร้างเกมแห่งโอกาสให้กับลูกค้า สล็อตมีหลายประเภท รวมถึงเครื่องโป๊กเกอร์ เกมพักกี้ และเครื่องผลไม้ จุดประสงค์ของเกมเหล่านี้คือการสร้างรายได้ให้กับลูกค้าผ่านการผสมผสานระหว่างโอกาสและทักษะ อย่างไรก็ตาม ประเภทสล็อตที่ดีที่สุดในการเล่นออนไลน์คือสล็อตวิดีโอ สมัครสล็อต
การจ่ายเงินในเกมสล็อตจะถูกกาหนดโดยผู้พัฒนา สิ่งสาคัญคือต้องตรวจสอบการจ่ายเงินสาหรับเกมเหล่านี้ก่อนเดิมพัน คุณสามารถทาได้โดยทาการค้นหาโดย Google หรืออ่านบทวิจารณ์บนเว็บไซต์ที่มีชื่อเสียง บางเว็บไซต์มีฟอรัมผู้ใช้ซึ่งสามารถให้ข้อมูลที่มีค่าสาหรับผู้เล่น การเลือกคาสิโนออนไลน์ที่เหมาะสมเป็นสิ่งสาคัญสาหรับความปลอดภัยและความเพลิดเพลินของคุณ แต่คุณต้องระวังไม่ให้ติดเกม หากคุณเป็นมือใหม่ คุณควรเริ่มต้นเพียงเล็กน้อยและเพิ่มการลงทุนเมื่อคุณได้รับประสบการณ์มากขึ้น เพื่อให้แน่ใจว่าคุณกาลังเล่นที่คาสิโนออนไลน์ที่มีชื่อเสียง อ่านบทวิจารณ์เกี่ยวกับเว็บไซต์
ค้นหาความคิดเห็นจากเพื่อนเกมเมอร์ ยังเลือกคาสิโนที่มีชื่อเสียงที่สุด บางเว็บไซต์มีการตรวจสอบสถานะและมีฟอรัมสาหรับผู้เล่นจานวนมาก ด้วยวิธีนี้ คุณจะมีความคิดที่ดีขึ้นว่าเกมสล็อตใดเกมหนึ่งยุติธรรมหรือไม่ และคุณควรเดิมพันเท่าไร การเล่นบนเว็บไซต์ที่มีชื่อเสียงย่อมดีกว่าเว็บไซต์ที่มีชื่อเสียงน้อยกว่าเสมอ ในบรรดาตัวเลือกออนไลน์ที่หลากหลาย การเลือกคาสิโนที่มีชื่อเสียงเป็นสิ่งสาคัญ ตรวจสอบให้แน่ใจว่าคาสิโนมีชื่อเสียงที่ยอดเยี่ยมเพื่อหลีกเลี่ยงการหลอกลวง ด้วยการค้นหาโดย Google อย่างรวดเร็ว คุณจะพบบทวิจารณ์คาสิโนที่ให้ผลตอบแทนดีที่สุด บางเว็บไซต์มีฟอรัมที่ผู้เล่นสามารถพูดคุยเกี่ยวกับประสบการณ์ของตนกับคาสิโนได้ เมื่อคุณเลือกคาสิโนออนไลน์ ให้หาข้อมูลก่อนเล่นเสมอ และถ้าคุณมีเวลาลองอ่านรีวิวคาสิโนก่อนเริ่มเล่น สมัครสล็อต ก่อนเล่นเกมสล็อตออนไลน์ คุณควรศึกษาข้อมูลให้ดีเสียก่อน คุณต้องการค้นหาคาสิโนที่ขึ้นชื่อเรื่องความซื่อสัตย์และความน่าเชื่อถือ เป็นความคิดที่ดีที่จะอ่านบทวิจารณ์ของผู้ใช้ในไซต์ต่างๆ แม้ว่าบางเว็บไซต์จะใหม่ แต่บางเว็บไซต์ก็เป็นที่ยอมรับและมีประวัติที่พิสูจน์แล้ว ไม่ต้องกังวลหากคุณสามารถไว้วางใจคาสิโนด้วยเงินของคุณ อันที่จริงแล้ว ไม่มีอะไรสาคัญไปกว่าความสนุกสนานขณะเล่น มีคาสิโนออนไลน์มากมายที่ให้บริการเกมสล็อต และสิ่งสาคัญคือต้องเลือกคาสิโนที่มีชื่อเสียงเพื่อให้แน่ใจว่าคุณมีประสบการณ์ที่ดี คาสิโนที่ดีจะมีการรีวิวจากผู้เล่นจริง และบางแห่งก็จะมีบริการลูกค้าที่พร้อมให้บริการทุกวันตลอด 24 ชั่วโมง คุณควรรู้ว่าคุณกาลังทาอะไรอยู่เมื่อเล่นออนไลน์ คุณจะต้องการเล่นเพื่อความสนุกสนาน แต่คุณไม่ควรถูกล่อลวงให้เสี่ยงเงินของคุณ!

eunasiao741 said...

A 파워볼전용사이트 파워 사다리 시스템 배팅 Ante: Should You Pay Up?

raju said...

우리카지노 에 오신 것을 환영합니다. 국내 최고의카지노사이트 에 가입하여 바카라사이트 에서 다양한 게임을 즐기시면서 대박의 기회를 놓치지마세요! 우리 카지노는 한국의 바카라 산업을 지배하는 카지노 사이트입니다. 우리 카지노는 한국 바카라 시장 점유율의 50 % 이상을 차지하는 10 년 이상 온라인 바카라 시장을 지배 해 왔기 때문에 우리 카지노를 모르는 사람은 거의 없습니다.

sam322657 said...

Police bust underground 바카라검증업체 토토검증커뮤니티 in Toronto-area mansion

shindionne1 said...

Slots, Bonus Buys and Live 메이저놀이터 목록 ! - !LIKE for cash raffle

Omni ayurveda said...

very nice informative blog given by you . Thanks for sharing ....

Omni ayurveda said...

very nice informative blog given by you . Thanks for sharing ....
Best SMO services in india