This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I know all about conversational web services.I am the single user and i want to prove that web service i have made is conversational,how to do it.I know start,middle and finish methods but i am clear how to use them for this proval.In examples i am getting that all three methods are executed by the client.can anyone tell abt this??
Raj Kumar Bindal
Ranch Hand
Joined: Apr 15, 2006
Posts: 409
posted
0
I have this client side file , package examples.webservices.conversation; import java.io.Serializable; import weblogic.jws.WLHttpTransport; import weblogic.jws.Conversation; import weblogic.jws.Conversational; import weblogic.jws.Context; import weblogic.wsee.jws.JwsContext; import weblogic.wsee.jws.ServiceHandle; import javax.jws.WebService; import javax.jws.WebMethod; @Conversational(maxIdleTime="10 minutes", maxAge="1 day", runAsStartUser=false, singlePrincipal=false ) @WebService(name="ConversationalPortType", serviceName="ConversationalService", targetNamespace="http://examples.org/") @WLHttpTransport(contextPath="conv", serviceUri="ConversationalService", portName="ConversationalServicePort") /** * Conversational Web Service. */ public class ConversationalServiceImpl implements Serializable { @Context private JwsContext ctx; public String status = "undefined"; @WebMethod @Conversation (Conversation.Phase.START) public String start() { ServiceHandle handle = ctx.getService(); String convID = handle.getConversationID(); status = "start"; return "Starting conversation, with ID " + convID + " and status equal to "+ status; } @WebMethod @Conversation (Conversation.Phase.CONTINUE) public String middle(String message) { ServiceHandle handle = ctx.getService(); String convID = handle.getConversationID(); status = "middle"; return "Middle of conversation; the message is: " + message + " and id is "+convID+" and status is " + status; } @WebMethod @Conversation (Conversation.Phase.FINISH) public String finish(String message ) { status = "finish"; ServiceHandle handle = ctx.getService(); String convID = handle.getConversationID(); return "End of conversation with id "+convID+" ; the message is: " + message + " and status is" + status; } }