keep getting ERR.SWS.CLIENT.VALIDATION_FAILED exception when calling PassengerDetailsRQ - c#

I am using Sabre SOAP Api in C#. I got the response from session creation successfully, I added wsdl Service Reference
http://files.developer.sabre.com/wsdl/sabreXML1.0.00/ServicesPlatform/PassengerDetails3.3.0RQ.wsdl to my test project and pass required values to parameters in the request as given in the documentation https://developer.sabre.com/docs/read/soap_apis/management/itinerary/Passenger_Details.
this is my xml to that is send to sabre and Getting Exception
<?xml version="1.0" encoding="utf-16"?>
<PassengerDetailsRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.2.1"
IgnoreOnError="false">
<MiscSegmentSellRQ xmlns="http://services.sabre.com/sp/pd/v3_2">
<MiscSegment DepartureDateTime="2018-01-10T16:45" InsertAfter="0" NumberInParty="1" Status="HK" Type="OTH">
<OriginLocation LocationCode="SAN" />
<Text>America Tours</Text>
<VendorPrefs>
<Airline Code="DL" />
</VendorPrefs>
</MiscSegment>
</MiscSegmentSellRQ>
<PostProcessing xmlns="http://services.sabre.com/sp/pd/v3_2">
<EndTransactionRQ>
<EndTransaction Ind="true">
<Email Ind="true" />
</EndTransaction>
<Source ReceivedFrom="SWS TESTING" />
</EndTransactionRQ>
</PostProcessing>
<PreProcessing xmlns="http://services.sabre.com/sp/pd/v3_2" />
<PriceQuoteInfo xmlns="http://services.sabre.com/sp/pd/v3_2">
<Link NameNumber="1.1" Record="1" />
</PriceQuoteInfo>
<SpecialReqDetails xmlns="http://services.sabre.com/sp/pd/v3_2">
<SpecialServiceRQ>
<SpecialServiceInfo>
<SecureFlight>
<PersonName DateOfBirth="02/02/1998" NameNumber="1.1">
<GivenName>Usama QW</GivenName>
<Surname>Alam</Surname>
</PersonName>
<VendorPrefs>
<Airline />
</VendorPrefs>
</SecureFlight>
</SpecialServiceInfo>
</SpecialServiceRQ>
</SpecialReqDetails>
<TravelItineraryAddInfoRQ xmlns="http://services.sabre.com/sp/pd/v3_2">
<AgencyInfo>
<Address>
<AddressLine>America Tours</AddressLine>
<CityName>Los Angeles</CityName>
<CountryCode>US</CountryCode>
<PostalCode>90020</PostalCode>
<StateCountyProv StateCode="CA" />
<StreetNmbr>3434 West 6th Street Suite 400-6</StreetNmbr>
</Address>
<Ticketing TicketType="7T-A" />
</AgencyInfo>
<CustomerInfo>
<ContactNumbers>
<ContactNumber NameNumber="1.1" Phone="213-738-8185" PhoneUseType="A" />
<ContactNumber NameNumber="1.1" Phone="3162881034" PhoneUseType="A" />
</ContactNumbers>
<Email Address="www.usamaalam60#gmail.com" ShortText="AmericaTours" />
<Email Address="admin#koreaonly.com" ShortText="AmericaTours" />
<PersonName NameNumber="1.1" NameReference="MR" PassengerType="ADT">
<GivenName>Usama sd</GivenName>
<Surname>Alam</Surname>
</PersonName>
</CustomerInfo>
</TravelItineraryAddInfoRQ>
</PassengerDetailsRQ>

For this one you seem to be using invalid service version for the 3.2 namespace. Try with something like this:
*xmlns="http://services.sabre.com/sp/pd/v3_2"* and *version="3.2.0"*.
You were using version 2.2.1 here which will require a different URL.
Are you intending to use 3.2.0 version? I can see that the dates are not valid as per the schema as well. You have:
*DateOfBirth="02/02/1998"*
but should have:
*DateOfBirth="1998-02-02"*

Related

Service Fabric Application doesn't register and run the Actor

I am developing APIs with Service Fabric into a big solution. After I created the services I needed (an Actor, a stateful and a stateless with .NET Framework) and I made a walking skeleton of the APIs.
I started to test and service fabric always threw the error "Service does not exist" (I'm 100% sure that the uri was right) when was the time to call the Actor (same error with both ActorProxyFactory and ActorProxy). I wathced on Cluster Explorer and under my SF App there was only the other two service. But the ActorServiceType was registered.
So I decide to create two simple SF app with an actor and I got the same error and also I don't see them on Cluster explorer.
In no projects I touched the ServiceManifest, ApplicationManifest or whatelse.
Here the versions of the tools I use:
Windows 11 Enterprise
Visual Studio Enterprise v16.11.9 with .Net Framework 4.7.1
Service Fabric Runtime 8.1.321.9590
Serive Fabric SDK 5.1.321.9590
Nuget Microsoft.SerivceFabric 8.1.321
Nuget Microsoft.ServiceFabric.Actors 5.1.321 (For the nuget packages I tried everything)
Microsoft.VisualStudio.Azure.Fabric.MSBuild 1.7.6 (also this I tried
every version)
My auto-generated setting.xml:
<?xml version="1.0" encoding="utf-8"?>
<Settings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<Section Name="MyActorServiceReplicatorConfig">
<Parameter Name="ReplicatorEndpoint" Value="MyActorServiceReplicatorEndpoint" />
<Parameter Name="BatchAcknowledgementInterval" Value="0.005" />
</Section>
<Section Name="MyActorServiceReplicatorSecurityConfig">
<Parameter Name="CredentialType" Value="None" />
</Section>
<!-- The content will be generated during build -->
</Settings>
My auto-generated service-manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="MyActorPkg" Version="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<ServiceTypes>
<StatefulServiceType ServiceTypeName="MyActorServiceType" HasPersistedState="true">
<Extensions>
<Extension Name="__GeneratedServiceType__" GeneratedId="5f4d2e71-68d5-43f4-b8a3-60990017b54d|Persisted">
<GeneratedNames xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema">
<DefaultService Name="MyActorService" />
<ReplicatorEndpoint Name="MyActorServiceReplicatorEndpoint" />
<ReplicatorConfigSection Name="MyActorServiceReplicatorConfig" />
<ReplicatorSecurityConfigSection Name="MyActorServiceReplicatorSecurityConfig" />
<StoreConfigSection Name="MyActorServiceLocalStoreConfig" />
<ServiceEndpointV2_1 Name="MyActorServiceEndpointV2_1" />
</GeneratedNames>
</Extension>
</Extensions>
</StatefulServiceType>
</ServiceTypes>
<CodePackage Name="Code" Version="1.0.0">
<EntryPoint>
<ExeHost>
<Program>MyActor.exe</Program>
</ExeHost>
</EntryPoint>
</CodePackage>
<ConfigPackage Name="Config" Version="1.0.0" />
<Resources>
<Endpoints>
<Endpoint Name="MyActorServiceEndpointV2_1" />
<Endpoint Name="MyActorServiceReplicatorEndpoint" />
</Endpoints>
</Resources>
<!-- The content will be generated during build -->
</ServiceManifest>
my auto-generated application-manifest:
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="MyActorPkg" Version="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<ServiceTypes>
<StatefulServiceType ServiceTypeName="MyActorServiceType" HasPersistedState="true">
<Extensions>
<Extension Name="__GeneratedServiceType__" GeneratedId="5f4d2e71-68d5-43f4-b8a3-60990017b54d|Persisted">
<GeneratedNames xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema">
<DefaultService Name="MyActorService" />
<ReplicatorEndpoint Name="MyActorServiceReplicatorEndpoint" />
<ReplicatorConfigSection Name="MyActorServiceReplicatorConfig" />
<ReplicatorSecurityConfigSection Name="MyActorServiceReplicatorSecurityConfig" />
<StoreConfigSection Name="MyActorServiceLocalStoreConfig" />
<ServiceEndpointV2_1 Name="MyActorServiceEndpointV2_1" />
</GeneratedNames>
</Extension>
</Extensions>
</StatefulServiceType>
</ServiceTypes>
<CodePackage Name="Code" Version="1.0.0">
<EntryPoint>
<ExeHost>
<Program>MyActor.exe</Program>
</ExeHost>
</EntryPoint>
</CodePackage>
<ConfigPackage Name="Config" Version="1.0.0" />
<Resources>
<Endpoints>
<Endpoint Name="MyActorServiceEndpointV2_1" />
<Endpoint Name="MyActorServiceReplicatorEndpoint" />
</Endpoints>
</Resources>
<!-- The content will be generated during build -->
</ServiceManifest>
my local1node.xml file:
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="fabric:/TEST2.MYACTOR.SF" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<Parameters />
</Application>
screens cluster explorer:
screen cluster explorer
screen cluster explorer service type
The solution of this problem found on this github issue with a step-by-step guide.
In few words if you have more than installation of Visual Studio (2019 and 2022) a service fabric package cache go in conflict.

Tizen.NET NfcCardEmulation throws UnsupportedException (with added privileges)

I had a issue with a Tizen.NET Api v4. Generally i need cardemulation in the watch, but while executing static method
NfcManager.GetCardEmulationAdapter()
i am gettings logs
tizen-manifest.xml looks like (and he was generating by vs2019 with Tizen ext)
<?xml version="1.0" encoding="utf-8"?>
<manifest package="tizenapp" version="1.0.1" api-version="4" xmlns="http://tizen.org/ns/packages">
<profile name="wearable" />
<ui-application appid="tizenapp" exec="tizenapp.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>tizenapp</label>
<icon>tizenapp.png</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
<splash-screens />
</ui-application>
<shortcut-list />
<privileges>
<privilege>http://tizen.org/privilege/secureelement</privilege>
<privilege>http://tizen.org/privilege/nfc</privilege>
<privilege>http://tizen.org/privilege/nfc.cardemulation</privilege>
<privilege>http://tizen.org/feature/network.nfc.card_emulation</privilege>
<privilege>http://tizen.org/feature/network.nfc</privilege>
</privileges>
<dependencies />
<provides-appdefined-privileges />
<feature name="http://tizen.org/feature/network.nfc">true</feature>
<feature name="http://tizen.org/feature/network.nfc.card_emulation">true</feature>
<feature name="http://tizen.org/feature/network.secure_element">true</feature>
<feature name="http://tizen.org/feature/network.secure_element.ese">true</feature>
<feature name="http://tizen.org/feature/network.secure_element.uicc">true</feature>
</manifest>
I dont know what i need to fix this problems.
It looks like a simple typo in the implementation. It's fixed in API5 and later.
https://github.com/Samsung/TizenFX/pull/578/files
I'm not sure if there's any workaround for this when targetting for API4, because it's not about a privilege but a feature.

How to get list of Sabre Traveler Profiles using EPS_EXT_ProfileSearchRQ

I'm using the EPS_EXT_ProfileSearchRQ Sabre API, trying to gather a list of profile references (TPA_Identities) for a given Corporate Profile. My payloads are below (redacted) - all I am getting back is the corporate profile itself, not the traveler level references, despite indicating the ProfileTypeCode of "TVL".
What am I getting wrong with this request?
Request:
<?xml version="1.0" encoding="utf-16"?>
<Sabre_OTA_ProfileSearchRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="6.46" ReturnPaymentCardToken="Y">
<ProfileSearchCriteria ProfileNameOnly="Y" ReturnCount="250" xmlns="http://www.sabre.com/eps/schemas">
<TPA_Identity ProfileTypeCode="TVL" ClientCode="TN" ClientContextCode="TMP" ProfileName="COMPANY NAME" DomainID="XX12" />
<CustomerReferenceInfo />
</ProfileSearchCriteria>
Response:
<?xml version="1.0" encoding="utf-16"?>
<Sabre_OTA_ProfileSearchRS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" TimeStamp="2019-06-08T19:19:31.529Z" Version="6.51">
<ResponseMessage xmlns="http://www.sabre.com/eps/schemas">
<Success />
</ResponseMessage>
<ProfileInfo xmlns="http://www.sabre.com/eps/schemas">
<Profile CreateDateTime="2018-03-30T20:51:31.386Z" UpdateDateTime="2018-04-18T15:33:08.904Z" PrimaryLanguageIDCode="EN-US">
<TPA_Identity ClientCode="TN" ClientContextCode="MYS" UniqueID="6164723212" ProfileTypeCode="TVL" ProfileName="COMPANY NAME" ProfileNameModifyIndicator="Y" ProfileDescription="COMPANY NAME" DomainID="XX12" ProfileStatusCode="AC">
<ProfileSubType SubTypeCode="NN" />
</TPA_Identity>
<Traveler>
<Customer ChildIndicator="N" SeniorIndicator="N" LapInfantIndicator="N" IsSubjectToSecureFlightRule="N">
<Email EmailTypeCode="UNK" EmailAddress="SPETERSON#COMPANYNAME.COM" OrderSequenceNo="1" />
<Address LocationTypeCode="BUS" Attention="COMPANY NAME" OrderSequenceNo="1">
<AddressLine>5331 XXXX STREET</AddressLine>
<CityName>ROGER</CityName>
<PostalCd>81205</PostalCd>
<StateCode>AK</StateCode>
</Address>
<CustLoyalty VendorTypeCode="CR" VendorCode="ZI" MembershipID="X1A87DG" OrderSequenceNo="1" />
</Customer>
<TPA_Extensions>
<CustomerReferenceInfo TripTypeCode="AZ" BranchID="CMI" ReferenceID="888" OrderSequenceNo="1" />
<STARData STARName="COMPANY NAME" OrderSequenceNo="1"></STARData>
</TPA_Extensions>
</Traveler>
</Profile>
</ProfileInfo>
</Sabre_OTA_ProfileSearchRS>
It all depends on how you have built your Profiles structure. If you are looking for all of the Traveler profiles that are associated to the "COMPANY NAME" corporate profile, you could use something like this:
<Sabre_OTA_ProfileSearchRQ xmlns="http://www.sabre.com/eps/schemas" xmlns:ns2="http://services.sabre.com/res/tir/v3_9" xmlns:ns3="http://services.sabre.com/res/or/v1_9" xmlns:ns4="http://services.sabre.com/STL/v01" xmlns:ns5="http://webservices.sabre.com/triprecord" xmlns:ns6="http://webservices.sabre.com/pnrbuilder/v1_19" xmlns:ns7="http://services.sabre.com/res/or/v1_14" TimeStamp="2019-06-10T17:04:53.879+08:00" Version="6.35">
<ProfileSearchCriteria CountAll="Y" PageNumber="1" ReturnCount="50" SearchOperationType="AND">
<TPA_Identity ClientCode="TN" ClientContextCode="TMP" DomainID="XX12" ProfileName="*" ProfileTypeCode="TVL"/>
<AssociatedProfiles AssocProfileName="COMPANY NAME" IncludeTemplateAssoc="Y"/>
<SortPreference SortByCreateDate="N" SortByProfileName="Y"/>
</ProfileSearchCriteria>
</Sabre_OTA_ProfileSearchRQ>
Bear in mind that the request is also looking for profiles that are associated within the template, if that's available, with IncludeTemplateAssoc="Y". So, this search will look for all of your TVL profiles, given they are associated to that particular CRP profile, through the profiles themselves or through an association object (template).

.NET OData error with decimals: Type mismatch

I'm currently trying to get rid of OData error which looks like a problem with decimal parsing/deserializing.
I have working OData API (using System.Web.Http.OData library) in my ASP.NET MVC application and user can download OData Feed file *.odc pointing to said OData API. When there is a decimal in OData API response, such as
<d:Value m:type="Edm.Decimal">50.50</d:Value>
and user wants to open OData Feed file in Excel (tested on Excel 2016) to fetch data he gets an error:
We couldn't get data from the Data Model. Here's the error message we got:
The following system error occurred: Type mismatch.
What is intersting is that there is no error when the decimal value has no decimal part, like this:
<d:Value m:type="Edm.Decimal">50.00</d:Value>
Here's complete API response (with urls cut out):
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="xxxxxxxxx" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<id>http://schemas.datacontract.org/2004/07/</id>
<title />
<updated>2016-06-22T11:01:10Z</updated>
<link rel="self" href="xxxxxxxxxxxxx" />
<entry>
<id>xxxxx</id>
<category term="Itm.Erp.Domain.Finance.CashRegistryListView" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="xxxx" />
<link rel="self" href="xxxx" />
<title />
<updated>2016-06-22T11:01:10Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:Number>001</d:Number>
<d:Location m:null="true" />
<d:Direction>In</d:Direction>
<d:Person>Sam</d:Person>
<d:Company>Company</d:Company>
<d:Date m:type="Edm.DateTime">2016-06-06T00:00:00</d:Date>
<d:IsProcessed m:type="Edm.Boolean">true</d:IsProcessed>
<d:ExpenseType m:null="true" />
<d:Value m:type="Edm.Decimal">50.50</d:Value>
<d:EffectiveValue m:type="Edm.Decimal">50.50</d:EffectiveValue>
<d:Seller m:null="true" />
<d:DocumentNumber m:null="true" />
</m:properties>
</content>
</entry>
</feed>
What is the problem with decimals in API response and is there a way to fix it? Does anyone had a similar problem and managed to solve it?

exporting XmlDocument to excel

I have a XmlDocument in which i have hierarchical data and i want to export this data to excel. Please help me to get out of this.
I have tried to read this data into a dataset but it is not working for me.
Please send xml sample for more information.
Your code loads xml into dataset, so,
if your xml doesn't exported from DataSet, you could use LinqToXml.
for example:
xml:
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title>Business Logic Toolkit for .NET</title>
<link>http://www.bltoolkit.net</link>
<description />
<lastBuildDate>2009-01-11</lastBuildDate>
<item>
<title>Version 3.1 released</title>
<link>http://www.bltoolkit.net/Download.htm</link>
<description>See <a href="http://www.bltoolkit.net/Download.htm">change log</a></description>
<pubDate>2009-01-11</pubDate>
</item>
<item>
<title>Version 3.0 released</title>
<link>http://www.bltoolkit.net/Download.htm</link>
<description>See <a href="http://www.bltoolkit.net/Download.htm">change log</a></description>
<pubDate>2008-05-21</pubDate>
</item>
<item>
<title>New examples</title>
<link>http://www.bltoolkit.net/Doc/</link>
<description>See the following <a href="http://www.bltoolkit.net/Doc/">link</a></description>
<pubDate>2008-05-10</pubDate>
</item>
</channel>
</rss>
this code get all rss items title
var path = #"D:\rss.xml";
var doc = XDocument.Load(path);
rssTitles = doc.Root.Descendants("item").Elements("title").Select(el => el.Value);
results:
Version 3.1 released
Version 3.0 released
New examples
<Roles>
<BalanceSheets RoleURL="http://fluor.com/role/BalanceSheets" RoleDefination="0020 - CONDENSED CONSOLIDATED BALANCE SHEET">
<Taxonomys>
<StatementOfFinancialPositionAbstract TaxonomyPresentationId="StatementOfFinancialPositionAbstract">
<StatementLineItems TaxonomyPresentationId="StatementOfFinancialPositionAbstract">
<LiabilitiesAndStockholdersEquityAbstract TaxonomyPresentationId="StatementLineItems">
<CommitmentsAndContingencies TaxonomyPresentationId="LiabilitiesAndStockholdersEquityAbstract" />
<OtherLiabilitiesNoncurrent TaxonomyPresentationId="LiabilitiesAndStockholdersEquityAbstract" />
<NonRecourseProjectFinanceDebtNoncurrent TaxonomyPresentationId="LiabilitiesAndStockholdersEquityAbstract" />
<LongTermDebtNoncurrent TaxonomyPresentationId="LiabilitiesAndStockholdersEquityAbstract" />
<LiabilitiesCurrentAbstract TaxonomyPresentationId="LiabilitiesAndStockholdersEquityAbstract">
<BillingsInExcessOfCost TaxonomyPresentationId="LiabilitiesCurrentAbstract" />
<LiabilitiesCurrent TaxonomyPresentationId="LiabilitiesCurrentAbstract" />
<AccountsPayable TaxonomyPresentationId="LiabilitiesCurrentAbstract" />
<BridgeLoan TaxonomyPresentationId="LiabilitiesCurrentAbstract" />
<NonRecourseProjectFinanceDebtCurrent TaxonomyPresentationId="LiabilitiesCurrentAbstract" />
<EmployeeRelatedLiabilities TaxonomyPresentationId="LiabilitiesCurrentAbstract" />
<OtherAccruedLiabilities TaxonomyPresentationId="LiabilitiesCurrentAbstract" />
<ConvertibleDebtCurrent TaxonomyPresentationId="LiabilitiesCurrentAbstract" />
</LiabilitiesCurrentAbstract>
</LiabilitiesAndStockholdersEquityAbstract>
</StatementLineItems>
</StatementOfFinancialPositionAbstract>
</Taxonomys>
</BalanceSheets>
</Roles>

Categories