My XSLT logic is not working. Can we check why its not Sorting the S5_Loop is working but it moved L3 and SE sections above S5_Loop. Here is the XSL, I am using, its version 1.0. I can only use version 1.0. This is not right output, it should sort S5_Loop bit keep the remaining fields in same place.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="node()|#*">
<xsl:copy>
<xsl:apply-templates select="#*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/ST_Loop">
<xsl:copy>
<xsl:apply-templates>
<xsl:sort data-type="number" select="S5/S501"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
XML Input
<?xml version="1.0" encoding="UTF-8"?>
<ST_Loop>
<N1_Loop>
<N1>
<N101>CN</N101>
<N102 GROUP 03</N102>
</N1>
<N3>
<N301></N301>
</N3>
<N4>
<N401>S</N401>
<N403>-1300</N403>
<N404>US</N404>
</N4>
<G61>
<G6101>CN</G6101>
<G6102> </G6102>
<G6103>TE</G6103>
<G6104>781-596-0345</G6104>
</G61>
</N1_Loop>
<S5_Loop>
<S5>
<S501>1</S501>
<S502>LD</S502>
</S5>
<G62>
<G6202>200929</G6202>
<G6204>010000</G6204>
</G62>
<N1_Loop>
<N1>
<N101>ford</N101>
</N1>
<N3>
<N301>St</N301>
</N3>
<N4>
<N401>ster</N401>
<N403>-1656</N403>
<N404>US</N404>
</N4>
</N1_Loop>
<OID_Loop/>
</S5_Loop>
<S5_Loop>
<S5>
<S501>3</S501>
<S502>LD</S502>
</S5>
<G62/>
<N1_Loop>
<N1>
<N101>LLC</N101>
</N1>
<N3>
<N301>Great Rd</N301>
</N3>
<N4>
<N401>Qiddlesex</N401>
<N403>-2802</N403>
<N404>US</N404>
</N4>
</N1_Loop>
<OID_Loop/>
</S5_Loop>
<S5_Loop>
<S5>
<S501>5</S501>
<S502>LD</S502>
</S5>
<G62/>
<N1_Loop>
<N1>
<N101></N101>
</N1>
<N3>
<N301>St</N301>
</N3>
<N4>
<N401>Rssex</N401>
<N403>-3308</N403>
<N404>US</N404>
</N4>
</N1_Loop>
<OID_Loop/>
</S5_Loop>
<S5_Loop>
<S5>
<S501>2</S501>
<S502>UL</S502>
</S5>
<G62>
<G6202>2021929</G6202>
<G6204>040000</G6204>
</G62>
<LAD/>
<N1_Loop>
<N1>
<N101>ST</N101>
<N102></N102>
</N1>
<N3>
<N301>297 Rd</N301>
</N3>
<N4>
<N401>Bedfd</N401>
<N402>MA</N402>
<N403>-2802</N403>
<N404>US</N404>
</N4>
</N1_Loop>
</S5_Loop>
<S5_Loop>
<S5>
<S501>4</S501>
<S502>UL</S502>
</S5>
<G62>
<G6202>2021029</G6202>
<G6204>040000</G6204>
</G62>
<LAD/>
<N1_Loop>
<N1>
<N101>ST</N101>
<N102> & , INC. 02</N102>
</N1>
<N3>
<N301>13 Ell St</N301>
</N3>
<N4>
<N401>Beer</N401>
<N402>MA</N402>
<N403>-3308</N403>
<N404>US</N404>
</N4>
</N1_Loop>
</S5_Loop>
<S5_Loop>
<S5>
<S501>6</S501>
<S502>UL</S502>
</S5>
<G62>
<G6202></G6202>
<G6204>040000</G6204>
</G62>
<LAD/>
<N1_Loop>
<N1>
<N101>ST</N101>
<N102></N102>
</N1>
<N3>
<N301>450 Rd</N301>
</N3>
<N4>
<N401></N401>
<N402>MA</N402>
<N403></N403>
<N404>US</N404>
</N4>
</N1_Loop>
</S5_Loop>
<L3>
<L301>KGM</L301>
<L302>G</L302>
</L3>
<SE>
<SE01>1</SE01>
<SE02></SE02>
</SE>
</ST_Loop>
Output
<ST_Loop>
<N1_Loop>
<N1>
<N101>CN</N101>
<N102></N102>
</N1>
<N3>
<N301>450 Rd</N301>
</N3>
<N4>
<N401></N401>
<N403>-1300</N403>
<N404>US</N404>
</N4>
<G61>
<G6101>CN</G6101>
<G6102> </G6102>
<G6103>TE</G6103>
<G6104></G6104>
</G61>
</N1_Loop>
<L3>
<L301>KGM</L301>
<L302>G</L302>
</L3>
<SE>
<SE01>1</SE01>
<SE02></SE02>
</SE>
<S5_Loop>
<S5>
<S501>1</S501>
<S502>LD</S502>
</S5>
<G62>
<G6202>200929</G6202>
<G6204>010000</G6204>
</G62>
<N1_Loop>
<N1>
<N101></N101>
</N1>
<N3>
<N301></N301>
</N3>
<N4>
<N401></N401>
<N403>-1656</N403>
<N404>US</N404>
</N4>
</N1_Loop>
<OID_Loop/>
</S5_Loop>
<S5_Loop>
<S5>
<S501>2</S501>
<S502>UL</S502>
</S5>
<G62>
<G6202></G6202>
<G6204>040000</G6204>
</G62>
<LAD/>
<N1_Loop>
<N1>
<N101>ST</N101>
<N102></N102>
</N1>
<N3>
<N301>297 Rd</N301>
</N3>
<N4>
<N401></N401>
<N402>MA</N402>
<N403>-2802</N403>
<N404>US</N404>
</N4>
</N1_Loop>
</S5_Loop>
<S5_Loop>
<S5>
<S501>3</S501>
<S502>LD</S502>
</S5>
<G62/>
<N1_Loop>
<N1>
<N101></N101>
</N1>
<N3>
<N301>Rd</N301>
</N3>
<N4>
<N401></N401>
<N403>-2802</N403>
<N404>US</N404>
</N4>
</N1_Loop>
<OID_Loop/>
</S5_Loop>
<S5_Loop>
<S5>
<S501>4</S501>
<S502>UL</S502>
</S5>
<G62>
<G6202>20210929</G6202>
<G6204>040000</G6204>
</G62>
<LAD/>
<N1_Loop>
<N1>
<N101>ST</N101>
<N102></N102>
</N1>
<N3>
<N301>St</N301>
</N3>
<N4>
<N401></N401>
<N402>MA</N402>
<N403>-3308</N403>
<N404>US</N404>
</N4>
</N1_Loop>
</S5_Loop>
<S5_Loop>
<S5>
<S501>5</S501>
<S502>LD</S502>
</S5>
<G62/>
<N1_Loop>
<N1>
<N101></N101>
</N1>
<N3>
<N301>t</N301>
</N3>
<N4>
<N401>Rssex</N401>
<N403>-3308</N403>
<N404>US</N404>
</N4>
</N1_Loop>
<OID_Loop/>
</S5_Loop>
<S5_Loop>
<S5>
<S501>6</S501>
<S502>UL</S502>
</S5>
<G62>
<G6202></G6202>
<G6204>040000</G6204>
</G62>
<LAD/>
<N1_Loop>
<N1>
<N101>ST</N101>
<N102></N102>
</N1>
<N3>
<N301> Rd</N301>
</N3>
<N4>
<N401></N401>
<N402>MA</N402>
<N403>-1300</N403>
<N404>US</N404>
</N4>
</N1_Loop>
</S5_Loop>
</ST_Loop>
Currently, your stylesheet does not specify the specific parent to sort by underlying children. By specifying <xsl:apply-templates/> without a select path, you instruct processor to copy all children of current node and descendants. However, the sort nodes, S5/S501, only exists under <S5_Loop>. As a result, the other nodes without xpath returns empty and so sorts first by default ascending order. Try adding order="descending" and see <L3> and <SE> will be at the bottom!
To retain your original style, consider redesigning the <ST_Loop> template by re-applying the other nodes in their original placement using preceding-sibling and following-sibling and run sorting only on the S5_Loop nodes. Also, consider <xsl:strip-space> to remove redundant whitespace between nodes and normalize-space(.) on all text nodes to remove redundant whitespace inside text values.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|#*">
<xsl:copy>
<xsl:apply-templates select="#*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="ST_Loop">
<xsl:copy>
<xsl:apply-templates select="S5_Loop/preceding-sibling::*[name()!='S5_Loop']"/>
<xsl:apply-templates select="S5_Loop">
<xsl:sort data-type="number" select="S5/S501"/>
</xsl:apply-templates>
<xsl:apply-templates select="S5_Loop/following-sibling::*[name()!='S5_Loop']"/>
</xsl:copy>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="normalize-space(.)"/>
</xsl:template>
</xsl:stylesheet>
Related
I'm a newbie to web services. I'm using ColdFusion 2016 and want to make a call to this service url: https://apitest.authorize.net/xml/v1/request.api. This service is written in C#. How can I call a service, from ColdFusion, which is written in other language?
One more thing, I want pass the below xml data as input. How can I do this?
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>API LOGIN ID</name>
<transactionKey>TRANSACTION KEY</transactionKey>
</merchantAuthentication>
<transactionRequest>
<transactionType>authCaptureTransaction</transactionType>
<amount>139.94</amount>
<payment>
<creditCard>
<cardNumber>5424000000000015</cardNumber>
<expirationDate>1220</expirationDate>
<cardCode>999</cardCode>
</creditCard>
</payment>
<order>
<invoiceNumber>INV-12345</invoiceNumber>
<description>Golf Supplies</description>
</order>
<lineItems>
<lineItem>
<itemId>243</itemId>
<name>Golf Bag</name>
<description>Blue wheeled golf bag</description>
<quantity>1</quantity>
<unitPrice>129.99</unitPrice>
</lineItem>
<lineItem>
<itemId>42</itemId>
<name>Golf Ball</name>
<description>Long Drive II Balls</description>
<quantity>5</quantity>
<unitPrice>1.99</unitPrice>
</lineItem>
</lineItems>
<customer>
<id>39432</id>
<email>customer#example.com</email>
</customer>
<billTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address>1234 Main St</address>
<city>Pecan Springs</city>
<state>TX</state>
<zip>44628</zip>
<country>USA</country>
</billTo>
<shipTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address>PO Box 3432</address>
<city>Pecan Springs</city>
<state>TX</state>
<zip>44628</zip>
<country>USA</country>
</shipTo>
</transactionRequest>
</createTransactionRequest>
I found a solution for this.
<cfsavecontent variable="strXML">
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>API LOGIN ID</name>
<transactionKey>TRANSACTION KEY</transactionKey>
</merchantAuthentication>
<transactionRequest>
<transactionType>authCaptureTransaction</transactionType>
<amount>139.94</amount>
<payment>
<creditCard>
<cardNumber>5424000000000015</cardNumber>
<expirationDate>1220</expirationDate>
<cardCode>999</cardCode>
</creditCard>
</payment>
<order>
<invoiceNumber>INV-12345</invoiceNumber>
<description>Golf Supplies</description>
</order>
<lineItems>
<lineItem>
<itemId>243</itemId>
<name>Golf Bag</name>
<description>Blue wheeled golf bag</description>
<quantity>1</quantity>
<unitPrice>129.99</unitPrice>
</lineItem>
<lineItem>
<itemId>42</itemId>
<name>Golf Ball</name>
<description>Long Drive II Balls</description>
<quantity>5</quantity>
<unitPrice>1.99</unitPrice>
</lineItem>
</lineItems>
<customer>
<id>39432</id>
<email>customer#example.com</email>
</customer>
<billTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address>1234 Main St</address>
<city>Pecan Springs</city>
<state>TX</state>
<zip>44628</zip>
<country>USA</country>
</billTo>
<shipTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<address>PO Box 3432</address>
<city>Pecan Springs</city>
<state>TX</state>
<zip>44628</zip>
<country>USA</country>
</shipTo>
</transactionRequest>
</createTransactionRequest>
</cfsavecontent>
<cfhttp
method="post"
url=" https://apitest.authorize.net/xml/v1/request.api"
result="objGet"
>
<cfhttpparam
type="XML"
value="#strXML.Trim()#"
/>
</cfhttp>
<cfdump var="#objGet#"/>
Am trying to add a product to prestashop through web service.Am able to add everything but the product feature value is not getting added. The feature label is getting selected in backend but the value is empty. The product xml is given below
<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<product>
<id></id>
<id_manufacturer>1</id_manufacturer>
<id_supplier>1</id_supplier>
<id_category_default>5</id_category_default>
<new>1</new>
<cache_default_attribute>1</cache_default_attribute>
<id_default_image>1</id_default_image>
<id_default_combination>1</id_default_combination>
<id_tax_rules_group>1</id_tax_rules_group>
<position_in_category>0</position_in_category>
<type>simple</type>
<id_shop_default>1</id_shop_default>
<reference>demo_1</reference>
<supplier_reference></supplier_reference>
<location></location>
<width>0.000000</width>
<height>0.000000</height>
<depth>0.000000</depth>
<weight>0.000000</weight>
<quantity_discount>0</quantity_discount>
<ean13>0</ean13>
<isbn></isbn>
<upc></upc>
<cache_is_pack>0</cache_is_pack>
<cache_has_attachments>0</cache_has_attachments>
<is_virtual>0</is_virtual>
<state>1</state>
<on_sale>0</on_sale>
<online_only>0</online_only>
<ecotax>0.000000</ecotax>
<minimal_quantity>1</minimal_quantity>
<price>12.00</price>
<wholesale_price>10.00</wholesale_price>
<unity></unity>
<unit_price_ratio>0.000000</unit_price_ratio>
<additional_shipping_cost>0</additional_shipping_cost>
<customizable>0</customizable>
<text_fields>0</text_fields>
<uploadable_files>0</uploadable_files>
<active>1</active>
<redirect_type>404</redirect_type>
<id_type_redirected>0</id_type_redirected>
<available_for_order>1</available_for_order>
<available_date>0000-00-00</available_date>
<show_condition>0</show_condition>
<condition>new</condition>
<show_price>1</show_price>
<indexed>1</indexed>
<visibility>both</visibility>
<advanced_stock_management>0</advanced_stock_management>
<date_add></date_add>
<date_upd></date_upd>
<pack_stock_type>3</pack_stock_type>
<meta_description><language id="1">dsgfdsgdf</language></meta_description>
<meta_keywords><language id="1">fgdgdfgdf</language></meta_keywords>
<meta_title><language id="1">dfgdfgdf</language></meta_title>
<link_rewrite><language id="1"></language></link_rewrite>
<name><language id="1">New Product</language></name>
<description><language id="1">kk descritption</language></description>
<description_short><language id="1">kk</language></description_short>
<available_now><language id="1"></language></available_now>
<available_later><language id="1"></language></available_later>
<associations>
<categories>
<category>
<id>2</id>
</category>
</categories>
<images>
<image>
<id></id>
</image>
</images>
<combinations>
<combination>
<id></id>
</combination>
</combinations>
<product_option_values>
<product_option_value>
<id></id>
</product_option_value>
</product_option_values>
<product_features>
<product_feature>
<id>8</id>
<custom>1</custom>
<id_feature_value>222</id_feature_value>
</product_feature>
</product_features>
<tags>
<tag>
<id></id>
</tag>
</tags>
<stock_availables>
<stock_available>
<id>1</id>
<id_product_attribute>0</id_product_attribute>
</stock_available>
</stock_availables>
<accessories>
<product>
<id></id>
</product>
</accessories>
<product_bundle>
<product>
<id></id>
<quantity></quantity>
</product>
</product_bundle>
</associations>
</product>
</prestashop>
below given the feature part of the xml
<product_features>
<product_feature>
<id>8</id>
<custom>1</custom>
<id_feature_value>222</id_feature_value>
</product_feature>
</product_features>
attaching the backend screen.
I'm trying to do Issue Air Ticket workflow, but AirTicketLLSRQ returns error:
PNR HAS BEEN UPDATED-IGN AND RETRY-0049
Before this, I'm creating PNR with PassengerDetailsRQ method.
Request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<MessageHeader xmlns="http://www.ebxml.org/namespaces/messageHeader">
<From>
<PartyId>WebServiceClient</PartyId>
</From>
<To>
<PartyId>WebServiceSupplier</PartyId>
</To>
<CPAId>4PFI</CPAId>
<ConversationId>SWS-Test-4PFI</ConversationId>
<Service>PassengerDetails</Service>
<Action>PassengerDetailsRQ</Action>
<MessageData>
<MessageId>9314594d-6c40-406b-9029-b887b13906b6</MessageId>
<Timestamp>2017-07-11T08:57:38Z</Timestamp>
</MessageData>
</MessageHeader>
<Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext">
<BinarySecurityToken>
Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/CERTG!ICESMSLB\/CRT.LB!-3255696707179766905!1188118!0
</BinarySecurityToken>
</Security>
</soap:Header>
<soap:Body>
<PassengerDetailsRQ xmlns="http://services.sabre.com/sp/pd/v3_3" version="3.3.0" IgnoreOnError="false"
HaltOnError="false">
<PostProcessing IgnoreAfter="false" RedisplayReservation="true">
<EndTransactionRQ>
<EndTransaction Ind="true">
<Email Ind="true">
<Itinerary Ind="true">
<PDF Ind="true"/>
<Segment Number="1"/>
</Itinerary>
</Email>
</EndTransaction>
<Source ReceivedFrom="TEST"/>
</EndTransactionRQ>
</PostProcessing>
<SpecialReqDetails>
<AddRemarkRQ>
<RemarkInfo>
<Remark Code="H" SegmentNumber="1" Type="General">
<Text>TEXT</Text>
</Remark>
</RemarkInfo>
</AddRemarkRQ>
<SpecialServiceRQ>
<SpecialServiceInfo>
<AdvancePassenger SegmentNumber="A">
<!-- 2. a legal LLS request -->
<Document ExpirationDate="2018-05-26" Number="1234567890" Type="P">
<IssueCountry>FR</IssueCountry>
<NationalityCountry>FR</NationalityCountry>
</Document>
<PersonName DateOfBirth="1980-12-02" Gender="M" NameNumber="1.1" DocumentHolder="true">
<GivenName>JAMES</GivenName>
<MiddleName>MALCOLM</MiddleName>
<Surname>GREEN</Surname>
</PersonName>
<VendorPrefs>
<Airline Hosted="false"/>
</VendorPrefs>
</AdvancePassenger>
<SecureFlight SegmentNumber="A">
<PersonName DateOfBirth="1980-12-02" Gender="M" NameNumber="1.1">
<GivenName>JAMES</GivenName>
<Surname>GREEN</Surname>
</PersonName>
</SecureFlight>
</SpecialServiceInfo>
</SpecialServiceRQ>
</SpecialReqDetails>
<TravelItineraryAddInfoRQ>
<AgencyInfo>
<Address>
<AddressLine>SABRE TRAVEL</AddressLine>
<CityName>SOUTHLAKE</CityName>
<CountryCode>US</CountryCode>
<PostalCode>76092</PostalCode>
<StateCountyProv StateCode="TX"/>
<StreetNmbr>3150 SABRE DRIVE</StreetNmbr>
<VendorPrefs>
<Airline Hosted="true"/>
</VendorPrefs>
</Address>
<Ticketing TicketType="7T-"/>
</AgencyInfo>
<CustomerInfo>
<ContactNumbers>
<ContactNumber Phone="817-555-1212" PhoneUseType="A"/>
</ContactNumbers>
<Email Address="yury.patrin#gmail.com" NameNumber="1.1"/>
<PersonName NameNumber="1.1">
<GivenName>JAMES</GivenName>
<Surname>GREEN</Surname>
</PersonName>
</CustomerInfo>
</TravelItineraryAddInfoRQ>
</PassengerDetailsRQ>
</soap:Body>
</soap:Envelope>
Response:
<?xml version="1.0" encoding="utf-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="URI">WebServiceSupplier</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI">WebServiceClient</eb:PartyId>
</eb:To>
<eb:CPAId>4PFI</eb:CPAId>
<eb:ConversationId>SWS-Test-4PFI</eb:ConversationId>
<eb:Service>PassengerDetails</eb:Service>
<eb:Action>PassengerDetailsRS</eb:Action>
<eb:MessageData>
<eb:MessageId>1i9226s68</eb:MessageId>
<eb:Timestamp>2017-07-11T08:50:23</eb:Timestamp>
<eb:RefToMessageId>9314594d-6c40-406b-9029-b887b13906b6</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">
Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/CERTG!ICESMSLB\/CRT.LB!-3255696707179766905!1188118!0
</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<PassengerDetailsRS xmlns="http://services.sabre.com/sp/pd/v3_3">
<ApplicationResults xmlns="http://services.sabre.com/STL_Payload/v02_01" status="Complete">
<Success timeStamp="2017-07-11T03:50:23.635-05:00"/>
<Warning type="BusinessLogic" timeStamp="2017-07-11T03:50:23.469-05:00">
<SystemSpecificResults>
<Message code="WARN.SWS.HOST.WARNING_RESPONSE">EndTransactionLLSRQ: TTY REQ PEND</Message>
</SystemSpecificResults>
</Warning>
</ApplicationResults>
<ItineraryRef ID="PGAAHT"/>
<TravelItineraryReadRS>
<TravelItinerary>
<CustomerInfo>
<Address>
<AddressLine type="N">SABRE TRAVEL</AddressLine>
<AddressLine type="A">3150 SABRE DRIVE</AddressLine>
<AddressLine type="C">SOUTHLAKE, TX US</AddressLine>
<AddressLine type="Z">76092</AddressLine>
</Address>
<ContactNumbers>
<ContactNumber LocationCode="IEV" Phone="817-555-1212-A" RPH="001"/>
</ContactNumbers>
<PersonName NameNumber="01.01" RPH="1" WithInfant="false">
<Email>YURY.PATRIN#GMAIL.COM</Email>
<GivenName>JAMES</GivenName>
<Surname>GREEN</Surname>
</PersonName>
</CustomerInfo>
<ItineraryInfo>
<ReservationItems>
<Item RPH="1">
<FlightSegment AirMilesFlown="0484" ArrivalDateTime="08-13T08:45" DayOfWeekInd="7" DepartureDateTime="2017-08-13T07:05" ElapsedTime="01.40" FlightNumber="0465" IsPast="false" NumberInParty="01" ResBookDesigCode="Y" SegmentNumber="0001" SmokingAllowed="false" SpecialMeal="false" Status="HK" StopQuantity="00" eTicket="false">
<DestinationLocation LocationCode="HKG" Terminal="TERMINAL 1" TerminalCode="1"/>
<Equipment AirEquipType="773"/>
<MarketingAirline Code="CX" FlightNumber="0465"/>
<Meal Code="B"/>
<OriginLocation LocationCode="TPE" Terminal="TERMINAL 1" TerminalCode="1"/>
<SupplierRef ID="DCCX"/>
<UpdatedArrivalTime>08-13T08:45</UpdatedArrivalTime>
<UpdatedDepartureTime>08-13T07:05</UpdatedDepartureTime>
</FlightSegment>
</Item>
</ReservationItems>
<Ticketing RPH="01" TicketTimeLimit="T-"/>
</ItineraryInfo>
<ItineraryRef AirExtras="false" ID="PGAAHT" InhibitCode="U" PartitionID="AA" PrimeHostID="1S">
<Source AAA_PseudoCityCode="4PFI" CreateDateTime="2017-07-11T03:50" CreationAgent="AWS" HomePseudoCityCode="4PFI" LastUpdateDateTime="2017-07-11T03:50" PseudoCityCode="4PFI" ReceivedFrom="TEST" SequenceNumber="1"/>
</ItineraryRef>
<RemarkInfo>
<Remark RPH="001" Type="General">
<Text>TEXT</Text>
</Remark>
</RemarkInfo>
<SpecialServiceInfo RPH="001" Type="GFX">
<Service SSR_Code="SSR" SSR_Type="DOCS">
<Airline Code="CX"/>
<PersonName NameNumber="01.01">GREEN/JAMES</PersonName>
<Text>
HK1/P/FR/1234567890/FR/02DEC1980/M/26MAY2018/GREEN/JAMES/MALCOLM/H
</Text>
</Service>
</SpecialServiceInfo>
</TravelItinerary>
</TravelItineraryReadRS>
</PassengerDetailsRS>
</soap-env:Body>
</soap-env:Envelope>
After this request I recieved booking confirmation on my email. Then, I do DesignatePrinterLLSRQ and TravelItineraryReadRQ.
TravelItineraryReadRQ Request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<MessageHeader xmlns="http://www.ebxml.org/namespaces/messageHeader">
<From>
<PartyId>WebServiceClient</PartyId>
</From>
<To>
<PartyId>WebServiceSupplier</PartyId>
</To>
<CPAId>4PFI</CPAId>
<ConversationId>SWS-Test-4PFI</ConversationId>
<Service>TravelItineraryRead</Service>
<Action>TravelItineraryReadRQ</Action>
<MessageData>
<MessageId>9314594d-6c40-406b-9029-b887b13906b6</MessageId>
<Timestamp>2017-07-11T08:36:19Z</Timestamp>
</MessageData>
</MessageHeader>
<Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext">
<BinarySecurityToken>
Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/CERTG!ICESMSLB\/CRT.LB!-3255700571383677304!1140614!0
</BinarySecurityToken>
</Security>
</soap:Header>
<soap:Body>
<TravelItineraryReadRQ xmlns="http://services.sabre.com/res/tir/v3_9"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dd="http://webservices.sabre.com/dd2" Version="3.9.0">
<MessagingDetails>
<SubjectAreas>
<SubjectArea>FULL</SubjectArea>
</SubjectAreas>
</MessagingDetails>
<UniqueID ID=""/>
<EchoToken/>
</TravelItineraryReadRQ>
</soap:Body>
</soap:Envelope>
Response:
<?xml version="1.0" encoding="utf-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0"
soap-env:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="URI">WebServiceSupplier</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI">WebServiceClient</eb:PartyId>
</eb:To>
<eb:CPAId>4PFI</eb:CPAId>
<eb:ConversationId>SWS-Test-4PFI</eb:ConversationId>
<eb:Service>TravelItineraryRead</eb:Service>
<eb:Action>TravelItineraryReadRS</eb:Action>
<eb:MessageData>
<eb:MessageId>2506522311129290610</eb:MessageId>
<eb:Timestamp>2017-07-11T08:38:33</eb:Timestamp>
<eb:RefToMessageId>9314594d-6c40-406b-9029-b887b13906b6</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">
Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/CERTG!ICESMSLB\/CRT.LB!-3255700571383677304!1140614!0
</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<tir39:TravelItineraryReadRS xmlns:tir39="http://services.sabre.com/res/tir/v3_9"
xmlns:or8="http://services.sabre.com/res/or/v1_8"
xmlns:stl="http://services.sabre.com/STL/v01"
xmlns:or19="http://services.sabre.com/res/or/v1_9" Version="3.9.0">
<stl:ApplicationResults status="Complete">
<stl:Success timeStamp="2017-07-11T03:38:33.392-05:00"/>
</stl:ApplicationResults>
<tir39:TravelItinerary>
<tir39:CustomerInfo>
<tir39:Address>
<tir39:AddressLine Id="8" type="N">SABRE TRAVEL</tir39:AddressLine>
<tir39:AddressLine Id="9" type="A">3150 SABRE DRIVE</tir39:AddressLine>
<tir39:AddressLine Id="10" type="C">SOUTHLAKE, TX US</tir39:AddressLine>
<tir39:AddressLine Id="11" type="Z">76092</tir39:AddressLine>
</tir39:Address>
<tir39:ContactNumbers>
<tir39:ContactNumber LocationCode="IEV" Phone="817-555-1212-A" RPH="001" Id="7"/>
</tir39:ContactNumbers>
<tir39:PersonName WithInfant="false" NameNumber="01.01" RPH="1" elementId="pnr-4.1">
<tir39:Email Id="6">YURY.PATRIN#GMAIL.COM</tir39:Email>
<tir39:GivenName>JAMES</tir39:GivenName>
<tir39:Surname>GREEN</tir39:Surname>
</tir39:PersonName>
</tir39:CustomerInfo>
<tir39:ItineraryInfo>
<tir39:ReservationItems>
<tir39:Item RPH="1">
<tir39:FlightSegment AirMilesFlown="0484" ArrivalDateTime="08-13T08:45" DayOfWeekInd="7"
DepartureDateTime="2017-08-13T07:05"
SegmentBookedDate="2017-07-11T03:34:00" ElapsedTime="01.40"
eTicket="false" FlightNumber="0465" NumberInParty="01"
ResBookDesigCode="Y" SegmentNumber="0001" SmokingAllowed="false"
SpecialMeal="false" Status="HK" StopQuantity="00" IsPast="false"
CodeShare="false" Id="3">
<tir39:DestinationLocation LocationCode="HKG" Terminal="TERMINAL 1" TerminalCode="1"/>
<tir39:Equipment AirEquipType="773"/>
<tir39:MarketingAirline Code="CX" FlightNumber="0465">
<tir39:Banner>MARKETED BY CATHAY PACIFIC AIRWAYS</tir39:Banner>
</tir39:MarketingAirline>
<tir39:Meal Code="B"/>
<tir39:OperatingAirline Code="CX" FlightNumber="0465" ResBookDesigCode="Y">
<tir39:Banner>OPERATED BY CATHAY PACIFIC AIRWAYS</tir39:Banner>
</tir39:OperatingAirline>
<tir39:OperatingAirlinePricing Code="CX"/>
<tir39:DisclosureCarrier Code="CX" DOT="false">
<tir39:Banner>CATHAY PACIFIC AIRWAYS</tir39:Banner>
</tir39:DisclosureCarrier>
<tir39:OriginLocation LocationCode="TPE" Terminal="TERMINAL 1" TerminalCode="1"/>
<tir39:SupplierRef ID="DCCX"/>
<tir39:UpdatedArrivalTime>08-13T08:45</tir39:UpdatedArrivalTime>
<tir39:UpdatedDepartureTime>08-13T07:05</tir39:UpdatedDepartureTime>
</tir39:FlightSegment>
</tir39:Item>
</tir39:ReservationItems>
<tir39:Ticketing RPH="01" TicketTimeLimit="T-"/>
</tir39:ItineraryInfo>
<tir39:ItineraryRef AirExtras="false" ID="UJUDSY" InhibitCode="U" PartitionID="AA" PrimeHostID="1S">
<tir39:Source AAA_PseudoCityCode="4PFI" CreateDateTime="2017-07-11T03:34" CreationAgent="AWS"
HomePseudoCityCode="4PFI" PseudoCityCode="4PFI" ReceivedFrom="TEST"
LastUpdateDateTime="2017-07-11T03:34" SequenceNumber="1"/>
</tir39:ItineraryRef>
<tir39:RemarkInfo>
<tir39:Remark RPH="001" Type="General" Id="14">
<tir39:Text>TEXT</tir39:Text>
</tir39:Remark>
</tir39:RemarkInfo>
<tir39:SpecialServiceInfo RPH="001" Type="GFX" Id="12">
<tir39:Service SSR_Code="SSR" SSR_Type="DOCS">
<tir39:Airline Code="CX"/>
<tir39:PersonName NameNumber="01.01">GREEN/JAMES</tir39:PersonName>
<tir39:Text>
HK1/P/FR/1234567890/FR/02DEC1980/M/26MAY2018/GREEN/JAMES/MALCOLM/H
</tir39:Text>
</tir39:Service>
</tir39:SpecialServiceInfo>
<tir39:SpecialServiceInfo RPH="002" Type="GFX" Id="13">
<tir39:Service SSR_Code="SSR" SSR_Type="DOCS">
<tir39:Airline Code="CX"/>
<tir39:PersonName NameNumber="01.01">GREEN/JAMES</tir39:PersonName>
<tir39:Text>HK1/DB/02DEC1980/M/GREEN/JAMES</tir39:Text>
</tir39:Service>
</tir39:SpecialServiceInfo>
</tir39:TravelItinerary>
</tir39:TravelItineraryReadRS>
</soap-env:Body>
</soap-env:Envelope>
And then I do AirTicketLLSRQ.
Request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<MessageHeader xmlns="http://www.ebxml.org/namespaces/messageHeader">
<From>
<PartyId>WebServiceClient</PartyId>
</From>
<To>
<PartyId>WebServiceSupplier</PartyId>
</To>
<CPAId>4PFI</CPAId>
<ConversationId>SWS-Test-4PFI</ConversationId>
<Service>AirTicketRQ</Service>
<Action>AirTicketLLSRQ</Action>
<MessageData>
<MessageId>9314594d-6c40-406b-9029-b887b13906b6</MessageId>
<Timestamp>2017-07-11T08:39:43Z</Timestamp>
</MessageData>
</MessageHeader>
<Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext">
<BinarySecurityToken>
Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/CERTG!ICESMSLB\/CRT.LB!-3255700571383677304!1140614!0
</BinarySecurityToken>
</Security>
</soap:Header>
<soap:Body>
<AirTicketRQ 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" NumResponses="1" Version="2.10.0"
ReturnHostCommand="true">
<OptionalQualifiers>
<FlightQualifiers>
<VendorPrefs>
<Airline Code="CX"/>
</VendorPrefs>
</FlightQualifiers>
<MiscQualifiers>
<Ticket Type="ETR"/>
</MiscQualifiers>
<PricingQualifiers>
<PriceQuote>
<Record Number="1"/>
</PriceQuote>
</PricingQualifiers>
</OptionalQualifiers>
</AirTicketRQ>
</soap:Body>
</soap:Envelope>
Response:
<?xml version="1.0" encoding="utf-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0"
soap-env:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="URI">WebServiceSupplier</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI">WebServiceClient</eb:PartyId>
</eb:To>
<eb:CPAId>4PFI</eb:CPAId>
<eb:ConversationId>SWS-Test-4PFI</eb:ConversationId>
<eb:Service>AirTicketRQ</eb:Service>
<eb:Action>AirTicketLLSRS</eb:Action>
<eb:MessageData>
<eb:MessageId>393675312556970611</eb:MessageId>
<eb:Timestamp>2017-07-11T08:40:56</eb:Timestamp>
<eb:RefToMessageId>9314594d-6c40-406b-9029-b887b13906b6</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">
Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/CERTG!ICESMSLB\/CRT.LB!-3255700571383677304!1140614!0
</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<AirTicketRS 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"
Version="2.10.0">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="BusinessLogic" timeStamp="2017-07-11T03:40:56-05:00">
<stl:SystemSpecificResults>
<stl:HostCommand LNIATA="757110">W¥PQ1¥ETR¥ACX</stl:HostCommand>
<stl:Message>PNR HAS BEEN UPDATED-IGN AND RETRY-0049</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</AirTicketRS>
</soap-env:Body>
</soap-env:Envelope>
How can I fix this error? Maybe I am doing something wrong?
What you encountered is quite a normal situation (but unwanted).
Solution to this is to run (but only after you detect PNR HAS BEEN UPDATED-IGN AND RETRY error)
ignore command
rerun AirTicketRQ (exactly the same that failed in the first run)
As far as Ignore command is concerned what you should know is that it will ignore (cancel) all your PNR changes since the last successful EndTransactionRQ, so it's best to have everything saved before AirTicketRQ is expected to be run
Example of ignore command (IR in HostCommand will trigger ignore transaction) :
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ns4:MessageHeader xmlns:ns8="http://www.w3.org/2000/09/xmldsig#" xmlns:ns7="http://www.opentravel.org/OTA/2002/11" xmlns:ns6="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:ns5="http://www.w3.org/1999/xlink" xmlns:ns4="http://www.ebxml.org/namespaces/messageHeader">
<ns4:ConversationId> CONVERSATION_ID </ns4:ConversationId>
<ns4:From>
<ns4:PartyId ns4:type="urn:x12.org:IO5:01"> PARTY_ID_FROM </ns4:PartyId>
<ns4:Role></ns4:Role>
</ns4:From>
<ns4:To>
<ns4:PartyId ns4:type="urn:x12.org:IO5:01"> PARTY_ID_TO </ns4:PartyId>
<ns4:Role></ns4:Role>
</ns4:To>
<ns4:CPAId>GF</ns4:CPAId>
<ns4:Service ns4:type="OTA"></ns4:Service>
<ns4:Action>SabreCommandLLSRQ</ns4:Action>
</ns4:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary"> BOOKING_PROVIDER_SESSION </wsse:BinarySecurityToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<SabreCommandLLSRQ xmlns="http://webservices.sabre.com/sabreXML/2003/07" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" TimeStamp="2014-03-04T14:00:00" Version="1.8.1">
<Request Output="SCREEN" CDATA="true">
<HostCommand>IR</HostCommand>
</Request>
</SabreCommandLLSRQ>
</soap:Body>
</soap:Envelope>
Sabre is launching a new Orchestrated AirTicketRQ service that will automate and simplify many of these items, and much much more magic. If you are interested, please let us know...
I am new to webservice and WS Security. I have a sample webservice using CFX interceptor. Following is the config file I have.
Cfx-servelet.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">
<jaxws:endpoint
id="doubleit"
implementor="service.DoubleItPortTypeImpl"
address="/doubleit" >
<!-- Uncomment only if using WS-SecurityPolicy
<jaxws:properties>
<entry key="ws-security.callback-handler" value-ref="myPasswordCallback"/>
</jaxws:properties>
-->
<!-- Uncomment only if using standard WSS4J interceptors -->
<jaxws:inInterceptors>
<bean
class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken"/>
<entry key="passwordType" value="PasswordText"/>
<entry key="passwordCallbackRef" value-ref="myPasswordCallback"/>
</map>
</constructor-arg>
</bean>
</jaxws:inInterceptors>
</jaxws:endpoint>
<bean id="myPasswordCallback" class="service.ServerPasswordCallback" />
</beans>
When I generated security attribute in the HTTP headers (not in the message payload) using soapUI tool, it worked. But I need to pass the wsse:security attribute in message payload (something like below)
soap request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:doub="http://www.example.org/schema/DoubleIt">
<soapenv:Header>
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis- open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-27777511" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>joe</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">joespassword</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<doub:DoubleIt>
<numberToDouble>10</numberToDouble>
</doub:DoubleIt>
</soapenv:Body>
</soapenv:Envelope>
It is giving fault message back:
Soap Response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Fault occurred while processing.</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Log file has the following exception:
2014-03-07 15:44:20,438 [http-8080-1] WARN org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for {http://www.example.org/contract/DoubleIt}DoubleItService has thrown exception, unwinding now
java.lang.NullPointerException
at org.apache.cxf.staxutils.StaxUtils.getDocument(StaxUtils.java:944)
at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:981)
at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:223)
at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getSOAPMessage(WSS4JInInterceptor.java: 154)
at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:203)
at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:89)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:209)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:191)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.connecture.stateadvantage.ui.healthplanmanagement.PublicResourceFilter.doFilter(PublicResourceFilter.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.connecture.services.planservice.ui.PublicResourceFilter.doFilter(PublicResourceFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.connecture.services.applicationservice.ui.PublicResourceFilter.doFilter(PublicResourceFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:369)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
at com.connecture.securityservice.ui.SecAnonymousAuthenticationFilter.doFilter(SecAnonymousAuthenticationFilter.java:51)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at com.connecture.securityservice.ui.SecureLoginCookieFilter.doFilter(SecureLoginCookieFilter.java:122)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at com.connecture.stateadvantage.ui.common.TimerFilter.doFilter(TimerFilter.java:37)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:168)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:600)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1703)
at java.lang.Thread.run(Unknown Source)
Can any one tell me whether I am doing something wrong with the header? Any help would be appreciated.
Thanks
In the "soap request:" example you have provided, there are two problems:
There are duplicate <soapenv:Header> tags
There is whitespace in xmlns:wsse="http://docs.oasis- open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
I call a web service via Apache Axis Client in Tomcat server. I get ISO-8859-1 encoded response xml instead of UTF-8. When i simply run this client form main method, everything works as excepted. Below is an example request and response xml log. Please help!
In Message:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:getContactInformation
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://extranet.turkcell.com.tr/webServices/toskaWebService">
<longVal href="#id0" />
<longVal0 href="#id1" />
<longVal1 href="#id2" />
<longVal2 href="#id3" />
<integer href="#id4" />
<integer0 href="#id5" />
<integer1 href="#id6" />
<integer2 href="#id7" />
</ns1:getContactInformation>
<multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">-1</multiRef>
<multiRef id="id6" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">408</multiRef>
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">-1</multiRef>
<multiRef id="id2" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">5322067832</multiRef>
<multiRef id="id3" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">-1</multiRef>
<multiRef id="id5" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">100</multiRef>
<multiRef id="id7" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">0</multiRef>
<multiRef id="id4" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef>
</soapenv:Body>
</soapenv:Envelope>
Out Message:
<?xml version="1.0" encoding="ISO-8859-9" standalone="yes"?>
<env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header></env:Header>
<env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<m:getContactInformationResponse
xmlns:m="http://extranet.turkcell.com.tr/webServices/toskaWebService">
<result xmlns:n1="java:com.turkcell.toska.model" xsi:type="n1:WSContactList">
<addresslist soapenc:arrayType="n1:WSAddress[1]">
<WSAddress xsi:type="n1:WSAddress">
<address1 xsi:type="xsd:string">7-8 Mah. I 9 C Kap�s�</address1>
<address2 xsi:type="xsd:string">�orak�� Sok. No:111</address2>
<address3 xsi:type="xsd:string">Gazzosmanpa�a</address3>
<addressID xsi:type="xsd:long">0</addressID>
<addressStatus xsi:type="xsd:int">0</addressStatus>
<addresstype xsi:type="xsd:int">0</addresstype>
<addressusage xsi:type="xsd:int">1</addressusage>
<cityCode xsi:type="xsd:int">72</cityCode>
<cityName xsi:nil="true"></cityName>
<countryCode xsi:type="xsd:int">1</countryCode>
<usageStatus xsi:type="xsd:int">0</usageStatus>
<zipCode xsi:type="xsd:string">72439</zipCode>
</WSAddress>
</addresslist>
<emaillist soapenc:arrayType="n1:WSEmailInfo[0]"></emaillist>
<errMessage xsi:type="xsd:string"></errMessage>
<phonelist soapenc:arrayType="n1:WSPhone[1]">
<WSPhone xsi:type="n1:WSPhone">
<addressID xsi:type="xsd:long">0</addressID>
<addressStatus xsi:type="xsd:int">0</addressStatus>
<extension xsi:nil="true"></extension>
<generationDate xsi:nil="true"></generationDate>
<modificationDate xsi:nil="true"></modificationDate>
<phonenumber xsi:type="xsd:string">2125487549</phonenumber>
<phonenumbertype xsi:type="xsd:int">100</phonenumbertype>
<usageStatus xsi:type="xsd:int">0</usageStatus>
</WSPhone>
</phonelist>
<resultcode xsi:type="xsd:int">0</resultcode>
</result>
</m:getContactInformationResponse>
</env:Body>
</env:Envelope>
you can try following codes.
Stub._setProperty(Call.CHARACTER_SET_ENCODING, "ISO-8859-9");