Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No enum constant com.g2switch.core.service.Provider #206

Open
rxa092 opened this issue Oct 27, 2020 · 5 comments
Open

No enum constant com.g2switch.core.service.Provider #206

rxa092 opened this issue Oct 27, 2020 · 5 comments

Comments

@rxa092
Copy link

rxa092 commented Oct 27, 2020

I am trying to call the terminal service uapi and my current xml is

<?xml version="1.0" encoding="utf-16"?>
<TerminalReq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" TargetBranch="P3090173">
  <BillingPointOfSaleInfo OriginApplication="UAPI" xmlns="http://www.travelport.com/schema/common_v33_0" />
  <HostToken Host="XXXX" Key="123456" xmlns="http://www.travelport.com/schema/common_v33_0">Raza</HostToken>
  <TerminalCommand xmlns="http://www.travelport.com/schema/terminal_v33_0">*AB124</TerminalCommand>
</TerminalReq>

Currently I am getting an error:
No enum constant `com.g2switch.core.service.Provider.XXXX

But I cannot find the enum through which I can verify the host value how can I resolve this

@vivekjyotipramanik
Copy link
Contributor

Hi rxa092,

The Host attribute is optional. Could you please remove it and give it a try. Thanks.

https://support.travelport.com/webhelp/uapi/uapi.htm#../Subsystems/Schemas/Content/Schemas/TerminalReq.html

@rxa092
Copy link
Author

rxa092 commented Oct 28, 2020

on removing the host attribute the xml created is

<?xml version="1.0" encoding="utf-16"?>
<TerminalReq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" TargetBranch="P3090173">
  <BillingPointOfSaleInfo OriginApplication="UAPI" xmlns="http://www.travelport.com/schema/common_v33_0" />
  <TerminalCommand xmlns="http://www.travelport.com/schema/terminal_v33_0">*G5K0GW</TerminalCommand>
</TerminalReq>

The exception now is
Error unmarshalling message body: Expected "{http://www.travelport.com/schema/common_v33_0}HostToken" start tag, found "{http://www.travelport.com/schema/terminal_v33_0}TerminalCommand" start tag

@vivekjyotipramanik
Copy link
Contributor

Hi rxa092,

I actually asked you to remove the Host attribute, not the HostToken element. Please try with the below xml. Thanks.

<?xml version="1.0" encoding="utf-16"?>
<TerminalReq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" TargetBranch="P3090173">
  <BillingPointOfSaleInfo OriginApplication="UAPI" xmlns="http://www.travelport.com/schema/common_v33_0" />
  <HostToken Key="123456" xmlns="http://www.travelport.com/schema/common_v33_0">Raza</HostToken>
  <TerminalCommand xmlns="http://www.travelport.com/schema/terminal_v33_0">*AB124</TerminalCommand>
</TerminalReq>

@rxa092
Copy link
Author

rxa092 commented Oct 29, 2020

I removed the Host attribute from the HostToken element. The xml I got is below

<?xml version="1.0" encoding="utf-16"?>
<TerminalReq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" TargetBranch="P3090173">
  <BillingPointOfSaleInfo OriginApplication="UAPI" xmlns="http://www.travelport.com/schema/common_v33_0" />
  <HostToken Key="123456" xmlns="http://www.travelport.com/schema/common_v33_0">Raza</HostToken>
  <TerminalCommand xmlns="http://www.travelport.com/schema/terminal_v33_0">*AB124</TerminalCommand>
</TerminalReq>

Now I get the exception Name is null

@vivekjyotipramanik
Copy link
Contributor

Hi rxa092,

You have to first start the session, using CreateTerminalSessionReq/Rsp. Then in the response you will received the host token. You have to use that hosttoken in TerminalReq. Also, you have to have access to use Terminal via UAPI. To receive access, please reach out to your Travelport Account Manager. Please let me know how it goes. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants