0
votes

I have use case as below:

I have mule flow with http as inbound and after some components i have configured a soap (cxf jaxws-client)component . Created stubs(java class) from wsdl and configured the required properties on soap component.Then I have added http as outbound endpoint with "POST" as method and address as " endpoint url" of the service.

Configuration looks as below:

-->

    <http:outbound-endpoint exchange-pattern="request-response" method="POST" address="http://www.isupplymaster.com/ihostinterfacemtuservice/ihostinterfacemtuservice.asmx" doc:name="HTTP" mimeType="text/xml">

    **<cxf:jaxws-client doc:name="SOAP"  clientClass="com.whitesky.webservicetest.IHostInterfaceX0020MTUX0020Service" operation="TestWebService" port="iHostInterface_x0020_MTU_x0020_ServiceSoap" wsdlLocation="src/main/resources/ihostinterfacemtuservice.wsdl">

   <!--  <cxf:properties>

            <spring:property name="username" value="username" />
            <spring:property name="password" value="password"/>
     </cxf:properties> -->

    </cxf:jaxws-client>**
    </http:outbound-endpoint>
    <object-to-string-transformer doc:name="Object to String"/>
    <logger message="payload after response is #[payload]" level="INFO" doc:name="Logger"/>

How i can configure the soap headers in java class created from wsdl.

Regards Vikram

1

1 Answers

0
votes

Could this work for you: http://mule.1045714.n5.nabble.com/How-to-add-SOAP-Header-when-using-CXF-client-Jaxb-binding-tp2675520p2675521.html ?

When using CXF, use the wsdl2java generator with the -exsh true arg. This will generate ws artifacts with the header as an argument to the service methods.