I think this test process might help you: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestSoapHeader2/
The corresponding java test case to run is: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeader2Test.java Cheers, Alexis On Fri, Sep 4, 2009 at 3:09 AM, Avo Jenk <[email protected]> wrote: > Hello, > Having problems with SOAP headers. I need to send the headers from a > received message with every outgoing message. Dynamic headers works fine, > but is an ODE specific solution so I can't use that. The other option of > defining them as message parts of every message isn't fun either, but i > guess it'll have to do. The problem is I can't get the variable > initialization right. How to initialize a variable of messageType that has > several parts? (Can't use literal because then I have to specify a single > part.) > > Here's the message: > <message name="bpelTestRequestMessage"> > <part element="tns:bpelTestRequest" name="payload1"/> > <part name="asutus" element="xtee:asutus" /> > <part name="andmekogu" element="xtee:andmekogu" /> > <part name="isikukood" element="xtee:isikukood" /> > <part name="nimi" element="xtee:nimi" /> > <part name="id" element="xtee:id" /> > </message> > > Types: > <element name="bpelTestRequest"> > <complexType> > <sequence> > <element name="input" type="string"/> > </sequence> > </complexType> > </element> > <element name="asutus" type="string" /> > ... (the other header parts are the same) > > Bindings: > <soap:body parts="payload1" use="literal" /> > <soap:header message="tns:bpelTestRequestMessage" part="asutus" > use="literal" namespace="http://x-tee.riik.ee/xsd/xtee.xsd" /> > <soap:header message="tns:bpelTestRequestMessage" part="andmekogu" > use="literal" namespace="http://x-tee.riik.ee/xsd/xtee.xsd" /> > <soap:header message="tns:bpelTestRequestMessage" part="isikukood" > use="literal" namespace="http://x-tee.riik.ee/xsd/xtee.xsd" /> > <soap:header message="tns:bpelTestRequestMessage" part="nimi" > use="literal" namespace="http://x-tee.riik.ee/xsd/xtee.xsd" /> > <soap:header message="tns:bpelTestRequestMessage" part="id" > use="literal" namespace="http://x-tee.riik.ee/xsd/xtee.xsd" /> > > BPEL variable is defined as: > <bpel:variable name="input" > messageType="tns:bpelTestRequestMessage"/> > > Can't use this cause then it has to be a message: > <bpel:copy> > <bpel:from> > <bpel:literal xml:space="preserve"> > <tns:HelloWorldRequest xmlns:tns=" > http://www.aktors.ee/bpel/HelloWorld" xmlns:xtee=" > http://x-tee.riik.ee/xsd/xtee.xsd" xmlns:xsi=" > http://www.w3.org/2001/XMLSchema-instance"> > <tns:input></tns:input> > <xtee:asutus></xtee:asutus> > <xtee:andmekogu></xtee:andmekogu> > <xtee:isikukood></xtee:isikukood> > <xtee:nimi></xtee:nimi> > <xtee:id></xtee:id> > </tns:HelloWorldRequest> > </bpel:literal> > </bpel:from> > <bpel:to variable="helloLinkRequest" /> > > Some examples on using SOAP headers (without dynamic headers) and variable > initialization (of a message that has more than one part) would be much > appreciated. > Thanks. >
