|
|
Choosing A Webhost: |
cvs commit: ws-fx/sandesha/src/org/apache/sandesha/server CompositeProcesso: msg#00213apache.webservices.fx.devel
jaliya 2004/08/27 11:50:17 Modified: sandesha/src/org/apache/sandesha/server CompositeProcessor.java Log: Modify the code so that a copy of the Message Context is inserted to the InQueue Obtained from: Submitted by: Reviewed by: CVS: ---------------------------------------------------------------------- CVS: PR: CVS: If this change addresses a PR in the problem report tracking CVS: database, then enter the PR number(s) here. CVS: Obtained from: CVS: If this change has been taken from another system, such as NCSA, CVS: then name the system in this line, otherwise delete it. CVS: Submitted by: CVS: If this code has been contributed to Apache by someone else; i.e., CVS: they sent us a patch or a new module, then include their name/email CVS: address here. If this is your work then delete this line. CVS: Reviewed by: CVS: If we are doing pre-commit code reviews and someone else has CVS: reviewed your changes, include their name(s) here. CVS: If you have not had it reviewed then delete this line. Revision Changes Path 1.4 +38 -28 ws-fx/sandesha/src/org/apache/sandesha/server/CompositeProcessor.java Index: CompositeProcessor.java =================================================================== RCS file: /home/cvs/ws-fx/sandesha/src/org/apache/sandesha/server/CompositeProcessor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CompositeProcessor.java 20 Aug 2004 13:14:22 -0000 1.3 +++ CompositeProcessor.java 27 Aug 2004 18:50:17 -0000 1.4 @@ -16,8 +16,12 @@ */ package org.apache.sandesha.server; +import java.util.Iterator; + +import org.apache.axis.AxisFault; import org.apache.axis.Message; import org.apache.axis.MessageContext; +import org.apache.sandesha.Constants; import org.apache.sandesha.IStorageManager; import org.apache.sandesha.RMMessageContext; import org.apache.sandesha.ws.rm.RMHeaders; @@ -51,38 +55,42 @@ if (storageManger.isMessageExist(sequenceID, messageNumber) != true) { - //////////////////////////////////////////////////////////////////////// - //////////////////////////////NEED TO CLEAN THIS PART/////////////////// - - RMMessageContext rmMsgContext= new RMMessageContext(); - rmMsgContext.setAddressingHeaders(rmMessageContext.getAddressingHeaders()); - rmMsgContext.setMessageID(rmMessageContext.getMessageID()); - rmMsgContext.setObj(rmMessageContext.getObj()); - rmMsgContext.setReqEnv(rmMessageContext.getReqEnv()); - rmMsgContext.setResEnv(rmMessageContext.getResEnv()); - rmMsgContext.setRMHeaders(rmMessageContext.getRMHeaders()); - rmMsgContext.setSequenceID(rmMessageContext.getSequenceID()); - rmMsgContext.setOutGoingAddress(rmMessageContext.getOutGoingAddress()); - - Message reqMsg= new Message(rmMessageContext.getMsgContext().getRequestMessage()); - Message resMsg= new Message(rmMessageContext.getMsgContext().getResponseMessage()); - - MessageContext msgContext = new MessageContext(rmMessageContext.getMsgContext().getAxisEngine()); - - msgContext = MessageContext.getCurrentContext(); - msgContext.setRequestMessage(reqMsg); - msgContext.setResponseMessage(resMsg); - - - rmMsgContext.setMsgContext(msgContext); + //Create a copy of the RMMessageContext. + RMMessageContext rmMsgContext = new RMMessageContext(); + + try { + //Copy the request and response messages. + Message reqMsg = + new Message( + rmMessageContext.getMsgContext().getRequestMessage().getSOAPPartAsString()); + Message resMsg = + new Message( + rmMessageContext.getMsgContext().getResponseMessage().getSOAPPartAsString()); + + //Create a new MessageContext, by pasing the axis engine. + MessageContext msgContext = + new MessageContext(rmMessageContext.getMsgContext().getAxisEngine()); + //Copy the existing message context to the new message context. + RMMessageContext.copyMessageContext(rmMessageContext.getMsgContext(), msgContext); + //Copy the RMMEssageContext + rmMessageContext.copyContents(rmMsgContext); + //Set the request and response messages of the message context. + msgContext.setRequestMessage(reqMsg); + msgContext.setResponseMessage(resMsg); + rmMsgContext.setMsgContext(msgContext); + //Set the message type for this message. + rmMsgContext.setMessageType(Constants.MSG_TYPE_SERVICE_REQUEST); + } catch (Exception e) { + e.printStackTrace(); + //TODO: Add to log. + } - - //////////////////////////////////////////////////////////////////////// - + System.out.println("INSERT THE REQUEST MESSAGE.....\n"); + //Insert the message to the INQUEUE storageManger.insertRequestMessage(rmMsgContext); + } - //send ack //Send an Ack for every message received by the server. //This should be changed according to the WS-policy. return ackProcessor.sendAcknowledgement(rmMessageContext); @@ -95,5 +103,7 @@ // TODO Auto-generated method stub return null; } + + }
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Fwd: Re: Fwd: Re: [PATCH] : STSAgent WS-Trust, Malinda Kaushalye |
|---|---|
| Next by Date: | cvs commit: ws-fx/sandesha/src/org/apache/sandesha RMMessageContext.java, jaliya-1oDqGaOF3Lkdnm+yROfE0A |
| Previous by Thread: | cvs commit: ws-fx/sandesha/src/org/apache/sandesha/server CompositeProcessor.java, jaliya-1oDqGaOF3Lkdnm+yROfE0A |
| Next by Thread: | cvs commit: ws-fx/sandesha/src/org/apache/sandesha/server/dao IServerDAO.java ServerDatabaseDAO.java ServerQueueDAO.java, jaliya-1oDqGaOF3Lkdnm+yROfE0A |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |