Error ENTRY VALID ONLY FOR SUBSCRIBER PNR with TravelItineraryAddInfo Sabre - sabre

I want call TravelItineraryAddInfo to add passenger to PNR, but api return error ENTRY VALID ONLY FOR SUBSCRIBER PNR , ERR.SWS.HOST.ERROR_IN_RESPONSE.
How can I fix this issue ?
My request
<TravelItineraryAddInfoRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" TimeStamp="2016-05-17T15:30:00-06:00" Version="2.2.0" ReturnHostCommand="false">
<AgencyInfo>
<Address>
<AddressLine>xxxx</AddressLine>
<CityName>xxx</CityName>
<CountryCode>XX</CountryCode>
<PostalCode>xxxx</PostalCode>
<StateCountyProv StateCode="xx"/>
<StreetNmbr>xx</StreetNmbr>
</Address>
</AgencyInfo>
<CustomerInfo>
<ContactNumbers>
<ContactNumber InsertAfter="0" LocationCode="VN" NameNumber="1.1" Phone="984163620" PhoneUseType="H"/>
</ContactNumbers>
<Email Address="xxx#gmail.com" LanguageOverride="O" NameNumber="1.1" Type="CC"/>
<PersonName Infant="false" NameNumber="1.1" PassengerType="ADT">
<GivenName>Smith</GivenName>
<Surname>TEST</Surname>
</PersonName>
</CustomerInfo>
This is response api:
<stl:SystemSpecificResults>
<stl:Message>.ENTRY VALID ONLY FOR SUBSCRIBER PNR</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>

Related

Getting FQTV DATA EXISTS FOR THIS PASSENGER in TravelItineraryModifyInfoRQ

request-
<soapenv:Body>
<ns:TravelItineraryModifyInfoRQ Version="2.1.1">
<ns:CustomerInfo>
<ns:CustLoyalty MembershipID="520000001221" NameNumber="02.01"
ProgramID="EY" RPH="1" />
</ns:CustomerInfo>
</ns:TravelItineraryModifyInfoRQ>
</soapenv:Body>
response-
<soap-env:Body>
<TravelItineraryModifyInfoRS Version="2.1.1"
xmlns="http://webservices.sabre.com/sabreXML/2011/10"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:stl="http://services.sabre.com/STL/v01">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="BusinessLogic" timeStamp="2018-04-20T13:13:39-
05:00">
<stl:SystemSpecificResults>
<stl:Message>.EY/EY FQTV DATA EXISTS FOR THIS PASSENGER.SEE
ITEM 02</stl:Message>
<stl:Message>.ENTRY NOT PROCESSED BEGINNING WITH</stl:Message>
<stl:Message>FF1¤EY100014486283-02.01</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</TravelItineraryModifyInfoRS>
</soap-env:Body>
Is modification not allowed on membership id.
http://webservices.sabre.com/drc/servicedoc/TravelItineraryAddInfoLLSRQ_v2.2.0_Sample_Payloads.xml
Seems it can be.
It would appear that the FF data for passenger 02.01 is stored in RPH2, and you're attempting to modify 1, while the passenger's data is still in RPH2.
Try modifying the request to RPH 2:
<soapenv:Body>
<ns:TravelItineraryModifyInfoRQ Version="2.1.1">
<ns:CustomerInfo>
<ns:CustLoyalty MembershipID="520000001221" NameNumber="02.01"
ProgramID="EY" RPH="2" />
</ns:CustomerInfo>
</ns:TravelItineraryModifyInfoRQ>
</soapenv:Body>

How do I add SSR OSI to SABRE 2.2.1 API

Below is sample request I made, and below is the response I'm getting.
If you can post sample SpecialServiceRq OSI entry request and response sample that would help a lot.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<SpecialServiceRQ ReturnHostCommand="false" TimeStamp="2018-03-05T19:02:32.219-05:00" Version="2.2.1" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:ns2="http://services.sabre.com/STL/v01">
<SpecialServiceInfo>
<SecureFlight SegmentNumber="A">
<PersonName DateOfBirth="1969-02-25" Gender="M" NameNumber="1.1">
<GivenName>LIAM</GivenName>
<Surname>JACKSON</Surname>
</PersonName>
</SecureFlight>
<Service SSR_Code="OSI">
<Text>CTCE/ACCEPT//TEST.CORP.COMPANY.COM</Text>
</Service>
</SpecialServiceInfo>
</SpecialServiceRQ>]
[03-05-18 19:02:32.462] [SplitAgentBooker_10009498321_10009498321_2139481603] INFO SABREpl_timings - : T:0.234 secs S:ABE_ABEBOOKD01_9RVB_000000000002 A:SpecialServiceLLSRS M:2139481603_37114603_37772403_14 RSP: [<?xml version="1.0" encoding="UTF-8"?>
<SpecialServiceRS Version="2.2.1" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:stl="http://services.sabre.com/STL/v01" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<stl:ApplicationResults status="NotProcessed">
<stl:Error timeStamp="2018-03-05T18:02:32-06:00" type="BusinessLogic">
<stl:SystemSpecificResults>
<stl:Message>.CHECK ENTRY FORMAT.NOT ENT BGNG WITH</stl:Message>
<stl:Message>3OSI CTCE/ACCEPT//TEST.CORP.COMPANY.COM</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</SpecialServiceRS>
If your intention is to create the 3CTCEA/ACCEPT//TEST.CORP.COMPANY.COM-1.1 format, then you don't have to use the SecureFlight node, as that one creates the 3DOCS format.
I would advise to remove it altogether:
<SpecialServiceRQ TimeStamp="2018-03-05T19:02:32.219-05:00" Version="2.2.1" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:ns2="http://services.sabre.com/STL/v01" ReturnHostCommand="true">
<SpecialServiceInfo>
<Service SSR_Code="CTCE" SegmentNumber="A">
<PersonName NameNumber="1.1"/>
<Text>ACCEPT//TEST.CORP.COMPANY.COM</Text>
</Service>
</SpecialServiceInfo>
This way you will create the above format. If this is not the format let me know which one is and I will help with that one as well.

SOAP API alternative for geo-autocomplete

Is there a SOAP API alternative for geo-autocomplete that is available in REST API? Is it EncodeDecodeLLSRQ? If so, it is always providing the below response when I try with the below provided request. I get the same response for the example provided in doc too.
<EncodeDecodeRS Version="2.0.0" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="Application" timeStamp="2016-10-26T03:33:02-05:00">
<stl:SystemSpecificResults>
<stl:Message>Unexpected request processing error</stl:Message>
<stl:ShortText>ERR.SWS.PROVIDER.REQUEST_HANDLER_ERROR</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</EncodeDecodeRS>
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:mes="http://www.ebxml.org/namespaces/messageHeader" xmlns:ns="http://webservices.sabre.com/sabreXML/2011/10">
<soapenv:Header>
<sec:Security>
<sec:BinarySecurityToken>--Token--</sec:BinarySecurityToken>
</sec:Security>
<mes:MessageHeader>
<mes:From>
<mes:PartyId>from</mes:PartyId>
</mes:From>
<mes:To>
<mes:PartyId>ws</mes:PartyId>
</mes:To>
<mes:CPAId>--CPAId--</mes:CPAId>
<mes:ConversationId>eservices#sabre.com</mes:ConversationId>
<mes:Action>EncodeDecodeLLSRQ</mes:Action>
<mes:MessageData>
<mes:MessageId>00000</mes:MessageId>
<mes:Timestamp>233</mes:Timestamp>
</mes:MessageData>
</mes:MessageHeader>
</soapenv:Header>
<soapenv:Body>
<ns:EncodeDecodeRQ Version="2.0.0">
<ns:Encode>
<ns:Address>
<ns:CityName>Atlanta</ns:CityName>
</ns:Address>
</ns:Encode>
</ns:EncodeDecodeRQ>
</soapenv:Body>
</soapenv:Envelope>
I don't think EncodeDecodeLLSRQ was designed to do what you're looking for but it might just work. For example, when entering an incomplete city name, the service will return a list of possible values.
RQ:
<CityName>MONTEV</CityName>
RS:
<Text>MVD MONTEVIDEO, URUGUAY</Text>
<Text>MVE MONTEVIDEO MN, MINNESOTA,USA</Text>
<Text>FMV MONTEVIDEO FLUVIA, URUGUAY</Text>
<Text>VDT MONTEVIDEO TC BUS, URUGUAY</Text>
Do you have access to SOAP API? If so, could you please share the complete RQ to see if there's something wrong there?

What is SOAP Request Body for Sabre hotel reservation API [ OTA_HotelResLLSRQ ]

I am working hotel reservation work flow. But I struggled on Hotel Reservation API. Below I mentioned step by step activities what I done. Pls help me to solve the issue.
I Searched New York ["NYC"] city hotels using OTA_HotelAvailRQ API and got the successful response.
From that response picked hotel code [ HotelCode="0048286" ] property and supplied to HotelPropertyDescriptionLLSRQ api then successful response gotted.
From that response picked first RPH attribute of room rate element from room rates element [ < RoomRates > < RoomRate RPH="001" > ] and supplied to the OTA_HotelResLLSRQ API.
But following error happend. Workflows are tested in SoapUI.
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="BusinessLogic" timeStamp="2016-08-20T03:19:25-05:00">
<stl:SystemSpecificResults>
<stl:Message>FORMAT</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
OTA_HotelAvailRQ API :
Request Body :
<ns:OTA_HotelAvailRQ Version="2.2.1">
<ns:AvailRequestSegment>
<ns:Customer>
<ns:Corporate>
<ns:ID>ABC1223</ns:ID>
</ns:Corporate>
</ns:Customer>
<ns:GuestCounts Count="2" />
<ns:HotelSearchCriteria>
<ns:Criterion>
<ns:HotelRef HotelCityCode="NYC" />
</ns:Criterion>
</ns:HotelSearchCriteria>
<ns:TimeSpan End="09-24" Start="09-22" />
</ns:AvailRequestSegment>
</ns:OTA_HotelAvailRQ>
Response Body or Soap Body :
<OTA_HotelAvailRS Version="2.2.1" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01">
<stl:ApplicationResults status="Complete">
<stl:Success timeStamp="2016-08-20T03:07:02-05:00"/>
</stl:ApplicationResults>
<AdditionalAvail Ind="true"/>
<AvailabilityOptions>
<AvailabilityOption RPH="001">
<BasicPropertyInfo AreaID="000E" ChainCode="WV" Distance="M" GEO_ConfidenceLevel="1" HotelCityCode="JFK" HotelCode="0048286" HotelName="HOTEL ON RIVINGTON" Latitude="40.719970" Longitude="-73.987990">
<Address>
<AddressLine>107 RIVINGTON STREET</AddressLine>
<AddressLine>NEW YORK NY 10002</AddressLine>
</Address>
<ContactNumbers>
<ContactNumber Fax="1-212-475 5959" Phone="1-212-475 2600"/>
</ContactNumbers>
<DirectConnect>
<Alt_Avail Ind="false"/>
<DC_AvailParticipant Ind="true"/>
<DC_SellParticipant Ind="true"/>
<RatesExceedMax Ind="false"/>
<UnAvail Ind="false"/>
</DirectConnect>
<LocationDescription Code="G">
<Text>NEW YORK</Text>
</LocationDescription>
<Property Rating="NTM">
<Text>4 CROWN</Text>
</Property>
<PropertyOptionInfo>
<!-- deleted -->
</PropertyOptionInfo>
<RoomRate RateLevelCode="RAC">
<AdditionalInfo>
<CancelPolicy Numeric="00"/>
</AdditionalInfo>
<HotelRateCode>RAC</HotelRateCode>
</RoomRate>
<SpecialOffers Ind="false"/>
</BasicPropertyInfo>
</AvailabilityOption>
<!-- 6 More Results are avilable below i skipped -->
</AvailabilityOptions>
</OTA_HotelAvailRS>
</soap-env:Body>
HotelPropertyDescriptionLLSRQ
Request Body :
<SOAP-ENV:Body>
<ns4:HotelPropertyDescriptionRQ xmlns:ns2="http://services.sabre.com/STL_Header/v120" xmlns:ns3="http://services.sabre.com/STL/v01" xmlns:ns4="http://webservices.sabre.com/sabreXML/2011/10" Version="2.3.0">
<ns4:AvailRequestSegment>
<ns4:GuestCounts Count="2" />
<ns4:HotelSearchCriteria>
<ns4:Criterion>
<ns4:HotelRef HotelCode="0048286" />
</ns4:Criterion>
</ns4:HotelSearchCriteria>
<ns4:TimeSpan End="09-24" Start="09-22" />
</ns4:AvailRequestSegment>
</ns4:HotelPropertyDescriptionRQ>
</SOAP-ENV:Body>
Response Body :
<soap-env:Body>
<HotelPropertyDescriptionRS Version="2.3.0" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01">
<stl:ApplicationResults status="Complete">
<stl:Success timeStamp="2016-08-20T03:11:53-05:00"/>
</stl:ApplicationResults>
<RoomStay>
<BasicPropertyInfo ChainCode="WV" GeoConfidenceLevel="1" HotelCityCode="JFK" HotelCode="0048286" HotelName="HOTEL ON RIVINGTON" Latitude="40.719970" Longitude="-73.987990" NumFloors="20" RPH="001">
<Address>
<AddressLine>107 RIVINGTON STREET</AddressLine>
<AddressLine>NEW YORK NY 10002</AddressLine>
<CountryCode>US</CountryCode>
</Address>
<Awards>
<AwardProvider>NTM4 CROWN</AwardProvider>
</Awards>
<CheckInTime>16:00</CheckInTime>
<CheckOutTime>12:00</CheckOutTime>
<ContactNumbers>
<ContactNumber Fax="1-212-475 5959" Phone="1-212-475 2600"/>
</ContactNumbers>
<DirectConnect Ind="false">
<!--I deleted -->
</DirectConnect>
<IndexData>
<!--I deleted -->
</IndexData>
<PropertyOptionInfo>
<!--I deleted -->
</PropertyOptionInfo>
<PropertyTypeInfo>
<!--I deleted -->
</PropertyTypeInfo>
<SpecialOffers Ind="false"/>
<Taxes>
<Text>8.5PCT ST</Text>
<Text>6.25PCT CT</Text>
<Text>3USD OCC</Text>
</Taxes>
<VendorMessages>
<!--I deleted -->
</VendorMessages>
</BasicPropertyInfo>
<Guarantee>
<!-- I delete -->
</Guarantee>
<LongSellTimeIdentifier>D138CA674B4C40A4529719A000000000529719A016233031153</LongSellTimeIdentifier>
<RoomRates>
<RoomRate DirectConnect="false" GuaranteeSurchargeRequired="G" GuaranteedRateProgram="false" IATA_CharacteristicIdentification="C1KRAC" IATA_ProductIdentification="BEST AVAILABLE RATE" LowInventoryThreshold="false" RPH="001" RateChangeInd="false" RateConversionInd="false" SpecialOffer="false">
<AdditionalInfo>
<!-- deleted -->
</AdditionalInfo>
<Rates>
<Rate Amount="550.00" ChangeIndicator="false" CurrencyCode="USD" HRD_RequiredForSell="false" PackageIndicator="false" RateConversionInd="false" ReturnOfRateInd="false" RoomOnRequest="false">
<AdditionalGuestAmounts>
<AdditionalGuestAmount MaxExtraPersonsAllowed="1">
<Charges ExtraPerson="50.00"/>
</AdditionalGuestAmount>
</AdditionalGuestAmounts>
<HotelTotalPricing Amount="1269.25">
<Disclaimer>INCLUDES TAXES AND SURCHARGES</Disclaimer>
<TotalTaxes Amount="169.25">
<TaxFieldOne>162.26</TaxFieldOne>
<TaxFieldThree>3.00</TaxFieldThree>
<TaxFieldTwo>3.99</TaxFieldTwo>
<Text>STATETAX</Text>
<Text>OTHER</Text>
<Text>OTHER</Text>
</TotalTaxes>
</HotelTotalPricing>
</Rate>
</Rates>
</RoomRate>
<!-- I deleted Room Rate from RPH="002" to RPH="0025" -->
</RoomRates>
<TimeSpan Duration="0005" End="2016-09-24" Start="2016-09-22"/>
</RoomStay>
</HotelPropertyDescriptionRS>
</soap-env:Body>
OTA_HotelResLLSRQ
Request Body :
<ns2:OTA_HotelResRQ xmlns:ns2="http://webservices.sabre.com/sabreXML/2011/10" xmlns:ns3="http://services.sabre.com/STL_Header/v120" xmlns:ns4="http://services.sabre.com/STL/v01" Version="2.2.0">
<ns2:Hotel>
<ns2:BasicPropertyInfo RPH="001">
<ns2:ConfirmationNumber>ABC123</ns2:ConfirmationNumber>
</ns2:BasicPropertyInfo>
<ns2:Guarantee Type="GDPST">
<ns2:CC_Info>
<ns2:PaymentCard Code="AX" ExpireDate="2020-12" Number="1234567890" />
<ns2:PersonName>
<ns2:Surname>TEST</ns2:Surname>
</ns2:PersonName>
</ns2:CC_Info>
</ns2:Guarantee>
<ns2:GuestCounts Count="2" />
<ns2:RoomType NumberOfUnits="1"/>
<ns2:TimeSpan End="09-24T10:00" Start="09-22T08:00" />
</ns2:Hotel>
</ns2:OTA_HotelResRQ>
Response Body :
<OTA_HotelResRS Version="2.2.0" xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="BusinessLogic" timeStamp="2016-08-20T03:19:25-05:00">
<stl:SystemSpecificResults>
<stl:Message>FORMAT</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</OTA_HotelResRS>
Pls provide working Request Body for OTA_HotelResLLSRQ.
Have you tried requesting with a real test Credit Card?
https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm
The credit card number "1234567890" is likely the cause of the problem. If this is being done on Sabre's production API, a real credit card number is required here. You should also enter the card owner's real surname instead of "TEST".
My recommendation would be to enter a real valid credit number and expiry date. To prevent the booking from getting passed to the hotel, you should make a call to "IgnoreTransactionLLSRQ" right after the call to "OTA_HotelResLLSRQ".
The SOAP body for "IgnoreTransactionLLSRQ" is very simple:
<soapenv:Body>
<IgnoreTransactionRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0.0"></IgnoreTransactionRQ>
</soapenv:Body>
That will allow you to pass a valid credit card to "OTA_HotelResLLSRQ" to verify if that is the cause of your error. Once your flow is working properly, you can then replace the call to "IgnoreTransactionLLSRQ" with the proper "EndTransactionLLSRQ" to generate real bookings.
I hope that helps!
The credit card number is too short and invalid. The roomrate should have included a list of accepted cards, maybe AX is not accepted. Also it probably won't accept a name like TEST.

Decryption of SAML authenticaion response failed

I have problem with decryption of the received authentication response SAML message.
My app is connected with two IdP's of different types. Frist is ForgeRocks, OpenAM
and second Microsoft's ADFS server.
Both IdPs were provided with same service provider metadata document that contains same
certificate public keys for encyrption and signing.
Case 01
IdP : OpenAM, ForgeRock
Result : Process properly decryption and response.
Case 02
IdP : ADFS 2.0, Microsoft
Result : Failed decryption with error : CryptographicException, Bad Data.
Is it possible that encryption on IdP side is different for the same asymetric key pair ?
Or I am getting something wrong ?
As I see there are differences in EncryptedAssertion xml node. EncryptionMethod Algorithms are different.
Here are key nodes.
OpenAM, ForgeRock
<saml:EncryptedAssertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
<xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
Type="http://www.w3.org/2001/04/xmlenc#Element"
>
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
/>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
/>
<xenc:CipherData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<xenc:CipherValue xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedKey>
</ds:KeyInfo>
<xenc:CipherData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<xenc:CipherValue xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
ADFS 2.0, Microsoft
<EncryptedAssertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
<xenc:EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
>
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc" />
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<e:EncryptedKey xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
</e:EncryptionMethod>
<KeyInfo>
<ds:X509Data xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509IssuerSerial>
<ds:X509IssuerName>CN=certName</ds:X509IssuerName>
<ds:X509SerialNumber>-18xxxxxx</ds:X509SerialNumber>
</ds:X509IssuerSerial>
</ds:X509Data>
</KeyInfo>
<e:CipherData>
<e:CipherValue></e:CipherValue>
</e:CipherData>
</e:EncryptedKey>
</KeyInfo>
<xenc:CipherData>
<xenc:CipherValue></xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
As I see there are differences on used encryption methods. Also in second case there is certificate's alias name and serial number. Also serial number has negative value (maybe because I am using self signed certificate).
Thanks,
You have this exception as in corresponding xml nodes there are no data to decrypt that's the reason:
<e:CipherData>
<e:CipherValue>No data!!!</e:CipherValue>
</e:CipherData>
</e:EncryptedKey>
</KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>No data!!!</xenc:CipherValue>
</xenc:CipherData>
Example how it should be:
<EncryptedAssertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
<xenc:EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
>
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc" />
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<e:EncryptedKey xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
</e:EncryptionMethod>
<KeyInfo>
<ds:X509Data xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509IssuerSerial>
<ds:X509IssuerName>CN=name, O=Name, S=CA, C=us</ds:X509IssuerName>
<ds:X509SerialNumber>0</ds:X509SerialNumber>
</ds:X509IssuerSerial>
</ds:X509Data>
</KeyInfo>
<e:CipherData>
<e:CipherValue>qSMgmgpO0+1vhdt5wvyhNT+uh3BhmOlFD4IiWTPoj2N90nOUzwEoEkWCuGzHDizxq6rvc5eoikjgcbz5TYFlIX+eizyxcJQFl02t... SOME VALUES HERE=</e:CipherValue>
</e:CipherData>
</e:EncryptedKey>
</KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>RSCxYAMJ7RaD+MtEcnmE9EwLmvDJgTsXx5MOKJYUJiAmQWziSLNolZQYt5xgUPHJaD+co/PoWwifWuobHdClFwBBMR/lAqWAHIQldP+ro ... SOME VALUES HERE=</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
</EncryptedAssertion>

Resources