From 3a569a2f00bf172cddfd567149774ee808a2a242 Mon Sep 17 00:00:00 2001 From: nash Date: Wed, 30 Mar 2011 19:50:51 +0000 Subject: Create branch for 1.6.2 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1087059 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca-java-1.6.2/samples/quote-xquery/README | 358 +++++++++++++++++++++ 1 file changed, 358 insertions(+) create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/samples/quote-xquery/README (limited to 'sca-java-1.x/branches/sca-java-1.6.2/samples/quote-xquery/README') diff --git a/sca-java-1.x/branches/sca-java-1.6.2/samples/quote-xquery/README b/sca-java-1.x/branches/sca-java-1.6.2/samples/quote-xquery/README new file mode 100644 index 0000000000..b92e8671e6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/samples/quote-xquery/README @@ -0,0 +1,358 @@ +Quote Xquery Sample +=================== + +This sample covers the most important integration scenarios for the xquery +implementation type and its corresponding saxon data bindings. + +If you just want to run it to see what happens open two command prompts (one for the server +and the other for the client), navigate to this sample directory and do: + +Command Prompt 1: +ant run-server + +Command Prompt 2: +ant run + +OR if you don't have ant, on Windows do + +Command Prompt 1: +java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-quote-xquery.jar xquery.quote.XQueryQuoteServer +Command Prompt 2: +java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-quote-xquery.jar xquery.quote.XQueryQuoteClient + +and on *nix do + +Command Prompt 1: +java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-quote-xquery.jar xquery.quote.XQueryQuoteServer +Command Prompt 2: +java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-quote-xquery.jar xquery.quote.XQueryQuoteClient + + +Results +---------- +The sample when run should simply display on the standard output some startup messages followed by: + +The service side: +Buildfile: build.xml + +run-server: + [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.core.StandardEngine start + [java] INFO: Starting Servlet Engine: Apache Tomcat/6.0.10 + [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.ContextConfig defaultWebConfig + [java] INFO: No default web.xml + [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.DigesterFactory register + [java] WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd + [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.DigesterFactory register + [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd + [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.DigesterFactory register + [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd + [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.DigesterFactory register + [java] WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd + [java] Sep 18, 2007 1:14:16 PM org.apache.catalina.startup.DigesterFactory register + [java] WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xsd + [java] Sep 18, 2007 1:14:17 PM org.apache.coyote.http11.Http11Protocol init + [java] INFO: Initializing Coyote HTTP/1.1 on http-8085 + [java] Sep 18, 2007 1:14:17 PM org.apache.coyote.http11.Http11Protocol start + [java] INFO: Starting Coyote HTTP/1.1 on http-8085 + [java] Sep 18, 2007 1:14:17 PM org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping + [java] INFO: Added Servlet mapping: http://localhost:8085/QuoteJoinService + [java] Sep 18, 2007 1:14:17 PM org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping + [java] INFO: Added Servlet mapping: http://localhost:8085/AvailQuoteProviderService + [java] XQuery Quote server started (press enter to shutdown) + [java] Sep 18, 2007 1:16:54 PM org.apache.coyote.http11.Http11Protocol destroy + [java] INFO: Stopping Coyote HTTP/1.1 on http-8085 + +BUILD SUCCESSFUL +Total time: 2 minutes 51 seconds + +The client side: +Buildfile: build.xml + +run: + [java] Input quote for the price list: + [java] + [java] + [java] Acme Inc + [java] + [java] + [java] + [java] 12 + [java] 1.0 + [java] + [java] + [java] 134 + [java] 34.1 + [java] + [java] + [java] 211 + [java] 10.0 + [java] + [java] + [java] + [java] + [java] Input quote for the availability: + [java] + [java] + [java] + [java] 12 + [java] 10 + [java] true + [java] 2003-03-22 + [java] + [java] + [java] 134 + [java] 345 + [java] false + [java] BackOrder + [java] + [java] + [java] 211 + [java] 100 + [java] true + [java] 2003-04-21 + [java] + [java] + [java] + [java] + [java] Output quote from local join: + [java] + [java] + [java] Acme Inc + [java]
12 Springs Rd,Morris Plains,NJ,07960
+ [java] + [java] 12 + [java] 1.0 + [java] 10 + [java] true + [java] 2003-03-22 + [java] 0.1 + [java] 11.0 + [java] + [java] + [java] 134 + [java] 34.1 + [java] 345 + [java] false + [java] BackOrder + [java] 0.1 + [java] 0.0 + [java] + [java] + [java] 211 + [java] 10.0 + [java] 100 + [java] true + [java] 2003-04-21 + [java] 0.1 + [java] 1100.0 + [java] + [java]
+ [java] + [java] + [java] Output quote from local join (second invokation): + [java] + [java] + [java] Acme Inc + [java]
12 Springs Rd,Morris Plains,NJ,07960
+ [java] + [java] 12 + [java] 1.0 + [java] 10 + [java] true + [java] 2003-03-22 + [java] 0.2 + [java] 12.0 + [java] + [java] + [java] 134 + [java] 34.1 + [java] 345 + [java] false + [java] BackOrder + [java] 0.2 + [java] 0.0 + [java] + [java] + [java] 211 + [java] 10.0 + [java] 100 + [java] true + [java] 2003-04-21 + [java] 0.2 + [java] 1200.0 + [java] + [java]
+ [java] + [java] + [java] Output quote from web service join: + [java] + [java] + [java] Acme Inc + [java]
12 Springs Rd,Morris Plains,NJ,07960
+ [java] + [java] 12 + [java] 1.0 + [java] 10 + [java] true + [java] 2003-03-22 + [java] 0.1 + [java] 11.0 + [java] + [java] + [java] 134 + [java] 34.1 + [java] 345 + [java] false + [java] BackOrder + [java] 0.1 + [java] 0.0 + [java] + [java] + [java] 211 + [java] 10.0 + [java] 100 + [java] true + [java] 2003-04-21 + [java] 0.1 + [java] 1100.0 + [java] + [java]
+ [java] + [java] + [java] Output quote from properties join: + [java] + [java] + [java] Acme Inc + [java]
12 Springs Rd,Morris Plains,NJ,07960
+ [java] + [java] 12 + [java] 1.0 + [java] 10 + [java] true + [java] 2003-03-22 + [java] 0.1 + [java] 11.0 + [java] + [java] + [java] 134 + [java] 34.1 + [java] 345 + [java] false + [java] BackOrder + [java] 0.1 + [java] 0.0 + [java] + [java] + [java] 211 + [java] 10.0 + [java] 100 + [java] true + [java] 2003-04-21 + [java] 0.1 + [java] 1100.0 + [java] + [java]
+ [java] + [java] + [java] Output quote from external references join: + [java] + [java] + [java] Acme Inc + [java]
12 Springs Rd,Morris Plains,NJ,07960
+ [java] + [java] 12 + [java] 1.0 + [java] 10 + [java] true + [java] 2003-03-22 + [java] 0.1 + [java] 11.0 + [java] + [java] + [java] 134 + [java] 34.1 + [java] 345 + [java] false + [java] BackOrder + [java] 0.1 + [java] 0.0 + [java] + [java] + [java] 211 + [java] 10.0 + [java] 100 + [java] true + [java] 2003-04-21 + [java] 0.1 + [java] 1100.0 + [java] + [java]
+ [java] + +BUILD SUCCESSFUL +Total time: 16 seconds + + +Sample Overview +--------------- + + 1. There is a central component for invoking the different + scenarios: QuoteJoinLocalComponent + 2. It provides the following cases: + - invoke XQuery component in the current assembly, by providing all needed + information as input parameters + - invoke XQuery component in external assembly, which is exposed as a web + service + - invoke XQuery component in the current assembly, which retrieves the needed + information from the component properties + - invoke XQuery component in the current assembly, which retrieves the needed + information from its references to other components: + - one of the components is in the current assembly + - the other component is in anther assembly and it is exposed (and accessed) + as web service + + 3. All of the XQuery components have reference to a component for calculation of the + total price + 4. SDO is used for data interchange + +src/main/resources + wsdl + AvailQuote.xsd + PriceQuote.xsd + Quote.xsd + quotejoin.wsdl + META-INF + sca + quote_join_external_references.xq --- the external references xquery script + quote_join_properties.xq --- the property-based join xquery script + quote_join.xq --- the join xquery script + xqueryquotews.composite --- composite file for the client side + xqueryquotewsclient.composite --- composite file for the service side + + build.xml - the Ant build file + pom.xml - the Maven build file + + +Building And Running The Sample Using Ant +----------------------------------------- +With the binary distribution the sample can be built and run using Maven +as follows: + +cd quote-xquery +ant compile +ant run-server + +(then from another command prompt) +cd quote-xquery +ant run + + +Building And Running The Sample Using Maven +------------------------------------------- +With either the binary or source distribution the sample can be built and run +using Maven as follows: + +cd quote-xquery +mvn + +This shows that the Junit test cases have run successfully. -- cgit v1.2.3