You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Filippo Balicchia <fb...@gmail.com> on 2012/02/13 13:32:27 UTC

How to include additional data to soap header (WSSE,WSA) with camel-cxf

Hello i need to include <wsa:Action> header in my soap request with camel-cxf


I have route like this
  from("timer://foo?fixedRate=true&period=10000").process(new Processor()
        {

            @Override
            public void process(Exchange exchange) throws Exception
            {

                InputReportIncident newIncident = new InputReportIncident();
                newIncident.setFamilyName("ciao");
                newIncident.setGivenName("mondo");
                newIncident.setEmail("myemail@gmail.com");
                newIncident.setSummary("first test");
                newIncident.setIncidentId("45677");
                newIncident.setIncidentDate("2011-03-05");
                newIncident.setDetails("detaild");
                newIncident.setPhone("0049 69 1234567");
                exchange.getOut().setBody(newIncident);
            }
        }).to("cxf:bean:reportIncident").convertBodyTo(OutputReportIncident.class)

where in my spring file the configuration is link this
<cxf:cxfEndpoint id="reportIncident"

address="http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident"
                     wsdlURL="META-INF/wsdl/report_incident.wsdl"

serviceClass="org.apache.camel.example.reportincident.ReportIncidentEndpoint"
                     >
</cxf:cxfEndpoint>


Could you tell me please if possible and how to to add that header in
declarative manner or in programmatic manner

Thanks for help

--Filippo

Re: How to include additional data to soap header (WSSE,WSA) with camel-cxf

Posted by Glen Mazza <gm...@talend.com>.
http://camel.apache.org/cxf.html#CXF-HowtogetandsetSOAPheadersinPOJOmode, possibly 
http://camel.apache.org/cxf.html#CXF-HowtogetandsetSOAPheadersinPAYLOADmode 
should help you.

Glen

On 02/13/2012 07:32 AM, Filippo Balicchia wrote:
> Hello i need to include<wsa:Action>  header in my soap request with camel-cxf
>
>
> I have route like this
>    from("timer://foo?fixedRate=true&period=10000").process(new Processor()
>          {
>
>              @Override
>              public void process(Exchange exchange) throws Exception
>              {
>
>                  InputReportIncident newIncident = new InputReportIncident();
>                  newIncident.setFamilyName("ciao");
>                  newIncident.setGivenName("mondo");
>                  newIncident.setEmail("myemail@gmail.com");
>                  newIncident.setSummary("first test");
>                  newIncident.setIncidentId("45677");
>                  newIncident.setIncidentDate("2011-03-05");
>                  newIncident.setDetails("detaild");
>                  newIncident.setPhone("0049 69 1234567");
>                  exchange.getOut().setBody(newIncident);
>              }
>          }).to("cxf:bean:reportIncident").convertBodyTo(OutputReportIncident.class)
>
> where in my spring file the configuration is link this
> <cxf:cxfEndpoint id="reportIncident"
>
> address="http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident"
>                       wsdlURL="META-INF/wsdl/report_incident.wsdl"
>
> serviceClass="org.apache.camel.example.reportincident.ReportIncidentEndpoint"
>                       >
> </cxf:cxfEndpoint>
>
>
> Could you tell me please if possible and how to to add that header in
> declarative manner or in programmatic manner
>
> Thanks for help
>
> --Filippo


-- 
Glen Mazza
Talend Community Coders - coders.talend.com
blog: www.jroller.com/gmazza