Closed jadchahine closed 5 years ago
Please help we need this ASAP, thank u and sorry for any inconvenience.
Hi Jad,
This will be available around the end of next week. Hopefully we will push the code by Next week Wednesday along with the new version 38 code. Thanks.
Thanks & Regards Vivekjyoti Pramanik
Ok thank you.
Please inform us when the final code of ticketing is available. Thank you.
Hi Jad,
We have pushed the latest code. Please let me know how it goes. Thanks.
Thanks & Regards Vivekjyoti Pramanik
Hi VivekJyoti,
Thanks so much for the update, but after updating the code, I got this error upon executing low fare search:
Caused by: java.lang.RuntimeException: You supplied a bad service/port pair (InvocationTarget):null
at com.travelport.tutorial.support.ServiceWrapper.init(ServiceWrapper.java:74)
at com.travelport.tutorial.support.ServiceWrapper.
Sorry it was the URLPREFIX that I should edit it to match the project path.
One more question please, concerning the ticketing, where it is implemented currently? in lesson2?!
Hi Jad,
Apologies for the delayed reply. The Ticketing is implemented in Lesson4bad.java in Unit 2. Thanks.
Thanks & Regards Vivekjyoti Pramanik
Hi VivekJyoti,
Thank you, I will test it and integrate in my application to build a complete scenario of the low fare search then return to you if I have any question (it will be similar for the advanced search and hotel I guess)
But now I want to make sure that I am understanding right the travelport api: I believe that the steps in the flight/hotel scenario are as listed below:
Step 1: Searching, so the api will search all flights based on the user criteria (origin, destination, ...) Step 2: Booking, so after that the user choose one flight, the api will book this flight for the user based on its price (got from the first step) and based on the passengers information (first name, last name, email ...) Step 3: Ticketing
Is this right?
Thanks&Regards
Hi Jadchahine, Yes, basic flow should be the one as below.
Low Fare Search Response with flight options Prior to booking you need to do the Air Price to ensure the fares are valid for the itinerary Based on the Air Price response AirCreate Once the successful booking is created following that the Ticketing fulfillment (Please note in prior to AirTicket the commission and the form of payment needs to be filled with the booking)
Thank you, B.Rgds, Niranda
Hello help me please... I get the error when i run Lesson1.java
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.test.JavaMain.main(JavaMain.java:33)
Caused by: java.lang.RuntimeException: You supplied a bad service/port pair (InvocationTarget):null
at com.travelport.tutorial.support.ServiceWrapper.init(ServiceWrapper.java:74)
at com.travelport.tutorial.support.ServiceWrapper.
static public String URLPREFIX = "file:///D:/DHD/WebService-Test3/"; static public String SYSTEM_WSDL = "wsdl/system_v8_0/System.wsdl"; static public String AIR_WSDL = "wsdl/air_v18_0/Air.wsdl"; static public String HOTEL_WSDL = "wsdl/hotel_v17_0/Hotel.wsdl"; static public String VEHICLE_WSDL = "wsdl/vehicle_v17_0/Vehicle.wsdl";
Hi AlbinGlobosoft,
I believe the version v17 or v18 has been retired long ago. Please use the latest version of uapi schema. Thanks.
I tried with uAPI_WSDLschema_Release-V19.1.0.53 but i was unable to create client code for AirService i got the below error when i tried to create Air client code
iam using Eclipse : Mars.1 Release (4.5.1) Server : Apache tomcat 8 CXF : Apache CXF -3.3.2 WebAppLibraries : provided picture below
IWAB0399E Error in generating Java from WSDL: java.lang.NullPointerException
IWAB0399E Error in generating Java from WSDL: java.lang.NullPointerException java.lang.NullPointerException at org.apache.axis.wsdl.toJava.JavaBeanHelperWriter.getAsFieldName(JavaBeanHelperWriter.java:435) at org.apache.axis.wsdl.toJava.JavaBeanHelperWriter.writeMetaData(JavaBeanHelperWriter.java:325) at org.apache.axis.wsdl.toJava.JavaBeanHelperWriter.writeFileBody(JavaBeanHelperWriter.java:183) at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127) at org.apache.axis.wsdl.toJava.JavaBeanWriter.writeFileBody(JavaBeanWriter.java:257) at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127) at org.apache.axis.wsdl.toJava.JavaBeanWriter.generate(JavaBeanWriter.java:1405) at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113) at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421) at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:547) at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:432) at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45) at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362) at java.lang.Thread.run(Unknown Source)
i solved the issue . it was due to apache axis as Web service runtime. i changed it to CXF
changed from Apache axis to CXF as web service runtime
Please help me sir,
My Test Credential are given below
Do i need to give space After Universal
-Djava.util.logging.config.file=logging.properties -Dtravelport.username=Universal API/uAPI-778445410 -Dtravelport.password=bFTpCf6MjK2JrknJhKNtkwypg -Dtravelport.gds=1G -Dtravelport.tagetBranch=P105195
if i leave space it shows error ### : Error: Could not find or load main class API.uAPI-778445410
if i remove space and run i get error like this :-
Exception in thread "main" java.lang.ExceptionInInitializerError
at test.app.support.test.JavaMain.main(JavaMain.java:34)
Caused by: java.lang.RuntimeException: You supplied a bad service/port pair (InvocationTarget):null
at test.app.support.ServiceWrapper.init(ServiceWrapper.java:74)
at test.app.support.ServiceWrapper.
my URLPREFIX i tried using static public String URLPREFIX = "file:///D://NewEclipse//WebService-UAPI-V19/"; static public String URLPREFIX = "file:///D:\NewEclipse\WebService-UAPI-V19\"; static public String URLPREFIX = "file:///D:\NewEclipse\WebService-UAPI-V19/"; static public String URLPREFIX = "file:///D:/NewEclipse/WebService-UAPI-V19/"; static public String URLPREFIX = "file:///D://NewEclipse/WebService-UAPI-V19/";
it shows the error
Exception in thread "main" java.lang.ExceptionInInitializerError
at test.app.support.test.JavaMain.main(JavaMain.java:34)
Caused by: java.lang.RuntimeException: You supplied a bad service/port pair (InvocationTarget):null
at test.app.support.ServiceWrapper.init(ServiceWrapper.java:74)
at test.app.support.ServiceWrapper.
// location of the WSDL files within this repository
static public String SYSTEM_WSDL = "wsdl/system_v32_0/System.wsdl";
static public String AIR_WSDL = "wsdl/air_v48_0/Air.wsdl";
static public String HOTEL_WSDL = "wsdl/hotel_v48_0/Hotel.wsdl";
static public String VEHICLE_WSDL = "wsdl/vehicle_v48_0/Vehicle.wsdl";
static public String UNIVERSAL_WSDL = "wsdl/universal_v48_0/UniversalRecord.wsdl";
static public String UTIL_WSDL = "wsdl/util_v48_0/Util.wsdl";
Dont care about the password since i got two test credentials
Universal API User ID: Universal API/uAPI-778445410
Branch Code (TargetBranch) for ProviderName (ProviderCode): Branch Code for Galileo (1G): P105195
URLs: https://emea.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/ ========================== ================== Universal API User ID: Universal API/uAPI-778445410
Branch Code (TargetBranch) for ProviderName (ProviderCode): Branch Code for Galileo (1G): P105195
URLs: https://emea.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/
Only password differes
Hi AlbinGlobosoft,
The space should not be there. You probably getting the error, cause it is unable to find the path. If you give path like "file:///D://NewEclipse//WebService-UAPI-V19/", it will try to find the schema say for Service in the location, "file:///D://NewEclipse//WebService-UAPI-V19/wsdl/system_v32_0/System.wsdl". Please check if the schema is available there. If not, provide correct path. Thanks.
Now the error is this:
Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message. at org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:183) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145) at com.sun.proxy.$Proxy47.service(Unknown Source) at test.app.support.test.JavaMain.main(JavaMain.java:34) Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '401: Unauthorized' when communicating with https://emea.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/SystemService at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1618) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1625) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1570) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1371) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140) ... 2 more
Can i directly login into https://emea.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/ using my credentials ?
if i login with my credential , i get the following error : IndexOutOfBoundsException. Could you please verify the above credentials are valid?
When i login with my credential , i get the following error in response while inspecting it in network.
{ "errors": { "error": { "status": "500", "code": "Dynamic backend host not specified", "detail": "Dynamic backend host not specified" } } }
but shows error in console :
Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message. at org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:183) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145) at com.sun.proxy.$Proxy47.service(Unknown Source) at test.app.support.test.JavaMain.main(JavaMain.java:41) Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '401: Unauthorized' when communicating with https://apac.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/SystemService at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1618) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1625) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1570) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1371) at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56) at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:228) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140) ... 2 more
Hi AlbinGlobosoft,
You are getting this error cause your credentials are locked. We are working on to unlock them and as soon as they are unlocked I will notify you. Thanks.
How long will it take? When i communicate through chat in TRAVELPORT there was nobody to respond. how a beginner can get sort of this problem?
Do i need to add any jar files to bin folder in WEB-INF ? The reason why iam asking when i run the application on tomcat server it shows some of the following errors:
SEVERE: Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/NewEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/WebService-UAPI-V19-2/WEB-INF/lib/javax.xml.soap-api-1.4.0.jar!/] for annotations
SEVERE: Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/NewEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/WebService-UAPI-V19-2/WEB-INF/lib/rngom-2.3.2.jar!/] for annotations
SEVERE: Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/NewEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/WebService-UAPI-V19-2/WEB-INF/lib/txw2-2.3.2.jar!/] for annotations
SEVERE: Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/NewEclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/WebService-UAPI-V19-2/WEB-INF/lib/istack-commons-runtime-3.0.8.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:97)
at org.apache.tomcat.util.bcel.classfile.ConstantPool.
Hi AlbinGlobosoft,
The account is unlocked. Please use the password which starts with "b" and it should be working fine. Thanks.
I got the following error
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Marshalling Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ns2:Payload'. One of '{"http://www.travelport.com/schema/common_v32_0":BillingPointOfSaleInfo}' is expected. at org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:195) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145) at com.sun.proxy.$Proxy47.service(Unknown Source) at com.travelport.tutorial.support.test.TestClass.main(TestClass.java:23) Caused by: javax.xml.bind.MarshalException
Could you please check these codes? I need only air service.
Hi AlbinGlobosoft,
This error means in the code where you are creating the request, the BillingPointOfSale is missing which is a mandatory element. The code you have shared is missing the file where you are creating the request. Thanks.
I used the code from github
https://github.com/Travelport-xx/travelport-uapi-tutorial
But it shows some Marshalling Error . Could you please help me to where i need to make changes?
When i tried to create code for Util it show some error:
org.apache.cxf.tools.common.ToolException: Schema Error : Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5,000.
Hi AlbinGlobosoft,
The codebase in github is working fine. It is quite impossible to see the actual issue without seeing your complete code. Could you please share the TestClass.java file.
Regarding the util wsdl issue, Could you please try generating the class files using apache axis. The cxf does not support maxoccurs more than 5000. Also, you can try the below. Thanks.
Here is TestClass.java TestClass.zip
Hi AlbinGlobosoft,
Please use the below code and it should work fine. It was missing the BillingPointOfSaleInfo code. It is there in the tutotial. Thanks.
package com.travelport.support.test;
import com.travelport.schema.system_v32_0.PingReq;
import com.travelport.schema.system_v32_0.PingRsp;
import com.travelport.service.system_v32_0.SystemFaultMessage;
import com.travelport.support.WSDLService;
public class TestClass {
public static void main(String args[]) {
// PING REQUEST //
String payload= "this my payload; there are many like it but this one is mine";
String someTraceId = "doesntmatter-8176";
//set up the request parameters into a PingReq object
PingReq req = new PingReq();
req.setPayload(payload);
req.setTraceId(someTraceId);
BillingPointOfSaleInfo billSetInfo = new BillingPointOfSaleInfo();
billSetInfo.setOriginApplication(originApp);
req.setBillingPointOfSaleInfo(billSetInfo);
try {
//run the ping request
PingRsp rsp = WSDLService.sysPing.get().service(req);
//print results.. payload and trace ID are echoed back in response
System.out.println(rsp.getPayload());
System.out.println(rsp.getTraceId());
System.out.println(rsp.getTransactionId());
} catch (SystemFaultMessage e) {
//usually only the error message is useful, not the full stack
//trace, since the stack trace in is your address space...
System.err.println("Error making ping request: "+e.getMessage());
}
}
}
Above mentioned javax.xml.ws.soap.SOAPFaultException solved but again came the following error Do i need to make any permission enabled from mytravelport account?
Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message. at org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:183) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145) at com.sun.proxy.$Proxy47.service(Unknown Source) at com.travelport.support.test.TestClass.main(TestClass.java:31) Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '401: Unauthorized' when communicating with https://emea.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/SystemService at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1618) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1625) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1570) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1371) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140) ... 2 more
Hi AlbinGlobosoft,
I believe you are using incorrect username or password which is causing the issue. Could you please check your username and password in the below link if it is working fine there. Please use the custom credentials option from the top right corner. Thanks.
I got it. i could ping with the server
space is mandatory for username also it should be inside double quotes
-Djava.util.logging.config.file=logging.properties -Dtravelport.username="Universal API/uAPI-778445410" -Dtravelport.password="" -Dtravelport.gds="1G" -Dtravelport.targetBranch=""
in return i got the traceid and transactionId.
Is there any problem changing traceid? I found no issue after changing.
Thanks.
Your Github Lesson1 tutorial missing following codes that you sent me.
String originApp="UAPI";
BillingPointOfSaleInfo billSetInfo = new BillingPointOfSaleInfo();
billSetInfo.setOriginApplication(originApp);
https://github.com/Travelport/travelport-uapi-tutorial/blob/gh-pages/lesson_1-1.md
Thanks.
Is there any problem changing maxOccurs value 9999 to 999? The reason is i was unable to create client code for "universal_v48_0" . When i tried to generate code by CXF it shows "Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5,000." .
I even tried with Apache axis but it failed to create client code version i tried :-> axis2-1.7.9 axis2-1.6.2
i got the following error
Exception occurred during code generation for WSDL : org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
Error as text given below
Exception occurred during code generation for WSDL : org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
Exception occurred during code generation for WSDL : org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.jst.ws.axis2.consumption.core.command.Axis2ClientCodegenCommand.execute(Axis2ClientCodegenCommand.java:224) at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:421) at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:361) at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:256) at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:296) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:438) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:354) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:977) at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:266) at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:93) at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.performFinish(WizardPageManager.java:264) at org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard.performFinish(DynamicWizard.java:384) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:775) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:414) at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:622) at org.eclipse.jface.dialogs.Dialog$$Lambda$76/1979980170.accept(Unknown Source) at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547) at org.eclipse.jface.window.Window.runEventLoop(Window.java:823) at org.eclipse.jface.window.Window.open(Window.java:799) at org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard.run(DynamicPopupWizard.java:132) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:250) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:568) at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:400) at org.eclipse.jface.action.ActionContributionItem$$Lambda$278/92510173.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) at org.eclipse.ui.internal.Workbench$$Lambda$83/495885630.run(Unknown Source) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597) at org.eclipse.equinox.launcher.Main.run(Main.java:1476) Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:293) ... 61 more Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:246) ... 61 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50) ... 62 more Caused by: org.apache.axis2.schema.SchemaCompilationException: Unsupported content Simple Content ! at org.apache.axis2.schema.SchemaCompiler.copyMetaInfoHierarchy(SchemaCompiler.java:1413) at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1279) at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1228) at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1172) at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:1055) at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1009) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:645) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:615) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:423) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:407) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:382) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:407) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:292) at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102) ... 67 more
Hi AlbinGlobosoft,
You are using incorrect path to the code. Please find below the correct repository path. Here in this repository the BillingPointOfSaleInfo code is there in Line 27-30. Also, Please find below the link witf full master repository. Thanks.
https://github.com/Travelport/travelport-uapi-tutorial/tree/master
Hi AlbinGlobosoft,
Please try with CXF 3.2.1 and generate the schema using command line tool using CXF 3.2.1. Thanks.
I used CXF apache-cxf-3.3.2 - Latest apache-cxf-3.2.1 apache-cxf-2.7.2
no result .
I moved to Lesson 2 and i found that
airBookReq.setAirPricingSolution(soln); // settor method missing in AirCreateReservationReq so i commented it and run
i got the following partial result with exception :
Price:AED2900 [BasePrice AUD1082.30, Taxes AED140]
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Unmarshalling Error: unexpected element (uri:"http://www.travelport.com/schema/SessionContext_v1_0", local:"Code"). Expected elements are <{http://www.travelport.com/schema/common_v48_0}CommandHistory>,<{http://www.travelport.com/schema/common_v48_0}Type>,<{http://www.travelport.com/schema/common_v48_0}Description>,<{http://www.travelport.com/schema/common_v48_0}StackTrace>,<{http://www.travelport.com/schema/common_v48_0}Auxdata>,<{http://www.travelport.com/schema/common_v48_0}Service>,<{http://www.travelport.com/schema/common_v48_0}TraceId>,<{http://www.travelport.com/schema/common_v48_0}Code>,<{http://www.travelport.com/schema/common_v48_0}TransactionId> at org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:195) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145) at com.sun.proxy.$Proxy51.service(Unknown Source) at test.app.support.test2.Lesson2.bookItinerary(Lesson2.java:440) at test.app.support.test2.Lesson2.main(Lesson2.java:180) Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.travelport.com/schema/SessionContext_v1_0", local:"Code"). Expected elements are <{http://www.travelport.com/schema/common_v48_0}CommandHistory>,<{http://www.travelport.com/schema/common_v48_0}Type>,<{http://www.travelport.com/schema/common_v48_0}Description>,<{http://www.travelport.com/schema/common_v48_0}StackTrace>,<{http://www.travelport.com/schema/common_v48_0}Auxdata>,<{http://www.travelport.com/schema/common_v48_0}Service>,<{http://www.travelport.com/schema/common_v48_0}TraceId>,<{http://www.travelport.com/schema/common_v48_0}Code>,<{http://www.travelport.com/schema/common_v48_0}TransactionId> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:714) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:232) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:227) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:94) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:75) at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:238) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:544) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:526) at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:45) at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:138) at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:214) at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:251) at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:220) at com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:97) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:339) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:318) at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:860) at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$200(JAXBEncoderDecoder.java:103) at org.apache.cxf.jaxb.JAXBEncoderDecoder$3.run(JAXBEncoderDecoder.java:920) at java.security.AccessController.doPrivileged(Native Method) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:918) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:738) at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:170) at org.apache.cxf.interceptor.ClientFaultConverter.processFaultDetail(ClientFaultConverter.java:156) at org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFaultConverter.java:83) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112) at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:70) at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:35) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:826) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1693) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1570) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1371) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140) ... 3 more
Thanks.
Hi AlbinGlobosoft,
I am using cxf 3.2.1 through command line and it is successfully generating the class files. I am not sure why you are getting the error.
Regarding the exception, Please share the xml request which is getting send so that I can check for issues in the xml. Thanks.
cmd> wsimport -keep Util.wsdl parsing WSDL...
[WARNING] Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5,000.
Generating code... Compiling code...
Could you please help me with the above error in lesson2 ?
Thanks.
Hi AlbinGlobosoft,
Please try with Wsdl2Java command to cxf rather than using wsimport. Thanks.
I generated the code using wsimport . it seems no problem.
I mentioned error was : QF#498 from MEL to SYD at 2019-09-23T05:30:00.000+10:00 QF#401 from SYD to MEL at 2019-10-01T06:00:00.000+10:00 Price:AED2900 [BasePrice AUD1082.30, Taxes AED140]
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Unmarshalling Error: unexpected element (uri:"http://www.travelport.com/schema/SessionContext_v1_0", local:"Code"). Expected elements are <{http://www.travelport.com/schema/common_v48_0}CommandHistory>,<{http://www.travelport.com/schema/common_v48_0}Type>,<{http://www.travelport.com/schema/common_v48_0}Description>,<{http://www.travelport.com/schema/common_v48_0}StackTrace>,<{http://www.travelport.com/schema/common_v48_0}Auxdata>,<{http://www.travelport.com/schema/common_v48_0}Service>,<{http://www.travelport.com/schema/common_v48_0}TraceId>,<{http://www.travelport.com/schema/common_v48_0}Code>,<{http://www.travelport.com/schema/common_v48_0}TransactionId> at org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:195) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145) at com.sun.proxy.$Proxy51.service(Unknown Source) at test.app.support.test2.Lesson2.bookItinerary(Lesson2.java:440) at test.app.support.test2.Lesson2.main(Lesson2.java:180) Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.travelport.com/schema/SessionContext_v1_0", local:"Code"). Expected elements are <{http://www.travelport.com/schema/common_v48_0}CommandHistory>,<{http://www.travelport.com/schema/common_v48_0}Type>,<{http://www.travelport.com/schema/common_v48_0}Description>,<{http://www.travelport.com/schema/common_v48_0}StackTrace>,<{http://www.travelport.com/schema/common_v48_0}Auxdata>,<{http://www.travelport.com/schema/common_v48_0}Service>,<{http://www.travelport.com/schema/common_v48_0}TraceId>,<{http://www.travelport.com/schema/common_v48_0}Code>,<{http://www.travelport.com/schema/common_v48_0}TransactionId> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:714)
I resolved it . it was due to airBookReq.setAirPricingSolution(soln);
i had commented it because i was unable to find it setter method now i changed it to airBookReq.getAirPricingSolution().add(soln);
Thanks.
When i run Lesson 2 i got Flight Details and Universal Record Locator but when the second time i got the following error :
QF#400 from MEL to SYD at 2019-09-27T06:00:00.000+10:00 QF#401 from SYD to MEL at 2019-10-05T06:00:00.000+10:00 ----------- Exception in thread "main" com.travelport.service.air_v48_0.AirFaultMessage: SYSTEM ERROR OCCURRED at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.apache.cxf.interceptor.ClientFaultConverter.processFaultDetail(ClientFaultConverter.java:183) at org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFaultConverter.java:83) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112) at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:70) at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:35) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:826) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1693) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1570) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1371) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140) at com.sun.proxy.$Proxy50.service(Unknown Source) at test.app.support.test2.Lesson2.priceItinerary(Lesson2.java:503) at test.app.support.test2.Lesson2.displayItineraryPrice(Lesson2.java:270) at test.app.support.test2.Lesson2.main(Lesson2.java:113)
================================================================
More Error Details :- >
at test.app.support.test2.Lesson2.main(Lesson2.java:113) : ->
AirPriceRsp priceRsp = displayItineraryPrice(itin)
at test.app.support.test2.Lesson2.displayItineraryPrice(Lesson2.java:270) - >
AirPriceRsp priceRsp = priceItinerary(itin);
at test.app.support.test2.Lesson2.priceItinerary(Lesson2.java:503) ->
return WSDLService.airPrice.get().service(priceReq, null);
How can i get all flight details(name or flight code) to auto complete search inputs when user type into origin and destination fields?
Thanks.
Hi AlbinGlobosoft,
I am seeing that you are getting 'SYSTEM ERROR OCCURRED'. it can happen due to quite a few number of reasons. I would recommend to installer fiddler tool to capture the request and response xml so that it would be easier for us to pinpoint the issue.
As you said, it is happening 2nd time, it might be because you are using same itinerary and trying to book the same itinerary for the same booking traveler twice. But, if you can capture the xml request and response using fiddler and share the same, it would be very helpful for us to analyze the issue.
Regarding your 2nd question about name and flight code, we have a reference data service which provide all the details about a airline and its code. Please find below the link with all the details. If you are looking for something else, Could you please elaborate the question a little bit more with example how you are expecting to see the data. Thanks.
Can i use this data for production use ?
Reference Data :
RAML - AIR MEAL SERVICE TYPES
RAPT - AIRPORTS
These tables column differs when i tried to insert data from Reference data(RAML and RAPT) to RAML and RAPT tables according to 'formats.doc'. RAPT shows 9 column attributes but 'RAPT.TXT' has 10 column values RAML shows 3 column attributes but 'RAML.TXT' has 5 column values
Help me please.
Thanks.
Hi AlbinGlobosoft,
Absolutely. These are production ready data. The Column values can differe based on what kind of data you are requesting. As Airports has different data definition than Air meal type, the will generate different number of columns and data. Thanks.
Hi All,
This lesson is a great one that takes into account low fare search and booking:
https://github.com/Travelport/travelport-uapi-tutorial/blob/master/src/com/travelport/uapi/unit1/Lesson2.java
But I don't found a logic that take into account ticketing, please can you provide us a sample code for ticketing after search and booking (also for hotel booking)
Thanks&Regards