OK, my example is build completely on cxf_wsdl_first. Just a different WSDL and a different java implementation (se). I have a bc, se, and sa (like cxf_wsdl_first). bc just contains the wsdl. Code ist generated by maven/wsdl2java from wsdl. My java code does not see any soap header stuff, just the createorder(...) method. Yes, I wanted to access the header from my se. However, I don't know about the interceptor (where to put it, how to use). I'll try to find out more about it (docs) ...
Thanks!!! Freeman Fang-2 wrote: > > I am not sure I understand your scenario correctly > Would you please describe your use case more detail? > Did you use cxf bc or se inside servicemix? Did you generate your code > stub using cxf codegen from the wsdl? Did you want to access soap header > inside servicemix cxf se ? > Cxf will do soap header / method para mapping for you according to the > service model so generallly you shouldn't care about the soap header > issue yourself. > > If you want to access soap headder in your incerceptors, you can do as > follows > List<SoapHeaderInfo> headers = > wsdlMessage.getExtensors(SoapHeaderInfo.class); > List<Header> headerElement = message.getHeaders(); > You can get more details from JbiInWsdl1Interceptor.java of > servicemix-cxf-bc component > > Best Regards > > Freeman > > > Cybexion wrote: >> Hi, >> >> I've specified a WSDL for an OrderService. Inside my Binding I have >> defined >> that a SOAP Header should be send. >> >> <<<WSDL >> ... >> <binding name="OrderServiceBinding" type="tns:orderServicePort"> >> <soap:binding style="document" >> transport="http://schemas.xmlsoap.org/soap/http"/> >> <operation name="createOrder"> >> <soap:operation >> soapAction="http://localhost/adf/OrderService"/> >> <input> >> <soap:header message="tns:systemRequest" >> part="parameters" >> use="literal"/> >> <soap:body use="literal"/> >> </input> >> <output> >> <soap:body use="literal"/> >> </output> >> </operation> >> </binding> >> WSDL >>> >> >> >> >> <<<SOAP >> ... >> <Header> >> <adf:system id="1" version="1"> >> <adf:loginuseremail>[EMAIL PROTECTED]</adf:loginuseremail> >> </adf:system> >> </Header> >> ... >> SOAP>>> >> >> The request and response works fine. Also the Javacode for the payload is >> executed. >> Now some questions: >> 1) How and where can I access the data from the SOAP Header? >> 2) If I remove the Header Stuff from my SOAP Request, everything stil >> works >> fine. >> (Do I need must understand = true to make it required) >> >> Thanks! >> >> >> >> >> >> > > -- View this message in context: http://www.nabble.com/CXF-access-SOAP-Header-tp14314133s12049p14333665.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
