axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nisha Menon" <nisha.me...@wipro.com>
Subject rebuilding soap envelope
Date Mon, 12 May 2003 14:37:27 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META
HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"></HEAD><BODY><DIV>hi
all,</DIV>
<DIV>&nbsp;</DIV>
<DIV>i've a problem with rebuilding my SOAP envelope.. :-(</DIV>
<DIV>&nbsp;</DIV>
<DIV>i've extracted the SOAP body from a SOAP envelope and need to encrypt the 
same.. </DIV>
<DIV>but in order to work on the encryption i need to convert the envelope 
to&nbsp;document type (org.w3c.dom.Document)</DIV>
<DIV>&nbsp;</DIV>
<DIV>after encryption (result is stored in the document) i want to set it back 
into the envelope....</DIV>
<DIV>&nbsp;</DIV>
<DIV>but i'm facing a problem :-((</DIV>
<DIV>&nbsp;</DIV>
<DIV>here is my code:</DIV>
<DIV>&nbsp;</DIV>
<DIV>SOAPEnvelope env = msg.getSOAPEnvelope();</DIV>
<DIV>SOAPBody bod = env.getBody();</DIV>
<DIV>&nbsp;</DIV>
<DIV>Encryptor e = new Encryptor(bod.getAsDocument(), encryptingKey, 
algorithmType);</DIV>
<DIV>XPath xpath = new XPath("//*");</DIV>
<DIV>e.encryptInPlace(xpath);</DIV>
<DIV>&nbsp;</DIV>
<DIV>env.clearBody();</DIV>
<DIV>env.setBody(bod);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>but when compiling, i get an error :-(( </DIV>
<DIV>&nbsp;</DIV>
<DIV>C:\javastuff&gt;javac SessionHandler.java<BR>SessionHandler.java:126:

incompatible types<BR>found&nbsp;&nbsp; : javax.xml.soap.SOAPBody<BR>required:

org.apache.axis.message.SOAPBody<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

SOAPBody bod = 
env.getBody();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

^<BR>1 error</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>getBody returns a javax.xml.soap.SOAPBody and setBody requires a 
org.apache.axis.message.SOAPBody.... :-(</DIV></DIV>
<DIV>is there any way around this problem?</DIV>
<DIV>please help!!</DIV>
<DIV>&nbsp;</DIV>
<DIV>regards,</DIV>
<DIV>nisha</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>
Mime
View raw message