• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Attaching Header to SOAP request in SOAP Webservices

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a wsdl containing SAOP Header and SOAP Body. I generated client with eclipse and APACHE CXF and sent request. But request is failing saying Header is missed or invalid.
Below is my wsdl.

Can any one help me how to write client with header as per wsdl.

<?xml version="1.0" encoding="UTF-8"?>
<types>
<xsd:schema>
<xsd:import
namespace="http://finservice.cl.com/Services/financier/Operational/Messages/Request"
schemaLocation="financierRequest.xsd"/>
<xsd:import
namespace="http://finservice.cl.com/Services/financier/Operational/Messages/Response"
schemaLocation="financierResponse6.xsd"/>
<xsd:import namespace="http://finservice.cl.com/Services/Faults"
schemaLocation="finserviceFaults.xsd"/>
<xsd:import namespace="http://www.cl.com/Services/SOAPHeaders"
schemaLocation="CLSoapHeaders.xsd"/>
<xsd:import
namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
schemaLocation="oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
</xsd:schema>
</types>


<message name="WS-Security-SOAPHeader">
<part element="wssec:Security" name="Security"/>
</message>

<message name="CLSOAPHeader">
<part element="hdr_ns:RequestContextHeader" name="requestHeader"/>
<part element="hdr_ns:ProcessingNodesHeader" name="processingNodesHeader"/>
</message>


<message name="financierRequest">
<part element="req_ns:financierRequestElement" name="financierRequestElement"/>
</message>


<message name="financierResponse">
<part element="res_ns:financierResponseElement" name="financierResponseElement"/>
</message>


<message name="Fault_Exception">
<part element="fault_ns:Fault" name="fault"/>
</message>


<portType name="finServicePortType">
<operation name="getFinanciers">
<input message="tns:financierRequest"/>
<output message="tns:financierResponse"/>
<fault message="tns:Fault_Exception" name="Fault_Exception"/>
</operation>
</portType>


<binding name="finServiceBinding" type="tns:finServicePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<operation name="getFinanciers">
<soap:operation soapAction=""/>
<input>
<soap:body parts="financierRequestElement" use="literal"/>
<soap:header message="tns:CLSOAPHeader" part="requestHeader" use="literal"/>
<!-- soap:header message="tns:CLSOAPHeader" part="processingNodesHeader" use="optional"/-->
<soap:header message="tns:WS-Security-SOAPHeader" part="Security" use="literal"/>
</input>
<output>
<soap:body use="literal"/>
<soap:header message="tns:CLSOAPHeader" part="processingNodesHeader" use="literal"/>
<soap:header message="tns:WS-Security-SOAPHeader" part="Security" use="literal"/>
</output>
<fault name="Fault_Exception">
<soap:fault name="Fault_Exception" use="literal"/>
</fault>
</operation>
</binding>

<service name="financierService_v4">
<port binding="tns:finServiceBinding" name="finServicePort">
<soap:address location="http://finservice.qtcorpCL.cl.com:20021/finservService"/>
</port>
</service

Appreciate your help regarding this.
Thanks,
 
reply
    Bookmark Topic Watch Topic
  • New Topic