You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Raghavan <ra...@gmail.com> on 2016/09/24 19:38:32 UTC
Header Values are coming as null in Apache camel Exchange
Below are my web-service request , Route and Request-Validator,
Web-service request:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<stlh:SabreHeader
xmlns:stlh="http://services.sabre.com/STL_Header/v02_01">
<stlh:Service version="1.0.0">GetHotelMediaRQ</stlh:Service>
<stlh:Identification>
<stlh:CustomerID>CID12345</stlh:CustomerID>
<stlh:CustomerAppID>AppTest</stlh:CustomerAppID>
<stlh:ConversationID>05EFPElI2A4KudU75863JIxqAhQJtAx0</stlh:ConversationID>
<stlh:MessageID>4DTTQaHGSifFUtmSoMHAiq</stlh:MessageID>
<stlh:TimeStamp>2014-11-07T14:45:42.725-06:00</stlh:TimeStamp>
</stlh:Identification>
</stlh:SabreHeader>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:BinarySecurityToken
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
wsu:Id="athId">${athId}</wsse:BinarySecurityToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<GetHotelMediaRQ xmlns="http://services.sabre.com/hotel/media/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
xsi:schemaLocation="http://services.sabre.com/hotel/media/v1
GetHotelMediaRQ.xsd">
<HotelRefs>
<HotelRef HotelCode="184769" CodeContext="Sabre">
<ImageRef MaxImages="1">
<Images>
<Image Type="ORI"/>
</Images>
<AdditionalInfo>
<Info Type="CAPTION">true</Info>
</AdditionalInfo>
<Languages>
<Language Code="EN"/>
</Languages>
</ImageRef>
</HotelRef>
</HotelRefs>
</GetHotelMediaRQ>
</soap:Body>
</soap:Envelope>
RequestValidator:
public void validate(GetHotelMediaRQ request, Exchange exchange) throws
Exception {
TransactionContext context =
BusExtensions.getTransactionContext(exchange);
Collection<HotelRef> hotelRefList = getInstance().convert(request,
Collection.class);
Set<Property> properties = new HashSet<>();
String customerAppId = exchange.getIn().getHeader("customerAppID",
String.class);
String customerId = exchange.getIn().getHeader("customerID",
String.class);
But customerAppId(AppTest) and CustomerId(CI12345) is coming as null when i
try to access via Exchange object.
Regards,
Raghavan
--
View this message in context: http://camel.465427.n5.nabble.com/Header-Values-are-coming-as-null-in-Apache-camel-Exchange-tp5787995.html
Sent from the Camel - Users mailing list archive at Nabble.com.