Hi Nilantha,
I think you have choose the wrong mail list for this question. Axis
issues are discussed in its own list. Please forward this post to it.


Regards,

On 8/29/06, Nilantha Jayalath <[EMAIL PROTECTED]> wrote:




Hi,

I have axis.jar (1.2.1) and saaj-impl.jar(1.3) in a same web application
deployed in Tomcat 5.5.17. axis MessageFactoryImpl
(org.apache.axis.soap.MessageFactoryImpl) gets preference
over saaj-impl implementation
(com.sun.xml.messaging.saaj.soap.MessageFactoryImpl) during
the run time. I am facing issues due to this and need to use saaj
implementation when I create SOAP messages.

 My problem: there is no SOAP Header available when I try to put the
signature in Tomcat 5.5. I am using "xmlsec-1.3.0". But If I try to add the
header just after creating the messages ( "MessageFactory mf =
MessageFactory.newInstance()") using "header.addHeaderElement" is says
header is available.



I have no issue in Tomcat 5.0.x and it uses sun implementation for the same
app. Only in Tomcat 5.5.x it is looking for axis version even if
saaj-impl.jar is available.



This is how I am creating the signature.



Element soapHeaderElement = (Element) ((Element) document


.getFirstChild()).getElementsByTagNameNS(


"http://schemas.xmlsoap.org/soap/envelope/";, "Header")


.item(0);

sig = new XMLSignature(document, baseURI, signatureMethod);



soapHeaderElement.appendChild(sig.getElement());



As of my understanding I could try in  two ways. Either have saaj-impl
message factory implementation loaded or have soap header available if axis
version is getting used. Still I didn't get any idea from Tomcat user
community for the option 1.  If someone could shed any light on this it
would be really helpful.



Note: I added a dummy element for the header in 5.5.17 environment but then
I got an error saying "content not allowed in prolog…"



Thank you

Nilantha


--
http://r-bg.com

Reply via email to