Hi, I have some problems by calling a Webservice with camel-cxf running in Apache Karaf! I've posted my question already on Stackoverflow, so her is the link http://stackoverflow.com/questions/38308084/camel-cxf-doesnt-add-soapheader-to-request-when-run-inside-apache-karaf <http://stackoverflow.com/questions/38308084/camel-cxf-doesnt-add-soapheader-to-request-when-run-inside-apache-karaf> .
For documentation reasons I post the question from Stackoverflow in subsequent: Thank you in advance! ----------- I'm using Camel (2.16.3) to call a Webservice (see WSDL below). If I run my Route Standalone with the *camel:run* maven command, everything works fine and the Request is like so: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Header> <Action xmlns="http://www.w3.org/2005/08/addressing">http://tempuri.org/OutboundItemTransferIISWebService/OutboundItemTransferIISWebService/ItemTransfer</Action> <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:17fba6c9-daa8-41cb-a5a5-2806165d705b</MessageID> <To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8765/wc3/entw/OutboundItemTransferIISWebService.svc</To> <ReplyTo xmlns="http://www.w3.org/2005/08/addressing"> <Address>http://www.w3.org/2005/08/addressing/anonymous</Address> </ReplyTo> </soap:Header> <soap:Body> <ns2:ItemTransfer xmlns="urn:microsoft-dynamics-nav/xmlports/x60780" xmlns:ns2="http://tempuri.org/OutboundItemTransferIISWebService/"><ns2:p_OutboundItem/> <ns2:p_ItemFilter></ns2:p_ItemFilter> <ns2:p_ItemMaxFilter>100</ns2:p_ItemMaxFilter> </ns2:ItemTransfer> </soap:Body> </soap:Envelope> But if I deploy my Project to a Karaf (4.0.4) Installation and trigger the Request, the soap:Header is missing: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Body> <ns2:ItemTransfer xmlns="urn:microsoft-dynamics-nav/xmlports/x60780" xmlns:ns2="http://tempuri.org/OutboundItemTransferIISWebService/"><ns2:p_OutboundItem/> <ns2:p_ItemFilter></ns2:p_ItemFilter> <ns2:p_ItemMaxFilter>100</ns2:p_ItemMaxFilter> </ns2 :ItemTransfer> </soap:Body> </soap:Envelope> Because for the Server, which is called, the Header is required I get an SOAP Fault back. ---------- **Attachments** Following the Spring configuration which defines the CXF Endpoint: <cxf:cxfEndpoint id="itemTransfer" address="${navision.ws.base.url}/OutboundItemTransferIISWebService.svc" wsdlURL="wsdl/OutboundItemTransferIISWebService.wsdl" serviceClass="org.tempuri.outbounditemtransferiiswebservice.OutboundItemTransferIISWebService" endpointName="ns:WSHttpBinding_OutboundItemTransferIISWebService" serviceName="ns:OutboundItemTransferIISWebService" xmlns:ns="http://tempuri.org/OutboundItemTransferIISWebService/" loggingFeatureEnabled="true"> </cxf:cxfEndpoint> and the Route (in Java DSL) which trigger the request: from(ACTIVEMQ_UPDATE_ITEMS).routeId("Read all Items from the Webservice into MongoDB") .log(LoggingLevel.INFO, logger, "Read the next {{navision.ws.chunk.size}} Items! Filter: '${body}'") .setHeader(Masterdata.HEADER_CHUNK_SIZE).simple("{{navision.ws.chunk.size}}") .bean(InitialItemImport.class, "createItemTransferRequest") .to("cxf:bean:itemTransfer?dataFormat=POJO") .bean(InitialItemImport.class, "itemTransferResponseToList") .split(body()).parallelProcessing() .bean(InitialItemImport.class, "convertItemToUpsert") .to("mongodb:mongo?database={{mongo.database}}&collection=articles&operation=update") .end() .choice() .when(method(InitialItemImport.class, "shouldTriggerNext")) .bean(InitialItemImport.class, "createNextFilter") .to(ACTIVEMQ_UPDATE_ITEMS) .otherwise() .log(LoggingLevel.INFO, logger, "Finished Full-Update of Items") .end(); and the WSDL which defines the Service: <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions name="OutboundItemTransferIISWebService" targetNamespace="http://tempuri.org/OutboundItemTransferIISWebService/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/OutboundItemTransferIISWebService/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <wsp:Policy wsu:Id="WSHttpBinding_OutboundItemTransferIISWebService_policy"> <wsp:ExactlyOne> <wsp:All> <wsaw:UsingAddressing /> </wsp:All> </wsp:ExactlyOne> </wsp:Policy> <wsdl:types> <xsd:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/OutboundItemTransferIISWebService/"> <xsd:element name="ItemTransfer"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="p_OutboundItem" type="q1:ItemData" xmlns:q1="urn:microsoft-dynamics-nav/xmlports/x60780" /> <xsd:element minOccurs="0" maxOccurs="1" name="p_ItemFilter" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="p_ItemMaxFilter" type="xsd:int" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="ItemTransferResponse"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="ItemTransferResult" type="q2:ItemData" xmlns:q2="urn:microsoft-dynamics-nav/xmlports/x60780" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> <xsd:schema elementFormDefault="qualified" targetNamespace="urn:microsoft-dynamics-nav/xmlports/x60780"> <xsd:complexType name="ItemData" mixed="true"> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="unbounded" name="Item" type="q3:Item" xmlns:q3="urn:microsoft-dynamics-nav/xmlports/x60780" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="Item"> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="No" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="No_2" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Description" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Search_Description" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Description_2" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Base_Unit_of_Measure" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="Price_Unit_Conversion" type="xsd:int" /> <xsd:element minOccurs="1" maxOccurs="1" name="Unit_Price" type="xsd:decimal" /> <xsd:element minOccurs="1" maxOccurs="1" name="Duty_Due_Percent" type="xsd:decimal" /> <xsd:element minOccurs="0" maxOccurs="1" name="Duty_Code" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="Gross_Weight" type="xsd:decimal" /> <xsd:element minOccurs="1" maxOccurs="1" name="Net_Weight" type="xsd:decimal" /> <xsd:element minOccurs="1" maxOccurs="1" name="Unit_Volume" type="xsd:decimal" /> <xsd:element minOccurs="0" maxOccurs="1" name="Freight_Type" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Tariff_No" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="Duty_Unit_Conversion" type="xsd:decimal" /> <xsd:element minOccurs="0" maxOccurs="1" name="Country_Region_Purchased_Code" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="Blocked" type="xsd:boolean" /> <xsd:element minOccurs="1" maxOccurs="1" name="Price_Includes_VAT" type="xsd:boolean" /> <xsd:element minOccurs="0" maxOccurs="1" name="VAT_Bus_Posting_Gr_Price" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Gen_Prod_Posting_Group" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Country_Region_of_Origin_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Tax_Group_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="VAT_Prod_Posting_Group" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Manufacturer_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Item_Category_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Product_Group_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Expiration_Calculation" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Common_Item_No" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Last_Date_Modified" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Recency_From_Date" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Recency_To_Date" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Status_Code" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="Rock_Bottom_Price" type="xsd:boolean" /> <xsd:element minOccurs="1" maxOccurs="1" name="Buy_Hit" type="xsd:boolean" /> <xsd:element minOccurs="1" maxOccurs="1" name="Test_Winner" type="xsd:boolean" /> <xsd:element minOccurs="1" maxOccurs="1" name="Inventory" type="xsd:decimal" /> <xsd:element minOccurs="0" maxOccurs="1" name="Item_Status_Display_Text" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="Not_Homologated" type="xsd:boolean" /> <xsd:element minOccurs="1" maxOccurs="1" name="Last_Direct_Cost" type="xsd:decimal" /> <xsd:element minOccurs="1" maxOccurs="1" name="Unit_List_Price" type="xsd:decimal" /> <xsd:element minOccurs="0" maxOccurs="unbounded" name="ItemVariant" type="q4:ItemVariant" xmlns:q4="urn:microsoft-dynamics-nav/xmlports/x60780" /> <xsd:element minOccurs="0" maxOccurs="unbounded" name="ItemVendor" type="q5:ItemVendor" xmlns:q5="urn:microsoft-dynamics-nav/xmlports/x60780" /> <xsd:element minOccurs="0" maxOccurs="unbounded" name="ItemSalesPrice" type="q6:ItemSalesPrice" xmlns:q6="urn:microsoft-dynamics-nav/xmlports/x60780" /> <xsd:element minOccurs="0" maxOccurs="unbounded" name="ItemTranslation" type="q7:ItemTranslation" xmlns:q7="urn:microsoft-dynamics-nav/xmlports/x60780" /> <xsd:element minOccurs="0" maxOccurs="unbounded" name="ItemDistributionChannel" type="q8:ItemDistributionChannel" xmlns:q8="urn:microsoft-dynamics-nav/xmlports/x60780" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ItemVariant"> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Description" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Description_2" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Variant_Promo" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="Variant_Inventory" type="xsd:decimal" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ItemVendor"> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="Vendor_No" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Lead_Time_Calculation" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Vendor_Item_No" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Variant_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" default="false" name="Primary_Vendor" type="xsd:boolean" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ItemSalesPrice"> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="Sales_Type" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Sales_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Starting_Date" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Currency_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Variant_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Unit_Of_Measure_Code" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="Minimum_Quantity" type="xsd:decimal" /> <xsd:element minOccurs="0" maxOccurs="1" name="Ending_Date" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="Unit_Price" type="xsd:decimal" /> <xsd:element minOccurs="1" maxOccurs="1" name="Price_Includes_VAT" type="xsd:boolean" /> <xsd:element minOccurs="0" maxOccurs="1" name="VAT_Bus_Posting_Grp_Price" type="xsd:string" /> <xsd:element minOccurs="1" maxOccurs="1" name="Action_Price" type="xsd:boolean" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ItemTranslation"> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="Variant_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Language_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Description" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Description_2" type="xsd:string" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ItemDistributionChannel"> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="Item_No" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Variant_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Responsibility_Center" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Start_Date" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Distribution_Channel_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Item_Description" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Item_Description_2" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Language_Code" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Promo_From_Date" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Promo_Until_Date" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Recency_From_Date_Distr" type="xsd:string" /> <xsd:element minOccurs="0" maxOccurs="1" name="Recency_To_Date_Distr" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:schema> </wsdl:types> <wsdl:message name="OutboundItemTransferIISWebService_ItemTransfer_InputMessage"> <wsdl:part name="parameters" element="tns:ItemTransfer" /> </wsdl:message> <wsdl:message name="OutboundItemTransferIISWebService_ItemTransfer_OutputMessage"> <wsdl:part name="parameters" element="tns:ItemTransferResponse" /> </wsdl:message> <wsdl:portType name="OutboundItemTransferIISWebService"> <wsdl:operation name="ItemTransfer"> <wsdl:input wsaw:Action="http://tempuri.org/OutboundItemTransferIISWebService/OutboundItemTransferIISWebService/ItemTransfer" message="tns:OutboundItemTransferIISWebService_ItemTransfer_InputMessage" /> <wsdl:output wsaw:Action="http://tempuri.org/OutboundItemTransferIISWebService/OutboundItemTransferIISWebService/ItemTransferResponse" message="tns:OutboundItemTransferIISWebService_ItemTransfer_OutputMessage" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="WSHttpBinding_OutboundItemTransferIISWebService" type="tns:OutboundItemTransferIISWebService"> <wsp:PolicyReference URI="#WSHttpBinding_OutboundItemTransferIISWebService_policy" /> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="ItemTransfer"> <soap12:operation soapAction="http://tempuri.org/OutboundItemTransferIISWebService/OutboundItemTransferIISWebService/ItemTransfer" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="OutboundItemTransferIISWebService"> <wsdl:port name="WSHttpBinding_OutboundItemTransferIISWebService" binding="tns:WSHttpBinding_OutboundItemTransferIISWebService"> <soap12:address location="http://mdnmt2.ms.local/wc3/entw/OutboundItemTransferIISWebService.svc" /> <wsa10:EndpointReference> <wsa10:Address>http://mdnmt2.ms.local/wc3/entw/OutboundItemTransferIISWebService.svc</wsa10:Address> </wsa10:EndpointReference> </wsdl:port> </wsdl:service> </wsdl:definitions> -- View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-doesn-t-add-soap-Header-to-Request-when-run-inside-Apache-Karaf-tp5785042.html Sent from the Camel - Users mailing list archive at Nabble.com.