[jboss-cvs] jboss-seam/examples/seambay/view ...
Shane Bryzak
sbryzak at redhat.com
Sun Jun 24 03:09:53 EDT 2007
User: sbryzak2
Date: 07/06/24 03:09:53
Modified: examples/seambay/view test.js test.xhtml
Log:
updated ws test page
Revision Changes Path
1.10 +12 -5 jboss-seam/examples/seambay/view/test.js
(In the diff below, changes in quantity of whitespace are not shown.)
Index: test.js
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/seambay/view/test.js,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- test.js 24 Apr 2007 12:49:06 -0000 1.9
+++ test.js 24 Jun 2007 07:09:53 -0000 1.10
@@ -13,6 +13,7 @@
this.name = name;
this.group = group;
this.parameters = new Array();
+ this.conversational = false;
webServices[name] = this;
@@ -21,6 +22,8 @@
ServiceMetadata.prototype.addParameter = function(param) { this.parameters.push(param); };
ServiceMetadata.prototype.setRequest = function(request) { this.request = request; };
ServiceMetadata.prototype.getRequest = function() { return this.request; };
+ ServiceMetadata.prototype.setConversational = function(val) { this.conversational = val; };
+ ServiceMetadata.prototype.isConversational = function() { return this.conversational; };
}
// start of web service definitions
@@ -94,16 +97,18 @@
svc = new ServiceMetadata("setAuctionDuration", "Create/Update Auction");
svc.setDescription("Set auction duration");
svc.setRequest("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
- "\n xmlns:seam=\"http://seambay.example.seam.jboss.org/\">\n <soapenv:Header/>" +
+ "\n xmlns:seam=\"http://seambay.example.seam.jboss.org/\">" +
+ "\n <soapenv:Header>" +
+ "\n <seam:conversationId xmlns:seam='http://www.jboss.org/seam/webservice'>#{conversationId}</seam:conversationId>" +
+ "\n </soapenv:Header>" +
"\n <soapenv:Body>" +
"\n <seam:setAuctionDuration>" +
- "\n <arg0>#{auctionId}</arg0>" +
- "\n <arg1>#{duration}</arg1>" +
+ "\n <arg0>#{duration}</arg0>" +
"\n </seam:setAuctionDuration>" +
"\n </soapenv:Body>" +
"\n</soapenv:Envelope>");
-svc.addParameter(new ServiceParam("Auction ID", "auctionId"));
svc.addParameter(new ServiceParam("Duration in days", "duration"));
+svc.setConversational(true);
svc = new ServiceMetadata("getNewAuctionDetails", "Create/Update Auction");
svc.setDescription("Get the auction details");
@@ -115,7 +120,6 @@
"\n </seam:getNewAuctionDetails>" +
"\n </soapenv:Body>" +
"\n</soapenv:Envelope>");
-svc.addParameter(new ServiceParam("Auction ID", "auctionId"));
svc = new ServiceMetadata("confirmAuction", "Create/Update Auction");
svc.setDescription("Confirm auction");
@@ -153,6 +157,9 @@
request = request.replace(search, param.value);
}
+ // Set the conversation ID
+ request = request.replace("#{conversationId}", document.getElementById("conversationId").value);
+
document.getElementById("serviceRequest").value = request;
}
1.5 +5 -0 jboss-seam/examples/seambay/view/test.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: test.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/seambay/view/test.xhtml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- test.xhtml 24 Apr 2007 12:49:06 -0000 1.4
+++ test.xhtml 24 Jun 2007 07:09:53 -0000 1.5
@@ -28,6 +28,11 @@
</div>
<div>
+ <h3>Context</h3>
+ Conversation ID <input id="conversationId" type="text" onkeyup="javascript:setAllParams()"/>
+ </div>
+
+ <div>
<h3>Parameters</h3>
<div id="parameters">
More information about the jboss-cvs-commits
mailing list