Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

cvs commit: ws-fx/sandesha/src/org/apache/sandesha/server CompositeProcesso: msg#00213

apache.webservices.fx.devel

Subject: cvs commit: ws-fx/sandesha/src/org/apache/sandesha/server CompositeProcessor.java

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>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive 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

Navigation