aspose file tools *
The moose likes Web Services and the fly likes regarding conversational web services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "regarding conversational web services" Watch "regarding conversational web services" New topic
Author

regarding conversational web services

Raj Kumar Bindal
Ranch Hand

Joined: Apr 15, 2006
Posts: 418
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: 418
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;
}
}

How to make a good conversation out of this??
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: regarding conversational web services