diff options
author | dims <dims@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-17 00:23:01 +0000 |
---|---|---|
committer | dims <dims@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-17 00:23:01 +0000 |
commit | bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a (patch) | |
tree | 38a92061c0793434c4be189f1d70c3458b6bc41d /tags/java/sca/1.0-RC1/demos |
Move Tuscany from Incubator to top level.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tags/java/sca/1.0-RC1/demos')
143 files changed, 14532 insertions, 0 deletions
diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/README b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/README new file mode 100644 index 0000000000..90498bdd19 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/README @@ -0,0 +1,82 @@ +Apache Tuscany Alert Aggregator Demo +==================================== + +The alert aggregator demo provides an application, implemented using SCA, that +aggregates feeds together and exposes them using the following bindings. + +binding.ws +binding.jsonrpc +binding.feed + +The easiest way to get going is to build the demo + +cd alert-aggregator-webapp +mvn + +This will build and test the source and generate a war file + +demo-alert-aggregator-webapp.war + +This war can be deployed to you web application container and tested (the war +has been tested with Tomcat 6.0.10). + +The Web Application +------------------- + +Once deployed point your browser at + +http://localhost:8080/demo-alert-aggregator-webapp + +Taking care to ensure the host name and port number match you local +configuration. + +This launches a Javascript application in the browser that uses JSONRPC +to contact the server and retrived a list of alert sources and alerts that +these sources are providing. + +There default sources that you see are stored in a file in the following +file + +demo-alert-aggregator-webapp/WEB-INF/classes/sources.xml + +This files has the following contents + +<ns0:Config xmlns:ns0="http://tuscany.apache.org/sca/demos/aggregator/types"> +<ns0:Source Id="0" FeedType="rss"> + <ns0:Name>BBC News</ns0:Name> + <ns0:Address>http://news.bbc.co.uk/</ns0:Address> + <ns0:LastChecked>10-Jun-2007 16:34:03</ns0:LastChecked> + <ns0:FeedAddress>http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml</ns0:FeedAddress> +</ns0:Source> +<ns0:Source Id="1" FeedType="rss"> + <ns0:Name>Engadget</ns0:Name> + <ns0:Address>http://www.engadget.com</ns0:Address> + <ns0:LastChecked>10-Jun-2007 16:34:03</ns0:LastChecked> + <ns0:FeedAddress>http://www.engadget.com/rss.xml</ns0:FeedAddress> +</ns0:Source> +</ns0:Config> + +You may want to adjust the "LastChecked" values to change the number of +alerts that are displayed in the first instance + +Using A Feed Reader +------------------- + +As this SCA application also uses the binding.feed binding you can use your +favourite feed reader to read the aggregated alerts. To do this point your +feed reader at + +http://localhost:8080/demo-alert-aggregator-webapp/services/AlertsFeedServiceRSS + +Again taking care to ensure that the host name and port number match you +local configuration. + +Using Web Services +------------------ + +The SCA application also uses binding.ws to provide a SOAP/HTTP interface. +The demo client that uses this interface is not yet available. + + + + diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/alert-aggregator.png b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/alert-aggregator.png Binary files differnew file mode 100644 index 0000000000..ae429cca94 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/alert-aggregator.png diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/alert-aggregator.svg b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/alert-aggregator.svg new file mode 100644 index 0000000000..6c44e716ff --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/alert-aggregator.svg @@ -0,0 +1,609 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="1052.3622" + height="744.09448" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.44" + sodipodi:docbase="C:\simon\Projects\Tuscany\java\sandbox\slaws\feed-aggregator" + sodipodi:docname="aggregator.svg" + version="1.0" + inkscape:export-filename="C:\simon\Projects\Tuscany\java\sandbox\slaws\feed-aggregator\aggregator.png" + inkscape:export-xdpi="52.84" + inkscape:export-ydpi="52.84"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.98994949" + inkscape:cx="559.53502" + inkscape:cy="380.79143" + inkscape:document-units="px" + inkscape:current-layer="layer1" + inkscape:window-width="1231" + inkscape:window-height="883" + inkscape:window-x="24" + inkscape:window-y="13" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <g + id="g2997" + transform="matrix(0.493398,0,0,0.868873,32.49726,7.184761)"> + <rect + rx="15.307091" + ry="11.608842" + y="192.00241" + x="258.31146" + height="274.39081" + width="495.71429" + id="rect2067" + style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:3.05459166;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <flowRoot + id="flowRoot2954" + xml:space="preserve" + transform="matrix(1.807362,0,0,1,-230.6612,-5.522464)"><flowRegion + id="flowRegion2956"><rect + y="212.66591" + x="281.42856" + height="61.42857" + width="170" + id="rect2958" /></flowRegion><flowPara + id="flowPara2960">DisplayComposite - PHP</flowPara></flowRoot> </g> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2988" + width="115.66247" + height="155.56354" + x="224.91631" + y="240.73917" + rx="6.9961648" + ry="12.905249" /> + <flowRoot + xml:space="preserve" + id="flowRoot2966" + transform="translate(-42.67445,34.80051)"><flowRegion + id="flowRegion2968"><rect + id="rect2970" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2972">Display</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 207.76582,260.46421 L 241.10086,260.46421 L 247.16177,273.59619 L 240.09071,285.71803 L 207.76582,285.71803 L 215.34197,273.59619 L 207.76582,260.46421 z " + id="path3017" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 321.01826,362.74776 L 354.3533,362.74776 L 360.41421,375.87974 L 353.34315,388.00158 L 321.01826,388.00158 L 328.59441,375.87974 L 321.01826,362.74776 z " + id="path3019" /> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 132.44488,252.20297 L 176.05464,252.20297 L 183.98368,272.02067 L 174.73314,290.31394 L 132.44488,290.31394 L 142.35619,272.02067 L 132.44488,252.20297 z " + id="path1883" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 373.8733,354.18185 L 423.52701,354.18185 L 432.55495,376.97097 L 422.02236,398.0071 L 373.8733,398.0071 L 385.15824,376.97097 L 373.8733,354.18185 z " + id="path1885" /> + <g + id="g1887" + transform="matrix(0.493398,0,0,1.065504,374.2831,-30.40982)"> + <rect + rx="27.634869" + ry="18.594875" + y="192.0024" + x="258.31131" + height="439.5152" + width="894.9447" + id="rect1889" + style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:2.75837588;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <flowRoot + id="flowRoot1891" + xml:space="preserve" + transform="matrix(1.807362,0,0,1,-224.5192,-5.522463)"><flowRegion + id="flowRegion1893"><rect + y="212.66591" + x="281.42856" + height="61.42857" + width="170" + id="rect1895" /></flowRegion><flowPara + id="flowPara1897">AlerterComposite - Java</flowPara></flowRoot> </g> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000095;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect1899" + width="115.66247" + height="190.91896" + x="566.70215" + y="313.4194" + rx="6.9961648" + ry="15.838266" /> + <flowRoot + xml:space="preserve" + id="flowRoot1901" + transform="translate(294.0606,125.6634)"><flowRegion + id="flowRegion1903"><rect + id="rect1905" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1907">AlertsService</flowPara><flowPara + id="flowPara2023" /></flowRoot> <rect + style="opacity:1;fill:#fff62c;fill-opacity:1;stroke:#060000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect1909" + width="21.718224" + height="20.708065" + x="611.65393" + y="302.81259" + rx="10.859112" + ry="0" /> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 548.54148,397.87026 L 581.87652,397.87026 L 587.93743,411.00224 L 580.86637,423.12408 L 548.54148,423.12408 L 556.11763,411.00224 L 548.54148,397.87026 z " + id="path1911" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 662.80407,336.35687 L 696.13911,336.35687 L 702.20002,349.48885 L 695.12896,361.61069 L 662.80407,361.61069 L 670.38022,349.48885 L 662.80407,336.35687 z " + id="path1913" /> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 474.23069,356.27399 L 517.84045,356.27399 L 525.76949,376.09169 L 516.51895,394.38496 L 474.23069,394.38496 L 484.142,376.09169 L 474.23069,356.27399 z " + id="path1915" /> + <flowRoot + xml:space="preserve" + id="flowRoot1919" + transform="translate(-136.1038,52.42486)"><flowRegion + id="flowRegion1921"><rect + id="rect1923" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1925">rest</flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot1927" + transform="translate(110.8013,157.3641)"><flowRegion + id="flowRegion1929"><rect + id="rect1931" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1933">soap</flowPara></flowRoot> <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 182.85715,271.25837 L 215,271.25837" + id="path1941" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 359.28572,375.3802 L 385,375.3802" + id="path1943" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 432.14286,376.80877 L 482.85715,376.09448" + id="path1945" /> + <flowRoot + xml:space="preserve" + id="flowRoot1921" + transform="translate(206.326,156.4433)"><flowRegion + id="flowRegion1923"><rect + id="rect1925" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1927">soap</flowPara></flowRoot> <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 663.16514,379.93449 L 696.50018,379.93449 L 702.56109,393.06647 L 695.49003,405.18831 L 663.16514,405.18831 L 670.74129,393.06647 L 663.16514,379.93449 z " + id="path1929" /> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.99999976;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect1932" + width="115.66247" + height="79.802025" + x="746.18158" + y="348.62225" + rx="6.9961648" + ry="6.6202211" /> + <flowRoot + xml:space="preserve" + id="flowRoot1934" + transform="translate(478.5909,142.6837)"><flowRegion + id="flowRegion1936"><rect + id="rect1938" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1940">RSS</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 723.03101,380.46928 L 756.36605,380.46928 L 762.42696,393.60126 L 755.3559,405.7231 L 723.03101,405.7231 L 730.60716,393.60126 L 723.03101,380.46928 z " + id="path1944" /> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000119;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect1950" + width="115.66247" + height="132.33011" + x="745.13855" + y="195.58192" + rx="6.9961648" + ry="10.977848" /> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 720.74384,253.66542 L 754.07888,253.66542 L 760.13979,266.7974 L 753.06873,278.91924 L 720.74384,278.91924 L 728.31999,266.7974 L 720.74384,253.66542 z " + id="path1952" /> + <flowRoot + xml:space="preserve" + id="flowRoot1954" + transform="translate(486.8998,-9.966938)"><flowRegion + id="flowRegion1956"><rect + id="rect1958" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1960">AlertsSources</flowPara><flowPara + id="flowPara2055">Service</flowPara></flowRoot> <g + id="g1962" + transform="translate(-176.0137,-37.3322)"> + <rect + ry="6.2971425" + rx="7.4499478" + y="442.66592" + x="221.42857" + height="44.285713" + width="48.57143" + id="rect1964" + style="opacity:1;fill:none;fill-opacity:1;stroke:#060000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:6, 1;stroke-dashoffset:0;stroke-opacity:1" /> + <path + id="path1966" + d="M 215,436.23734 L 276.42857,436.95163 L 276.42857,491.23734 L 213.57143,491.23734 L 215,436.23734 z " + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + id="path1968" + d="M 275.71429,491.23734 L 287.85714,504.80877 L 203.57143,504.09448 L 214.28571,491.95163" + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + </g> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 472.97164,431.20643 L 516.5814,431.20643 L 524.51044,451.02413 L 515.2599,469.3174 L 472.97164,469.3174 L 482.88295,451.02413 L 472.97164,431.20643 z " + id="path1973" /> + <flowRoot + xml:space="preserve" + id="flowRoot1977" + transform="translate(201.067,231.3759)"><flowRegion + id="flowRegion1979"><rect + id="rect1981" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1983">jsonrpc</flowPara></flowRoot> <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 703.12601,392.5614 C 729.14865,392.5614 730.28007,392.5614 730.28007,392.5614" + id="path2011" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 103.05071,450.26192 C 480.81768,450.26192 480.81768,450.26192 480.81768,450.26192" + id="path2021" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 321.88845,274.15881 L 355.22349,274.15881 L 361.2844,287.29079 L 354.21334,299.41263 L 321.88845,299.41263 L 329.4646,287.29079 L 321.88845,274.15881 z " + id="path2025" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 374.74349,265.5929 L 424.3972,265.5929 L 433.42514,288.38202 L 422.89255,309.41815 L 374.74349,309.41815 L 386.02843,288.38202 L 374.74349,265.5929 z " + id="path2027" /> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 475.10088,267.68504 L 518.71064,267.68504 L 526.63968,287.50274 L 517.38914,305.79601 L 475.10088,305.79601 L 485.01219,287.50274 L 475.10088,267.68504 z " + id="path2029" /> + <flowRoot + xml:space="preserve" + id="flowRoot2031" + transform="translate(111.6715,68.77515)"><flowRegion + id="flowRegion2033"><rect + id="rect2035" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2037">soap</flowPara></flowRoot> <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 360.15591,286.79125 L 385.87019,286.79125" + id="path2039" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 433.01305,288.21982 L 483.72734,287.50553" + id="path2041" /> + <flowRoot + xml:space="preserve" + id="flowRoot2043" + transform="translate(207.1962,67.85435)"><flowRegion + id="flowRegion2045"><rect + id="rect2047" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2049">soap</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 472.23581,584.46535 L 515.84557,584.46535 L 523.77461,604.28305 L 514.52407,622.57632 L 472.23581,622.57632 L 482.14712,604.28305 L 472.23581,584.46535 z " + id="path2077" /> + <flowRoot + xml:space="preserve" + id="flowRoot2079" + transform="translate(201.2595,384.6873)"><flowRegion + id="flowRegion2081"><rect + id="rect2083" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2085">atom</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 474.05184,212.89166 L 517.6616,212.89166 L 525.59064,232.70936 L 516.3401,251.00263 L 474.05184,251.00263 L 483.96315,232.70936 L 474.05184,212.89166 z " + id="path1995" /> + <flowRoot + xml:space="preserve" + id="flowRoot1997" + transform="translate(202.1472,13.06115)"><flowRegion + id="flowRegion1999"><rect + id="rect2001" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2003">jsonrpc</flowPara></flowRoot> <g + id="g2019" + transform="translate(-178.034,112.9369)"> + <rect + ry="6.2971425" + rx="7.4499478" + y="442.66592" + x="221.42857" + height="44.285713" + width="48.57143" + id="rect2021" + style="opacity:1;fill:none;fill-opacity:1;stroke:#060000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:6, 1;stroke-dashoffset:0;stroke-opacity:1" /> + <path + id="path2023" + d="M 215,436.23734 L 276.42857,436.95163 L 276.42857,491.23734 L 213.57143,491.23734 L 215,436.23734 z " + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + id="path2026" + d="M 275.71429,491.23734 L 287.85714,504.80877 L 203.57143,504.09448 L 214.28571,491.95163" + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + </g> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 663.04526,423.36857 L 696.3803,423.36857 L 702.44121,436.50055 L 695.37015,448.62239 L 663.04526,448.62239 L 670.62141,436.50055 L 663.04526,423.36857 z " + id="path2030" /> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.99999976;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:5.99999928, 1.99999976;stroke-dashoffset:0;stroke-opacity:1" + id="rect2032" + width="115.66247" + height="79.802025" + x="747.07184" + y="437.51321" + rx="6.9961648" + ry="6.6202211" /> + <flowRoot + xml:space="preserve" + id="flowRoot2034" + transform="translate(482.5116,231.5747)"><flowRegion + id="flowRegion2036"><rect + id="rect2038" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2040">POP - Not done</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 726.95174,469.36022 L 760.28678,469.36022 L 766.34769,482.4922 L 759.27663,494.61404 L 726.95174,494.61404 L 734.52789,482.4922 L 726.95174,469.36022 z " + id="path2042" /> + <g + id="g2046" + transform="translate(-173.9935,-197.1597)"> + <rect + ry="6.2971425" + rx="7.4499478" + y="442.66592" + x="221.42857" + height="44.285713" + width="48.57143" + id="rect2048" + style="opacity:1;fill:none;fill-opacity:1;stroke:#060000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:6, 1;stroke-dashoffset:0;stroke-opacity:1" /> + <path + id="path2050" + d="M 215,436.23734 L 276.42857,436.95163 L 276.42857,491.23734 L 213.57143,491.23734 L 215,436.23734 z " + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + id="path2052" + d="M 275.71429,491.23734 L 287.85714,504.80877 L 203.57143,504.09448 L 214.28571,491.95163" + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + </g> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 103.03556,270.33294 C 140.4112,270.33294 140.4112,270.33294 140.4112,270.33294" + id="path2054" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 102.02541,434.9878 L 449.51788,432.9675 L 450.52804,231.94714 L 482.85292,231.94714" + id="path2056" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 97.984797,603.52083 L 480.83262,601.50053" + id="path2058" /> + <flowRoot + xml:space="preserve" + id="flowRoot2060" + transform="translate(-226.8143,99.79398)"><flowRegion + id="flowRegion2062"><rect + id="rect2064" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2066">HTML</flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot2068" + transform="translate(-232.7737,258.6113)"><flowRegion + id="flowRegion2070"><rect + id="rect2072" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2074">Web2.0</flowPara></flowRoot> <flowRoot + xml:space="preserve" + id="flowRoot2076" + transform="translate(-248.6574,410.2362)"><flowRegion + id="flowRegion2078"><rect + id="rect2080" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2082">Thunderbird</flowPara></flowRoot> <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 663.10519,467.81527 L 696.44023,467.81527 L 702.50114,480.94725 L 695.43008,493.06909 L 663.10519,493.06909 L 670.68134,480.94725 L 663.10519,467.81527 z " + id="path2088" /> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.99999976;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:5.99999928, 1.99999976;stroke-dashoffset:0;stroke-opacity:1" + id="rect2090" + width="115.66247" + height="79.802025" + x="746.12164" + y="533.47766" + rx="6.9961648" + ry="6.6202211" /> + <flowRoot + xml:space="preserve" + id="flowRoot2092" + transform="translate(481.5614,327.5392)"><flowRegion + id="flowRegion2094"><rect + id="rect2096" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2098">NNTP - Not done</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 726.00152,565.3247 L 759.33656,565.3247 L 765.39747,578.45668 L 758.32641,590.57852 L 726.00152,590.57852 L 733.57767,578.45668 L 726.00152,565.3247 z " + id="path2100" /> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 472.48834,533.95773 L 516.0981,533.95773 L 524.02714,553.77543 L 514.7766,572.0687 L 472.48834,572.0687 L 482.39965,553.77543 L 472.48834,533.95773 z " + id="path2106" /> + <flowRoot + xml:space="preserve" + id="flowRoot2108" + transform="translate(201.512,334.1797)"><flowRegion + id="flowRegion2110"><rect + id="rect2112" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2114">rss</flowPara></flowRoot> <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 98.237332,557.01321 L 481.08515,554.99291" + id="path2120" /> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2022" + width="115.66247" + height="95.964485" + x="565.43286" + y="534.48798" + rx="6.9961648" + ry="7.9610276" /> + <flowRoot + xml:space="preserve" + id="flowRoot2024" + transform="translate(304.5289,349.5419)"><flowRegion + id="flowRegion2026"><rect + id="rect2028" + width="170" + height="61.42857" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2030">AlertFeed</flowPara><flowPara + id="flowPara2032">Service</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 540.93669,563.74164 L 574.27173,563.74164 L 580.33264,576.87362 L 573.26158,588.99546 L 540.93669,588.99546 L 548.51284,576.87362 L 540.93669,563.74164 z " + id="path2073" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 657.10424,562.7721 L 690.43928,562.7721 L 696.50019,575.90408 L 689.42913,588.02592 L 657.10424,588.02592 L 664.68039,575.90408 L 657.10424,562.7721 z " + id="path2034" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 525.27933,230.93699 L 685.89358,229.92684 L 685.89358,259.22126 L 724.27938,259.22126" + id="path2038" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 525.27933,286.49538 L 671.75144,284.47507 L 671.75144,267.30248 L 726.29968,267.30248" + id="path2040" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 701.04587,349.12484 L 714.17785,348.11468 L 714.17785,275.3837 L 722.25907,275.3837" + id="path2043" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 525.27933,374.37865 L 538.41131,374.37865 L 538.41131,401.65277 L 550.53314,400.64262" + id="path2045" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 701.04587,437.00811 L 721.24892,437.00811 L 721.24892,480.44467 L 732.3606,480.44467" + id="path2049" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 701.04587,481.45482 L 714.17785,481.45482 L 714.17785,579.43962 L 733.37075,579.43962" + id="path2051" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 697.00526,575.39901 L 705.08648,575.39901 L 704.07633,518.83046 L 541.44177,518.83046 L 541.44177,415.7949 L 552.55344,415.7949" + id="path2053" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 522.24887,451.15024 L 533.36055,451.15024 L 533.36055,409.73399 L 554.57375,409.73399" + id="path2055" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 522.24887,552.1655 L 535.38085,552.1655 L 534.3707,574.38885 L 546.49253,574.38885" + id="path2057" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 522.24887,604.69343 L 535.38085,603.68328 L 535.38085,583.48023 L 542.45192,583.48023" + id="path2059" /> + </g> +</svg> diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/build-dojo.xml b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/build-dojo.xml new file mode 100644 index 0000000000..e293e882c6 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/build-dojo.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project name="DojoZipInstaller"> + + + <property name="dojo.version" value="0.9.0"/> + <property name="unpack.location" value="${basedir}/src/main/webapp/dojo"/> + + + <target name="check-dojo-installed"> + <condition property="already.installed" > + <available file="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"/> + </condition> + <condition property="maven.suffix" value=""> + <os family="unix"/> + </condition> + <condition property="maven.suffix" value=".bat"> + <os family="windows"/> + </condition> + </target> + + + <target name="check-dojo-unpacked"> + <condition property="already.unpacked" > + <available file="${unpack.location}"/> + </condition> + </target> + + <target name="install-dojo" depends="check-dojo-installed" unless="already.installed"> + <mkdir dir="${basedir}/target/dojo-download/"/> + <get src="http://download.dojotoolkit.org/release-${dojo.version}/dojo-release-${dojo.version}.zip" + dest="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip" + verbose="true" + usetimestamp="true"/> + <exec executable="mvn${maven.suffix}" dir="${basedir}" failonerror="false"> + <arg line="install:install-file -DgroupId=dojo -DartifactId=dojo -Dversion=${dojo.version} -Dpackaging=zip -DgeneratePom=true -Dfile=${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"/> + </exec> + </target> + + <target name="install-dojo-nomaven" depends="check-dojo-installed" unless="already.installed"> + <mkdir dir="${basedir}/target/dojo-download/"/> + <get src="http://download.dojotoolkit.org/release-${dojo.version}/dojo-release-${dojo.version}.zip" + dest="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip" + verbose="true" + usetimestamp="true"/> + <copy file="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip" + tofile="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"/> + </target> + + + <target name="unpack-dojo-files" depends="check-dojo-installed, check-dojo-unpacked" unless="already.unpacked"> + <fail message="dojo zip file not installed in local repository: ${localRepository}" unless="already.installed"/> + <mkdir dir="${basedir}/target/dojo-unpack-temp/"/> + <unzip src="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip" + dest="${basedir}/target/dojo-unpack-temp/" + overwrite="false"> + <patternset> + <include name="dojo-release-${dojo.version}/dojo/**"/> + <exclude name="dojo-release-${dojo.version}/dojo/tests/**"/> + <include name="dojo-release-${dojo.version}/dijit/**"/> + <exclude name="dojo-release-${dojo.version}/dojox/**"/> + <exclude name="dojo-release-${dojo.version}/util/**"/> + </patternset> + </unzip> + <move file="${basedir}/target/dojo-unpack-temp/dojo-release-${dojo.version}" + tofile="${unpack.location}" + verbose="true"/> + <delete dir="${basedir}/target/dojo-unpack-temp/"/> + </target> + + + <target name="clean-dojo-files"> + <delete dir="${unpack.location}"/> + </target> +</project> diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/build.xml b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/build.xml new file mode 100644 index 0000000000..7f840cfa5e --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/build.xml @@ -0,0 +1,230 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project name="helloworld-jsonrpc" default="package"> + <property name="settings.localRepository" value="./target/repo" /> + <property name="artifactId" value="sample-feed-aggregator" /> + + <target name="init"> + <mkdir dir="target/classes"/> + <mkdir dir="target/sdo-source"/> + </target> + + <target name="generate" depends="init"> + <java classname="org.apache.tuscany.sdo.generate.XSD2JavaGenerator" + fork="true"> + <arg value="-targetDirectory"/> + <arg value="target/sdo-source"/> + <arg value="-javaPackage"/> + <arg value="org.apache.tuscany.sca.demos.aggregator.service"/> + <arg value="-schemaNamespace"/> + <arg value="http://tuscany.apache.org/sca/demos/aggregator/service"/> + <arg value="-noNotification"/> + <arg value="-noContainment"/> + <arg value="-noUnsettable"/> + <arg value="src/main/resources/Alerts.wsdl"/> + + <classpath> + <pathelement path="target/classes"/> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + </classpath> + </java> + + <java classname="org.apache.tuscany.sdo.generate.XSD2JavaGenerator" + fork="true"> + <arg value="-targetDirectory"/> + <arg value="target/sdo-source"/> + <arg value="-javaPackage"/> + <arg value="org.apache.tuscany.sca.demos.aggregator.sources"/> + <arg value="-schemaNamespace"/> + <arg value="http://tuscany.apache.org/sca/demos/aggregator/sources"/> + <arg value="-noNotification"/> + <arg value="-noContainment"/> + <arg value="-noUnsettable"/> + <arg value="src/main/resources/AlertsSources.wsdl"/> + + <classpath> + <pathelement path="target/classes"/> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + </classpath> + </java> + + <java classname="org.apache.tuscany.sdo.generate.XSD2JavaGenerator" + fork="true"> + <arg value="-targetDirectory"/> + <arg value="target/sdo-source"/> + <arg value="-javaPackage"/> + <arg value="org.apache.tuscany.sca.demos.aggregator.types"/> + <arg value="-schemaNamespace"/> + <arg value="http://tuscany.apache.org/sca/demos/aggregator/types"/> + <arg value="-noNotification"/> + <arg value="-noContainment"/> + <arg value="-noUnsettable"/> + <arg value="src/main/resources/Alerts.xsd"/> + + <classpath> + <pathelement path="target/sdo-source"/> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + </classpath> + </java> + </target> + + <target name="compile" depends="generate"> + <javac srcdir="target/sdo-source" + destdir="target/classes" + debug="on" + source="1.5" + target="1.5"> + <classpath> + <pathelement path="target/classes"/> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + </classpath> + </javac> + <javac srcdir="src/main/java" + destdir="target/classes" + debug="on" + source="1.5" + target="1.5"> + <classpath> + <pathelement path="target/classes"/> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + </classpath> + </javac> + <copy todir="target/classes"> + <fileset dir="src/main/resources"/> + </copy> + </target> + + <target name="package" depends="compile"> + <ant antfile="./build-dojo.xml" target="install-dojo-nomaven"> + <property name="localRepository" value="${settings.localRepository}"/> + </ant> + + <ant antfile="./build-dojo.xml" target="unpack-dojo-files"> + <property name="localRepository" value="${settings.localRepository}"/> + <property name="artifactId" value="${artifactId}"/> + </ant> + + <war destfile="target/demo-alert-aggregator-webapp.war" + webxml="src/main/webapp/WEB-INF/web.xml"> + <fileset dir="src/main/webapp"/> + <zipfileset dir="../../modules" prefix="WEB-INF/lib"> + <include name="sca-api-1.0-incubating.jar"/> + <include name="tuscany-assembly-1.0-incubating.jar"/> + <include name="tuscany-assembly-xml-1.0-incubating.jar"/> + <include name="tuscany-binding-feed-1.0-incubating.jar"/> + <include name="tuscany-binding-jsonrpc-1.0-incubating.jar"/> + <include name="tuscany-binding-sca-1.0-incubating.jar"/> + <include name="tuscany-binding-sca-xml-1.0-incubating.jar"/> + <include name="tuscany-binding-ws-1.0-incubating.jar"/> + <include name="tuscany-binding-ws-axis2-1.0-incubating.jar"/> + <include name="tuscany-binding-ws-xml-1.0-incubating.jar"/> + <include name="tuscany-contribution-1.0-incubating.jar"/> + <include name="tuscany-contribution-impl-1.0-incubating.jar"/> + <include name="tuscany-contribution-java-1.0-incubating.jar"/> + <include name="tuscany-contribution-namespace-1.0-incubating.jar"/> + <include name="tuscany-core-1.0-incubating.jar"/> + <include name="tuscany-core-databinding-1.0-incubating.jar"/> + <include name="tuscany-core-spi-1.0-incubating.jar"/> + <include name="tuscany-databinding-1.0-incubating.jar"/> + <include name="tuscany-databinding-axiom-1.0-incubating.jar"/> + <include name="tuscany-databinding-jaxb-1.0-incubating.jar"/> + <include name="tuscany-databinding-sdo-1.0-incubating.jar"/> + <include name="tuscany-distributed-1.0-incubating.jar"/> + <include name="tuscany-extension-helper-1.0-incubating.jar"/> + <include name="tuscany-host-embedded-1.0-incubating.jar"/> + <include name="tuscany-host-http-1.0-incubating.jar"/> + <include name="tuscany-host-webapp-1.0-incubating.jar"/> + <include name="tuscany-implementation-java-1.0-incubating.jar"/> + <include name="tuscany-implementation-java-runtime-1.0-incubating.jar"/> + <include name="tuscany-implementation-java-xml-1.0-incubating.jar"/> + <include name="tuscany-interface-1.0-incubating.jar"/> + <include name="tuscany-interface-java-1.0-incubating.jar"/> + <include name="tuscany-interface-java-xml-1.0-incubating.jar"/> + <include name="tuscany-interface-wsdl-1.0-incubating.jar"/> + <include name="tuscany-interface-wsdl-runtime-1.0-incubating.jar"/> + <include name="tuscany-interface-wsdl-xml-1.0-incubating.jar"/> + <include name="tuscany-policy-1.0-incubating.jar"/> + <include name="tuscany-policy-xml-1.0-incubating.jar"/> + </zipfileset> + <lib dir="../../lib"> + <include name="XmlSchema-1.3.1.jar"/> + <include name="activation-1.1.jar"/> + <include name="annogen-0.1.0.jar"/> + <include name="ant-1.7.0.jar"/> + <include name="ant-launcher-1.7.0.jar"/> + <include name="axiom-api-1.2.4.jar"/> + <include name="axiom-dom-1.2.4.jar"/> + <include name="axiom-impl-1.2.4.jar"/> + <include name="axis2-java2wsdl-1.2.jar"/> + <include name="axis2-kernel-1.2.jar"/> + <include name="backport-util-concurrent-2.2.jar"/> + <include name="backport-util-concurrent-3.0.jar"/> + <include name="cglib-nodep-2.1_3.jar"/> + <include name="common-2.2.3.jar"/> + <include name="commons-codec-1.3.jar"/> + <include name="commons-fileupload-1.1.1.jar"/> + <include name="commons-httpclient-3.0.1.jar"/> + <include name="commons-io-1.1.jar"/> + <include name="commons-logging-1.1.jar"/> + <include name="ecore-2.2.3.jar"/> + <include name="ecore-change-2.2.3.jar"/> + <include name="ecore-xmi-2.2.3.jar"/> + <include name="geronimo-commonj_1.1_spec-1.0.jar"/> + <include name="geronimo-jms_1.1_spec-1.1.jar"/> + <include name="jakarta-httpcore-4.0-alpha4.jar"/> + <include name="jaxb-api-2.1.jar"/> + <include name="jaxb-impl-2.1.4.jar"/> + <include name="jaxen-1.1-beta-9.jar"/> + <include name="jaxws-api-2.1.jar"/> + <include name="jdom-1.0.jar"/> + <include name="json-rpc-1.0.jar"/> + <include name="jsr181-api-1.0-MR1.jar"/> + <include name="jsr250-api-1.0.jar"/> + <include name="mail-1.4.jar"/> + <include name="neethi-2.0.1.jar"/> + <include name="rome-0.9.jar"/> + <include name="saaj-api-1.3.jar"/> + <include name="sca-api-1.0-incubating.jar"/> + <include name="stax-api-1.0-2.jar"/> + <include name="stax-api-1.0.1.jar"/> + <include name="woden-1.0-incubating-M7a.jar"/> + <include name="wsdl4j-1.6.2.jar"/> + <include name="wstx-asl-3.2.1.jar"/> + <include name="xercesImpl-2.8.1.jar"/> + <include name="xml-apis-1.3.03.jar"/> + <include name="xsd-2.2.3.jar"/> + <include name="tuscany-sdo-api-r2.1-1.0-incubating.jar"/> + <include name="tuscany-sdo-impl-1.0-incubating.jar"/> + <include name="tuscany-sdo-lib-1.0-incubating.jar"/> + </lib> + <classes dir="target/classes"/> + </war> + + <ant antfile="./build-dojo.xml" target="clean-dojo-files"> + <property name="localRepository" value="${settings.localRepository}"/> + <property name="artifactId" value="${artifactId}"/> + </ant> + </target> + + <target name="clean"> + <delete quiet="true" includeemptydirs="true"> + <fileset dir="target"/> + </delete> + </target> +</project> diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/pom.xml b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/pom.xml new file mode 100644 index 0000000000..2e75de244d --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/pom.xml @@ -0,0 +1,253 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-demos</artifactId> + <version>1.0-incubating</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>demo-alert-aggregator-webapp</artifactId> + <packaging>war</packaging> + <version>1.0-incubating</version> + <name>Apache Tuscany SCA Alert Aggregator Demo</name> + <url>http://cwiki.apache.org/TUSCANY</url> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>httpunit</groupId> + <artifactId>httpunit</artifactId> + <version>1.6.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sdo</groupId> + <artifactId>tuscany-sdo-impl</artifactId> + <version>1.0-incubating</version> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-ws-axis2</artifactId> + <version>${pom.version}</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-core-databinding</artifactId> + <version>${pom.version}</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-databinding-jaxb</artifactId> + <version>${pom.version}</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-databinding-sdo</artifactId> + <version>${pom.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-databinding-axiom</artifactId> + <version>${pom.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-embedded</artifactId> + <version>${pom.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-java-runtime</artifactId> + <version>${pom.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-interface-java-xml</artifactId> + <version>${pom.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-jetty</artifactId> + <version>${pom.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-webapp</artifactId> + <version>1.0-incubating</version> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-jsonrpc</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-feed</artifactId> + <version>1.0-incubating</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>rome</groupId> + <artifactId>rome</artifactId> + <version>0.9</version> + </dependency> + </dependencies> + + <build> + <finalName>demo-alert-aggregator-webapp</finalName> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.0</version> + <executions> + <execution> + <id>add-test-source</id> + <phase>generate-sources</phase> + <goals> + <goal>add-test-source</goal> + </goals> + <configuration> + <sources> + <source>target/sdo-source</source> + </sources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.tuscany.sdo</groupId> + <artifactId>tuscany-sdo-plugin</artifactId> + <version>1.0-incubating</version> + <executions> + <execution> + <id>generate-sdo</id> + <phase>process-resources</phase> + <configuration> + <schemaFiles> + <configuration> + <fileName>${project.build.directory}/classes/Alerts.wsdl</fileName> + <javaPackage>org.apache.tuscany.sca.demos.aggregator.service</javaPackage> + </configuration> + <configuration> + <fileName>${project.build.directory}/classes/AlertsSources.wsdl</fileName> + <javaPackage>org.apache.tuscany.sca.demos.aggregator.sources</javaPackage> + </configuration> + <configuration> + <fileName>${project.build.directory}/classes/Alerts.xsd</fileName> + <javaPackage>org.apache.tuscany.sca.demos.aggregator.types</javaPackage> + </configuration> + </schemaFiles> + <noNotification>true</noNotification> + <noContainment>true</noContainment> + <noUnsettable>true</noUnsettable> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.1</version> + + <dependencies> + <dependency> + <groupId>ant</groupId> + <artifactId>ant-trax</artifactId> + <version>1.6.5</version> + </dependency> + </dependencies> + + <executions> + <execution> + <id>install-dojo</id> + <phase>validate</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <ant antfile="./build-dojo.xml" target="install-dojo"> + <property name="localRepository" value="${settings.localRepository}"/> + </ant> + </tasks> + </configuration> + </execution> + <execution> + <id>copy-dojo-files</id> + <phase>generate-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <ant antfile="./build-dojo.xml" target="unpack-dojo-files"> + <property name="localRepository" value="${settings.localRepository}"/> + <property name="artifactId" value="${artifactId}"/> + </ant> + </tasks> + </configuration> + </execution> + <execution> + <id>clean-dojo-files</id> + <phase>clean</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <ant antfile="./build-dojo.xml" target="clean-dojo-files"> + <property name="localRepository" value="${settings.localRepository}"/> + <property name="artifactId" value="${artifactId}"/> + </ant> + </tasks> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + +</project> diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java new file mode 100644 index 0000000000..808374030c --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertTypeNonSDOImpl.java @@ -0,0 +1,339 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.demos.aggregator; + +import org.apache.tuscany.sca.demos.aggregator.types.AlertType; + + +public class AlertTypeNonSDOImpl implements AlertType +{ + private static final long serialVersionUID = 670364038865656196L; + +/** + * The default value of the '{@link #getTitle() <em>Title</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTitle() + * @generated + * @ordered + */ + protected static final String TITLE_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getTitle() <em>Title</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTitle() + * @generated + * @ordered + */ + protected String title = TITLE_DEFAULT_; + + /** + * The default value of the '{@link #getSummary() <em>Summary</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSummary() + * @generated + * @ordered + */ + protected static final String SUMMARY_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getSummary() <em>Summary</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSummary() + * @generated + * @ordered + */ + protected String summary = SUMMARY_DEFAULT_; + + /** + * The default value of the '{@link #getAddress() <em>Address</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddress() + * @generated + * @ordered + */ + protected static final String ADDRESS_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getAddress() <em>Address</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddress() + * @generated + * @ordered + */ + protected String address = ADDRESS_DEFAULT_; + + /** + * The default value of the '{@link #getDate() <em>Date</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDate() + * @generated + * @ordered + */ + protected static final String DATE_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getDate() <em>Date</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDate() + * @generated + * @ordered + */ + protected String date = DATE_DEFAULT_; + + /** + * The default value of the '{@link #getSourceId() <em>Source Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSourceId() + * @generated + * @ordered + */ + protected static final String SOURCE_ID_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getSourceId() <em>Source Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSourceId() + * @generated + * @ordered + */ + protected String sourceId = SOURCE_ID_DEFAULT_; + + /** + * The default value of the '{@link #isUnread() <em>Unread</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isUnread() + * @generated + * @ordered + */ + protected static final boolean UNREAD_DEFAULT_ = false; + + /** + * The cached value of the '{@link #isUnread() <em>Unread</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isUnread() + * @generated + * @ordered + */ + protected boolean unread = UNREAD_DEFAULT_; + + /** + * The default value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_DEFAULT_; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AlertTypeNonSDOImpl() + { + super(); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getTitle() + { + return title; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTitle(String newTitle) + { + title = newTitle; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getSummary() + { + return summary; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSummary(String newSummary) + { + summary = newSummary; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAddress() + { + return address; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAddress(String newAddress) + { + address = newAddress; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDate() + { + return date; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDate(String newDate) + { + date = newDate; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getSourceId() + { + return sourceId; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setSourceId(String newSourceId) + { + sourceId = newSourceId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isUnread() + { + return unread; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setUnread(boolean newUnread) + { + unread = newUnread; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getId() + { + return id; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setId(String newId) + { + id = newId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (Title: "); + result.append(title); + result.append(", Summary: "); + result.append(summary); + result.append(", Address: "); + result.append(address); + result.append(", Date: "); + result.append(date); + result.append(", SourceId: "); + result.append(sourceId); + result.append(", Unread: "); + result.append(unread); + result.append(", Id: "); + result.append(id); + result.append(')'); + return result.toString(); + } + +} //AlertTypeImpl diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java new file mode 100644 index 0000000000..f6479f8633 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java @@ -0,0 +1,137 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.demos.aggregator; + +import java.io.InputStream; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.List; + +import org.apache.tuscany.sca.binding.feed.collection.Collection; +import org.apache.tuscany.sca.binding.feed.collection.NotFoundException; +import org.apache.tuscany.sca.demos.aggregator.types.AlertType; +import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +import com.sun.syndication.feed.atom.Entry; +import com.sun.syndication.feed.atom.Feed; +import com.sun.syndication.feed.synd.SyndEntry; +import com.sun.syndication.feed.synd.SyndEntryImpl; +import com.sun.syndication.feed.synd.SyndFeed; +import com.sun.syndication.feed.synd.SyndFeedImpl; + +/** + * Read all new alerts from the specified sources + * + * @version $Rev$ $Date$ + */ +@Service(Collection.class) +public class AlertsFeedServiceImpl implements Collection { + + private AlertsService alerts; + + @Reference + public void alerts(AlertsService alerts) { + this.alerts = alerts; + } + + DateFormat dateFormatter = DateFormat.getDateTimeInstance(); + + /** + * Return the alerts as a feed. Used by binding.feed + * + * @return the structure containing alerts + */ + public Feed getFeed() { + + // Create a new Feed + SyndFeed feed = new SyndFeedImpl(); + feed.setTitle("Apache Tuscant Feed Aggregator"); + feed.setDescription("A sample showing an SCA application to aggregate various types of feeds"); + feed.setAuthor("Apache Tuscany"); + feed.setLink("http://incubator.apache.org/tuscany"); + + // Aggregate entries from feed1 and feed2 + List<SyndEntry> entries = new ArrayList<SyndEntry>(); + + try { + AlertsType alerts = this.alerts.getAllNewAlerts(""); + + for( Object alertObject : alerts.getAlert() ){ + AlertType alert = ((AlertType)alertObject); + SyndEntry entry = new SyndEntryImpl(); + entry.setTitle(alert.getTitle()); + //entry.(alert.getSummary()); + entry.setLink(alert.getAddress()); + entry.setPublishedDate(dateFormatter.parse(alert.getDate())); + + entries.add(entry); + } + } catch(Exception ex) { + System.err.println("Exception " + ex.toString()); + } + + feed.setEntries(entries); + + return (Feed)feed.createWireFeed("atom_1.0"); + } + + /** + * @see org.apache.tuscany.sca.binding.feed.Collection#delete(java.lang.String) + */ + public void delete(String id) throws NotFoundException { + } + + /** + * @see org.apache.tuscany.sca.binding.feed.Collection#get(java.lang.String) + */ + public Entry get(String id) throws NotFoundException { + return null; + } + + /** + * @see org.apache.tuscany.sca.binding.feed.Collection#post(com.sun.syndication.feed.atom.Entry) + */ + public Entry post(Entry entry) { + return null; + } + + /** + * @see org.apache.tuscany.sca.binding.feed.Collection#postMedia(java.lang.String, java.lang.String, java.lang.String, java.io.InputStream) + */ + public Entry postMedia(String title, String slug, String contentType, InputStream media) { + return null; + } + + /** + * @see org.apache.tuscany.sca.binding.feed.Collection#put(java.lang.String, com.sun.syndication.feed.atom.Entry) + */ + public Entry put(String id, Entry entry) throws NotFoundException { + return null; + } + + /** + * @see org.apache.tuscany.sca.binding.feed.Collection#putMedia(java.lang.String, java.lang.String, java.io.InputStream) + */ + public Entry putMedia(String id, String contentType, InputStream media) throws NotFoundException { + return null; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.java new file mode 100644 index 0000000000..c4bf13ce7a --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsService.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.demos.aggregator; + +import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; +import org.osoa.sca.annotations.Remotable; + +/** + * Retrieve and manage alerts + * + * @version $Rev$ $Date$ + */ +@Remotable +public interface AlertsService { + + /** + * Return a structure holding all of the new alerts that have been found + * + * @return the structure containing alerts + */ + public AlertsType getAllNewAlerts(String id); + +} diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.java new file mode 100644 index 0000000000..d33e4b8d0f --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsServiceImpl.java @@ -0,0 +1,126 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.demos.aggregator; + +import java.text.DateFormat; +import java.util.Date; +import java.util.List; + +import org.apache.tuscany.sca.demos.aggregator.types.AlertType; +import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; +import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; +import org.apache.tuscany.sca.demos.aggregator.types.SourceType; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * Read all new alerts from the specified sources + * + * @version $Rev$ $Date$ + */ +@Service(AlertsService.class) +public class AlertsServiceImpl implements AlertsService { + + private RSSCheckerService rssChecker; + + private AlertsSourcesService alertsSources; + + @Reference + public void setRssChecker(RSSCheckerService rssChecker) { + this.rssChecker = rssChecker; + } + + @Reference + public void alertsSources(AlertsSourcesService alertsSources) { + this.alertsSources = alertsSources; + } + + DateFormat dateFormatter = DateFormat.getDateTimeInstance(); + + /** + * Return a structure holding all of the new alerts that have been found + * + * @return the structure containing alerts + */ + public AlertsType getAllNewAlerts(String id) + { + System.err.println("getAllNewAlerts(" + id + ")"); + + //TypesFactory factory = TypesFactory.INSTANCE; + //AlertsType returnAlerts = factory.createAlertsType(); + AlertsType returnAlerts = new AlertsTypeNonSDOImpl(); + List returnAlertList = returnAlerts.getAlert(); + + // get the date/time now so that we can update the + // alert source record so that next time we + // only get the latest alerts + Date now = new Date(); + String nowString = dateFormatter.format(now); + + try { + ConfigType alertSourceConfig = alertsSources.getAlertSources(id); + + for (Object source : alertSourceConfig.getSource()){ + SourceType sourceType = (SourceType)source; + + AlertsType alerts = null; + + if ( sourceType.getFeedType().equals("rss")){ + alerts = rssChecker.getNewAlerts(sourceType.getFeedAddress(), + sourceType.getLastChecked()); + } else { + + } + + // extend return list with any alerts we found + for( Object alert : alerts.getAlert() ){ + + // set the id on the alert so we know which source it + // came from + ((AlertType)alert).setSourceId(sourceType.getId()); + + // convert from SDO to POJO so that the + // JSONRPC binding will work. It can't currently + // handle SDOs + AlertType newAlert = new AlertTypeNonSDOImpl(); + + newAlert.setSourceId(((AlertType)alert).getSourceId()); + newAlert.setTitle(((AlertType)alert).getTitle()); + newAlert.setSummary(((AlertType)alert).getSummary()); + newAlert.setAddress(((AlertType)alert).getAddress()); + newAlert.setDate(((AlertType)alert).getDate()); + newAlert.setId(((AlertType)alert).getId()); + newAlert.setUnread(((AlertType)alert).isUnread()); + + returnAlertList.add(newAlert); + } + + // update the time last checked for this source + sourceType.setLastChecked(nowString); + //alertsSources.updateAlertSource(sourceType); + } + } catch(Exception ex) { + System.err.println("Exception " + ex.toString()); + } + + return returnAlerts ; + + } +} diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java new file mode 100644 index 0000000000..7b943b1b45 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesService.java @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.demos.aggregator; + +import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; +import org.apache.tuscany.sca.demos.aggregator.types.SourceType; +import org.osoa.sca.annotations.Remotable; + +/** + * Retrieve and manage alert sources + * + * @version $Rev$ $Date$ + */ +@Remotable +public interface AlertsSourcesService { + + /** + * Return all of the configured alert sources. + * + * @return the list of alert sources + */ + public ConfigType getAlertSources (String id); + + /** + * Return a single alert source. + * @param id not currently used + * @return the alert source + */ + public SourceType getAlertSource (String id); + + /** + * Update an alert source. + * + * @param updatedSource the alert source to update + */ + public void updateAlertSource (SourceType updatedSource); + + /** + * Add an alert source. + * + * @param newSource the alert source to add + */ + public String addAlertSource (SourceType newSource); + + /** + * Remove an alert source. + * + * @param oldSource the alert source to remove + */ + public void removeAlertSource (String id); + +} diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java new file mode 100644 index 0000000000..ca2fc95b4a --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsSourcesServiceImpl.java @@ -0,0 +1,183 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.demos.aggregator; + +import java.io.InputStream; +import java.text.DateFormat; +import java.util.Date; + +import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; +import org.apache.tuscany.sca.demos.aggregator.types.SourceType; +import org.apache.tuscany.sca.demos.aggregator.types.TypesFactory; +import org.apache.tuscany.sca.demos.aggregator.types.impl.SourceTypeImpl; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +import commonj.sdo.helper.HelperContext; +import commonj.sdo.helper.XMLDocument; +import commonj.sdo.impl.HelperProvider; + +/** + * Retrieve and manage alert sources + * + * @version $Rev$ $Date$ + */ +@Service(AlertsSourcesService.class) +@Scope("COMPOSITE") +public class AlertsSourcesServiceImpl implements AlertsSourcesService { + + ConfigType alertSources; + + /** + * Constructor reads the configuration to provide + * the initial list of alert sources + */ + public AlertsSourcesServiceImpl(){ + System.err.println("AlertsSourcesServiceImpl()"); + try { + // read the alerts config from an XML file + InputStream is = this.getClass().getClassLoader().getResourceAsStream("sources.xml"); + + if (is == null) { + throw new Exception("Can;t find sources.xml"); + } else { + HelperContext helperContext = HelperProvider.getDefaultContext(); + TypesFactory.INSTANCE.register(helperContext); + XMLDocument xmlDoc = helperContext.getXMLHelper().load(is); + alertSources = (ConfigType)xmlDoc.getRootObject(); + } + } catch (Exception ex) { + System.err.println("Exception " + ex.toString()); + } + } + + /** + * Return all of the configured alert sources. + * + * @return the list of alert sources + */ + public ConfigType getAlertSources (String id) + { + System.err.println("getAlertSources(" + id + ")"); + + // convert alert sources to POJOs so that + // the JSONRPC binding will work + ConfigTypeNonSDOImpl sources = new ConfigTypeNonSDOImpl(); + + for (Object source : alertSources.getSource()) { + SourceTypeNonSDOImpl newSource = new SourceTypeNonSDOImpl(); + newSource.setAddress(((SourceTypeImpl)source).getAddress()); + newSource.setFeedAddress(((SourceTypeImpl)source).getFeedAddress()); + newSource.setId(((SourceTypeImpl)source).getId()); + newSource.setLastChecked(((SourceTypeImpl)source).getLastChecked()); + newSource.setName(((SourceTypeImpl)source).getName()); + newSource.setFeedType(((SourceTypeImpl)source).getFeedType()); + sources.getSource().add(newSource); + } + + return sources; + } + + /** + * Return a single alert source. + * @param id the alert source id number + * @return the alert source + */ + public SourceType getAlertSource (String id) + { + System.err.println("getAlertSource(" + id + ")"); + SourceType alertSource = null; + + for (Object source : alertSources.getSource()) { + if ( ((SourceType)source).getId().equals(id)) { + alertSource = (SourceType)source; + } + } + return alertSource; + } + + /** + * Update an alert source. + * + * @param updatedSource the alert source to update + */ + public void updateAlertSource (SourceType updatedSource) + { + System.err.println("updateAlertSource()"); + + Object originalSource = null; + + for (Object source : alertSources.getSource()) { + if ( ((SourceType)source).getId().equals(updatedSource.getId())) { + originalSource = source; + break; + } + } + + if (originalSource != null){ + alertSources.getSource().add(updatedSource); + alertSources.getSource().remove(originalSource); + } + } + + /** + * Add an alert source. + * + * @param newSource the alert source to add + */ + public String addAlertSource (SourceType newSource) + { + System.err.println("addAlertSource()"); + // set the date to now less 2 hours so we + // get some alerts straight away + DateFormat dateFormatter = DateFormat.getDateTimeInstance(); + Date now = new Date(); + now.setHours(now.getHours()-2); + String nowString = dateFormatter.format(now); + newSource.setLastChecked(nowString); + alertSources.getSource().add(newSource); + return "Done"; + } + + /** + * Remove an alert source. + * + * @param oldSource the alert source to remove + */ + public void removeAlertSource (String id) + { + System.err.println("removeAlertSource()"); + + Object originalSource = null; + + for (Object source : alertSources.getSource()) { + if ( ((SourceType)source).getId().equals(id)) { + originalSource = source; + break; + } + } + + if (originalSource != null) { + alertSources.getSource().remove(originalSource); + } + + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java new file mode 100644 index 0000000000..2962defb25 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsTypeNonSDOImpl.java @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.demos.aggregator; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Alerts Type</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.apache.tuscany.sca.samples.aggregator.types.impl.AlertsTypeImpl#getAlert <em>Alert</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class AlertsTypeNonSDOImpl implements AlertsType +{ + private static final long serialVersionUID = -3784576466148158776L; + +/** + * The cached value of the '{@link #getAlert() <em>Alert</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAlert() + * @generated + * @ordered + */ + + protected List alert = new ArrayList(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AlertsTypeNonSDOImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public List getAlert() + { + return alert; + } + +} //AlertsTypeImpl diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java new file mode 100644 index 0000000000..75544294ce --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/ConfigTypeNonSDOImpl.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.demos.aggregator; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.tuscany.sca.demos.aggregator.types.ConfigType; + + +public class ConfigTypeNonSDOImpl implements ConfigType +{ + private static final long serialVersionUID = 2522843951360675364L; + + protected List source = new ArrayList(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ConfigTypeNonSDOImpl() + { + super(); + } + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public List getSource() + { + return source; + } + + +} //ConfigTypeImpl diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java new file mode 100644 index 0000000000..2a5775e9a9 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerService.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.demos.aggregator; + +import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; + +/** + * The interface for the rss checker service + */ +public interface RSSCheckerService { + + public AlertsType getNewAlerts(String rssaddress, String lastchecktimestamp); + +} diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java new file mode 100644 index 0000000000..9b73a27625 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/RSSCheckerServiceImpl.java @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.demos.aggregator; + +import java.net.URL; +import java.text.DateFormat; +import java.util.Date; +import java.util.List; + +import org.apache.tuscany.sca.demos.aggregator.types.AlertType; +import org.apache.tuscany.sca.demos.aggregator.types.AlertsType; +import org.apache.tuscany.sca.demos.aggregator.types.TypesFactory; + +import com.sun.syndication.feed.synd.SyndEntry; +import com.sun.syndication.feed.synd.SyndFeed; +import com.sun.syndication.io.SyndFeedInput; +import com.sun.syndication.io.XmlReader; + +/** + * The interface for the rss checker service + */ +public class RSSCheckerServiceImpl implements RSSCheckerService { + + public AlertsType getNewAlerts(String rssaddress, String lastchecktimestamp){ + // Create the list of alerts to return + TypesFactory factory = TypesFactory.INSTANCE; + AlertsType returnAlerts = factory.createAlertsType(); + List returnAlertList = returnAlerts.getAlert(); + + try { + // Turn the date into something we can process. + DateFormat dateFormatter = DateFormat.getDateTimeInstance(); + Date timestamp = dateFormatter.parse(lastchecktimestamp); + + // get the feed data from the supplied address + SyndFeedInput input = new SyndFeedInput(); + SyndFeed feed = input.build(new XmlReader(new URL(rssaddress))); + //System.out.println(feed); + + // check all the items to see if we have seen them before + List entries = feed.getEntries(); + for(Object entry: entries){ + SyndEntry syndEntry = (SyndEntry)entry; + + if (syndEntry.getPublishedDate().after(timestamp)){ + AlertType newAlert = factory.createAlertType(); + + newAlert.setTitle(syndEntry.getTitle()); + // newAlert.setSummary("<![CDATA[" + + // syndEntry.getDescription().getValue() + + // "]]>"); + newAlert.setSummary(""); + newAlert.setAddress(syndEntry.getLink()); + newAlert.setDate(dateFormatter.format(syndEntry.getPublishedDate())); + newAlert.setId(rssaddress); + newAlert.setUnread(true); + + returnAlertList.add(newAlert); + } + } + + } catch(Exception ex) { + System.err.println("Exception " + ex.toString()); + } + + return returnAlerts; + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java new file mode 100644 index 0000000000..10575bf0dc --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/java/org/apache/tuscany/sca/demos/aggregator/SourceTypeNonSDOImpl.java @@ -0,0 +1,536 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.demos.aggregator; + +import org.apache.tuscany.sca.demos.aggregator.types.SourceType; + +import commonj.sdo.Sequence; + + +public class SourceTypeNonSDOImpl implements SourceType +{ + private static final long serialVersionUID = -4986294578888767793L; + + public final static int NAME = 0; + + public final static int ADDRESS = 1; + + public final static int LAST_CHECKED = 2; + + public final static int FEED_ADDRESS = 3; + + public final static int POP_SERVER = 4; + + public final static int POP_USERNAME = 5; + + public final static int POP_PASSWORD = 6; + + public final static int ANY = -1; + + public final static int ID = 7; + + public final static int TYPE = 8; + + public final static int SDO_PROPERTY_COUNT = 9; + + public final static int EXTENDED_PROPERTY_COUNT = -1; + + + /** + * The internal feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_NAME = 0; + + /** + * The internal feature id for the '<em><b>Address</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_ADDRESS = 1; + + /** + * The internal feature id for the '<em><b>Last Checked</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_LAST_CHECKED = 2; + + /** + * The internal feature id for the '<em><b>Feed Address</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_FEED_ADDRESS = 3; + + /** + * The internal feature id for the '<em><b>Pop Server</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_POP_SERVER = 4; + + /** + * The internal feature id for the '<em><b>Pop Username</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_POP_USERNAME = 5; + + /** + * The internal feature id for the '<em><b>Pop Password</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_POP_PASSWORD = 6; + + /** + * The internal feature id for the '<em><b>Any</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_ANY = 7; + + /** + * The internal feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_ID = 8; + + /** + * The internal feature id for the '<em><b>Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_TYPE = 9; + + /** + * The number of properties for this type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + public final static int INTERNAL_PROPERTY_COUNT = 10; + + + + + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_DEFAULT_; + + /** + * The default value of the '{@link #getAddress() <em>Address</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddress() + * @generated + * @ordered + */ + protected static final String ADDRESS_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getAddress() <em>Address</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAddress() + * @generated + * @ordered + */ + protected String address = ADDRESS_DEFAULT_; + + /** + * The default value of the '{@link #getLastChecked() <em>Last Checked</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLastChecked() + * @generated + * @ordered + */ + protected static final String LAST_CHECKED_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getLastChecked() <em>Last Checked</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLastChecked() + * @generated + * @ordered + */ + protected String lastChecked = LAST_CHECKED_DEFAULT_; + + /** + * The default value of the '{@link #getFeedAddress() <em>Feed Address</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFeedAddress() + * @generated + * @ordered + */ + protected static final String FEED_ADDRESS_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getFeedAddress() <em>Feed Address</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFeedAddress() + * @generated + * @ordered + */ + protected String feedAddress = FEED_ADDRESS_DEFAULT_; + + /** + * The default value of the '{@link #getPopServer() <em>Pop Server</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPopServer() + * @generated + * @ordered + */ + protected static final String POP_SERVER_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getPopServer() <em>Pop Server</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPopServer() + * @generated + * @ordered + */ + protected String popServer = POP_SERVER_DEFAULT_; + + /** + * The default value of the '{@link #getPopUsername() <em>Pop Username</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPopUsername() + * @generated + * @ordered + */ + protected static final String POP_USERNAME_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getPopUsername() <em>Pop Username</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPopUsername() + * @generated + * @ordered + */ + protected String popUsername = POP_USERNAME_DEFAULT_; + + /** + * The default value of the '{@link #getPopPassword() <em>Pop Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPopPassword() + * @generated + * @ordered + */ + protected static final String POP_PASSWORD_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getPopPassword() <em>Pop Password</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPopPassword() + * @generated + * @ordered + */ + protected String popPassword = POP_PASSWORD_DEFAULT_; + + /** + * The cached value of the '{@link #getAny() <em>Any</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAny() + * @generated + * @ordered + */ + + protected Sequence any = null; + + /** + * The default value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_DEFAULT_; + + /** + * The default value of the '{@link #getFeedType() <em>Feed Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFeedType() + * @generated + * @ordered + */ + protected static final String FEED_TYPE_DEFAULT_ = null; + + /** + * The cached value of the '{@link #getFeedType() <em>Feed Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFeedType() + * @generated + * @ordered + */ + protected String feedType = FEED_TYPE_DEFAULT_; + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SourceTypeNonSDOImpl() + { + super(); + } + + + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() + { + return name; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) + { + name = newName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAddress() + { + return address; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAddress(String newAddress) + { + address = newAddress; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLastChecked() + { + return lastChecked; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLastChecked(String newLastChecked) + { + lastChecked = newLastChecked; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getFeedAddress() + { + return feedAddress; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFeedAddress(String newFeedAddress) + { + feedAddress = newFeedAddress; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPopServer() + { + return popServer; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPopServer(String newPopServer) + { + popServer = newPopServer; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPopUsername() + { + return popUsername; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPopUsername(String newPopUsername) + { + popUsername = newPopUsername; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPopPassword() + { + return popPassword; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPopPassword(String newPopPassword) + { + popPassword = newPopPassword; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getId() + { + return id; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setId(String newId) + { + id = newId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getFeedType() + { + return feedType; + } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFeedType(String newType) + { + feedType = newType; + } + + public Sequence getAny(){ + return null; + } + +} //SourceTypeImpl diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl new file mode 100644 index 0000000000..79b025bc73 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/Alerts.wsdl @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<wsdl:definitions targetNamespace="http://tuscany.apache.org/sca/demos/aggregator/service" + xmlns:tns="http://tuscany.apache.org/sca/demos/aggregator/service" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + name="Alerter"> + + <wsdl:types> + <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://tuscany.apache.org/sca/demos/aggregator/service" + xmlns:alerter="http://tuscany.apache.org/sca/demos/aggregator/types" + elementFormDefault="qualified"> + + <xsd:import namespace="http://tuscany.apache.org/sca/demos/aggregator/types" + schemaLocation="Alerts.xsd" /> + + <element name="getAllNewAlerts"> + <xsd:complexType> + <sequence> + <element name="parm" type="string" /> + </sequence> + </xsd:complexType> + </element> + + <element name="getAllNewAlertsResponse"> + <complexType> + <sequence> + <element name="parm" type="alerter:AlertsType" /> + </sequence> + </complexType> + </element> + + </xsd:schema> + </wsdl:types> + + <wsdl:message name="GetAllNewAlertsRequest"> + <wsdl:part element="tns:getAllNewAlerts" name="parameters" /> + </wsdl:message> + <wsdl:message name="GetAllNewAlertsResponse"> + <wsdl:part element="tns:getAllNewAlertsResponse" name="parameters" /> + </wsdl:message> + + <wsdl:portType name="AlertsPortType"> + <wsdl:operation name="getAllNewAlerts"> + <wsdl:input message="tns:GetAllNewAlertsRequest" name="GetAllNewAlertsRequestMsg" /> + <wsdl:output message="tns:GetAllNewAlertsResponse" name="GetAllNewAlertsResponseMsg" /> + </wsdl:operation> + </wsdl:portType> + + <wsdl:binding name="AlertsBinding" type="tns:AlertsPortType"> + <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="getAllNewAlerts"> + <wsdlsoap:operation soapAction="" /> + <wsdl:input name="GetAllNewAlertsRequestMsg"> + <wsdlsoap:body use="literal" /> + </wsdl:input> + <wsdl:output name="GetAllNewAlertsResponseMsg"> + <wsdlsoap:body use="literal" /> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + + <wsdl:service name="AlertsService"> + <wsdl:port name="AlertsPort" binding="tns:AlertsBinding"> + <wsdlsoap:address location="http://localhost:8080/services/AlertsServiceWebServiceBinding" /> + </wsdl:port> + </wsdl:service> + +</wsdl:definitions> diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd new file mode 100644 index 0000000000..f0ec561ad8 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/Alerts.xsd @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<schema targetNamespace="http://tuscany.apache.org/sca/demos/aggregator/types" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:ns="http://tuscany.apache.org/sca/demos/aggregator/types"> + <element name="Alerts" type="ns:AlertsType"/> + + <complexType name="AlertType"> + <sequence> + <element name="Title" type="string"/> + <element name="Summary" type="string"/> + <element name="Address" type="anyURI" maxOccurs="1" minOccurs="1"/> + <element name="Date" type="string" maxOccurs="1" minOccurs="1"/> + </sequence> + <attribute name="SourceId" type="string" use="optional"/> + <attribute name="Unread" type="boolean" use="optional"/> + <attribute name="Id" type="string" use="optional"/> + </complexType> + + <complexType name="AlertsType"> + <sequence> + <element name="Alert" type="ns:AlertType" maxOccurs="unbounded" minOccurs="0" /> + </sequence> + </complexType> + + <complexType name="SourceType"> + <sequence> + <element name="Name" type="string" maxOccurs="1" minOccurs="1"/> + <element name="Address" type="anyURI" maxOccurs="1" minOccurs="1"/> + <element name="LastChecked" type="string" maxOccurs="1" minOccurs="0"/> + <element name="FeedAddress" type="string" maxOccurs="1" minOccurs="0"/> + <element name="PopServer" type="string" maxOccurs="1" minOccurs="0"/> + <element name="PopUsername" type="string" maxOccurs="1" minOccurs="0"/> + <element name="PopPassword" type="string" maxOccurs="1" minOccurs="0"/> + <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <attribute name="Id" type="string" use="optional"/> + <attribute name="FeedType" use="required"> + <simpleType> + <restriction base="string"> + <enumeration value="rss"/> + <enumeration value="pop"/> + <enumeration value="nntp"/> + </restriction> + </simpleType> + </attribute> + </complexType> + + <complexType name="ConfigType"> + <sequence> + <element name="Source" type="ns:SourceType" maxOccurs="unbounded" minOccurs="0"/> + </sequence> + </complexType> + + <complexType name="SingleSourceType"> + <sequence> + <element name="Source" type="ns:SourceType"/> + </sequence> + </complexType> + + <element name="Config" type="ns:ConfigType"/> + <element name="Source" type="ns:SourceType"/> +</schema>
\ No newline at end of file diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl new file mode 100644 index 0000000000..987481bd14 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/AlertsSources.wsdl @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<wsdl:definitions targetNamespace="http://tuscany.apache.org/sca/demos/aggregator/sources" + xmlns:tns="http://tuscany.apache.org/sca/demos/aggregator/sources" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + name="Alerter"> + + <wsdl:types> + <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://tuscany.apache.org/sca/demos/aggregator/sources" + xmlns:alerter="http://tuscany.apache.org/sca/demos/aggregator/types" + elementFormDefault="qualified"> + + <xsd:import namespace="http://tuscany.apache.org/sca/demos/aggregator/types" + schemaLocation="Alerts.xsd" /> + + <element name="getAlertSources"> + <xsd:complexType> + <sequence> + <element name="parm" type="string" /> + </sequence> + </xsd:complexType> + </element> + + <element name="getAlertSourcesResponse"> + <complexType> + <sequence> + <element name="parm" type="alerter:ConfigType" /> + </sequence> + </complexType> + </element> + + <element name="addAlertSource"> + <xsd:complexType> + <sequence> + <element name="parm" type="alerter:SourceType"/> + </sequence> + </xsd:complexType> + </element> + + <element name="addAlertSourceResponse"> + <complexType> + <sequence> + <element name="parm" type="string" /> + </sequence> + </complexType> + </element> + + </xsd:schema> + </wsdl:types> + + <wsdl:message name="GetAlertSourcesRequest"> + <wsdl:part element="tns:getAlertSources" name="parameters" /> + </wsdl:message> + <wsdl:message name="GetAlertSourcesResponse"> + <wsdl:part element="tns:getAlertSourcesResponse" name="parameters" /> + </wsdl:message> + + <wsdl:message name="AddAlertSourceRequest"> + <wsdl:part element="tns:addAlertSource" name="parameters" /> + </wsdl:message> + <wsdl:message name="AddAlertSourceResponse"> + <wsdl:part element="tns:addAlertSourceResponse" name="parameters" /> + </wsdl:message> + + <wsdl:portType name="AlertsSourcesPortType"> + <wsdl:operation name="getAlertSources"> + <wsdl:input message="tns:GetAlertSourcesRequest" name="GetAlertSourcesRequestMsg" /> + <wsdl:output message="tns:GetAlertSourcesResponse" name="GetAlertSourcesResponseMsg" /> + </wsdl:operation> + <wsdl:operation name="addAlertSource"> + <wsdl:input message="tns:AddAlertSourceRequest" name="AddAlertSourceRequestMsg" /> + <wsdl:output message="tns:AddAlertSourceResponse" name="AddAlertSourceResponseMsg" /> + </wsdl:operation> + </wsdl:portType> + + <wsdl:binding name="AlertsSourcesBinding" type="tns:AlertsSourcesPortType"> + <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="getAlertSources"> + <wsdlsoap:operation soapAction="" /> + <wsdl:input name="GetAlertSourcesRequestMsg"> + <wsdlsoap:body use="literal" /> + </wsdl:input> + <wsdl:output name="GetAlertSourcesResponseMsg"> + <wsdlsoap:body use="literal" /> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="addAlertSource"> + <wsdlsoap:operation soapAction="" /> + <wsdl:input name="AddAlertSourceRequestMsg"> + <wsdlsoap:body use="literal" /> + </wsdl:input> + <wsdl:output name="AddAlertSourceResponseMsg"> + <wsdlsoap:body use="literal" /> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + + <wsdl:service name="AlertsSourcesService"> + <wsdl:port name="AlertsSourcesPort" binding="tns:AlertsSourcesBinding"> + <wsdlsoap:address location="http://localhost:8080/services/AlertsSourcesServiceWebServiceBinding" /> + </wsdl:port> + </wsdl:service> + +</wsdl:definitions> diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/alerts.composite b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/alerts.composite new file mode 100644 index 0000000000..c359b275be --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/alerts.composite @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0"
+ targetNamespace="http://sample"
+ name="FeedAggregator">
+
+ <!-- SDO factory classes -->
+ <!-- dbsdo:import.sdo factory="org.apache.tuscany.sca.demos.aggregator.service.ServiceFactory"/ -->
+ <!-- dbsdo:import.sdo factory="org.apache.tuscany.sca.demos.aggregator.types.TypesFactory"/ -->
+
+ <!-- The alerts rss service -->
+ <service name="AlertsFeedServiceRSS" promote="AlertsFeedServiceComponent/Collection">
+ <tuscany:binding.rss />
+ </service>
+
+ <!-- The alerts atom service -->
+ <service name="AlertsFeedServiceAtom" promote="AlertsFeedServiceComponent/Collection">
+ <tuscany:binding.atom />
+ </service>
+
+ <component name="AlertsFeedServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.demos.aggregator.AlertsFeedServiceImpl" />
+ <reference name="alerts" target="AlertsServiceComponent"/>
+ </component>
+
+ <!-- The alerts web service -->
+ <service name="AlertsService" promote="AlertsServiceComponent">
+ <interface.wsdl interface="http://tuscany.apache.org/sca/demos/aggregator/service#wsdl.interface(AlertsPortType)"/>
+ <binding.ws wsdlElement="http://tuscany.apache.org/sca/demos/aggregator/service#wsdl.port(AlertsService/AlertsPort)"/>
+ </service>
+
+ <!-- The alerts jsonrpc service -->
+ <service name="AlertsServiceJSONRPC" promote="AlertsServiceComponent/AlertsService">
+ <interface.java interface="org.apache.tuscany.sca.demos.aggregator.AlertsService" />
+ <tuscany:binding.jsonrpc />
+ </service>
+
+ <component name="AlertsServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.demos.aggregator.AlertsServiceImpl" />
+ <reference name="rssChecker" target="RSSCheckerComponent"/>
+ <reference name="alertsSources" target="AlertsSourcesServiceComponent"/>
+ </component>
+
+ <!-- The alerts sources web service -->
+ <service name="AlertsSourcesService" promote="AlertsSourcesServiceComponent">
+ <interface.wsdl interface="http://tuscany.apache.org/sca/demos/aggregator/sources#wsdl.interface(AlertsSourcesPortType)"/>
+ <binding.ws wsdlElement="http://tuscany.apache.org/sca/demos/aggregator/sources#wsdl.port(AlertsSourcesService/AlertsSourcesPort)"/>
+ </service>
+
+ <!-- The alerts jsonrpc service -->
+ <service name="AlertsSourcesServiceJSONRPC" promote="AlertsSourcesServiceComponent/AlertsSourcesService">
+ <interface.java interface="org.apache.tuscany.sca.demos.aggregator.AlertsSourcesService" />
+ <tuscany:binding.jsonrpc />
+ </service>
+
+ <component name="AlertsSourcesServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.demos.aggregator.AlertsSourcesServiceImpl" />
+ </component>
+
+ <!-- The RSS reader -->
+ <component name="RSSCheckerComponent">
+ <implementation.java class="org.apache.tuscany.sca.demos.aggregator.RSSCheckerServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/sources.xml b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/sources.xml new file mode 100644 index 0000000000..2168c10c9c --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/resources/sources.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<ns0:Config xmlns:ns0="http://tuscany.apache.org/sca/demos/aggregator/types"> +<ns0:Source Id="0" FeedType="rss"> + <ns0:Name>BBC News</ns0:Name> + <ns0:Address>http://news.bbc.co.uk/</ns0:Address> + <ns0:LastChecked>10-Jun-2007 16:34:03</ns0:LastChecked> + <ns0:FeedAddress>http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml</ns0:FeedAddress> +</ns0:Source> +<ns0:Source Id="1" FeedType="rss"> + <ns0:Name>Engadget</ns0:Name> + <ns0:Address>http://www.engadget.com</ns0:Address> + <ns0:LastChecked>10-Jun-2007 16:34:03</ns0:LastChecked> + <ns0:FeedAddress>http://www.engadget.com/rss.xml</ns0:FeedAddress> +</ns0:Source> +</ns0:Config> diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html new file mode 100644 index 0000000000..8b472fd0fa --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/AlertAggregator.html @@ -0,0 +1,330 @@ +<html> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + --> +<head> +<title>Apache Tuscany Alert Aggregator Sample</TITLE> + +<script type="text/javascript"> + //var djConfig = {isDebug: true,debugContainerId: "dojoDebug" }; + //djConfig.debugAtAllCosts = true; + </script> + +<script type="text/javascript" src="dojo/dojo/dojo.js"> + </script> +<script type="text/javascript" src="dojo/dijit/dijit.js"> + </script> + +<script type="text/javascript"> + dojo.require("dijit.form.Button"); + dojo.require("dojo.rpc.JsonService"); + </script> + +<link rel="stylesheet" type="text/css" href="style.css" /> +</head> + +<body onload="getAlertSources()"> + +<script type="text/javascript"> + + // The proxy for the alert and alertsources services running in Tuscany + var alertsService = new dojo.rpc.JsonService("AlertsServiceJSONRPC?smd"); + var alertSourcesService = new dojo.rpc.JsonService("AlertsSourcesServiceJSONRPC?smd"); + + // If you want to put an HTTP sniffer in the way to look at the JSONROPC packets you'll + // need to edit the target address of the service in the smd. The only way to do this easily + // is to read an smd from disc rather than generate one. There are two smds provided for this + //var alertsService = new dojo.rpc.JsonService("service.smd"); + //var alertSourcesService = new dojo.rpc.JsonService("sources.smd"); + + // The global list of alerts sources + var alertSourceList = null; + + // The global list of alerts + var alertList = null; + + // the constructor for entries on the alert source list + function alertSourceType(name,id,address,feedAddress,feedType,popUsername,popPassword,popServer,lastChecked,javaClass) { + this.name = name; + this.id = id; + this.address = address; + this.feedAddress = feedAddress; + this.feedType = feedType; + this.lastChecked = lastChecked; + this.javaClass = "org.apache.tuscany.sca.demos.aggregator.types.impl.SourceTypeImpl"; + + } + + function errorCallback(result, error, id) { + var resultsNode = document.getElementById("errors"); + // There seems to be a problem somewhere as I should be able to get the error + // details but all I can actually get is the Id from the error message + // resultsNode.innerHTML = "there was an error! message id = " + " error code = " + result.error.code + " error message = " + result.error.msg ; + resultsNode.innerHTML = "An error was returned by the server. Message id = " + result.id; + } + + // Generate the alert sources table + function getAlertSources() + { + response = alertSourcesService.getAlertSources("Dojo"); + response.addCallbacks(getAlertSourcesCallback, errorCallback); + + getAlerts(); + } + + function getAlertSourcesCallback(result) { + var resultsNode = document.getElementById("alertSourcesTable"); + if ( result.error != null ) { + resultsNode.innerHTML = result.error; + } else { + // stash away the source list for when we come to edit it + alertSourceList = result.source.list; + + // put out the html + var text = "" + var nextSourceId = 0 + for (var i in result.source.list){ + var source = result.source.list[i]; + + text = text + "<table>"; + text = text + "<TR CLASS='source_" + source.id + "' >"; + text = text + " <TD CLASS='source_name clickable' ONCLICK=\"displayAlert('" + source.address + "')\">"; + text = text + " <IMG SRC='rss.png'/> " + source.name; + text = text + " </TD>"; + text = text + " <TD CLASS='clickable link' ONCLICK=\"showEditSource('" + source.id + "')\">Edit</TD>"; + text = text + " <TD CLASS='clickable link' ONCLICK=\"deleteSource('" + source.id + "')\">Delete</TD>"; + text = text + "</TR>"; + text = text + "<TR ID='edit_source_" + source.id + "' CLASS='hidden source_" + source.id + "'>"; + text = text + " <TD COLSPAN='3'>"; + text = text + " <TABLE CLASS='sourceDetailsTable'>"; + text = text + " <TR>"; + text = text + " <TD>Source name:</TD>"; + text = text + " <TD>"; + text = text + " <INPUT ID='source_" + source.id + "_name' TYPE='TEXT' SIZE='50' VALUE='" + source.name + "'/>"; + text = text + " </TD>"; + text = text + " </TR>"; + text = text + " <TR>"; + text = text + " <TD>Source address:</TD>" + text = text + " <TD>"; + text = text + " <INPUT ID='source_" + source.id + "_address' TYPE='TEXT' SIZE='50' VALUE='" + source.address + "'/>"; + text = text + " </TD>"; + text = text + " </TR>"; + text = text + " <TR>"; + text = text + " <TD>"; + text = text + " <INPUT ID='source_" + source.id + "_type' TYPE='HIDDEN' VALUE='" + source.id + "'/>"; + text = text + " <INPUT TYPE='BUTTON' VALUE='Update' ONCLICK=\"updateSource('" + source.id + "')\"/>"; + text = text + " <INPUT TYPE='BUTTON' VALUE='Cancel' ONCLICK=\"hideEditSource('" + source.id + "')\"/>"; + text = text + " </TD>"; + text = text + " </TR>"; + text = text + " </TABLE>"; + text = text + " </TD>"; + text = text + "</TR>"; + + nextSourceId = eval(source.id); + } + + nextSourceId = nextSourceId + 1; + + text = text + "<TR CLASS='source_" + nextSourceId + "'>"; + text = text + " <TD COLSPAN='4' CLASS='clickable link' ONCLICK=\"showAddNewSource('" + nextSourceId + "')\">Add new Alert Source</TD>"; + text = text + "</TR>"; + text = text + "<TR ID='add_source_" + nextSourceId + "' CLASS='hidden source_" + nextSourceId + "'>"; + text = text + " <TD COLSPAN='4'>"; + text = text + " <TABLE CLASS='sourceDetailsTable'>"; + text = text + " <TR>"; + text = text + " <TD>Source name:</TD>"; + text = text + " <TD>"; + text = text + " <INPUT ID='source_" + nextSourceId + "_name' TYPE='TEXT' SIZE='50'>"; + text = text + " </TD>"; + text = text + " </TR>"; + text = text + " <TR>"; + text = text + " <TD>Source address:</TD>"; + text = text + " <TD>"; + text = text + " <INPUT ID='source_" + nextSourceId + "_address' TYPE='TEXT' SIZE='50'>"; + text = text + " </TD>"; + text = text + " </TR>"; + text = text + " <TR>"; + text = text + " <TD>Source type:</TD>"; + text = text + " <TD>"; + text = text + " <SELECT ID='source_" + nextSourceId + "_type' ONCHANGE=\"showSourceType('" + nextSourceId + "')\">"; + text = text + " <OPTION value='rss' selected='selected'>RSS/Atom feed</OPTION>"; + text = text + " </SELECT>"; + text = text + " </TD>"; + text = text + " </TR>"; + text = text + " <TR ID='add_rss_source'>"; + text = text + " <TD COLSPAN='2'>"; + text = text + " <TABLE CLASS='sourceDetailsTable'>"; + text = text + " <TR>"; + text = text + " <TD>Feed address:</TD>"; + text = text + " <TD>"; + text = text + " <INPUT ID='source_" + nextSourceId + "_feedAddress' TYPE='TEXT' SIZE='50'/>"; + text = text + " </TD>"; + text = text + " </TR>"; + text = text + " </TABLE>"; + text = text + " </TD>"; + text = text + " </TR>"; + text = text + " <TR>"; + text = text + " <TD>"; + text = text + " <INPUT TYPE='BUTTON' VALUE='Add' ONCLICK=\"addSource('" + nextSourceId + "')\">"; + text = text + " <INPUT TYPE='BUTTON' VALUE='Cancel' ONCLICK=\"hideAddNewSource('" + nextSourceId + "')\">"; + text = text + " </TD>"; + text = text + " </TR>"; + text = text + " </TABLE>"; + text = text + " </TD>"; + text = text + "</TR>"; + text = text + "</table>"; + + resultsNode.innerHTML = text; + } + } + + function showEditSource(sourceid) + { + document.getElementById("edit_source_"+sourceid).className = "source_"+sourceid; + } + + function hideEditSource(sourceid) + { + document.getElementById("edit_source_"+sourceid).className = "hidden source_"+sourceid; + } + + function updateSource(sourceid) + { + hideEditSource(sourceid); + var source = getSource(sourceId); + alertSourcesService.updateAlertSource(source); + getAlertSources(); + } + + function deleteSource(sourceid) + { + alertSourcesService.removeAlertSource(sourceid); + getAlertSources(); + } + + function showAddNewSource(sourceid) + { + document.getElementById("add_source_"+sourceid).className = "source_"+sourceid; + } + + function hideAddNewSource(sourceid) + { + document.getElementById("add_source_"+sourceid).className = "hidden source_"+sourceid; + } + + function addSource(sourceid) + { + hideAddNewSource(sourceid); + var source = getSource(sourceid); + alertSourcesService.addAlertSource(source); + + // wait a little before getting the list back from the server + setTimeout("getAlertSources()",1250); + } + + function getSource(sourceid) + { + var source = alertSourceList[sourceid]; + + if ( source == null ){ + source = new alertSourceType("name","id","address","feedAddress","feedType","popUsername","popPassword","popServer","lastChecked","javaClass"); + alertSourceList[sourceid] = source; + } + + source.name = document.getElementById("source_"+sourceid+"_name").value; + source.id = sourceid; + source.address = document.getElementById("source_"+sourceid+"_address").value; + var typeElem = document.getElementById("source_"+sourceid+"_type"); + source.feedType = typeElem.options[typeElem.selectedIndex].value; + + if(source.feedType=="rss") + { + source.feedAddress = document.getElementById("source_"+sourceid+"_feedAddress").value; + + } + else if(source.feedType=="pop") + { + source.popServer = document.getElementById("source_"+sourceid+"_popServer").value; + source.popUsername = document.getElementById("source_"+sourceid+"_popUsername").value; + source.popPassword = document.getElementById("source_"+sourceid+"_popPassword").value; + } + return source; + } + + // Generate the alerts table + function getAlerts() + { + response = alertsService.getAllNewAlerts("Dojo"); + response.addCallbacks(getAlertsCallback, errorCallback); + } + + function getAlertsCallback(result) { + var resultsNode = document.getElementById("alertsTable"); + if ( result.error != null ) { + resultsNode.innerHTML = result.error; + } else { + alertList = result.alert.list; + var text = "" + for (var i in result.alert.list){ + var alert = result.alert.list[i]; + + text = text + "<table>"; + text = text + "<TR class='source_" + alert.sourceId + " clickable' onclick=\"displayAlert('" + alert.address + "')\">"; + text = text + " <TD class='alert_text'>"; + text = text + " <SPAN id='" + alert.id + "' class='unread_title'>" + alert.title + "</SPAN>"; + text = text + " <SPAN class='summary'> - " + alert.summary.substring(0, 80) + "...</SPAN>"; + text = text + " </TD>"; + text = text + " <TD>"; + text = text + alert.date; + text = text + " </TD>" + text = text + "</TR>" + text = text + "</table>"; + } + + resultsNode.innerHTML = text; + } + } + + + + function displayAlert(url) + { + document.getElementById("alertData").innerHTML="<IFRAME CLASS='alert_data' SRC='"+url+"'/>"; + window.location="#data"; + return; + } + + + + </script> + +<h1 id="top">Apache Tuscany Alert Aggregator Demo</h1> +<div id="errors"></div> +<p>Alert Sources<span id="refreshSources"></span>:</p> +<!--input type="button" value="getSources" onclick="getAlertSources()"/--> +<div id="alertSourcesTable">Refreshing...</div> +<p /><input type="button" value="Refresh" onclick="getAlerts()" /> +<p /> +<div id="alertsTable">Refreshing...</div> +<p><a id="data" HREF="#top">Back to top</a></p> +<div id="alertData"></div> +<p /> +<div id="dojoDebug"></div> + +</body> +</html> diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..0bc67c4c98 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/META-INF/sca-contribution.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +--> + +<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" +targetNamespace="http://sample" + xmlns:sample="http://sample"> + <deployable composite="sample:FeedAggregator"/> +</contribution> + diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..406a87b0e9 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> + +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web +Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> +<web-app> + + <display-name>Tuscany Alert Aggregator Demo</display-name> + + <filter> + <filter-name>tuscany</filter-name> + <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class> + </filter> + + <filter-mapping> + <filter-name>tuscany</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <listener> + <listener-class>org.apache.tuscany.sca.host.webapp.TuscanyContextListener</listener-class> + </listener> + + <welcome-file-list id="WelcomeFileList"> + <welcome-file>AlertAggregator.html</welcome-file> + </welcome-file-list> + +</web-app> diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/pop.png b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/pop.png Binary files differnew file mode 100644 index 0000000000..1cf1df24a7 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/pop.png diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/rss.png b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/rss.png Binary files differnew file mode 100644 index 0000000000..b3c949d224 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/rss.png diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/service.smd b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/service.smd new file mode 100644 index 0000000000..bc77e39bf9 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/service.smd @@ -0,0 +1 @@ +{"SMDVersion":".1","objectName":"AlertsService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8080/sample-feed-aggregator/services/AlertsServiceJSONRPC","methods":[{"name":"getAllNewAlerts","parameters":[{"name":"param0","type":"STRING"}]}]} diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/sources.smd b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/sources.smd new file mode 100644 index 0000000000..b5f1824363 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/sources.smd @@ -0,0 +1 @@ +{"SMDVersion":".1","objectName":"AlertsSourcesService","serviceType":"JSON-RPC","serviceURL":"http://localhost:8081/sample-feed-aggregator/services/AlertsSourcesServiceJSONRPC","methods":[{"name":"getAlertSources","parameters":[{"name":"param0","type":"STRING"}]},{"name":"getAlertSource","parameters":[{"name":"param0","type":"STRING"}]},{"name":"updateAlertSource","parameters":[{"name":"param0","type":"STRING"}]},{"name":"addAlertSource","parameters":[{"name":"param0","type":"STRING"}]},{"name":"removeAlertSource","parameters":[{"name":"param0","type":"STRING"}]}]} diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/style.css b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/style.css new file mode 100644 index 0000000000..f5bbf23379 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/main/webapp/style.css @@ -0,0 +1,176 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +p,table,li,h1,h2,h3 +{ +font-family: verdana, arial, 'sans serif'; +} + +p, h1, h2, h3, table, li, hr +{ +margin-left: 10pt; +} + +table +{ +border-color: black; +border-collapse: separate; +border-spacing: 0px 1px; + +margin-right: 10pt; +margin-left: 10pt; +width: 800px; +} + +.sourceDetailsTable +{ +width: 600px; +} + +tr, td +{ +margin-left: 0pt; +margin-right: 0pt; +padding-left: 10pt; +font-size: 90%; +} + +p,li,th +{ +font-size: 90%; +margin-left: 10pt; +} + +pre +{ +margin-left: 10pt; +} + +body +{ +#ffffff; +} + +h1,h2,h3,hr +{ +color: firebrick; +} + +a:link {COLOR: firebrick;} +a:visited {COLOR: firebrick;} +a:active {COLOR: navy;} + +.link +{ +COLOR: firebrick; +text-decoration: underline; +} + +.clickable +{ +cursor: pointer +} + +.unread_title +{ +font-weight: bold; +} + +.read_title +{ +font-weight: normal; +} + +.summary +{ +color: DimGrey; +} + +.hidden +{ +display: none; +} + +.source_name +{ +width: 600px; +} + +.alert_text +{ +width: 600px; +} + +.alert_data +{ +margin-left: 10px; +width: 800px; +height: 800px; +} + +.source_0 +{ +background-color: LightGreen; +} + +.source_1 +{ +background-color: LightSkyBlue; +} + +.source_2 +{ +background-color: Khaki; +} + +.source_3 +{ +background-color: LightPink; +} + +.source_4 +{ +background-color: Orange; +} + +.source_5 +{ +background-color: LightCoral; +} + +.source_6 +{ +background-color: Orchid; +} + +.source_7 +{ +background-color: Peru; +} + +.source_8 +{ +background-color: SpringGreen; +} + +.source_9 +{ +background-color: LightGrey; +} + diff --git a/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsTestCase.java b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsTestCase.java new file mode 100644 index 0000000000..9aedd2e1c7 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/alert-aggregator-webapp/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsTestCase.java @@ -0,0 +1,95 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.demos.aggregator; + +import java.io.ByteArrayInputStream; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.json.JSONObject; + +import com.meterware.httpunit.PostMethodWebRequest; +import com.meterware.httpunit.WebConversation; +import com.meterware.httpunit.WebRequest; +import com.meterware.httpunit.WebResponse; + + +/** + */ +public class AlertsTestCase extends TestCase { + private SCADomain scaDomain; + /** + * Runs before each test method + */ + @Override + protected void setUp() throws Exception { + scaDomain = SCADomain.newInstance("alerts.composite"); + super.setUp(); + } + + /** + * Runs after each test method + */ + @Override + protected void tearDown() { + scaDomain.close(); + } + +/* Use this if you want to test locally without deploying to a web container + public void testWait() throws Exception { + System.out.println("Feed aggregator server started (press enter to shutdown)"); + System.in.read(); + System.out.println("Feed aggregator server stopped"); + } +*/ + + public void testGetAllNewAlerts() throws Exception { + JSONObject jsonRequest = new JSONObject("{\"params\":[\"sometext\"],\"method\":\"getAllNewAlerts\",\"id\":2}"); + JSONObject jsonResp = callService ("http://localhost:8080/AlertsServiceJSONRPC", + jsonRequest); + assertNotNull(jsonResp); + } + + public void testAddAlertSources() throws Exception { + JSONObject jsonRequest = new JSONObject("{\"params\":[{\"name\":\"news\",\"id\":\"2\",\"address\":\"www.news.com\",\"feedAddress\":\"http://news.com.com/2547-1_3-0-20.xml\",\"feedType\":\"rss\",\"lastChecked\":\"lastChecked\",\"javaClass\":\"org.apache.tuscany.sca.demos.aggregator.types.impl.SourceTypeImpl\"}],\"method\":\"addAlertSource\",\"id\":2}"); + JSONObject jsonResp = callService ("http://localhost:8080/AlertsSourcesServiceJSONRPC", + jsonRequest); + assertNotNull(jsonResp); + } + + public void testGetAlertSources() throws Exception { + JSONObject jsonRequest = new JSONObject("{\"params\":[\"sometext\"],\"method\":\"getAlertSources\",\"id\":2}"); + JSONObject jsonResp = callService ("http://localhost:8080/AlertsSourcesServiceJSONRPC", + jsonRequest); + assertEquals("BBC News", jsonResp.getJSONObject("result").getJSONObject("source").optJSONArray("list").getJSONObject(0).getString("name")); + } + + public JSONObject callService(String url, JSONObject jsonRequest) throws Exception { + System.out.println("Request = " + jsonRequest.toString()); + WebConversation wc = new WebConversation(); + WebRequest request = new PostMethodWebRequest( url, + new ByteArrayInputStream(jsonRequest.toString().getBytes("UTF-8")),"application/json"); + WebResponse response = wc.getResource(request); + System.out.println("Response= " + response.getText()); + assertEquals(200, response.getResponseCode()); + return new JSONObject(response.getText()); + } +} diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/README b/tags/java/sca/1.0-RC1/demos/apachecon-training/README new file mode 100644 index 0000000000..b5322f82c2 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/README @@ -0,0 +1,77 @@ +Shopping Store Web Service Sample +================================= +This sample creates an shopping store application using Amazon's WS API interface. This sample intents to provide +the same services provided by Amazon but implementing them as SCA components. These services are provided through +a web service interface. + +If you just want to run it to see what happens you need to run the server first. So, open a command prompt, navigate +to the shoppingstore sample directory and do: + +1 - "ant" to compile it +2 - "ant run" to get the server up and running +3 - You should see the following output from the run target: + run: + [java] log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAXUtils). + [java] log4j:WARN Please initialize the log4j system properly. + [java] ToyApp server started (press enter to shutdown) + +Once the server is running, it will be expecting requests from a client through its Web Service interface. + +The WSDL describing the WS interface can be obtained opening a web broeser pointing to +http://localhost:8080/ShoppingStoreServiceComponent?wsdl + + +Sample Overview +--------------- +Currently, the sample provides two components: + 1 - ShoppingStoreService: that is wired to a reference with a web service binding and plays the role of a proxy service which offers all the operations exposed through the WSDL API and forwards every invocation to the actual service that in fact implements the service invoked. + 2 - CartService: currently, this is the only component offering an actual service through the Shopping Store. It provides the following operations: CartCreate, CartAdd, CartClear, CartGet. + +shoppingstore/ + lib/ + AWS2007_05_14.jar - The jar file containing all the classes generated out of Amazon's WSDL using + the Axis2's wsdl2java utility (the databinding used was jaxb) + src/ + main/ + java/ + shoppingstore/ + server/ + ShoppingStoreServer.java - starts the SCA Runtime and deploys + the shoppingstore.composite. + In doing this, the SCA WSDL binding + acts to expose the ShoppingStoreService + over WS + services/ + cart/ + CartService.java - Java interface description for + CartServiceComponent + CartServiceImpl.java - component implementation + proxy/ + ShoppingStoreService.java - Java interface description for + ShoppingStoreServiceComponent + ShoppingStoreServiceImpl.java - component implementation + resources/ + wsdl/ + shoppingstore.wsdl - the service description that the + SCA reference uses to bind to. This + wsdl file is very similar to Amazon's + WSDL released on May 14th, 2007. Only + two modifications were done: + 1 - Non-implemented services had to be + commented out from the WSDL + 2 - Its location was modified in order + for it to point to this sample's address + shoppingstore.composite - the SCA assembly for this sample + test/ - no test provided so far + shoppingstore.png - a pictorial representation of the + current status of the sample, plus future enhancements + build.xml - the Ant build file + + +Building And Running The Sample Using Ant +----------------------------------------- +Take a look at the beginning of this document. + +Building And Running The Sample Using Maven +------------------------------------------- +No maven support has been implemented yet.
\ No newline at end of file diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/build.xml b/tags/java/sca/1.0-RC1/demos/apachecon-training/build.xml new file mode 100644 index 0000000000..0a455f52b7 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/build.xml @@ -0,0 +1,74 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project name="sample-shoppingstore" default="compile"> + <property name="server.class" value="shoppingstore.server.ShoppingStoreServer" /> + <property name="server.jar" value="sample-shoppingstore.jar" /> + + <target name="init"> + <mkdir dir="target/classes"/> + </target> + + <target name="compile" depends="init"> + <javac srcdir="src/main/java" + destdir="target/classes" + debug="on" + source="1.5" + target="1.5"> + <classpath> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + <pathelement location="./lib/AWS2007_05_14.jar"/> + </classpath> + </javac> + <copy todir="target/classes"> + <fileset dir="src/main/resources"/> + </copy> + <jar destfile="target/${server.jar}" basedir="target/classes"> + <manifest> + <attribute name="Main-Class" value="${server.class}" /> + </manifest> + </jar> + </target> + + <target name="run-classes"> + <java classname="${test.class}" + fork="true"> + <classpath> + <pathelement path="target/classes"/> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + </classpath> + </java> + </target> + + <target name="run"> + <java classname="${server.class}" + fork="true"> + <classpath> + <pathelement path="target/${server.jar}"/> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + <pathelement location="./lib/AWS2007_05_14.jar"/> + </classpath> + </java> + </target> + + <target name="clean"> + <delete quiet="true" includeemptydirs="true"> + <fileset dir="target"/> + </delete> + </target> +</project> diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/lib/AWS2007_05_14.jar b/tags/java/sca/1.0-RC1/demos/apachecon-training/lib/AWS2007_05_14.jar Binary files differnew file mode 100644 index 0000000000..4b5232fd3b --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/lib/AWS2007_05_14.jar diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/shoppingstore.png b/tags/java/sca/1.0-RC1/demos/apachecon-training/shoppingstore.png Binary files differnew file mode 100644 index 0000000000..e88abcbd58 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/shoppingstore.png diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/server/ShoppingStoreServer.java b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/server/ShoppingStoreServer.java new file mode 100644 index 0000000000..486946b2fc --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/server/ShoppingStoreServer.java @@ -0,0 +1,25 @@ +package shoppingstore.server; + +import java.io.IOException; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +public class ShoppingStoreServer { + + public static void main(String[] args) { + + SCADomain scaDomain = SCADomain.newInstance("shoppingstore.composite"); + + try { + System.out.println("ToyApp server started (press enter to shutdown)"); + System.in.read(); + } catch (IOException e) { + e.printStackTrace(); + } + + scaDomain.close(); + System.out.println("ToyApp server stopped"); + } + + +} diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/cart/CartService.java b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/cart/CartService.java new file mode 100644 index 0000000000..e8f383c3e1 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/cart/CartService.java @@ -0,0 +1,35 @@ +package shoppingstore.services.cart; + +import org.osoa.sca.annotations.Remotable; + +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAdd; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAddResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClear; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClearResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreate; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreateResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGet; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGetResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModify; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModifyResponse; + +@Remotable +public interface CartService { + + public CartCreateResponse CartCreate(CartCreate cartCreate); + + public CartAddResponse CartAdd(CartAdd cartAdd); + + public CartModifyResponse CartModify(CartModify cartModify); + + public CartClearResponse CartClear(CartClear cartClear); + + public CartGetResponse CartGet(CartGet cartGet); + + //@Init + //public void start(); + + //@Destroy + //public void stop(); + +} diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/cart/CartServiceImpl.java b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/cart/CartServiceImpl.java new file mode 100644 index 0000000000..1579dbd60d --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/cart/CartServiceImpl.java @@ -0,0 +1,144 @@ +package shoppingstore.services.cart; + +import java.util.HashMap; + +import org.osoa.sca.annotations.Scope; + +import com.amazon.webservices.awsecommerceservice._2007_05_14.Cart; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAdd; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAddRequest; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAddResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClear; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClearResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreate; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreateResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGet; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGetResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartItem; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartItems; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModify; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModifyResponse; + +@Scope("COMPOSITE") +public class CartServiceImpl implements CartService { + + private static long ID = 0; + + private HashMap<String, Cart> cartsHash = new HashMap<String, Cart>(); + + public CartAddResponse CartAdd(CartAdd cartAdd) { + System.out.println("Entering cartAdd..."); + System.out.println("CartServiceID: " + this.toString()); + CartAddResponse cartAddResponse = new CartAddResponse(); + + CartAddRequest cartAddRequest = cartAdd.getRequest().get(0); + + //Cart cart = getCart(cartAddRequest.getCartId()); + Cart cart = getCart(cartAdd.getAWSAccessKeyId()); + if(cart == null){ + cartAddResponse.getCart().add(new Cart()); + return cartAddResponse; + } + + CartItem cartItem = new CartItem(); + cartItem.setASIN(cartAddRequest.getItems().getItem().get(0).getASIN()); + cartItem.setQuantity(cartAddRequest.getItems().getItem().get(0).getQuantity().toString()); + cart.getCartItems().getCartItem().add(cartItem); + cartAddResponse.getCart().add(cart); + System.out.println("Exiting cartAdd..."); + return cartAddResponse; + } + + public CartClearResponse CartClear(CartClear cartClear) { + System.out.println("CartServiceID: " + this.toString()); + System.out.println("Entering cartClear..."); + CartClearResponse cartClearResponse = new CartClearResponse(); + + //CartClearRequest cartClearRequest = cartClear.getRequest().get(0); + + //Cart cart = getCart(cartClearRequest.getCartId()); + Cart cart = getCart(cartClear.getAWSAccessKeyId()); + if(cart == null) { + cartClearResponse.getCart().add(new Cart()); + return cartClearResponse; + } + + cart.getCartItems().getCartItem().clear(); + + cartClearResponse.getCart().add(cart); + System.out.println("Exiting cartClear..."); + return cartClearResponse; + } + + public CartCreateResponse CartCreate(CartCreate cartCreate) { + System.out.println("CartServiceID: " + this.toString()); + System.out.println("Entering cartCreate..."); + CartCreateResponse cartCreateResponse = new CartCreateResponse(); + + Cart cart = getCart(cartCreate.getAWSAccessKeyId()); + if(cart != null){ + cartCreateResponse.getCart().add(cart); + System.out.println("User " + cartCreate.getAWSAccessKeyId() + " has already created a cart with ID: " + cart.getCartId()); + return cartCreateResponse; + } + + cart = new Cart(); + cart.setCartId(this.generateID()); + cart.setCartItems(new CartItems()); + addCart(cartCreate.getAWSAccessKeyId(), cart); + + cartCreateResponse.getCart().add(cart); + System.out.println("Exiting cartCreate..."); + return cartCreateResponse; + } + + public CartGetResponse CartGet(CartGet cartGet) { + System.out.println("CartServiceID: " + this.toString()); + System.out.println("Entering cartGet..."); + CartGetResponse cartGetResponse = new CartGetResponse(); + + //CartGetRequest cartGetRequest = cartGet.getRequest().get(0); + + //Cart cart = getCart(cartGetRequest.getCartId()); + Cart cart = getCart(cartGet.getAWSAccessKeyId()); + if(cart == null){ + cartGetResponse.getCart().add(new Cart()); + return cartGetResponse; + } + + cartGetResponse.getCart().add(cart); + System.out.println("Exiting cartGet..."); + return cartGetResponse; + } + + public CartModifyResponse CartModify(CartModify cartModify) { + // TODO Auto-generated method stub + return null; + } + + private synchronized String generateID(){ + ID++; + return String.valueOf(ID); + } + + + private Cart getCart(String cartId){ + Cart cart = null; + System.out.println(this.cartsHash.toString()); + cart = this.cartsHash.get(cartId); + return cart; + } + + private void addCart(String cartId, Cart cart){ + this.cartsHash.put(cartId, cart); + } +/* + public void start() { + System.out.println("Start CartService..."); + } + + public void stop() { + System.out.println("Stop CartService..."); + } +*/ +} diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/proxy/ShoppingStoreService.java b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/proxy/ShoppingStoreService.java new file mode 100644 index 0000000000..207125ac75 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/proxy/ShoppingStoreService.java @@ -0,0 +1,30 @@ +package shoppingstore.services.proxy; + +import org.osoa.sca.annotations.Remotable; + +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAdd; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAddResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClear; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClearResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreate; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreateResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGet; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGetResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModify; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModifyResponse; + + +@Remotable +public interface ShoppingStoreService{ + + public CartCreateResponse CartCreate(CartCreate cartCreate); + + public CartAddResponse CartAdd(CartAdd cartAdd); + + public CartModifyResponse CartModify(CartModify cartModify); + + public CartClearResponse CartClear(CartClear cartClear); + + public CartGetResponse CartGet(CartGet cartGet); + +} diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/proxy/ShoppingStoreServiceImpl.java b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/proxy/ShoppingStoreServiceImpl.java new file mode 100644 index 0000000000..8a73631cbb --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/java/shoppingstore/services/proxy/ShoppingStoreServiceImpl.java @@ -0,0 +1,49 @@ +package shoppingstore.services.proxy; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Scope; + +import shoppingstore.services.cart.CartService; + +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartAddResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartClearResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreateResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartGetResponse; +import com.amazon.webservices.awsecommerceservice._2007_05_14.CartModifyResponse; + +@Scope("COMPOSITE") +public class ShoppingStoreServiceImpl implements ShoppingStoreService { + + private CartService cartService; + + @Reference + public void setCartService(CartService cartService) { + this.cartService = cartService; + } + + public CartAddResponse CartAdd( + com.amazon.webservices.awsecommerceservice._2007_05_14.CartAdd cartAdd) { + return cartService.CartAdd(cartAdd); + } + + public CartClearResponse CartClear( + com.amazon.webservices.awsecommerceservice._2007_05_14.CartClear cartClear) { + return cartService.CartClear(cartClear); + } + + public CartCreateResponse CartCreate( + com.amazon.webservices.awsecommerceservice._2007_05_14.CartCreate cartCreate) { + return cartService.CartCreate(cartCreate); + } + + public CartGetResponse CartGet( + com.amazon.webservices.awsecommerceservice._2007_05_14.CartGet cartGet) { + return cartService.CartGet(cartGet); + } + + public CartModifyResponse CartModify( + com.amazon.webservices.awsecommerceservice._2007_05_14.CartModify cartModify) { + return cartService.CartModify(cartModify); + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/resources/shoppingstore.composite b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/resources/shoppingstore.composite new file mode 100644 index 0000000000..f03ce10d3b --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/resources/shoppingstore.composite @@ -0,0 +1,20 @@ +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://webservices.amazon.com/AWSECommerceService/2007-05-14"
+ xmlns:tns="http://webservices.amazon.com/AWSECommerceService/2007-05-14"
+ xmlns:db="http://tuscany.apache.org/xmlns/databinding/1.0"
+ name="ShoppingStore">
+
+ <component name="ShoppingStoreServiceComponent">
+ <service name="ShoppingStoreService" >
+ <interface.wsdl interface="http://webservices.amazon.com/AWSECommerceService/2007-05-14#wsdl.interface(AWSECommerceServicePortType)" />
+ <binding.ws />
+ <db:databinding name="jaxb" />
+ </service>
+ <implementation.java class="shoppingstore.services.proxy.ShoppingStoreServiceImpl" />
+ <reference name="cartService" target="CartServiceComponent"></reference>
+ </component>
+
+ <component name="CartServiceComponent">
+ <implementation.java class="shoppingstore.services.cart.CartServiceImpl" />
+ </component>
+</composite>
\ No newline at end of file diff --git a/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/resources/wsdl/shoppingstore.wsdl b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/resources/wsdl/shoppingstore.wsdl new file mode 100644 index 0000000000..22eba787c6 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/apachecon-training/src/main/resources/wsdl/shoppingstore.wsdl @@ -0,0 +1,3023 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://webservices.amazon.com/AWSECommerceService/2007-05-14" targetNamespace="http://webservices.amazon.com/AWSECommerceService/2007-05-14"> + <types> + <xs:schema targetNamespace="http://webservices.amazon.com/AWSECommerceService/2007-05-14" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://webservices.amazon.com/AWSECommerceService/2007-05-14" elementFormDefault="qualified"> + <!-- xs:element name="Bin"> + <xs:complexType> + <xs:sequence> + <xs:element name="BinName" type="xs:string"/> + <xs:element name="BinItemCount" type="xs:positiveInteger"/> + <xs:element name="BinParameter" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="Name" type="xs:string"/> + <xs:element name="Value" type="xs:string"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SearchBinSet"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Bin" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="NarrowBy" type="xs:string" use="required"/> + </xs:complexType> + </xs:element> + <xs:element name="SearchBinSets"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:SearchBinSet" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Help"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:HelpRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:HelpRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="HelpRequest"> + <xs:sequence> + <xs:element name="About" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="HelpType" minOccurs="0"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Operation"/> + <xs:enumeration value="ResponseGroup"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:element name="ItemSearch"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:ItemSearchRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:ItemSearchRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="ItemSearchRequest"> + <xs:sequence> + <xs:element name="Actor" type="xs:string" minOccurs="0"/> + <xs:element name="Artist" type="xs:string" minOccurs="0"/> + <xs:element name="Availability" minOccurs="0"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Available"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element ref="tns:AudienceRating" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="Author" type="xs:string" minOccurs="0"/> + <xs:element name="Brand" type="xs:string" minOccurs="0"/> + <xs:element name="BrowseNode" type="xs:string" minOccurs="0"/> + <xs:element name="City" type="xs:string" minOccurs="0"/> + <xs:element name="Composer" type="xs:string" minOccurs="0"/> + <xs:element ref="tns:Condition" minOccurs="0"/> + <xs:element name="Conductor" type="xs:string" minOccurs="0"/> + <xs:element name="Count" type="xs:positiveInteger" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <aws-se:restricted xmlns:aws-se="http://webservices.amazon.com/AWS-SchemaExtensions"> + <aws-se:excludeFrom>public</aws-se:excludeFrom> + <aws-se:excludeFrom>partner</aws-se:excludeFrom> + </aws-se:restricted> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="Cuisine" type="xs:string" minOccurs="0"/> + <xs:element ref="tns:DeliveryMethod" minOccurs="0"/> + <xs:element name="Director" type="xs:string" minOccurs="0"/> + <xs:element name="FutureLaunchDate" type="xs:string" minOccurs="0"/> + <xs:element name="ISPUPostalCode" type="xs:string" minOccurs="0"/> + <xs:element name="ItemPage" type="xs:positiveInteger" minOccurs="0"/> + <xs:element name="Keywords" type="xs:string" minOccurs="0"/> + <xs:element name="Manufacturer" type="xs:string" minOccurs="0"/> + <xs:element name="MaximumPrice" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="MerchantId" type="xs:string" minOccurs="0"/> + <xs:element name="MinimumPrice" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="MusicLabel" type="xs:string" minOccurs="0"/> + <xs:element name="Neighborhood" type="xs:string" minOccurs="0"/> + <xs:element name="Orchestra" type="xs:string" minOccurs="0"/> + <xs:element name="PostalCode" type="xs:string" minOccurs="0"/> + <xs:element name="Power" type="xs:string" minOccurs="0"/> + <xs:element name="Publisher" type="xs:string" minOccurs="0"/> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ReviewSort" type="xs:string" minOccurs="0"/> + <xs:element name="SearchIndex" type="xs:string" minOccurs="0"/> + <xs:element name="Sort" type="xs:string" minOccurs="0"/> + <xs:element name="State" type="xs:string" minOccurs="0"/> + <xs:element name="TextStream" type="xs:string" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + <xs:element name="ReleaseDate" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:element name="ItemLookup"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:ItemLookupRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:ItemLookupRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="ItemLookupRequest"> + <xs:sequence> + <xs:element ref="tns:Condition" minOccurs="0"/> + <xs:element ref="tns:DeliveryMethod" minOccurs="0"/> + <xs:element name="FutureLaunchDate" type="xs:string" minOccurs="0"/> + <xs:element name="IdType" minOccurs="0"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="ASIN"/> + <xs:enumeration value="UPC"/> + <xs:enumeration value="SKU"/> + <xs:enumeration value="EAN"/> + <xs:enumeration value="ISBN"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="ISPUPostalCode" type="xs:string" minOccurs="0"/> + <xs:element name="MerchantId" type="xs:string" minOccurs="0"/> + <xs:element name="OfferPage" type="xs:positiveInteger" minOccurs="0"/> + <xs:element name="ItemId" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ReviewPage" type="xs:positiveInteger" minOccurs="0"/> + <xs:element name="ReviewSort" type="xs:string" minOccurs="0"/> + <xs:element name="SearchIndex" type="xs:string" minOccurs="0"/> + <xs:element name="SearchInsideKeywords" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <aws-se:restricted xmlns:aws-se="http://webservices.amazon.com/AWS-SchemaExtensions"> + <aws-se:excludeFrom>public</aws-se:excludeFrom> + <aws-se:excludeFrom>partner</aws-se:excludeFrom> + </aws-se:restricted> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="VariationPage" type="tns:positiveIntegerOrAll" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:element name="ListSearch"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:ListSearchRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:ListSearchRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="ListSearchRequest"> + <xs:sequence> + <xs:element name="City" type="xs:string" minOccurs="0"/> + <xs:element name="Email" type="xs:string" minOccurs="0"/> + <xs:element name="FirstName" type="xs:string" minOccurs="0"/> + <xs:element name="LastName" type="xs:string" minOccurs="0"/> + <xs:element name="ListPage" type="xs:positiveInteger" minOccurs="0"/> + <xs:element name="ListType"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="WishList"/> + <xs:enumeration value="WeddingRegistry"/> + <xs:enumeration value="BabyRegistry"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="Name" type="xs:string" minOccurs="0"/> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="State" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:element name="ListLookup"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:ListLookupRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:ListLookupRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="ListLookupRequest"> + <xs:sequence> + <xs:element ref="tns:Condition" minOccurs="0"/> + <xs:element ref="tns:DeliveryMethod" minOccurs="0"/> + <xs:element name="ISPUPostalCode" type="xs:string" minOccurs="0"/> + <xs:element name="ListId" type="xs:string" minOccurs="0"/> + <xs:element name="ListType" minOccurs="0"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="WishList"/> + <xs:enumeration value="Listmania"/> + <xs:enumeration value="WeddingRegistry"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="MerchantId" type="xs:string" minOccurs="0"/> + <xs:element name="ProductGroup" type="xs:string" minOccurs="0"/> + <xs:element name="ProductPage" type="xs:positiveInteger" minOccurs="0"/> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ReviewSort" type="xs:string" minOccurs="0"/> + <xs:element name="Sort" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:element name="CustomerContentSearch"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:CustomerContentSearchRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:CustomerContentSearchRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="CustomerContentSearchRequest"> + <xs:sequence> + <xs:element name="CustomerPage" type="xs:positiveInteger" minOccurs="0"/> + <xs:element name="Email" type="xs:string" minOccurs="0"/> + <xs:element name="Name" type="xs:string" minOccurs="0"/> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:element name="CustomerContentLookup"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:CustomerContentLookupRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:CustomerContentLookupRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="CustomerContentLookupRequest"> + <xs:sequence> + <xs:element name="CustomerId" type="xs:string" minOccurs="0"/> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ReviewPage" type="xs:positiveInteger" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:element name="SimilarityLookup"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:SimilarityLookupRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:SimilarityLookupRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="SimilarityLookupRequest"> + <xs:sequence> + <xs:element ref="tns:Condition" minOccurs="0"/> + <xs:element ref="tns:DeliveryMethod" minOccurs="0"/> + <xs:element name="ItemId" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ISPUPostalCode" type="xs:string" minOccurs="0"/> + <xs:element name="MerchantId" type="xs:string" minOccurs="0"/> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ReviewSort" type="xs:string" minOccurs="0"/> + <xs:element name="SimilarityType" minOccurs="0"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Intersection"/> + <xs:enumeration value="Random"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + </xs:sequence> + </xs:complexType> + <xs:element name="SellerLookup"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:SellerLookupRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:SellerLookupRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="SellerLookupRequest"> + <xs:sequence> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="SellerId" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="FeedbackPage" type="xs:positiveInteger" minOccurs="0"/> + </xs:sequence> + </xs:complexType --> + <xs:element name="CartGet"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:CartGetRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:CartGetRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="CartGetRequest"> + <xs:sequence> + <xs:element name="CartId" type="xs:string" minOccurs="0"/> + <xs:element name="HMAC" type="xs:string" minOccurs="0"/> + <xs:element name="MergeCart" type="xs:string" minOccurs="0"/> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:element name="CartAdd"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:CartAddRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:CartAddRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="CartAddRequest"> + <xs:sequence> + <xs:element name="CartId" type="xs:string" minOccurs="0"/> + <xs:element name="HMAC" type="xs:string" minOccurs="0"/> + <xs:element name="MergeCart" type="xs:string" minOccurs="0"/> + <xs:element name="Items" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Item" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="OfferListingId" type="xs:string" minOccurs="0"/> + <xs:element name="Quantity" type="xs:positiveInteger" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="ListItemId" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:element name="CartCreate"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:CartCreateRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:CartCreateRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="CartCreateRequest"> + <xs:sequence> + <xs:element name="MergeCart" type="xs:string" minOccurs="0"/> + <xs:element name="Items" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Item" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="OfferListingId" type="xs:string" minOccurs="0"/> + <xs:element name="Quantity" type="xs:positiveInteger" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="ListItemId" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:element name="CartModify"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:CartModifyRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:CartModifyRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="CartModifyRequest"> + <xs:sequence> + <xs:element name="CartId" type="xs:string" minOccurs="0"/> + <xs:element name="HMAC" type="xs:string" minOccurs="0"/> + <xs:element name="MergeCart" type="xs:string" minOccurs="0"/> + <xs:element name="Items" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Item" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="Action" minOccurs="0"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="MoveToCart"/> + <xs:enumeration value="SaveForLater"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="CartItemId" type="xs:string" minOccurs="0"/> + <xs:element name="Quantity" type="xs:nonNegativeInteger" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:element name="CartClear"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:CartClearRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:CartClearRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="CartClearRequest"> + <xs:sequence> + <xs:element name="CartId" type="xs:string" minOccurs="0"/> + <xs:element name="HMAC" type="xs:string" minOccurs="0"/> + <xs:element name="MergeCart" type="xs:string" minOccurs="0"/> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <!-- xs:element name="TransactionLookup"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:TransactionLookupRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:TransactionLookupRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="TransactionLookupRequest"> + <xs:sequence> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="TransactionId" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:element name="SellerListingSearch"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:SellerListingSearchRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:SellerListingSearchRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="SellerListingSearchRequest"> + <xs:sequence> + <xs:element name="Keywords" type="xs:string" minOccurs="0"/> + <xs:element name="ListingPage" type="xs:positiveInteger" minOccurs="0"/> + <xs:element name="OfferStatus" minOccurs="0"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Open"/> + <xs:enumeration value="Closed"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="SellerId" type="xs:string" minOccurs="1"/> + <xs:element name="Sort" type="xs:string" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:element name="SellerListingLookup"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:SellerListingLookupRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:SellerListingLookupRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="SellerListingLookupRequest"> + <xs:sequence> + <xs:element name="Id" type="xs:string"/> + <xs:element name="SellerId" type="xs:string" minOccurs="0"/> + <xs:element name="IdType"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Exchange"/> + <xs:enumeration value="Listing"/> + <xs:enumeration value="ASIN"/> + <xs:enumeration value="SKU"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:element name="BrowseNodeLookup"> + <xs:complexType> + <xs:sequence> + <xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0"/> + <xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/> + <xs:element name="AssociateTag" type="xs:string" minOccurs="0"/> + <xs:element name="Validate" type="xs:string" minOccurs="0"/> + <xs:element name="XMLEscaping" type="xs:string" minOccurs="0"/> + <xs:element name="Shared" type="tns:BrowseNodeLookupRequest" minOccurs="0"/> + <xs:element name="Request" type="tns:BrowseNodeLookupRequest" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="BrowseNodeLookupRequest"> + <xs:sequence> + <xs:element name="BrowseNodeId" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ResponseGroup" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:element name="Condition"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="All"/> + <xs:enumeration value="New"/> + <xs:enumeration value="Used"/> + <xs:enumeration value="Collectible"/> + <xs:enumeration value="Refurbished"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="DeliveryMethod"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="Ship"/> + <xs:enumeration value="ISPU"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="AudienceRating"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="G"/> + <xs:enumeration value="PG"/> + <xs:enumeration value="PG-13"/> + <xs:enumeration value="R"/> + <xs:enumeration value="NC-17"/> + <xs:enumeration value="NR"/> + <xs:enumeration value="Unrated"/> + <xs:enumeration value="6"/> + <xs:enumeration value="12"/> + <xs:enumeration value="16"/> + <xs:enumeration value="18"/> + <xs:enumeration value="FamilyViewing"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="MultiOperation"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Help" minOccurs="0"/> + <xs:element ref="tns:ItemSearch" minOccurs="0"/> + <xs:element ref="tns:ItemLookup" minOccurs="0"/> + <xs:element ref="tns:ListSearch" minOccurs="0"/> + <xs:element ref="tns:ListLookup" minOccurs="0"/> + <xs:element ref="tns:CustomerContentSearch" minOccurs="0"/> + <xs:element ref="tns:CustomerContentLookup" minOccurs="0"/> + <xs:element ref="tns:SimilarityLookup" minOccurs="0"/> + <xs:element ref="tns:SellerLookup" minOccurs="0"/> + <xs:element ref="tns:CartGet" minOccurs="0"/> + <xs:element ref="tns:CartAdd" minOccurs="0"/> + <xs:element ref="tns:CartCreate" minOccurs="0"/> + <xs:element ref="tns:CartModify" minOccurs="0"/> + <xs:element ref="tns:CartClear" minOccurs="0"/> + <xs:element ref="tns:TransactionLookup" minOccurs="0"/> + <xs:element ref="tns:SellerListingSearch" minOccurs="0"/> + <xs:element ref="tns:SellerListingLookup" minOccurs="0"/> + <xs:element ref="tns:BrowseNodeLookup" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="HelpResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Information" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ItemSearchResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Items" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ItemLookupResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Items" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ListSearchResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Lists" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ListLookupResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Lists" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="CustomerContentSearchResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Customers" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="CustomerContentLookupResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Customers" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SimilarityLookupResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Items" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SellerLookupResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Sellers" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element --> + <xs:element name="CartGetResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Cart" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="CartAddResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Cart" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="CartCreateResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Cart" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="CartModifyResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Cart" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="CartClearResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Cart" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <!-- xs:element name="TransactionLookupResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:Transactions" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SellerListingSearchResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:SellerListings" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SellerListingLookupResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:SellerListings" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="BrowseNodeLookupResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:BrowseNodes" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="MultiOperationResponse"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:OperationRequest" minOccurs="0"/> + <xs:element ref="tns:HelpResponse" minOccurs="0"/> + <xs:element ref="tns:ItemSearchResponse" minOccurs="0"/> + <xs:element ref="tns:ItemLookupResponse" minOccurs="0"/> + <xs:element ref="tns:ListSearchResponse" minOccurs="0"/> + <xs:element ref="tns:ListLookupResponse" minOccurs="0"/> + <xs:element ref="tns:CustomerContentSearchResponse" minOccurs="0"/> + <xs:element ref="tns:CustomerContentLookupResponse" minOccurs="0"/> + <xs:element ref="tns:SimilarityLookupResponse" minOccurs="0"/> + <xs:element ref="tns:SellerLookupResponse" minOccurs="0"/> + <xs:element ref="tns:CartGetResponse" minOccurs="0"/> + <xs:element ref="tns:CartAddResponse" minOccurs="0"/> + <xs:element ref="tns:CartCreateResponse" minOccurs="0"/> + <xs:element ref="tns:CartModifyResponse" minOccurs="0"/> + <xs:element ref="tns:CartClearResponse" minOccurs="0"/> + <xs:element ref="tns:TransactionLookupResponse" minOccurs="0"/> + <xs:element ref="tns:SellerListingSearchResponse" minOccurs="0"/> + <xs:element ref="tns:SellerListingLookupResponse" minOccurs="0"/> + <xs:element ref="tns:BrowseNodeLookupResponse" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="OperationRequest"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:HTTPHeaders" minOccurs="0"/> + <xs:element name="RequestId" type="xs:string" minOccurs="0"/> + <xs:element ref="tns:Arguments" minOccurs="0"/> + <xs:element ref="tns:Errors" minOccurs="0"/> + <xs:element name="RequestProcessingTime" type="xs:float" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Request"> + <xs:complexType> + <xs:sequence> + <xs:element name="IsValid" type="xs:string" minOccurs="0"/> + <xs:element name="HelpRequest" type="tns:HelpRequest" minOccurs="0"/> + <xs:element name="BrowseNodeLookupRequest" type="tns:BrowseNodeLookupRequest" minOccurs="0"/> + <xs:element name="ItemSearchRequest" type="tns:ItemSearchRequest" minOccurs="0"/> + <xs:element name="ItemLookupRequest" type="tns:ItemLookupRequest" minOccurs="0"/> + <xs:element name="ListSearchRequest" type="tns:ListSearchRequest" minOccurs="0"/> + <xs:element name="ListLookupRequest" type="tns:ListLookupRequest" minOccurs="0"/> + <xs:element name="CustomerContentSearchRequest" type="tns:CustomerContentSearchRequest" minOccurs="0"/> + <xs:element name="CustomerContentLookupRequest" type="tns:CustomerContentLookupRequest" minOccurs="0"/> + <xs:element name="SimilarityLookupRequest" type="tns:SimilarityLookupRequest" minOccurs="0"/> + <xs:element name="CartGetRequest" type="tns:CartGetRequest" minOccurs="0"/> + <xs:element name="CartAddRequest" type="tns:CartAddRequest" minOccurs="0"/> + <xs:element name="CartCreateRequest" type="tns:CartCreateRequest" minOccurs="0"/> + <xs:element name="CartModifyRequest" type="tns:CartModifyRequest" minOccurs="0"/> + <xs:element name="CartClearRequest" type="tns:CartClearRequest" minOccurs="0"/> + <xs:element name="TransactionLookupRequest" type="tns:TransactionLookupRequest" minOccurs="0"/> + <xs:element name="SellerListingSearchRequest" type="tns:SellerListingSearchRequest" minOccurs="0"/> + <xs:element name="SellerListingLookupRequest" type="tns:SellerListingLookupRequest" minOccurs="0"/> + <xs:element name="SellerLookupRequest" type="tns:SellerLookupRequest" minOccurs="0"/> + <xs:element ref="tns:Errors" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Arguments"> + <xs:complexType> + <xs:sequence> + <xs:element name="Argument" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="Name" type="xs:string" use="required"/> + <xs:attribute name="Value" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="HTTPHeaders"> + <xs:complexType> + <xs:sequence> + <xs:element name="Header" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="Name" type="xs:string" use="required"/> + <xs:attribute name="Value" type="xs:string" use="required"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Errors"> + <xs:complexType> + <xs:sequence> + <xs:element name="Error" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="Code" type="xs:string"/> + <xs:element name="Message" type="xs:string"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Information"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Request" minOccurs="0"/> + <xs:element ref="tns:OperationInformation" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="tns:ResponseGroupInformation" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Items"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Request" minOccurs="0"/> + <xs:element ref="tns:CorrectedQuery" minOccurs="0"/> + <xs:element name="Qid" type="xs:string" minOccurs="0"/> + <xs:element name="TotalResults" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:SearchResultsMap" minOccurs="0"/> + <xs:element ref="tns:Item" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="tns:SearchBinSets" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="CorrectedQuery"> + <xs:complexType> + <xs:sequence> + <xs:element name="Keywords" type="xs:string" minOccurs="0"/> + <xs:element name="Message" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Lists"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Request" minOccurs="0"/> + <xs:element name="TotalResults" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:List" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Customers"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Request" minOccurs="0"/> + <xs:element name="TotalResults" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:Customer" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element --> + <xs:element name="Cart"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Request" minOccurs="0"/> + <xs:element name="CartId" type="xs:string"/> + <xs:element name="HMAC" type="xs:string"/> + <xs:element name="URLEncodedHMAC" type="xs:string"/> + <xs:element name="PurchaseURL" type="xs:string" minOccurs="0"/> + <xs:element name="SubTotal" type="tns:Price" minOccurs="0"/> + <xs:element ref="tns:CartItems" minOccurs="0"/> + <xs:element ref="tns:SavedForLaterItems" minOccurs="0"/> + <xs:element ref="tns:SimilarProducts" minOccurs="0"/> + <xs:element ref="tns:TopSellers" minOccurs="0"/> + <xs:element ref="tns:NewReleases" minOccurs="0"/> + <xs:element ref="tns:SimilarViewedProducts" minOccurs="0"/> + <xs:element ref="tns:OtherCategoriesSimilarProducts" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <!-- xs:element name="Transactions"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Request" minOccurs="0"/> + <xs:element name="TotalResults" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:Transaction" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Sellers"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Request" minOccurs="0"/> + <xs:element name="TotalResults" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:Seller" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SellerListings"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Request" minOccurs="0"/> + <xs:element name="TotalResults" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:SellerListing" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="OperationInformation"> + <xs:complexType> + <xs:sequence> + <xs:element name="Name" type="xs:string" minOccurs="0"/> + <xs:element name="Description" type="xs:string" minOccurs="0"/> + <xs:element name="RequiredParameters" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Parameter" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AvailableParameters" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Parameter" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="DefaultResponseGroups" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="ResponseGroup" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AvailableResponseGroups" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="ResponseGroup" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ResponseGroupInformation"> + <xs:complexType> + <xs:sequence> + <xs:element name="Name" type="xs:string" minOccurs="0"/> + <xs:element name="CreationDate" type="xs:string" minOccurs="0"/> + <xs:element name="ValidOperations" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Operation" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Elements" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Element" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="List"> + <xs:complexType> + <xs:sequence> + <xs:element name="ListId" type="xs:string"/> + <xs:element name="ListURL" type="xs:string" minOccurs="0"/> + <xs:element name="RegistryNumber" type="xs:string" minOccurs="0"/> + <xs:element name="ListName" type="xs:string" minOccurs="0"/> + <xs:element name="ListType" minOccurs="0"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="WishList"/> + <xs:enumeration value="WeddingRegistry"/> + <xs:enumeration value="BabyRegistry"/> + <xs:enumeration value="Listmania"/> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="TotalItems" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="DateCreated" type="xs:string" minOccurs="0"/> + <xs:element name="OccasionDate" type="xs:string" minOccurs="0"/> + <xs:element name="CustomerName" type="xs:string" minOccurs="0"/> + <xs:element name="PartnerName" type="xs:string" minOccurs="0"/> + <xs:element name="AdditionalName" type="xs:string" minOccurs="0"/> + <xs:element name="Comment" type="xs:string" minOccurs="0"/> + <xs:element name="Image" type="tns:Image" minOccurs="0"/> + <xs:element name="AverageRating" type="xs:decimal" minOccurs="0"/> + <xs:element name="TotalVotes" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalTimesRead" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:ListItem" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ListItem"> + <xs:complexType> + <xs:sequence> + <xs:element name="ListItemId" type="xs:string" minOccurs="0"/> + <xs:element name="DateAdded" type="xs:string" minOccurs="0"/> + <xs:element name="Comment" type="xs:string" minOccurs="0"/> + <xs:element name="QuantityDesired" type="xs:string" minOccurs="0"/> + <xs:element name="QuantityReceived" type="xs:string" minOccurs="0"/> + <xs:element ref="tns:Item" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Customer"> + <xs:complexType> + <xs:sequence> + <xs:element name="CustomerId" type="xs:string"/> + <xs:element name="Nickname" type="xs:string" minOccurs="0"/> + <xs:element name="Birthday" type="xs:string" minOccurs="0"/> + <xs:element name="WishListId" type="xs:string" minOccurs="0"/> + <xs:element name="Location" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="UserDefinedLocation" type="xs:string" minOccurs="0"/> + <xs:element name="City" type="xs:string" minOccurs="0"/> + <xs:element name="State" type="xs:string" minOccurs="0"/> + <xs:element name="Country" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element ref="tns:CustomerReviews" maxOccurs="unbounded" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SearchResultsMap"> + <xs:complexType> + <xs:sequence> + <xs:element name="SearchIndex" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="IndexName" type="xs:string"/> + <xs:element name="Results" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="Pages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:CorrectedQuery" minOccurs="0"/> + <xs:element name="RelevanceRank" type="xs:positiveInteger"/> + <xs:element name="ASIN" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Item"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string"/> + <xs:element name="ParentASIN" type="xs:string" minOccurs="0"/> + <xs:element ref="tns:Errors" minOccurs="0"/> + <xs:element name="DetailPageURL" type="xs:string" minOccurs="0"/> + <xs:element name="SalesRank" type="xs:string" minOccurs="0"/> + <xs:element name="SmallImage" type="tns:Image" minOccurs="0"/> + <xs:element name="MediumImage" type="tns:Image" minOccurs="0"/> + <xs:element name="LargeImage" type="tns:Image" minOccurs="0"/> + <xs:element name="ImageSets" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="MerchantId" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element ref="tns:ImageSet" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element ref="tns:ItemAttributes" minOccurs="0"/> + <xs:element ref="tns:MerchantItemAttributes" minOccurs="0"/> + <xs:element ref="tns:Collections" minOccurs="0"/> + <xs:element name="Subjects" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="Subject" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element ref="tns:OfferSummary" minOccurs="0"/> + <xs:element ref="tns:Offers" minOccurs="0"/> + <xs:element ref="tns:VariationSummary" minOccurs="0"/> + <xs:element ref="tns:Variations" minOccurs="0"/> + <xs:element ref="tns:CustomerReviews" minOccurs="0"/> + <xs:element ref="tns:EditorialReviews" minOccurs="0"/> + <xs:element ref="tns:SimilarProducts" minOccurs="0"/> + <xs:element ref="tns:Accessories" minOccurs="0"/> + <xs:element ref="tns:Tracks" minOccurs="0"/> + <xs:element ref="tns:BrowseNodes" minOccurs="0"/> + <xs:element ref="tns:ListmaniaLists" minOccurs="0"/> + <xs:element ref="tns:SearchInside" minOccurs="0"/> + <xs:element name="AlternateVersions" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="AlternateVersion" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + <xs:element name="Binding" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="OfferSummary"> + <xs:complexType> + <xs:sequence> + <xs:element name="LowestNewPrice" type="tns:Price" minOccurs="0"/> + <xs:element name="LowestUsedPrice" type="tns:Price" minOccurs="0"/> + <xs:element name="LowestCollectiblePrice" type="tns:Price" minOccurs="0"/> + <xs:element name="LowestRefurbishedPrice" type="tns:Price" minOccurs="0"/> + <xs:element name="TotalNew" type="xs:string" minOccurs="0"/> + <xs:element name="TotalUsed" type="xs:string" minOccurs="0"/> + <xs:element name="TotalCollectible" type="xs:string" minOccurs="0"/> + <xs:element name="TotalRefurbished" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Offers"> + <xs:complexType> + <xs:sequence> + <xs:element name="TotalOffers" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalOfferPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:Offer" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Offer"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Merchant" minOccurs="0"/> + <xs:element ref="tns:Seller" minOccurs="0"/> + <xs:element ref="tns:OfferAttributes" minOccurs="0"/> + <xs:element ref="tns:OfferListing" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="tns:LoyaltyPoints" minOccurs="0"/> + <xs:element ref="tns:Promotions" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="OfferAttributes"> + <xs:complexType> + <xs:sequence> + <xs:element name="Condition" type="xs:string" minOccurs="0"/> + <xs:element name="SubCondition" type="xs:string" minOccurs="0"/> + <xs:element name="ConditionNote" type="xs:string" minOccurs="0"/> + <xs:element name="WillShipExpedited" type="xs:boolean" minOccurs="0"/> + <xs:element name="WillShipInternational" type="xs:boolean" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Merchant"> + <xs:complexType> + <xs:sequence> + <xs:element name="MerchantId" type="xs:string"/> + <xs:element name="Name" type="xs:string" minOccurs="0"/> + <xs:element name="GlancePage" type="xs:string" minOccurs="0"/> + <xs:element name="AverageFeedbackRating" type="xs:decimal" minOccurs="0"/> + <xs:element name="TotalFeedback" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalFeedbackPages" type="xs:nonNegativeInteger" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="OfferListing"> + <xs:complexType> + <xs:sequence> + <xs:element name="OfferListingId" type="xs:string" minOccurs="0"/> + <xs:element name="ExchangeId" type="xs:string" minOccurs="0"/> + <xs:element name="Price" type="tns:Price" minOccurs="0"/> + <xs:element name="SalePrice" type="tns:Price" minOccurs="0"/> + <xs:element name="AmountSaved" type="tns:Price" minOccurs="0"/> + <xs:element name="PercentageSaved" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="Availability" type="xs:string" minOccurs="0"/> + <xs:element name="AvailabilityAttributes" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="AvailabilityType" type="xs:string" minOccurs="0"/> + <xs:element name="IsPreorder" type="xs:boolean" minOccurs="0"/> + <xs:element name="MinimumHours" type="xs:integer" minOccurs="0"/> + <xs:element name="MaximumHours" type="xs:integer" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Quantity" type="xs:integer" minOccurs="0"/> + <xs:element name="ISPUStoreAddress" type="tns:Address" minOccurs="0"/> + <xs:element name="ISPUStoreHours" type="xs:string" minOccurs="0"/> + <xs:element name="IsEligibleForSuperSaverShipping" type="xs:boolean" minOccurs="0"/> + <xs:element name="SalesRestriction" type="xs:string" minOccurs="0"/> + <xs:element name="ShippingCharge" minOccurs="0" maxOccurs="unbounded"> + <xs:annotation> + <xs:appinfo> + <aws-se:restricted xmlns:aws-se="http://webservices.amazon.com/AWS-SchemaExtensions"> + <aws-se:excludeFrom>public</aws-se:excludeFrom> + <aws-se:excludeFrom>partner</aws-se:excludeFrom> + </aws-se:restricted> + </xs:appinfo> + </xs:annotation> + <xs:complexType> + <xs:sequence> + <xs:element name="ShippingType" type="xs:string"/> + <xs:element name="ShippingPrice" type="tns:Price"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="LoyaltyPoints"> + <xs:complexType> + <xs:sequence> + <xs:element name="Points" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TypicalRedemptionValue" type="tns:Price" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="VariationSummary"> + <xs:complexType> + <xs:sequence> + <xs:element name="LowestPrice" type="tns:Price" minOccurs="0"/> + <xs:element name="HighestPrice" type="tns:Price" minOccurs="0"/> + <xs:element name="LowestSalePrice" type="tns:Price" minOccurs="0"/> + <xs:element name="HighestSalePrice" type="tns:Price" minOccurs="0"/> + <xs:element name="SingleMerchantId" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Variations"> + <xs:complexType> + <xs:sequence> + <xs:element name="TotalVariations" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalVariationPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:VariationDimensions" minOccurs="0"/> + <xs:element ref="tns:Item" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="VariationDimensions"> + <xs:complexType> + <xs:sequence> + <xs:element name="VariationDimension" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="EditorialReviews"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:EditorialReview" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Collections"> + <xs:complexType> + <xs:sequence> + <xs:element name="Collection" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="CollectionSummary" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="LowestListPrice" type="tns:Price" minOccurs="0" maxOccurs="1"/> + <xs:element name="HighestListPrice" type="tns:Price" minOccurs="0" maxOccurs="1"/> + <xs:element name="LowestSalePrice" type="tns:Price" minOccurs="0" maxOccurs="1"/> + <xs:element name="HighestSalePrice" type="tns:Price" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="CollectionParent" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="Title" type="xs:string" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="CollectionItem" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0" maxOccurs="1"/> + <xs:element name="Title" type="xs:string" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="EditorialReview"> + <xs:complexType> + <xs:sequence> + <xs:element name="Source" type="xs:string" minOccurs="0"/> + <xs:element name="Content" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="CustomerReviews"> + <xs:complexType> + <xs:sequence> + <xs:element name="AverageRating" type="xs:decimal" minOccurs="0"/> + <xs:element name="TotalReviews" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalReviewPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element ref="tns:Review" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Review"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="Rating" type="xs:decimal" minOccurs="0"/> + <xs:element name="HelpfulVotes" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="CustomerId" type="xs:string" minOccurs="0"/> + <xs:element ref="tns:Reviewer" minOccurs="0"/> + <xs:element name="TotalVotes" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="Date" type="xs:string" minOccurs="0"/> + <xs:element name="Summary" type="xs:string" minOccurs="0"/> + <xs:element name="Content" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Reviewer"> + <xs:complexType> + <xs:sequence> + <xs:element name="CustomerId" type="xs:string" minOccurs="0"/> + <xs:element name="Name" type="xs:string" minOccurs="0"/> + <xs:element name="Nickname" type="xs:string" minOccurs="0"/> + <xs:element name="Location" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Tracks"> + <xs:complexType> + <xs:sequence> + <xs:element name="Disc" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="Track" maxOccurs="unbounded"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="Number" type="xs:positiveInteger" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="Number" type="xs:positiveInteger" use="required"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SimilarProducts"> + <xs:complexType> + <xs:sequence> + <xs:element name="SimilarProduct" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="TopSellers"> + <xs:complexType> + <xs:sequence> + <xs:element name="TopSeller" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="NewReleases"> + <xs:complexType> + <xs:sequence> + <xs:element name="NewRelease" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SimilarViewedProducts"> + <xs:complexType> + <xs:sequence> + <xs:element name="SimilarViewedProduct" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="OtherCategoriesSimilarProducts"> + <xs:complexType> + <xs:sequence> + <xs:element name="OtherCategoriesSimilarProduct" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Accessories"> + <xs:complexType> + <xs:sequence> + <xs:element name="Accessory" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Promotions"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Promotion" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Promotion"> + <xs:complexType> + <xs:sequence> + <xs:element name="Summary" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="PromotionId" type="xs:string"/> + <xs:element name="Category" type="xs:string" minOccurs="0"/> + <xs:element name="StartDate" type="xs:string" minOccurs="0"/> + <xs:element name="EndDate" type="xs:string" minOccurs="0"/> + <xs:element name="EligibilityRequirementDescription" type="xs:string" minOccurs="0"/> + <xs:element name="BenefitDescription" type="xs:string" minOccurs="0"/> + <xs:element name="TermsAndConditions" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Details" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="MerchantId" type="xs:string"/> + <xs:element name="OwningMerchantId" type="xs:string"/> + <xs:element name="PromotionId" type="xs:string"/> + <xs:element name="PromotionCategory" type="xs:string"/> + <xs:element name="MerchantPromotionId" type="xs:string" minOccurs="0"/> + <xs:element name="GroupClaimCode" type="xs:string" minOccurs="0"/> + <xs:element name="CouponCombinationType" type="xs:string" minOccurs="0"/> + <xs:element name="StartDate" type="xs:string" minOccurs="0"/> + <xs:element name="EndDate" type="xs:string" minOccurs="0"/> + <xs:element name="TermsAndConditions" type="xs:string" minOccurs="0"/> + <xs:element name="EligibilityRequirements" type="tns:PromotionEligibilityRequirements" minOccurs="0"/> + <xs:element name="Benefits" type="tns:PromotionBenefits" minOccurs="0"/> + <xs:element name="ItemApplicability" type="tns:PromotionItemApplicability" minOccurs="0"/> + <xs:element name="MerchandisingMessage" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="PromotionEligibilityRequirements"> + <xs:sequence> + <xs:element name="EligibilityRequirement" type="tns:PromotionEligibilityRequirement" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="PromotionBenefits"> + <xs:sequence> + <xs:element name="Benefit" type="tns:PromotionBenefit" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="PromotionBenefit"> + <xs:sequence> + <xs:element name="BenefitType" type="xs:string"/> + <xs:element name="ComponentType" type="xs:string"/> + <xs:element name="Quantity" type="xs:int" minOccurs="0"/> + <xs:element name="PercentOff" type="xs:double" minOccurs="0"/> + <xs:element name="FixedAmount" type="tns:Price" minOccurs="0"/> + <xs:element name="Ceiling" type="tns:Price" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="PromotionEligibilityRequirement"> + <xs:sequence> + <xs:element name="EligibilityRequirementType" type="xs:string"/> + <xs:element name="Quantity" type="xs:int" minOccurs="0"/> + <xs:element name="CurrencyAmount" type="tns:Price" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="PromotionItemApplicability"> + <xs:sequence> + <xs:element name="ASIN" type="xs:string"/> + <xs:element name="IsInBenefitSet" type="xs:boolean"/> + <xs:element name="IsInEligibilityRequirementSet" type="xs:boolean"/> + </xs:sequence> + </xs:complexType> + <xs:element name="BrowseNodes"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:Request" minOccurs="0"/> + <xs:element ref="tns:BrowseNode" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="BrowseNode"> + <xs:complexType> + <xs:sequence> + <xs:element name="BrowseNodeId" type="xs:string" minOccurs="0"/> + <xs:element name="Name" type="xs:string" minOccurs="0"/> + <xs:element name="IsCategoryRoot" type="xs:boolean" minOccurs="0"/> + <xs:element name="Children" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:BrowseNode" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Ancestors" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:BrowseNode" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element ref="tns:TopSellers" minOccurs="0"/> + <xs:element ref="tns:NewReleases" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ListmaniaLists"> + <xs:complexType> + <xs:sequence> + <xs:element name="ListmaniaList" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="ListId" type="xs:string"/> + <xs:element name="ListName" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SearchInside"> + <xs:annotation> + <xs:appinfo> + <aws-se:restricted xmlns:aws-se="http://webservices.amazon.com/AWS-SchemaExtensions"> + <aws-se:excludeFrom>public</aws-se:excludeFrom> + <aws-se:excludeFrom>partner</aws-se:excludeFrom> + </aws-se:restricted> + </xs:appinfo> + </xs:annotation> + <xs:complexType> + <xs:sequence> + <xs:element name="TotalExcerpts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="Excerpt" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Checksum" type="xs:string" minOccurs="0"/> + <xs:element name="PageType" type="xs:string" minOccurs="0"/> + <xs:element name="PageNumber" type="xs:string" minOccurs="0"/> + <xs:element name="SequenceNumber" type="xs:string" minOccurs="0"/> + <xs:element name="Text" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element --> + <xs:element name="CartItems"> + <xs:complexType> + <xs:sequence> + <xs:element name="SubTotal" type="tns:Price" minOccurs="0"/> + <xs:element name="CartItem" type="tns:CartItem" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <!-- xs:element name="SavedForLaterItems"> + <xs:complexType> + <xs:sequence> + <xs:element name="SubTotal" type="tns:Price" minOccurs="0"/> + <xs:element name="SavedForLaterItem" type="tns:CartItem" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element --> + <xs:complexType name="CartItem"> + <xs:sequence> + <xs:element name="CartItemId" type="xs:string"/> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="ExchangeId" type="xs:string" minOccurs="0"/> + <xs:element name="MerchantId" type="xs:string" minOccurs="0"/> + <xs:element name="SellerId" type="xs:string" minOccurs="0"/> + <xs:element name="SellerNickname" type="xs:string" minOccurs="0"/> + <xs:element name="Quantity" type="xs:string"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + <xs:element name="ProductGroup" type="xs:string" minOccurs="0"/> + <xs:element name="ListOwner" type="xs:string" minOccurs="0"/> + <xs:element name="ListType" type="xs:string" minOccurs="0"/> + <xs:element name="Price" type="tns:Price" minOccurs="0"/> + <xs:element name="ItemTotal" type="tns:Price" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <!-- xs:element name="Transaction"> + <xs:complexType> + <xs:sequence> + <xs:element name="TransactionId" type="xs:string"/> + <xs:element name="SellerId" type="xs:string"/> + <xs:element name="Condition" type="xs:string"/> + <xs:element name="TransactionDate" type="xs:string"/> + <xs:element name="TransactionDateEpoch" type="xs:string"/> + <xs:element name="SellerName" type="xs:string" minOccurs="0"/> + <xs:element name="PayingCustomerId" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <aws-se:restricted xmlns:aws-se="http://webservices.amazon.com/AWS-SchemaExtensions"> + <aws-se:excludeFrom>public</aws-se:excludeFrom> + <aws-se:excludeFrom>partner</aws-se:excludeFrom> + </aws-se:restricted> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="OrderingCustomerId" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <aws-se:restricted xmlns:aws-se="http://webservices.amazon.com/AWS-SchemaExtensions"> + <aws-se:excludeFrom>public</aws-se:excludeFrom> + <aws-se:excludeFrom>partner</aws-se:excludeFrom> + </aws-se:restricted> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="Totals" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Total" type="tns:Price"/> + <xs:element name="Subtotal" type="tns:Price"/> + <xs:element name="Tax" type="tns:Price"/> + <xs:element name="ShippingCharge" type="tns:Price"/> + <xs:element name="Promotion" type="tns:Price"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="TransactionItems" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <aws-se:restricted xmlns:aws-se="http://webservices.amazon.com/AWS-SchemaExtensions"> + <aws-se:excludeFrom>public</aws-se:excludeFrom> + </aws-se:restricted> + </xs:appinfo> + </xs:annotation> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:TransactionItem" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Shipments" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <aws-se:restricted xmlns:aws-se="http://webservices.amazon.com/AWS-SchemaExtensions"> + <aws-se:excludeFrom>public</aws-se:excludeFrom> + </aws-se:restricted> + </xs:appinfo> + </xs:annotation> + <xs:complexType> + <xs:sequence> + <xs:element name="Shipment" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="Condition" type="xs:string"/> + <xs:element name="DeliveryMethod" type="xs:string"/> + <xs:element name="ShipmentItems" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="TransactionItemId" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Packages" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Package" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="TrackingNumber" type="xs:string"/> + <xs:element name="CarrierName" type="xs:string"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="TransactionItem"> + <xs:complexType> + <xs:sequence> + <xs:element name="TransactionItemId" type="xs:string"/> + <xs:element name="Quantity" type="xs:string"/> + <xs:element name="UnitPrice" type="tns:Price"/> + <xs:element name="TotalPrice" type="tns:Price"/> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="ChildTransactionItems" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element ref="tns:TransactionItem" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Seller"> + <xs:complexType> + <xs:sequence> + <xs:element name="SellerId" type="xs:string"/> + <xs:element name="SellerName" type="xs:string" minOccurs="0"/> + <xs:element name="SellerLegalName" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <aws-se:restricted xmlns:aws-se="http://webservices.amazon.com/AWS-SchemaExtensions"> + <aws-se:excludeFrom>public</aws-se:excludeFrom> + </aws-se:restricted> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="Nickname" type="xs:string" minOccurs="0"/> + <xs:element name="GlancePage" type="xs:string" minOccurs="0"/> + <xs:element name="About" type="xs:string" minOccurs="0"/> + <xs:element name="MoreAbout" type="xs:string" minOccurs="0"/> + <xs:element name="Location" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="UserDefinedLocation" type="xs:string" minOccurs="0"/> + <xs:element name="City" type="xs:string" minOccurs="0"/> + <xs:element name="State" type="xs:string" minOccurs="0"/> + <xs:element name="Country" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="AverageFeedbackRating" type="xs:decimal" minOccurs="0"/> + <xs:element name="TotalFeedback" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalFeedbackPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="SellerFeedbackSummary" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="FeedbackDateRange" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="SellerFeedbackRating" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="Count" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="Percentage" type="xs:nonNegativeInteger" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="Type" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="Period" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element ref="tns:SellerFeedback" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SellerFeedback"> + <xs:complexType> + <xs:sequence> + <xs:element name="Feedback" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="Rating" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="Comment" type="xs:string" minOccurs="0"/> + <xs:element name="Date" type="xs:string" minOccurs="0"/> + <xs:element name="RatedBy" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="Address"> + <xs:sequence> + <xs:element name="Name" type="xs:string" minOccurs="0"/> + <xs:element name="Address1" type="xs:string" minOccurs="0"/> + <xs:element name="Address2" type="xs:string" minOccurs="0"/> + <xs:element name="Address3" type="xs:string" minOccurs="0"/> + <xs:element name="City" type="xs:string" minOccurs="0"/> + <xs:element name="State" type="xs:string" minOccurs="0"/> + <xs:element name="PostalCode" type="xs:string" minOccurs="0"/> + <xs:element name="Country" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:element name="SellerListing"> + <xs:complexType> + <xs:sequence> + <xs:element name="ExchangeId" type="xs:string" minOccurs="0"/> + <xs:element name="ListingId" type="xs:string" minOccurs="0"/> + <xs:element name="ASIN" type="xs:string" minOccurs="0"/> + <xs:element name="SKU" type="xs:string" minOccurs="0"/> + <xs:element name="UPC" type="xs:string" minOccurs="0"/> + <xs:element name="EAN" type="xs:string" minOccurs="0"/> + <xs:element name="WillShipExpedited" type="xs:boolean" minOccurs="0"/> + <xs:element name="WillShipInternational" type="xs:boolean" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + <xs:element name="Price" type="tns:Price" minOccurs="0"/> + <xs:element name="StartDate" type="xs:string" minOccurs="0"/> + <xs:element name="EndDate" type="xs:string" minOccurs="0"/> + <xs:element name="Status" type="xs:string" minOccurs="0"/> + <xs:element name="Quantity" type="xs:string" minOccurs="0"/> + <xs:element name="Condition" type="xs:string" minOccurs="0"/> + <xs:element name="SubCondition" type="xs:string" minOccurs="0"/> + <xs:element ref="tns:Seller" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="Price"> + <xs:sequence> + <xs:element name="Amount" type="xs:integer" minOccurs="0"/> + <xs:element name="CurrencyCode" type="xs:string" minOccurs="0"/> + <xs:element name="FormattedPrice" type="xs:string"/> + </xs:sequence> + </xs:complexType> + <xs:element name="ImageSet"> + <xs:complexType> + <xs:sequence> + <xs:element name="SwatchImage" type="tns:Image" minOccurs="0"/> + <xs:element name="SmallImage" type="tns:Image" minOccurs="0"/> + <xs:element name="ThumbnailImage" type="tns:Image" minOccurs="0"/> + <xs:element name="TinyImage" type="tns:Image" minOccurs="0"/> + <xs:element name="MediumImage" type="tns:Image" minOccurs="0"/> + <xs:element name="LargeImage" type="tns:Image" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="Category" type="xs:string"/> + </xs:complexType> + </xs:element> + <xs:complexType name="Image"> + <xs:sequence> + <xs:element name="URL" type="xs:string"/> + <xs:element name="Height" type="tns:DecimalWithUnits"/> + <xs:element name="Width" type="tns:DecimalWithUnits"/> + <xs:element name="IsVerified" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:element name="ItemAttributes"> + <xs:complexType> + <xs:sequence> + <xs:element name="Actor" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="Address" type="tns:Address" minOccurs="0"/> + <xs:element name="AmazonMaximumAge" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="AmazonMinimumAge" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="AnalogVideoFormat" type="xs:string" minOccurs="0"/> + <xs:element name="ApertureModes" type="xs:string" minOccurs="0"/> + <xs:element name="Artist" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="AspectRatio" type="xs:string" minOccurs="0"/> + <xs:element name="AssemblyInstructions" type="xs:string" minOccurs="0"/> + <xs:element name="AssemblyRequired" type="xs:string" minOccurs="0"/> + <xs:element name="AudienceRating" type="xs:string" minOccurs="0"/> + <xs:element name="AudioFormat" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="BackFinding" type="xs:string" minOccurs="0"/> + <xs:element name="BandMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="BatteriesIncluded" type="xs:string" minOccurs="0"/> + <xs:element name="BatteriesRequired" type="xs:string" minOccurs="0"/> + <xs:element name="Batteries" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="BatteryDescription" type="xs:string" minOccurs="0"/> + <xs:element name="BatteryType" type="xs:string" minOccurs="0"/> + <xs:element name="BezelMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="Binding" type="xs:string" minOccurs="0"/> + <xs:element name="Brand" type="xs:string" minOccurs="0"/> + <xs:element name="CalendarType" type="xs:string" minOccurs="0"/> + <xs:element name="CameraManualFeatures" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="CaseDiameter" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="CaseMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="CaseThickness" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="CaseType" type="xs:string" minOccurs="0"/> + <xs:element name="CatalogNumber" type="xs:string" minOccurs="0"/> + <xs:element name="CDRWDescription" type="xs:string" minOccurs="0"/> + <xs:element name="ChainType" type="xs:string" minOccurs="0"/> + <xs:element name="CEROAgeRating" type="xs:string" minOccurs="0"/> + <xs:element name="ClaspType" type="xs:string" minOccurs="0"/> + <xs:element name="ClothingSize" type="xs:string" minOccurs="0"/> + <xs:element name="ClubType" type="xs:string" minOccurs="0"/> + <xs:element name="Color" type="xs:string" minOccurs="0"/> + <xs:element name="Compatibility" type="xs:string" minOccurs="0"/> + <xs:element name="CompatibleDevices" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ComputerHardwareType" type="xs:string" minOccurs="0"/> + <xs:element name="ComputerPlatform" type="xs:string" minOccurs="0"/> + <xs:element name="Connectivity" type="xs:string" minOccurs="0"/> + <xs:element name="ContinuousShootingSpeed" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Country" type="xs:string" minOccurs="0"/> + <xs:element name="CPUManufacturer" type="xs:string" minOccurs="0"/> + <xs:element name="CPUSpeed" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="CPUType" type="xs:string" minOccurs="0"/> + <xs:element name="Creator" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="Role" type="xs:string" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="Cuisine" type="xs:string" minOccurs="0"/> + <xs:element name="DataLinkProtocol" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="DeliveryOption" type="xs:string" minOccurs="0"/> + <xs:element name="DelayBetweenShots" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Department" type="xs:string" minOccurs="0"/> + <xs:element name="DeweyDecimalNumber" type="xs:string" minOccurs="0"/> + <xs:element name="DialColor" type="xs:string" minOccurs="0"/> + <xs:element name="DialWindowMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="DigitalZoom" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Director" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="DisplayColorSupport" type="xs:string" minOccurs="0"/> + <xs:element name="DisplaySize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="DrumSetPieceQuantity" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="DVDLayers" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="DVDRWDescription" type="xs:string" minOccurs="0"/> + <xs:element name="DVDSides" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="DPCI" type="xs:string" minOccurs="0"/> + <xs:element name="EAN" type="xs:string" minOccurs="0"/> + <xs:element name="Edition" type="xs:string" minOccurs="0"/> + <xs:element name="ESRBAgeRating" type="xs:string" minOccurs="0"/> + <xs:element name="ExternalDisplaySupportDescription" type="xs:string" minOccurs="0"/> + <xs:element name="FabricType" type="xs:string" minOccurs="0"/> + <xs:element name="FaxNumber" type="xs:string" minOccurs="0"/> + <xs:element name="Feature" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="FilmColorType" type="xs:string" minOccurs="0"/> + <xs:element name="FirstIssueLeadTime" type="tns:StringWithUnits" minOccurs="0"/> + <xs:element name="FloppyDiskDriveDescription" type="xs:string" minOccurs="0"/> + <xs:element name="Format" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="FormFactor" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="GemType" type="xs:string" minOccurs="0"/> + <xs:element name="Genre" type="xs:string" minOccurs="0"/> + <xs:element name="GLProductGroup" type="xs:string" minOccurs="0"/> + <xs:element name="GraphicsCardInterface" type="xs:string" minOccurs="0"/> + <xs:element name="GraphicsDescription" type="xs:string" minOccurs="0"/> + <xs:element name="GraphicsMemorySize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="GuitarAttribute" type="xs:string" minOccurs="0"/> + <xs:element name="GuitarBridgeSystem" type="xs:string" minOccurs="0"/> + <xs:element name="GuitarPickThickness" type="xs:string" minOccurs="0"/> + <xs:element name="GuitarPickupConfiguration" type="xs:string" minOccurs="0"/> + <xs:element name="HandOrientation" type="xs:string" minOccurs="0"/> + <xs:element name="HardDiskCount" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="HardDiskSize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="HardDiskInterface" type="xs:string" minOccurs="0"/> + <xs:element name="HardwarePlatform" type="xs:string" minOccurs="0"/> + <xs:element name="HasAutoFocus" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasBurstMode" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasInCameraEditing" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasRedEyeReduction" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasSelfTimer" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasTripodMount" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasVideoOut" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasViewfinder" type="xs:boolean" minOccurs="0"/> + <xs:element name="HazardousMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="HoursOfOperation" type="xs:string" minOccurs="0"/> + <xs:element name="IncludedSoftware" type="xs:string" minOccurs="0"/> + <xs:element name="IncludesMp3Player" type="xs:boolean" minOccurs="0"/> + <xs:element name="Ingredients" type="xs:string" minOccurs="0"/> + <xs:element name="InstrumentKey" type="xs:string" minOccurs="0"/> + <xs:element name="IsAdultProduct" type="xs:boolean" minOccurs="0"/> + <xs:element name="IsAutographed" type="xs:boolean" minOccurs="0"/> + <xs:element name="ISBN" type="xs:string" minOccurs="0"/> + <xs:element name="IsFragile" type="xs:boolean" minOccurs="0"/> + <xs:element name="IsLabCreated" type="xs:boolean" minOccurs="0"/> + <xs:element name="IsMemorabilia" type="xs:boolean" minOccurs="0"/> + <xs:element name="ISOEquivalent" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="IsPreannounce" type="xs:boolean" minOccurs="0"/> + <xs:element name="IssuesPerYear" type="xs:string" minOccurs="0"/> + <xs:element name="ItemDimensions" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="Height" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Length" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Weight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Width" type="tns:DecimalWithUnits" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="KeyboardDescription" type="xs:string" minOccurs="0"/> + <xs:element name="Label" type="xs:string" minOccurs="0"/> + <xs:element name="Languages" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Language" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="Name" type="xs:string"/> + <xs:element name="Type" type="xs:string" minOccurs="0"/> + <xs:element name="AudioFormat" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="LegalDisclaimer" type="xs:string" minOccurs="0"/> + <xs:element name="LensType" type="xs:string" minOccurs="0"/> + <xs:element name="LineVoltage" type="xs:string" minOccurs="0"/> + <xs:element name="ListPrice" type="tns:Price" minOccurs="0"/> + <xs:element name="MacroFocusRange" type="xs:string" minOccurs="0"/> + <xs:element name="MagazineType" type="xs:string" minOccurs="0"/> + <xs:element name="MalletHardness" type="xs:string" minOccurs="0"/> + <xs:element name="Manufacturer" type="xs:string" minOccurs="0"/> + <xs:element name="ManufacturerLaborWarrantyDescription" type="xs:string" minOccurs="0"/> + <xs:element name="ManufacturerMaximumAge" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="ManufacturerMinimumAge" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="ManufacturerPartsWarrantyDescription" type="xs:string" minOccurs="0"/> + <xs:element name="MaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="MaximumAperture" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MaximumColorDepth" type="xs:string" minOccurs="0"/> + <xs:element name="MaximumFocalLength" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MaximumHighResolutionImages" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="MaximumHorizontalResolution" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="MaximumLowResolutionImages" type="xs:string" minOccurs="0"/> + <xs:element name="MaximumResolution" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MaximumShutterSpeed" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MaximumVerticalResolution" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="MaximumWeightRecommendation" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MediaType" type="xs:string" minOccurs="0"/> + <xs:element name="MemorySlotsAvailable" type="xs:string" minOccurs="0"/> + <xs:element name="MetalStamp" type="xs:string" minOccurs="0"/> + <xs:element name="MetalType" type="xs:string" minOccurs="0"/> + <xs:element name="MiniMovieDescription" type="xs:string" minOccurs="0"/> + <xs:element name="MinimumFocalLength" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MinimumShutterSpeed" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Model" type="xs:string" minOccurs="0"/> + <xs:element name="ModelYear" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="ModemDescription" type="xs:string" minOccurs="0"/> + <xs:element name="MonitorSize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MonitorViewableDiagonalSize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MouseDescription" type="xs:string" minOccurs="0"/> + <xs:element name="MPN" type="xs:string" minOccurs="0"/> + <xs:element name="MusicalStyle" type="xs:string" minOccurs="0"/> + <xs:element name="NativeResolution" type="xs:string" minOccurs="0"/> + <xs:element name="Neighborhood" type="xs:string" minOccurs="0"/> + <xs:element name="NetworkInterfaceDescription" type="xs:string" minOccurs="0"/> + <xs:element name="NotebookDisplayTechnology" type="xs:string" minOccurs="0"/> + <xs:element name="NotebookPointingDeviceDescription" type="xs:string" minOccurs="0"/> + <xs:element name="NumberOfDiscs" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfIssues" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfItems" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfKeys" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfPearls" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfRapidFireShots" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfStones" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfStrings" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfTracks" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="OperatingSystem" type="xs:string" minOccurs="0"/> + <xs:element name="OpticalSensorResolution" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="OpticalZoom" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="OriginalReleaseDate" type="xs:string" minOccurs="0"/> + <xs:element name="OutputWattage" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="PackageDimensions" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="Height" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Length" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Weight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Width" type="tns:DecimalWithUnits" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="PackageQuantity" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="PearlLustre" type="xs:string" minOccurs="0"/> + <xs:element name="PearlMinimumColor" type="xs:string" minOccurs="0"/> + <xs:element name="PearlShape" type="xs:string" minOccurs="0"/> + <xs:element name="PearlStringingMethod" type="xs:string" minOccurs="0"/> + <xs:element name="PearlSurfaceBlemishes" type="xs:string" minOccurs="0"/> + <xs:element name="PearlType" type="xs:string" minOccurs="0"/> + <xs:element name="PearlUniformity" type="xs:string" minOccurs="0"/> + <xs:element name="PhoneNumber" type="xs:string" minOccurs="0"/> + <xs:element name="PhotoFlashType" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="PictureFormat" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="Platform" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="PriceRating" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="ProcessorCount" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="ProductGroup" type="xs:string" minOccurs="0"/> + <xs:element name="ProductSiteLaunchDate" type="xs:string" minOccurs="0"/> + <xs:element name="ProductTypeName" type="xs:string" minOccurs="0"/> + <xs:element name="ProductTypeSubcategory" type="xs:string" minOccurs="0"/> + <xs:element name="PromotionalTag" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:appinfo> + <aws-se:restricted xmlns:aws-se="http://webservices.amazon.com/AWS-SchemaExtensions"> + <aws-se:excludeFrom>public</aws-se:excludeFrom> + <aws-se:excludeFrom>partner</aws-se:excludeFrom> + </aws-se:restricted> + </xs:appinfo> + </xs:annotation> + </xs:element> + <xs:element name="PublicationDate" type="xs:string" minOccurs="0"/> + <xs:element name="Publisher" type="xs:string" minOccurs="0"/> + <xs:element name="POBoxShippingExcluded" type="xs:string" minOccurs="0"/> + <xs:element name="ReadingLevel" type="xs:string" minOccurs="0"/> + <xs:element name="ReturnMethod" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="RecorderTrackCount" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="RegionCode" type="xs:string" minOccurs="0"/> + <xs:element name="RegionOfOrigin" type="xs:string" minOccurs="0"/> + <xs:element name="ReturnPolicy" type="xs:string" minOccurs="0"/> + <xs:element name="ReleaseDate" type="xs:string" minOccurs="0"/> + <xs:element name="RemovableMemory" type="xs:string" minOccurs="0"/> + <xs:element name="RemovableStorage" type="xs:string" minOccurs="0"/> + <xs:element name="RequiredVoltageRange" type="xs:string" minOccurs="0"/> + <xs:element name="ResolutionModes" type="xs:string" minOccurs="0"/> + <xs:element name="RingSize" type="xs:string" minOccurs="0"/> + <xs:element name="RunningTime" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="ScentName" type="xs:string" minOccurs="0"/> + <xs:element name="SecondaryCacheSize" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="SettingType" type="xs:string" minOccurs="0"/> + <xs:element name="ShaftMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="Size" type="xs:string" minOccurs="0"/> + <xs:element name="SizePerPearl" type="xs:string" minOccurs="0"/> + <xs:element name="SkillLevel" type="xs:string" minOccurs="0"/> + <xs:element name="SKU" type="xs:string" minOccurs="0"/> + <xs:element name="SoldInStores" type="xs:string" minOccurs="0"/> + <xs:element name="SoundCardDescription" type="xs:string" minOccurs="0"/> + <xs:element name="SpeakerCount" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="SpeakerDescription" type="xs:string" minOccurs="0"/> + <xs:element name="SpecialFeatures" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="StoneClarity" type="xs:string" minOccurs="0"/> + <xs:element name="StoneColor" type="xs:string" minOccurs="0"/> + <xs:element name="StoneCut" type="xs:string" minOccurs="0"/> + <xs:element name="StoneShape" type="xs:string" minOccurs="0"/> + <xs:element name="StoneWeight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Studio" type="xs:string" minOccurs="0"/> + <xs:element name="Style" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionLength" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="SupportedImageType" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="SupportedMediaSize" type="xs:string" minOccurs="0"/> + <xs:element name="SystemBusSpeed" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="SystemMemorySizeMax" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="SystemMemorySize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="SystemMemoryType" type="xs:string" minOccurs="0"/> + <xs:element name="TellingPageIndicator" type="xs:string" minOccurs="0"/> + <xs:element name="TheatricalReleaseDate" type="xs:string" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + <xs:element name="TotalDiamondWeight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="TotalExternalBaysFree" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalFirewirePorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalGemWeight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="TotalInternalBaysFree" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalMetalWeight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="TotalNTSCPALPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalParallelPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPCCardSlots" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPCISlotsFree" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalSerialPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalSVideoOutPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalUSB2Ports" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalUSBPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalVGAOutPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="UPC" type="xs:string" minOccurs="0"/> + <xs:element name="VariationDenomination" type="xs:string" minOccurs="0"/> + <xs:element name="VariationDescription" type="xs:string" minOccurs="0"/> + <xs:element name="Warranty" type="xs:string" minOccurs="0"/> + <xs:element name="WatchMovementType" type="xs:string" minOccurs="0"/> + <xs:element name="WaterResistanceDepth" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="WEEETaxValue" type="tns:Price" minOccurs="0"/> + <xs:element name="WirelessMicrophoneFrequency" type="xs:nonNegativeInteger" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="MerchantItemAttributes"> + <xs:complexType> + <xs:sequence> + <xs:element name="Actor" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="Address" type="tns:Address" minOccurs="0"/> + <xs:element name="AmazonMaximumAge" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="AmazonMinimumAge" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="ApertureModes" type="xs:string" minOccurs="0"/> + <xs:element name="Artist" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="AspectRatio" type="xs:string" minOccurs="0"/> + <xs:element name="AssemblyInstructions" type="xs:string" minOccurs="0"/> + <xs:element name="AssemblyRequired" type="xs:string" minOccurs="0"/> + <xs:element name="AudienceRating" type="xs:string" minOccurs="0"/> + <xs:element name="AudioFormat" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="BackFinding" type="xs:string" minOccurs="0"/> + <xs:element name="BandMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="BatteriesIncluded" type="xs:string" minOccurs="0"/> + <xs:element name="BatteriesRequired" type="xs:string" minOccurs="0"/> + <xs:element name="Batteries" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="BatteryDescription" type="xs:string" minOccurs="0"/> + <xs:element name="BatteryType" type="xs:string" minOccurs="0"/> + <xs:element name="BezelMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="Binding" type="xs:string" minOccurs="0"/> + <xs:element name="Brand" type="xs:string" minOccurs="0"/> + <xs:element name="CalendarType" type="xs:string" minOccurs="0"/> + <xs:element name="CameraManualFeatures" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="CaseDiameter" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="CaseMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="CaseThickness" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="CaseType" type="xs:string" minOccurs="0"/> + <xs:element name="CatalogNumber" type="xs:string" minOccurs="0"/> + <xs:element name="CDRWDescription" type="xs:string" minOccurs="0"/> + <xs:element name="ChainType" type="xs:string" minOccurs="0"/> + <xs:element name="ClaspType" type="xs:string" minOccurs="0"/> + <xs:element name="ClothingSize" type="xs:string" minOccurs="0"/> + <xs:element name="Color" type="xs:string" minOccurs="0"/> + <xs:element name="Compatibility" type="xs:string" minOccurs="0"/> + <xs:element name="ComputerHardwareType" type="xs:string" minOccurs="0"/> + <xs:element name="ComputerPlatform" type="xs:string" minOccurs="0"/> + <xs:element name="Connectivity" type="xs:string" minOccurs="0"/> + <xs:element name="ContinuousShootingSpeed" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Country" type="xs:string" minOccurs="0"/> + <xs:element name="CountryOfOrigin" type="xs:string" minOccurs="0"/> + <xs:element name="CPUManufacturer" type="xs:string" minOccurs="0"/> + <xs:element name="CPUSpeed" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="CPUType" type="xs:string" minOccurs="0"/> + <xs:element name="Creator" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="Role" type="xs:string" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="Cuisine" type="xs:string" minOccurs="0"/> + <xs:element name="Customizable" type="xs:string" minOccurs="0"/> + <xs:element name="DelayBetweenShots" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="DeliveryOption" type="xs:string" minOccurs="0"/> + <xs:element name="Department" type="xs:string" minOccurs="0"/> + <xs:element name="Description" type="xs:string" minOccurs="0"/> + <xs:element name="DeweyDecimalNumber" type="xs:string" minOccurs="0"/> + <xs:element name="DialColor" type="xs:string" minOccurs="0"/> + <xs:element name="DialWindowMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="DigitalZoom" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Director" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="DisplaySize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="DrumSetPieceQuantity" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="DVDLayers" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="DVDRWDescription" type="xs:string" minOccurs="0"/> + <xs:element name="DVDSides" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="DPCI" type="xs:string" minOccurs="0"/> + <xs:element name="EAN" type="xs:string" minOccurs="0"/> + <xs:element name="Edition" type="xs:string" minOccurs="0"/> + <xs:element name="ESRBAgeRating" type="xs:string" minOccurs="0"/> + <xs:element name="ExternalDisplaySupportDescription" type="xs:string" minOccurs="0"/> + <xs:element name="FabricType" type="xs:string" minOccurs="0"/> + <xs:element name="FaxNumber" type="xs:string" minOccurs="0"/> + <xs:element name="Feature" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="FirstIssueLeadTime" type="tns:StringWithUnits" minOccurs="0"/> + <xs:element name="FloppyDiskDriveDescription" type="xs:string" minOccurs="0"/> + <xs:element name="Format" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="FixedShippingCharge" type="tns:Price" minOccurs="0"/> + <xs:element name="GemType" type="xs:string" minOccurs="0"/> + <xs:element name="GraphicsCardInterface" type="xs:string" minOccurs="0"/> + <xs:element name="GraphicsDescription" type="xs:string" minOccurs="0"/> + <xs:element name="GraphicsMemorySize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="GuitarAttribute" type="xs:string" minOccurs="0"/> + <xs:element name="GuitarBridgeSystem" type="xs:string" minOccurs="0"/> + <xs:element name="GuitarPickThickness" type="xs:string" minOccurs="0"/> + <xs:element name="GuitarPickupConfiguration" type="xs:string" minOccurs="0"/> + <xs:element name="HardDiskCount" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="HardDiskSize" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="HasAutoFocus" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasBurstMode" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasInCameraEditing" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasRedEyeReduction" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasSelfTimer" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasTripodMount" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasVideoOut" type="xs:boolean" minOccurs="0"/> + <xs:element name="HasViewfinder" type="xs:boolean" minOccurs="0"/> + <xs:element name="HazardousMaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="HoursOfOperation" type="xs:string" minOccurs="0"/> + <xs:element name="IncludedSoftware" type="xs:string" minOccurs="0"/> + <xs:element name="IncludesMp3Player" type="xs:boolean" minOccurs="0"/> + <xs:element name="Indications" type="xs:string" minOccurs="0"/> + <xs:element name="Ingredients" type="xs:string" minOccurs="0"/> + <xs:element name="InstrumentKey" type="xs:string" minOccurs="0"/> + <xs:element name="IsAutographed" type="xs:boolean" minOccurs="0"/> + <xs:element name="ISBN" type="xs:string" minOccurs="0"/> + <xs:element name="IsFragile" type="xs:boolean" minOccurs="0"/> + <xs:element name="IsLabCreated" type="xs:boolean" minOccurs="0"/> + <xs:element name="IsMemorabilia" type="xs:boolean" minOccurs="0"/> + <xs:element name="ISOEquivalent" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="IssuesPerYear" type="xs:string" minOccurs="0"/> + <xs:element name="ItemDimensions" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="Height" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Length" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Weight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Width" type="tns:DecimalWithUnits" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="KeyboardDescription" type="xs:string" minOccurs="0"/> + <xs:element name="Label" type="xs:string" minOccurs="0"/> + <xs:element name="Languages" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Language" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="Name" type="xs:string"/> + <xs:element name="Type" type="xs:string"/> + <xs:element name="AudioFormat" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="LegalDisclaimer" type="xs:string" minOccurs="0"/> + <xs:element name="LineVoltage" type="xs:string" minOccurs="0"/> + <xs:element name="ListPrice" type="tns:Price" minOccurs="0"/> + <xs:element name="MacroFocusRange" type="xs:string" minOccurs="0"/> + <xs:element name="MagazineType" type="xs:string" minOccurs="0"/> + <xs:element name="MalletHardness" type="xs:string" minOccurs="0"/> + <xs:element name="Manufacturer" type="xs:string" minOccurs="0"/> + <xs:element name="ManufacturerLaborWarrantyDescription" type="xs:string" minOccurs="0"/> + <xs:element name="ManufacturerMaximumAge" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="ManufacturerMinimumAge" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="ManufacturerPartsWarrantyDescription" type="xs:string" minOccurs="0"/> + <xs:element name="MaterialType" type="xs:string" minOccurs="0"/> + <xs:element name="MaximumAperture" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MaximumColorDepth" type="xs:string" minOccurs="0"/> + <xs:element name="MaximumFocalLength" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MaximumHighResolutionImages" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="MaximumHorizontalResolution" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="MaximumLowResolutionImages" type="xs:string" minOccurs="0"/> + <xs:element name="MaximumResolution" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MaximumShutterSpeed" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MaximumVerticalResolution" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="MaximumWeightRecommendation" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MemorySlotsAvailable" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="MetalStamp" type="xs:string" minOccurs="0"/> + <xs:element name="MetalType" type="xs:string" minOccurs="0"/> + <xs:element name="MiniMovieDescription" type="xs:string" minOccurs="0"/> + <xs:element name="MinimumFocalLength" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MinimumShutterSpeed" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Model" type="xs:string" minOccurs="0"/> + <xs:element name="ModelYear" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="ModemDescription" type="xs:string" minOccurs="0"/> + <xs:element name="MonitorSize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MonitorViewableDiagonalSize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="MouseDescription" type="xs:string" minOccurs="0"/> + <xs:element name="MPN" type="xs:string" minOccurs="0"/> + <xs:element name="MusicalStyle" type="xs:string" minOccurs="0"/> + <xs:element name="NativeResolution" type="xs:string" minOccurs="0"/> + <xs:element name="Neighborhood" type="xs:string" minOccurs="0"/> + <xs:element name="NetworkInterfaceDescription" type="xs:string" minOccurs="0"/> + <xs:element name="NotebookDisplayTechnology" type="xs:string" minOccurs="0"/> + <xs:element name="NotebookPointingDeviceDescription" type="xs:string" minOccurs="0"/> + <xs:element name="NumberOfDiscs" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfIssues" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfItems" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfKeys" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfPages" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfPearls" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfRapidFireShots" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfStones" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfStrings" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="NumberOfTracks" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="OpticalZoom" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="OriginalReleaseDate" type="xs:string" minOccurs="0"/> + <xs:element name="OutputWattage" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="PackageDimensions" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:sequence> + <xs:element name="Height" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Length" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Weight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Width" type="tns:DecimalWithUnits" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="PearlLustre" type="xs:string" minOccurs="0"/> + <xs:element name="PearlMinimumColor" type="xs:string" minOccurs="0"/> + <xs:element name="PearlShape" type="xs:string" minOccurs="0"/> + <xs:element name="PearlStringingMethod" type="xs:string" minOccurs="0"/> + <xs:element name="PearlSurfaceBlemishes" type="xs:string" minOccurs="0"/> + <xs:element name="PearlType" type="xs:string" minOccurs="0"/> + <xs:element name="PearlUniformity" type="xs:string" minOccurs="0"/> + <xs:element name="PhoneNumber" type="xs:string" minOccurs="0"/> + <xs:element name="PhotoFlashType" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="PictureFormat" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="Platform" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="PriceRating" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="ProcessorCount" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="ProductGroup" type="xs:string" minOccurs="0"/> + <xs:element name="PromotionalTag" type="xs:string" minOccurs="0"/> + <xs:element name="POBoxShippingExcluded" type="xs:string" minOccurs="0"/> + <xs:element name="PublicationDate" type="xs:string" minOccurs="0"/> + <xs:element name="Publisher" type="xs:string" minOccurs="0"/> + <xs:element name="PurchasingChannel" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ReadingLevel" type="xs:string" minOccurs="0"/> + <xs:element name="RecorderTrackCount" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="RegionCode" type="xs:string" minOccurs="0"/> + <xs:element name="RegionOfOrigin" type="xs:string" minOccurs="0"/> + <xs:element name="ReleaseDate" type="xs:string" minOccurs="0"/> + <xs:element name="ReturnMethod" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="RemovableMemory" type="xs:string" minOccurs="0"/> + <xs:element name="ResolutionModes" type="xs:string" minOccurs="0"/> + <xs:element name="ReturnPolicy" type="xs:string" minOccurs="0"/> + <xs:element name="RingSize" type="xs:string" minOccurs="0"/> + <xs:element name="SafetyWarning" type="xs:string" minOccurs="0"/> + <xs:element name="SalesRestriction" type="xs:string" minOccurs="0"/> + <xs:element name="SecondaryCacheSize" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="SettingType" type="xs:string" minOccurs="0"/> + <xs:element name="Size" type="xs:string" minOccurs="0"/> + <xs:element name="SKU" type="xs:string" minOccurs="0"/> + <xs:element name="SoldInStores" type="xs:string" minOccurs="0"/> + <xs:element name="SizePerPearl" type="xs:string" minOccurs="0"/> + <xs:element name="SkillLevel" type="xs:string" minOccurs="0"/> + <xs:element name="SoundCardDescription" type="xs:string" minOccurs="0"/> + <xs:element name="SpeakerCount" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="SpeakerDescription" type="xs:string" minOccurs="0"/> + <xs:element name="SpecialFeatures" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="StoneClarity" type="xs:string" minOccurs="0"/> + <xs:element name="StoneColor" type="xs:string" minOccurs="0"/> + <xs:element name="StoneCut" type="xs:string" minOccurs="0"/> + <xs:element name="StoneShape" type="xs:string" minOccurs="0"/> + <xs:element name="StoneWeight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="Studio" type="xs:string" minOccurs="0"/> + <xs:element name="SubscriptionLength" type="tns:NonNegativeIntegerWithUnits" minOccurs="0"/> + <xs:element name="SupportedImageType" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="SystemBusSpeed" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="SystemMemorySizeMax" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="SystemMemorySize" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="SystemMemoryType" type="xs:string" minOccurs="0"/> + <xs:element name="TellingPageIndicator" type="xs:string" minOccurs="0"/> + <xs:element name="TheatricalReleaseDate" type="xs:string" minOccurs="0"/> + <xs:element name="Title" type="xs:string" minOccurs="0"/> + <xs:element name="TotalDiamondWeight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="TotalExternalBaysFree" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalFirewirePorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalGemWeight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="TotalInternalBaysFree" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalMetalWeight" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="TotalNTSCPALPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalParallelPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPCCardSlots" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalPCISlotsFree" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalSerialPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalSVideoOutPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalUSB2Ports" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalUSBPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="TotalVGAOutPorts" type="xs:nonNegativeInteger" minOccurs="0"/> + <xs:element name="UPC" type="xs:string" minOccurs="0"/> + <xs:element name="VariationDenomination" type="xs:string" minOccurs="0"/> + <xs:element name="VariationDescription" type="xs:string" minOccurs="0"/> + <xs:element name="VendorRebate" minOccurs="0"> + <xs:complexType> + <xs:sequence> + <xs:element name="Type" type="xs:string" minOccurs="0"/> + <xs:element name="StartDate" type="xs:string" minOccurs="0"/> + <xs:element name="EndDate" type="xs:string" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Warranty" type="xs:string" minOccurs="0"/> + <xs:element name="WatchMovementType" type="xs:string" minOccurs="0"/> + <xs:element name="WebsiteBuyability" type="xs:string" minOccurs="0"/> + <xs:element name="WaterResistanceDepth" type="tns:DecimalWithUnits" minOccurs="0"/> + <xs:element name="WirelessMicrophoneFrequency" type="xs:nonNegativeInteger" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="NonNegativeIntegerWithUnits"> + <xs:simpleContent> + <xs:extension base="xs:nonNegativeInteger"> + <xs:attribute name="Units" type="xs:string" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="DecimalWithUnits"> + <xs:simpleContent> + <xs:extension base="xs:decimal"> + <xs:attribute name="Units" type="xs:string" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="StringWithUnits"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="Units" type="xs:string" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:simpleType name="positiveIntegerOrAll"> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:positiveInteger"/> + </xs:simpleType> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="All"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType --> + </xs:schema> + </types> + <!-- message name="HelpRequestMsg"> + <part name="body" element="tns:Help"/> + </message> + <message name="HelpResponseMsg"> + <part name="body" element="tns:HelpResponse"/> + </message> + <message name="ItemSearchRequestMsg"> + <part name="body" element="tns:ItemSearch"/> + </message> + <message name="ItemSearchResponseMsg"> + <part name="body" element="tns:ItemSearchResponse"/> + </message> + <message name="ItemLookupRequestMsg"> + <part name="body" element="tns:ItemLookup"/> + </message> + <message name="ItemLookupResponseMsg"> + <part name="body" element="tns:ItemLookupResponse"/> + </message> + <message name="BrowseNodeLookupRequestMsg"> + <part name="body" element="tns:BrowseNodeLookup"/> + </message> + <message name="BrowseNodeLookupResponseMsg"> + <part name="body" element="tns:BrowseNodeLookupResponse"/> + </message> + <message name="ListSearchRequestMsg"> + <part name="body" element="tns:ListSearch"/> + </message> + <message name="ListSearchResponseMsg"> + <part name="body" element="tns:ListSearchResponse"/> + </message> + <message name="ListLookupRequestMsg"> + <part name="body" element="tns:ListLookup"/> + </message> + <message name="ListLookupResponseMsg"> + <part name="body" element="tns:ListLookupResponse"/> + </message> + <message name="CustomerContentSearchRequestMsg"> + <part name="body" element="tns:CustomerContentSearch"/> + </message> + <message name="CustomerContentSearchResponseMsg"> + <part name="body" element="tns:CustomerContentSearchResponse"/> + </message> + <message name="CustomerContentLookupRequestMsg"> + <part name="body" element="tns:CustomerContentLookup"/> + </message> + <message name="CustomerContentLookupResponseMsg"> + <part name="body" element="tns:CustomerContentLookupResponse"/> + </message> + <message name="SimilarityLookupRequestMsg"> + <part name="body" element="tns:SimilarityLookup"/> + </message> + <message name="SimilarityLookupResponseMsg"> + <part name="body" element="tns:SimilarityLookupResponse"/> + </message> + <message name="SellerLookupRequestMsg"> + <part name="body" element="tns:SellerLookup"/> + </message> + <message name="SellerLookupResponseMsg"> + <part name="body" element="tns:SellerLookupResponse"/> + </message --> + <message name="CartGetRequestMsg"> + <part name="body" element="tns:CartGet"/> + </message> + <message name="CartGetResponseMsg"> + <part name="body" element="tns:CartGetResponse"/> + </message> + <message name="CartAddRequestMsg"> + <part name="body" element="tns:CartAdd"/> + </message> + <message name="CartAddResponseMsg"> + <part name="body" element="tns:CartAddResponse"/> + </message> + <message name="CartCreateRequestMsg"> + <part name="body" element="tns:CartCreate"/> + </message> + <message name="CartCreateResponseMsg"> + <part name="body" element="tns:CartCreateResponse"/> + </message> + <message name="CartModifyRequestMsg"> + <part name="body" element="tns:CartModify"/> + </message> + <message name="CartModifyResponseMsg"> + <part name="body" element="tns:CartModifyResponse"/> + </message> + <message name="CartClearRequestMsg"> + <part name="body" element="tns:CartClear"/> + </message> + <message name="CartClearResponseMsg"> + <part name="body" element="tns:CartClearResponse"/> + </message> + <!-- message name="TransactionLookupRequestMsg"> + <part name="body" element="tns:TransactionLookup"/> + </message> + <message name="TransactionLookupResponseMsg"> + <part name="body" element="tns:TransactionLookupResponse"/> + </message> + <message name="SellerListingSearchRequestMsg"> + <part name="body" element="tns:SellerListingSearch"/> + </message> + <message name="SellerListingSearchResponseMsg"> + <part name="body" element="tns:SellerListingSearchResponse"/> + </message> + <message name="SellerListingLookupRequestMsg"> + <part name="body" element="tns:SellerListingLookup"/> + </message> + <message name="SellerListingLookupResponseMsg"> + <part name="body" element="tns:SellerListingLookupResponse"/> + </message> + <message name="MultiOperationRequestMsg"> + <part name="body" element="tns:MultiOperation"/> + </message> + <message name="MultiOperationResponseMsg"> + <part name="body" element="tns:MultiOperationResponse"/> + </message --> + <portType name="AWSECommerceServicePortType"> + <!-- operation name="Help"> + <input message="tns:HelpRequestMsg"/> + <output message="tns:HelpResponseMsg"/> + </operation> + <operation name="ItemSearch"> + <input message="tns:ItemSearchRequestMsg"/> + <output message="tns:ItemSearchResponseMsg"/> + </operation> + <operation name="ItemLookup"> + <input message="tns:ItemLookupRequestMsg"/> + <output message="tns:ItemLookupResponseMsg"/> + </operation> + <operation name="BrowseNodeLookup"> + <input message="tns:BrowseNodeLookupRequestMsg"/> + <output message="tns:BrowseNodeLookupResponseMsg"/> + </operation> + <operation name="ListSearch"> + <input message="tns:ListSearchRequestMsg"/> + <output message="tns:ListSearchResponseMsg"/> + </operation> + <operation name="ListLookup"> + <input message="tns:ListLookupRequestMsg"/> + <output message="tns:ListLookupResponseMsg"/> + </operation> + <operation name="CustomerContentSearch"> + <input message="tns:CustomerContentSearchRequestMsg"/> + <output message="tns:CustomerContentSearchResponseMsg"/> + </operation> + <operation name="CustomerContentLookup"> + <input message="tns:CustomerContentLookupRequestMsg"/> + <output message="tns:CustomerContentLookupResponseMsg"/> + </operation> + <operation name="SimilarityLookup"> + <input message="tns:SimilarityLookupRequestMsg"/> + <output message="tns:SimilarityLookupResponseMsg"/> + </operation> + <operation name="SellerLookup"> + <input message="tns:SellerLookupRequestMsg"/> + <output message="tns:SellerLookupResponseMsg"/> + </operation --> + <operation name="CartGet"> + <input message="tns:CartGetRequestMsg"/> + <output message="tns:CartGetResponseMsg"/> + </operation> + <operation name="CartAdd"> + <input message="tns:CartAddRequestMsg"/> + <output message="tns:CartAddResponseMsg"/> + </operation> + <operation name="CartCreate"> + <input message="tns:CartCreateRequestMsg"/> + <output message="tns:CartCreateResponseMsg"/> + </operation> + <operation name="CartModify"> + <input message="tns:CartModifyRequestMsg"/> + <output message="tns:CartModifyResponseMsg"/> + </operation> + <operation name="CartClear"> + <input message="tns:CartClearRequestMsg"/> + <output message="tns:CartClearResponseMsg"/> + </operation> + <!-- operation name="TransactionLookup"> + <input message="tns:TransactionLookupRequestMsg"/> + <output message="tns:TransactionLookupResponseMsg"/> + </operation> + <operation name="SellerListingSearch"> + <input message="tns:SellerListingSearchRequestMsg"/> + <output message="tns:SellerListingSearchResponseMsg"/> + </operation> + <operation name="SellerListingLookup"> + <input message="tns:SellerListingLookupRequestMsg"/> + <output message="tns:SellerListingLookupResponseMsg"/> + </operation> + <operation name="MultiOperation"> + <input message="tns:MultiOperationRequestMsg"/> + <output message="tns:MultiOperationResponseMsg"/> + </operation --> + </portType> + <binding name="AWSECommerceServiceBinding" type="tns:AWSECommerceServicePortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <!-- operation name="Help"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="ItemSearch"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="ItemLookup"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="BrowseNodeLookup"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="ListSearch"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="ListLookup"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="CustomerContentSearch"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="CustomerContentLookup"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="SimilarityLookup"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="SellerLookup"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation --> + <operation name="CartGet"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="CartCreate"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="CartAdd"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="CartModify"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="CartClear"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <!-- operation name="TransactionLookup"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="SellerListingSearch"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="SellerListingLookup"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation> + <operation name="MultiOperation"> + <soap:operation soapAction="http://soap.amazon.com"/> + <input> + <soap:body use="literal"/> + </input> + <output> + <soap:body use="literal"/> + </output> + </operation --> + </binding> + <service name="ProxyService"> + <port name="AWSECommerceServicePort" binding="tns:AWSECommerceServiceBinding"> + <soap:address location="http://localhost:8080/ShoppingStoreServiceComponent"/> + </port> + </service> +</definitions> diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/README b/tags/java/sca/1.0-RC1/demos/bigbank-account/README new file mode 100644 index 0000000000..e3e1949da4 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/README @@ -0,0 +1,72 @@ +BigBank Demo +============ + +This application is made of 3 modules that represent the different aspects +of a fictitious banking application. Please see bigbank.png in the bigbank-account directory for a diagram of this demo. + +To run the bigbank-account demo you need to first run bigbank-calculator and bigbank-stockquote composites. This will bring up Tuscany runtime and load the two applications and make them available as services. Bigbank-account is dependent on these services. + +This demo uses ant. This is just one way of running this demo. + +Start Bigbank-calculator composite +---------------------------------- + +Bigbank-calculator is a calculator application which handles add, subtract, multiply and divide operations. Each of these operations is implemented in a different language, including JavaScript, groovy, Ruby and Python. + +To run the bigbank-calculator composite and make it available as a service for this demo do the following: + +cd bigbank-calculator +ant compile +ant run + +.. Leave the server running + +Note that 'ant compile' needs to be done the first time you run this demo out of the binary distribution. No need to do 'ant compile' from there on. + +Start Bigbank-stockquote +------------------------ + +A very simple web services based stock quote application which returns random +stock quotes on request. Please note that the stockquote service is not live and is implemented instead to allow for this application to always run without dependency on the availability of a webservice. + +cd bigbank-stockquote +ant compile +ant run + +.. Leave the server running + +Note that 'ant compile' needs to be done the first time you run this demo out of the binary distribution. No need to do 'ant compile' from there on. + +Start Bigbank-account +--------------------- + +Bigbank-account is entry point to this application running on Tuscany. Bigbank-account composite calls into bigbank-stockquote and bigbank-calculator services. Start bigbank-account in the following way: + +cd bigbank-account +ant compile +ant run + +.. Leave the server running + +Note that 'ant compile' needs to be done the first time you run this demo out ofthe binary distribution. No need to do 'ant compile' from there on. + +Run the demo +------------- +The front end of this demo application is a web app which users Json/RPC to communicate with the backend for retrieving account information. + +To try the app out point you browser at: + +http://localhost:8080/AccountJSON.html + +This should display an interface with a single button that goes and retrieves +a single set of account details exercising services across the three running +SCA applications. + +If you press on getAccountReport, you'll see a response posted, but the detail of the data will be displayed in the screen where you started bigbank-account. + + +Stop the demo +------------- +Go to each of the corresponding command line screens and hit 'enter'. This will stop each of the applications. + + diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/bigbank.png b/tags/java/sca/1.0-RC1/demos/bigbank-account/bigbank.png Binary files differnew file mode 100644 index 0000000000..985cc6bd05 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/bigbank.png diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/bigbank.svg b/tags/java/sca/1.0-RC1/demos/bigbank-account/bigbank.svg new file mode 100644 index 0000000000..6698b8cc9b --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/bigbank.svg @@ -0,0 +1,519 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="1052.3622" + height="744.09448" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.44" + sodipodi:docbase="C:\simon\Projects\Tuscany\java\java-0.91\demos\bigbank-account" + sodipodi:docname="bigbank.svg" + version="1.0" + inkscape:export-filename="C:\simon\Projects\Tuscany\java\java-0.91\demos\bigbank-account\bigbank.png" + inkscape:export-xdpi="105.68515" + inkscape:export-ydpi="105.68515"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.7" + inkscape:cx="668.70076" + inkscape:cy="413.94086" + inkscape:document-units="px" + inkscape:current-layer="layer1" + inkscape:window-width="1138" + inkscape:window-height="772" + inkscape:window-x="94" + inkscape:window-y="129" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <g + id="g2997" + transform="translate(-61.2386,-72.73099)"> + <rect + rx="7.8521242" + ry="17.265177" + y="192.00223" + x="258.31161" + height="334.34488" + width="257.31851" + id="rect2067" + style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.99999988;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <flowRoot + id="flowRoot2954" + xml:space="preserve"><flowRegion + id="flowRegion2956"><rect + y="212.66591" + x="281.42856" + height="61.42857" + width="170" + id="rect2958" /></flowRegion><flowPara + id="flowPara2960">Composite</flowPara><flowPara + id="flowPara1883">BigBank</flowPara></flowRoot> <flowRoot + id="flowRoot2315" + xml:space="preserve" + transform="translate(-185.101,71.92054)"><flowRegion + id="flowRegion2317"><rect + y="212.66591" + x="281.42856" + height="61.42857" + width="170" + id="rect2319" /></flowRegion><flowPara + id="flowPara2323">WebApp</flowPara></flowRoot> </g> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2988" + width="115.66247" + height="126.26909" + x="269.58636" + y="190.53091" + rx="6.9961648" + ry="10.475038" /> + <flowRoot + xml:space="preserve" + id="flowRoot2966" + transform="translate(1.99553,-15.40766)"><flowRegion + id="flowRegion2968"><rect + id="rect2970" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2972">Component </flowPara><flowPara + id="flowPara1885">Account</flowPara><flowPara + id="flowPara1887" /><flowPara + id="flowPara1889" /><flowPara + id="flowPara1891">Java</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 252.43583,222.37787 L 285.77087,222.37787 L 291.83178,235.50985 L 284.76072,247.63169 L 252.43583,247.63169 L 260.01198,235.50985 L 252.43583,222.37787 z " + id="path3017" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 365.68827,205.3873 L 399.02331,205.3873 L 405.08422,218.51928 L 398.01316,230.64112 L 365.68827,230.64112 L 373.26442,218.51928 L 365.68827,205.3873 z " + id="path3019" /> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 152.40866,209.21877 L 214.80502,209.21877 L 226.1498,236.00801 L 212.91422,260.73656 L 152.40866,260.73656 L 166.58966,236.00801 L 152.40866,209.21877 z " + id="path1893" /> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect1895" + width="115.66247" + height="85.862968" + x="272.53705" + y="351.65024" + rx="6.9961648" + ry="7.1230249" /> + <flowRoot + xml:space="preserve" + id="flowRoot1897" + transform="translate(4.94623,145.7117)"><flowRegion + id="flowRegion1899"><rect + id="rect1901" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1903">Component </flowPara><flowPara + id="flowPara1905">AccountData</flowPara><flowPara + id="flowPara1907" /><flowPara + id="flowPara1909" /><flowPara + id="flowPara1911">Java</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 255.38654,383.4972 L 288.72158,383.4972 L 294.78249,396.62918 L 287.71143,408.75102 L 255.38654,408.75102 L 262.96269,396.62918 L 255.38654,383.4972 z " + id="path1913" /> + <flowRoot + xml:space="preserve" + id="flowRoot1917" + transform="translate(-115.5876,5.278396)"><flowRegion + id="flowRegion1919"><rect + id="rect1921" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1931">binding.</flowPara><flowPara + id="flowPara1941">jsonrpc</flowPara></flowRoot> <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 426.15997,139.5181 L 490.26581,139.5181 L 501.9214,165.78205 L 488.32321,190.02572 L 426.15997,190.02572 L 440.72949,165.78205 L 426.15997,139.5181 z " + id="path1943" /> + <flowRoot + xml:space="preserve" + id="flowRoot1945" + transform="translate(161.03,-62.1275)" + inkscape:transform-center-y="51.51778" + inkscape:transform-center-x="-6.0609153"><flowRegion + id="flowRegion1947"><rect + id="rect1949" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1951">binding.</flowPara><flowPara + id="flowPara1953">ws</flowPara></flowRoot> <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 426.16,223.86592 L 490.26584,223.86592 L 501.92143,250.12987 L 488.32324,274.37354 L 426.16,274.37354 L 440.72952,250.12987 L 426.16,223.86592 z " + id="path1955" /> + <flowRoot + xml:space="preserve" + id="flowRoot1957" + transform="translate(161.03,22.22032)" + inkscape:transform-center-y="51.51778" + inkscape:transform-center-x="-6.0609153"><flowRegion + id="flowRegion1959"><rect + id="rect1961" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1963">binding.</flowPara><flowPara + id="flowPara1965">rmi</flowPara></flowRoot> <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 366.56099,240.53344 L 399.89603,240.53344 L 405.95694,253.66542 L 398.88588,265.78726 L 366.56099,265.78726 L 374.13714,253.66542 L 366.56099,240.53344 z " + id="path1967" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 365.55084,275.88877 L 398.88588,275.88877 L 404.94679,289.02075 L 397.87573,301.14259 L 365.55084,301.14259 L 373.12699,289.02075 L 365.55084,275.88877 z " + id="path1969" /> + <g + id="g1971" + transform="translate(439.292,-139.3494)"> + <rect + rx="7.8521242" + ry="7.8236527" + y="220.28642" + x="165.37758" + height="151.50719" + width="257.31851" + id="rect1973" + style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:1.99999976;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <flowRoot + id="flowRoot1975" + xml:space="preserve" + transform="translate(-109.0965,17.17259)"><flowRegion + id="flowRegion1977"><rect + y="212.66591" + x="281.42856" + height="61.42857" + width="170" + id="rect1979" /></flowRegion><flowPara + id="flowPara1981">Composite</flowPara><flowPara + id="flowPara1983">StockQuote</flowPara></flowRoot> <g + id="g2067" + transform="translate(-98.99495,207.0814)"> + <rect + rx="12.845777" + ry="17.265177" + y="192.00223" + x="258.31168" + height="334.34488" + width="420.96332" + id="rect2069" + style="opacity:1;fill:#90baf4;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <flowRoot + id="flowRoot2071" + xml:space="preserve" + transform="translate(-4.04061,-5.050763)"><flowRegion + id="flowRegion2073"><rect + y="212.66591" + x="281.42856" + height="61.42857" + width="170" + id="rect2075" /></flowRegion><flowPara + id="flowPara2077">Composite</flowPara><flowPara + id="flowPara2079">Calculator</flowPara></flowRoot> </g> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:1.99999988;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2081" + width="115.66247" + height="200.01021" + x="231.82996" + y="470.34314" + rx="6.9961648" + ry="16.592457" /> + <flowRoot + xml:space="preserve" + id="flowRoot2083" + transform="translate(-35.76085,264.4047)"><flowRegion + id="flowRegion2085"><rect + id="rect2087" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2089">Component </flowPara><flowPara + id="flowPara2091">Calculator</flowPara><flowPara + id="flowPara2093" /><flowPara + id="flowPara2095" /><flowPara + id="flowPara2097">Java</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 214.67944,502.19018 L 248.01448,502.19018 L 254.07539,515.32216 L 247.00433,527.444 L 214.67944,527.444 L 222.25559,515.32216 L 214.67944,502.19018 z " + id="path2099" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 327.93188,485.19961 L 361.26692,485.19961 L 367.32783,498.33159 L 360.25677,510.45343 L 327.93188,510.45343 L 335.50803,498.33159 L 327.93188,485.19961 z " + id="path2101" /> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 114.65227,489.03108 L 177.04863,489.03108 L 188.39341,515.82032 L 175.15784,540.54887 L 114.65227,540.54887 L 128.83327,515.82032 L 114.65227,489.03108 z " + id="path2103" /> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2105" + width="115.66247" + height="72.731003" + x="438.83148" + y="412.3407" + rx="6.9961648" + ry="6.0336223" /> + <flowRoot + xml:space="preserve" + id="flowRoot2107" + transform="translate(183.2407,206.4021)"><flowRegion + id="flowRegion2109"><rect + id="rect2111" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2113">Component </flowPara><flowPara + id="flowPara2115">Add</flowPara><flowPara + id="flowPara2119" /><flowPara + id="flowPara2121">Javascript</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 418.6505,435.09626 L 451.98554,435.09626 L 458.04645,448.22824 L 450.97539,460.35008 L 418.6505,460.35008 L 426.22665,448.22824 L 418.6505,435.09626 z " + id="path2123" /> + <flowRoot + xml:space="preserve" + id="flowRoot2125" + transform="translate(-153.344,285.0907)"><flowRegion + id="flowRegion2127"><rect + id="rect2129" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2131">binding.</flowPara><flowPara + id="flowPara2133">rmi</flowPara></flowRoot> <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 328.8046,531.45743 L 362.13964,531.45743 L 368.20055,544.58941 L 361.12949,556.71125 L 328.8046,556.71125 L 336.38075,544.58941 L 328.8046,531.45743 z " + id="path2159" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 329.81476,581.96505 L 363.1498,581.96505 L 369.21071,595.09703 L 362.13965,607.21887 L 329.81476,607.21887 L 337.39091,595.09703 L 329.81476,581.96505 z " + id="path2161" /> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2225" + width="115.66247" + height="72.731003" + x="438.39767" + y="491.58591" + rx="6.9961648" + ry="6.0336223" /> + <flowRoot + xml:space="preserve" + id="flowRoot2227" + transform="translate(182.8068,285.6473)"><flowRegion + id="flowRegion2229"><rect + id="rect2231" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2233">Component </flowPara><flowPara + id="flowPara2235">Subtract</flowPara><flowPara + id="flowPara2237" /><flowPara + id="flowPara2239">Ruby</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 418.21668,514.34147 L 451.55172,514.34147 L 457.61263,527.47345 L 450.54157,539.59529 L 418.21668,539.59529 L 425.79283,527.47345 L 418.21668,514.34147 z " + id="path2241" /> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2243" + width="115.66247" + height="72.731003" + x="438.39767" + y="569.36768" + rx="6.9961648" + ry="6.0336223" /> + <flowRoot + xml:space="preserve" + id="flowRoot2245" + transform="translate(182.8069,363.4291)"><flowRegion + id="flowRegion2247"><rect + id="rect2249" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2251">Component </flowPara><flowPara + id="flowPara2255">Multiply</flowPara><flowPara + id="flowPara2281" /><flowPara + id="flowPara2257">Python</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 418.21667,592.12321 L 451.55171,592.12321 L 457.61262,605.25519 L 450.54156,617.37703 L 418.21667,617.37703 L 425.79282,605.25519 L 418.21667,592.12321 z " + id="path2259" /> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2.00000024;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2261" + width="115.66247" + height="72.731003" + x="439.40784" + y="647.14941" + rx="6.9961648" + ry="6.0336223" /> + <flowRoot + xml:space="preserve" + id="flowRoot2263" + transform="translate(183.817,441.2108)"><flowRegion + id="flowRegion2265"><rect + id="rect2267" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2269">Component </flowPara><flowPara + id="flowPara2271">Divide</flowPara><flowPara + id="flowPara2273" /><flowPara + id="flowPara2275">Groovy</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 419.22682,669.90496 L 452.56186,669.90496 L 458.62277,683.03694 L 451.55171,695.15878 L 419.22682,695.15878 L 426.80297,683.03694 L 419.22682,669.90496 z " + id="path2277" /> + <path + style="fill:#ae62bf;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 328.29952,628.38036 L 361.63456,628.38036 L 367.69547,641.51234 L 360.62441,653.63418 L 328.29952,653.63418 L 335.87567,641.51234 L 328.29952,628.38036 z " + id="path2283" /> + </g> + <rect + style="fill:#317fed;fill-opacity:1;stroke:#060000;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect1985" + width="113.64217" + height="94.954361" + x="677.18286" + y="121.89223" + rx="6.9961648" + ry="10.475038" /> + <flowRoot + xml:space="preserve" + id="flowRoot1987" + transform="translate(409.5921,-84.04634)"><flowRegion + id="flowRegion1989"><rect + id="rect1991" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara1993">Component </flowPara><flowPara + id="flowPara1995">StockQuote</flowPara><flowPara + id="flowPara1997" /><flowPara + id="flowPara1999" /><flowPara + id="flowPara2001">Java</flowPara></flowRoot> <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 660.03239,153.73919 L 693.36743,153.73919 L 699.42834,166.87117 L 692.35728,178.99301 L 660.03239,178.99301 L 667.60854,166.87117 L 660.03239,153.73919 z " + id="path2003" /> + <path + style="fill:#5b9d05;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 560.00522,140.58009 L 622.40158,140.58009 L 633.74636,167.36933 L 620.51078,192.09788 L 560.00522,192.09788 L 574.18622,167.36933 L 560.00522,140.58009 z " + id="path2007" /> + <flowRoot + xml:space="preserve" + id="flowRoot2029" + transform="translate(292.009,-63.36024)"><flowRegion + id="flowRegion2031"><rect + id="rect2033" + width="171.01015" + height="76.580856" + x="281.42856" + y="212.66591" /></flowRegion><flowPara + id="flowPara2035">binding.</flowPara><flowPara + id="flowPara2037">ws</flowPara></flowRoot> <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 501.41636,164.26692 C 575.1575,165.27707 575.1575,165.27707 575.1575,165.27707" + id="path2285" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 633.74634,167.29737 C 667.08138,167.29737 667.08138,167.29737 667.08138,167.29737" + id="path2287" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 224.63456,235.98775 C 259.9899,235.98775 259.9899,235.98775 259.9899,235.98775" + id="path2289" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 403.43156,218.81515 L 412.52294,218.81515 L 412.52294,164.26692 L 439.79706,165.27707" + id="path2293" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 405.45187,254.17049 L 420.60416,254.17049 L 420.60416,250.12988 L 440.80721,251.14004" + id="path2295" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 404.44172,288.51568 L 419.59401,288.51568 L 419.59401,332.96239 L 225.64471,334.9827 L 226.65486,395.59185 L 262.01021,395.59185" + id="path2297" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 501.41636,249.11973 L 520.60926,249.11973 L 518.58895,377.4091 L 567.07628,377.4091" + id="path2299" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 625.66512,376.39895 L 660.01031,376.39895" + id="path2301" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 806.48243,359.22636 L 834.7667,359.22636 L 835.77685,309.72888 L 864.06112,308.71873" + id="path2303" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 807.49258,404.68322 L 840.82762,404.68322 L 840.82762,388.52078 L 864.06112,388.52078" + id="path2307" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 807.49258,455.19085 L 837.79716,455.19085 L 837.79716,467.31268 L 864.06112,467.31268" + id="path2309" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 805.47228,502.66802 L 833.75655,502.66802 L 833.75655,545.09443 L 865.07128,545.09443" + id="path2311" /> + <rect + style="opacity:0.35555558;fill:#9a8787;fill-opacity:1;stroke:#261c1c;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2313" + width="87.14286" + height="77.14286" + x="17.142859" + y="192.66591" + rx="10.859112" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 102.85714,235.52305 L 164.28571,235.52305" + id="path2327" /> + </g> +</svg> diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/build-dojo.xml b/tags/java/sca/1.0-RC1/demos/bigbank-account/build-dojo.xml new file mode 100644 index 0000000000..88aa0bd973 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/build-dojo.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project name="DojoZipInstaller">
+
+
+ <property name="dojo.version" value="0.9.0"/>
+ <property name="unpack.location" value="${basedir}/src/main/resources/web/dojo"/>
+
+
+ <target name="check-dojo-installed">
+ <condition property="already.installed" >
+ <available file="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"/>
+ </condition>
+ <condition property="maven.suffix" value="">
+ <os family="unix"/>
+ </condition>
+ <condition property="maven.suffix" value=".bat">
+ <os family="windows"/>
+ </condition>
+ </target>
+
+
+ <target name="check-dojo-unpacked">
+ <condition property="already.unpacked" >
+ <available file="${unpack.location}"/>
+ </condition>
+ </target>
+
+ <target name="install-dojo" depends="check-dojo-installed" unless="already.installed">
+ <mkdir dir="${basedir}/target/dojo-download/"/>
+ <get src="http://download.dojotoolkit.org/release-${dojo.version}/dojo-release-${dojo.version}.zip"
+ dest="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"
+ verbose="true"
+ usetimestamp="true"/>
+ <exec executable="mvn${maven.suffix}" dir="${basedir}" failonerror="false">
+ <arg line="install:install-file -DgroupId=dojo -DartifactId=dojo -Dversion=${dojo.version} -Dpackaging=zip -DgeneratePom=true -Dfile=${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"/>
+ </exec>
+ </target>
+
+ <target name="install-dojo-nomaven" depends="check-dojo-installed" unless="already.installed">
+ <mkdir dir="${basedir}/target/dojo-download/"/>
+ <get src="http://download.dojotoolkit.org/release-${dojo.version}/dojo-release-${dojo.version}.zip"
+ dest="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"
+ verbose="true"
+ usetimestamp="true"/>
+ <copy file="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"
+ tofile="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"/>
+ </target>
+
+
+ <target name="unpack-dojo-files" depends="check-dojo-installed, check-dojo-unpacked" unless="already.unpacked">
+ <fail message="dojo zip file not installed in local repository: ${localRepository}" unless="already.installed"/>
+ <mkdir dir="${basedir}/target/dojo-unpack-temp/"/>
+ <unzip src="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"
+ dest="${basedir}/target/dojo-unpack-temp/"
+ overwrite="false">
+ <patternset>
+ <include name="dojo-release-${dojo.version}/dojo/**"/>
+ <exclude name="dojo-release-${dojo.version}/dojo/tests/**"/>
+ <include name="dojo-release-${dojo.version}/dijit/**"/>
+ <exclude name="dojo-release-${dojo.version}/dojox/**"/>
+ <exclude name="dojo-release-${dojo.version}/util/**"/>
+ </patternset>
+ </unzip>
+ <move file="${basedir}/target/dojo-unpack-temp/dojo-release-${dojo.version}"
+ tofile="${unpack.location}"
+ verbose="true"/>
+ <delete dir="${basedir}/target/dojo-unpack-temp/"/>
+ </target>
+
+
+ <target name="clean-dojo-files">
+ <delete dir="${unpack.location}"/>
+ </target>
+</project>
diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/build.xml b/tags/java/sca/1.0-RC1/demos/bigbank-account/build.xml new file mode 100644 index 0000000000..c012c283bd --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/build.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project name="bigbank-account" default="run"> + <property name="localRepository" value="./target/repo" /> + <property name="artifactId" value="demo-bigbank-account" /> + <property name="test.class" value="bigbank.demo.BigBankServer" /> + + <path id="test.classpath"> + <pathelement location="target/classes"/> + <pathelement location="../../modules/tuscany-host-jetty-1.0-incubating.jar"/> + <pathelement location="../../modules/tuscany-binding-jsonrpc-1.0-incubating.jar"/> + <pathelement location="../../modules/tuscany-binding-rmi-1.0-incubating.jar"/> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + <pathelement location="target/demo-bigbank-account.jar"/> + </path> + + <target name="init"> + <mkdir dir="target/classes"/> + <mkdir dir="target/classes/web"/> + <mkdir dir="target/repo"/> + </target> + + <target name="dojo" depends="init"> + <ant antfile="./build-dojo.xml" target="install-dojo-nomaven"> + <property name="localRepository" value="${settings.localRepository}"/> + </ant> + + <ant antfile="./build-dojo.xml" target="unpack-dojo-files"> + <property name="localRepository" value="${settings.localRepository}"/> + <property name="artifactId" value="${artifactId}"/> + </ant> + </target> + + <target name="compile" depends="dojo"> + <javac srcdir="src/main/java" + destdir="target/classes" + debug="on" + source="1.5" + target="1.5"> + <classpath> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + </classpath> + </javac> + <copy todir="target/classes"> + <fileset dir="src/main/resources"/> + </copy> + <jar destfile="target/demo-bigbank-account.jar" basedir="target/classes"> + <manifest> + <attribute name="Main-Class" value="${test.class}" /> + </manifest> + </jar> + </target> + + <target name="run" depends="compile"> + <java classname="${test.class}" + fork="true"> + <classpath> + <path refid="test.classpath"/> + </classpath> + </java> + </target> + +</project> diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/pom.xml b/tags/java/sca/1.0-RC1/demos/bigbank-account/pom.xml new file mode 100644 index 0000000000..480d2ba4f5 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/pom.xml @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-demos</artifactId> + <version>1.0-incubating</version> + <relativePath>../pom.xml</relativePath> + </parent> + <artifactId>demo-bigbank-account</artifactId> + <packaging>jar</packaging> + <name>Apache Tuscany SCA BigBank Account Demo</name> + + <repositories> + <repository> + <id>apache.incubator</id> + <url>http://people.apache.org/repo/m2-incubating-repository</url> + </repository> + </repositories> + + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-embedded</artifactId> + <version>1.0-incubating</version> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-feed</artifactId> + <version>1.0-incubating</version> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-java-runtime</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-ws-axis2</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-jsonrpc</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-rmi</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-resource</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-http</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-jetty</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.2</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <build> + <finalName>demo-bigbank-account</finalName> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + + <dependencies> + <dependency> + <groupId>ant</groupId> + <artifactId>ant-trax</artifactId> + <version>1.6.5</version> + </dependency> + </dependencies> + + <executions> + <execution> + <id>install-dojo</id> + <phase>validate</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <ant antfile="./build-dojo.xml" target="install-dojo"> + <property name="localRepository" value="${settings.localRepository}"/> + </ant> + </tasks> + </configuration> + </execution> + <execution> + <id>copy-dojo-files</id> + <phase>generate-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <ant antfile="./build-dojo.xml" target="unpack-dojo-files"> + <property name="localRepository" value="${settings.localRepository}"/> + <property name="artifactId" value="${artifactId}"/> + </ant> + </tasks> + </configuration> + </execution> + <execution> + <id>clean-dojo-files</id> + <phase>clean</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <ant antfile="./build-dojo.xml" target="clean-dojo-files"> + <property name="localRepository" value="${settings.localRepository}"/> + <property name="artifactId" value="${artifactId}"/> + </ant> + </tasks> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + +</project> diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/account/AccountService.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/account/AccountService.java new file mode 100644 index 0000000000..2cb8027874 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/account/AccountService.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package bigbank.account; + +import org.osoa.sca.annotations.Remotable; + +/** + * @version $$Rev$$ $$Date$$ + */ + +@Remotable +public interface AccountService { + + public double getAccountReport(String customerID); + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/account/AccountServiceImpl.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/account/AccountServiceImpl.java new file mode 100644 index 0000000000..4f1afee204 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/account/AccountServiceImpl.java @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package bigbank.account; + +import org.osoa.sca.annotations.Property; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +import stockquote.StockQuoteService; +import bigbank.accountdata.AccountDataService; +import bigbank.accountdata.CheckingAccount; +import bigbank.accountdata.SavingsAccount; +import bigbank.accountdata.StockAccount; +import calculator.CalculatorService; + +/** + * @version $$Rev$$ $$Date$$ + */ + +@Service(AccountService.class) +public class AccountServiceImpl implements AccountService { + + @Reference + protected AccountDataService accountDataService; + + @Reference + protected StockQuoteService stockQuoteService; + + @Reference + protected CalculatorService calculatorService; + + @Property + protected String currency; + + public double getAccountReport(String customerID) { + + // Get the checking, savings and stock accounts from the AccountData + // service component + CheckingAccount checking = accountDataService.getCheckingAccount(customerID); + System.out.println("Checking account: " + checking); + + SavingsAccount savings = accountDataService.getSavingsAccount(customerID); + System.out.println("Savings account: " + savings); + + StockAccount stock = accountDataService.getStockAccount(customerID); + System.out.println("Stock account: " + stock); + + // Get the stock price in USD + double price = stockQuoteService.getQuote(stock.getSymbol()); + System.out.println("Stock price for " + stock.getSymbol() + ": " + price); + + // Convert to the configured currency + if (currency.equals("EURO")) { + + // Use our fancy calculator service to convert to the target currency + price = calculatorService.multiply(price, 0.70); + + System.out.println("Converted to " + currency + ": " + price); + } + + // Calculate the value of the stock account + double stockValue = price * stock.getQuantity(); + + // Calculate the total balance of all accounts and return it + double balance = checking.getBalance() + savings.getBalance() + stockValue; + + return balance; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/account/feed/AccountFeedImpl.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/account/feed/AccountFeedImpl.java new file mode 100644 index 0000000000..c17e9ada20 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/account/feed/AccountFeedImpl.java @@ -0,0 +1,95 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package bigbank.account.feed; + +import java.util.Collections; + +import org.apache.tuscany.sca.binding.feed.collection.Collection; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +import bigbank.account.AccountService; + +import com.sun.syndication.feed.atom.Content; +import com.sun.syndication.feed.atom.Entry; +import com.sun.syndication.feed.atom.Feed; +import com.sun.syndication.feed.atom.Link; + +/** + * @version $$Rev$$ $$Date$$ + */ + +@Service(Collection.class) +public class AccountFeedImpl implements Collection { + + @Reference + protected AccountService accountService; + + @SuppressWarnings("unchecked") + public com.sun.syndication.feed.atom.Feed getFeed() { + + // Create a new Feed + Feed feed = new Feed(); + feed.setId("accounts"); + feed.setTitle("Account Report Feed"); + Content subtitle = new Content(); + subtitle.setValue("This is a sample feed"); + feed.setSubtitle(subtitle); + Link link = new Link(); + link.setHref("http://incubator.apache.org/tuscany"); + feed.getAlternateLinks().add(link); + + // Add the Account report entry + Entry entry = get("1234"); + feed.getEntries().add(entry); + + return feed; + } + + public void delete(String id) { + } + + public Entry get(String id) { + + // Get the account report for the specified customer ID + double balance = accountService.getAccountReport(id); + String value = Double.toString(balance); + + Entry entry = new Entry(); + entry.setId("account-" + id); + entry.setTitle("Account Report Entry"); + Content summary = new Content(); + summary.setType(Content.HTML); + summary.setValue("This is your account report: <b>" + value + "</b>"); + entry.setSummary(summary); + Content content = new Content(); + content.setValue(value); + entry.setContents(Collections.singletonList(content)); + return entry; + } + + public Entry post(Entry entry) { + return null; + } + + public Entry put(String id, Entry entry) { + return null; + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataService.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataService.java new file mode 100644 index 0000000000..02f4d0e7b6 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataService.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package bigbank.accountdata; + +/** + * @version $$Rev$$ $$Date$$ + */ + +public interface AccountDataService { + + public CheckingAccount getCheckingAccount(String customerID); + + public SavingsAccount getSavingsAccount(String customerID); + + public StockAccount getStockAccount(String customerID); + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java new file mode 100644 index 0000000000..2e1290aa5f --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package bigbank.accountdata; + +import org.osoa.sca.annotations.Service; + +/** + * @version $$Rev$$ $$Date$$ + */ + +@Service(AccountDataService.class) +public class AccountDataServiceImpl implements AccountDataService { + + public CheckingAccount getCheckingAccount(String customerID) { + + CheckingAccount checkingAccount = new CheckingAccount(); + checkingAccount.setAccountNumber("CHA_" + customerID); + checkingAccount.setBalance(500.0f); + + return checkingAccount; + } + + public SavingsAccount getSavingsAccount(String customerID) { + + SavingsAccount savingsAccount = new SavingsAccount(); + savingsAccount.setAccountNumber("SAA_" + customerID); + savingsAccount.setBalance(1500.0f); + + return savingsAccount; + } + + public StockAccount getStockAccount(String customerID) { + + StockAccount stockAccount = new StockAccount(); + stockAccount.setAccountNumber("STA_" + customerID); + stockAccount.setSymbol("IBM"); + stockAccount.setQuantity(100); + + return stockAccount; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/CheckingAccount.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/CheckingAccount.java new file mode 100644 index 0000000000..c53d8b4576 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/CheckingAccount.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package bigbank.accountdata; + +/** + * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr + * 2007) $$ + */ + +public class CheckingAccount { + private String accountNumber; + private double balance; + + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String n) { + this.accountNumber = n; + } + + public double getBalance() { + return balance; + } + + public void setBalance(double b) { + this.balance = b; + } + + @Override + public String toString() { + return accountNumber + ", balance:" + balance; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/SavingsAccount.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/SavingsAccount.java new file mode 100644 index 0000000000..f4c7442f30 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/SavingsAccount.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package bigbank.accountdata; + +/** + * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr + * 2007) $$ + */ + +public class SavingsAccount { + private String accountNumber; + private double balance; + + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String n) { + this.accountNumber = n; + } + + public double getBalance() { + return balance; + } + + public void setBalance(double b) { + this.balance = b; + } + + @Override + public String toString() { + return accountNumber + ", balance:" + balance; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/StockAccount.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/StockAccount.java new file mode 100644 index 0000000000..c28e0b59a7 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/accountdata/StockAccount.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package bigbank.accountdata; + +/** + * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr + * 2007) $$ + */ + +public class StockAccount { + private String accountNumber; + private String symbol; + private int quantity; + + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String n) { + this.accountNumber = n; + } + + public double getQuantity() { + return quantity; + } + + public void setQuantity(int a) { + this.quantity = a; + } + + public String getSymbol() { + return symbol; + } + + public void setSymbol(String s) { + this.symbol = s; + } + + @Override + public String toString() { + return accountNumber + ", symbol:" + symbol + ", quantity:" + quantity; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/client/BigBankClient.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/client/BigBankClient.java new file mode 100644 index 0000000000..a7fa5ecc22 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/client/BigBankClient.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package bigbank.client; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +import bigbank.account.AccountService; + +/** + * This client program shows how to create an SCA runtime, start it, + * and locate and invoke a SCA component + */ +public class BigBankClient { + + public static void main(String[] args) throws Exception { + + SCADomain domain = SCADomain.newInstance("BigBank.composite"); + + AccountService accountService = domain.getService(AccountService.class, "AccountServiceComponent"); + + String customerID = "1234"; + + System.out.println("Calling account service for customer: " + customerID); + System.out.println(); + double balance = accountService.getAccountReport(customerID); + + System.out.println(); + System.out.println("Balance: " + balance); + + domain.close(); + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/demo/BigBankServer.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/demo/BigBankServer.java new file mode 100644 index 0000000000..89b6aeadc4 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/bigbank/demo/BigBankServer.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package bigbank.demo; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * This client program shows how to create an SCA runtime, start it, + * and locate and invoke a SCA component + */ +public class BigBankServer { + + public static void main(String[] args) throws Exception { + long timeout = -1L; + if (args.length > 0) { + timeout = Long.parseLong(args[0]); + } + System.out.println("Starting the Sample SCA BigBank server..."); + + SCADomain domain = SCADomain.newInstance("BigBank.composite"); + + if (timeout < 0) { + System.out.println("Press Enter to Exit..."); + System.in.read(); + } else { + Thread.sleep(timeout); + } + + domain.close(); + + System.out.println("Bye"); + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/calculator/CalculatorService.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/calculator/CalculatorService.java new file mode 100644 index 0000000000..c89043276e --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/calculator/CalculatorService.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package calculator; + +/** + * The Calculator service interface. + */ +public interface CalculatorService { + + double add(double n1, double n2); + + double subtract(double n1, double n2); + + double multiply(double n1, double n2); + + double divide(double n1, double n2); + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/stockquote/StockQuoteService.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/stockquote/StockQuoteService.java new file mode 100644 index 0000000000..749b8ee2f4 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/java/stockquote/StockQuoteService.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package stockquote; + +import org.osoa.sca.annotations.Remotable; + +/** + * This is the business interface of the StockQuote service. + */ +@Remotable +public interface StockQuoteService { + public double getQuote(String symbol); +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/AccountData.composite b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/AccountData.composite new file mode 100644 index 0000000000..c254ca95a8 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/AccountData.composite @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + targetNamespace="http://bigbank" + xmlns:bb="http://bigbank" + name="AccountData"> + + <service name="AccountDataService" promote="AccountDataServiceComponent"> + <interface.java interface="bigbank.accountdata.AccountDataService"/> + </service> + + <component name="AccountDataServiceComponent"> + <implementation.java class="bigbank.accountdata.AccountDataServiceImpl"/> + </component> + +</composite> diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/BigBank.composite b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/BigBank.composite new file mode 100644 index 0000000000..d7bf32c6ea --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/BigBank.composite @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" + targetNamespace="http://bigbank" + xmlns:bb="http://bigbank" + name="BigBank"> + + <component name="AccountServiceComponent"> + <service name="AccountService"> + <tuscany:binding.jsonrpc uri="/AccountJSONService"/> + <binding.ws wsdlElement="http://bigbank#wsdl.port(AccountService/AccountServiceSoap)"/> + <binding.sca/> + </service> + + <implementation.java class="bigbank.account.AccountServiceImpl"/> + + <reference name="accountDataService" target="AccountDataServiceComponent"/> + <reference name="calculatorService"> + <tuscany:binding.rmi host="localhost" port="8099" serviceName="CalculatorRMIService"/> + </reference> + <reference name="stockQuoteService"> + <binding.ws uri="http://localhost:8081/services/StockQuoteWebService"/> + </reference> + + <property name="currency">EURO</property> + </component> + + <component name="AccountFeedComponent"> + <service name="Collection"> + <tuscany:binding.rss uri="/rss"/> + <tuscany:binding.atom uri="/atom"/> + </service> + <implementation.java class="bigbank.account.feed.AccountFeedImpl"/> + <reference name="accountService" target="AccountServiceComponent"/> + </component> + + <component name="AccountDataServiceComponent"> + <implementation.composite name="bb:AccountData"/> + </component> + + <component name="WebResourceComponent"> + <service name="Resource"> + <tuscany:binding.http uri="/"/> + </service> + <tuscany:implementation.resource location="web"/> + </component> + +</composite> diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/web/AccountJSON.html b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/web/AccountJSON.html new file mode 100644 index 0000000000..1609bf4b43 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/web/AccountJSON.html @@ -0,0 +1,92 @@ +<html> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + --> +<head> +<title>Tuscany JSON-RPC BigBank Client</TITLE> + +<script type="text/javascript"> + var djConfig = {isDebug: true,debugContainerId: "dojoDebug" }; + djConfig.usePlainJson=true ; + //djConfig.debugAtAllCosts = true; + </script> +<script type="text/javascript" src="dojo/dojo/dojo.js"> + </script> +<script type="text/javascript" src="dojo/dijit/dijit.js"> + </script> + +<script type="text/javascript"> + dojo.require("dijit.form.Button"); + dojo.require("dojo.rpc.JsonService"); + </script> + +<link rel="stylesheet" type="text/css" href="style.css" /> +</head> + +<body> + +<table> + <tr> + <th colspan="2">Tuscany JSON-RPC BigBank Client</th> + </tr> + <tr> + <td colspan="2"> + <p>This example uses the <a href="http://dojotoolkit.org/">Dojo + Toolkit</a> to create a JavaScript object <code>accountService</code> for + the service at <b>http://localhost:8080/AccountJSONService</b> using <a + href="http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book9">Dojo's + RPC classes</a> and providing them with <a href="AccountJSONService?smd">http://localhost:8080/AccountJSONService?smd</a> + for <a href="http://dojo.jot.com/SMD">Simple Method Description + (SMD)</a> input.</p> + <p>It then creates a Dojo button that will envoke the <code>getAccountReport</code> + method of the <code>accountService</code> object.</p> + </tr> + <tr> + <td>Request</td> + <td>Response</td> + </tr> + <tr> + <td><br> + <button id="myaccount" dojoType="dijit.form.Button" + onClick='accountService.getAccountReport("Dojo1234").addCallback(contentCallBack);'>getAccountReport("Dojo1234")</button> + <br> + </td> + <td> + <div id="ReturnedContent">None Yet.</div> + </td> + </tr> + <tr> + <td colspan="2"> + <div id="dojoDebug">Dojo Debug:</div> + </td> + </tr> +</table> + +<script type="text/javascript"> + + function contentCallBack(result) { + var handlerNode = document.getElementById("ReturnedContent"); + handlerNode.innerHTML = "<p>" + result + "</p>" ; + } + + var accountService = new dojo.rpc.JsonService("AccountJSONService?smd"); + + </script> + +</body> +</html> diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/web/style.css b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/web/style.css new file mode 100644 index 0000000000..1071583264 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/web/style.css @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +* { font-family: arial; } + +table, th, td { border: 2px solid blue; border-collapse: collapse; } +th { color: white; background-color: blue; } diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl new file mode 100644 index 0000000000..ac4d987a57 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/main/resources/wsdl/AccountService.wsdl @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:tns="http://bigbank" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://bigbank" + name="AccountService"> + + <wsdl:types> + <xsd:schema + targetNamespace="http://bigbank" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:element name="getAccountReport"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="customerID" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="getAccountReportResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="balance" type="xsd:double" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + </xsd:schema> + </wsdl:types> + + <wsdl:message name="getAccountReportRequest"> + <wsdl:part element="tns:getAccountReport" + name="getAccountReportRequest" /> + </wsdl:message> + + <wsdl:message name="getAccountReportResponse"> + <wsdl:part element="tns:getAccountReportResponse" + name="getAccountReportResponse" /> + </wsdl:message> + + <wsdl:portType name="AccountService"> + <wsdl:operation name="getAccountReport"> + <wsdl:input message="tns:getAccountReportRequest" /> + <wsdl:output message="tns:getAccountReportResponse" /> + </wsdl:operation> + </wsdl:portType> + + <wsdl:binding name="AccountServiceSoap" type="tns:AccountService"> + <soap:binding style="document" + transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="getAccountReport"> + <soap:operation + soapAction="" /> + <wsdl:input> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap:body use="literal" /> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + + <wsdl:service name="AccountService"> + <wsdl:port binding="tns:AccountServiceSoap" + name="AccountServiceSoap"> + <soap:address + location="http://localhost:8082/services/AccountWebService" /> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-account/src/test/java/test/BigBankTestCase.java b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/test/java/test/BigBankTestCase.java new file mode 100644 index 0000000000..b9979d90e4 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-account/src/test/java/test/BigBankTestCase.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package test; + +import junit.framework.TestCase; + +import bigbank.demo.BigBankServer; + +/** + * @version $Rev$ $Date$ + */ +public class BigBankTestCase extends TestCase { + + public void testServer() throws Exception { + BigBankServer.main(new String[] {"1000"}); + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/README b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/README new file mode 100644 index 0000000000..f97a1af098 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/README @@ -0,0 +1,3 @@ +bigbank-calculator is part of a larger demo called bigbank-account. Please see the Readme file under bigbank-account to understand how bigbank-calculator fits into the overall demo. + + diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/build.xml b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/build.xml new file mode 100644 index 0000000000..483f2d3b91 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/build.xml @@ -0,0 +1,62 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project name="calculator" default="run"> + <property name="test.class" value="calculator.demo.CalculatorServer" /> + + <path id="test.classpath"> + <pathelement location="../../modules/tuscany-binding-rmi-1.0-incubating.jar"/> + <pathelement path="target/demo-bigbank-calculator.jar"/> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + </path> + + <target name="init"> + <mkdir dir="target/classes"/> + </target> + + <target name="compile" depends="init"> + <javac srcdir="src/main/java" + destdir="target/classes" + debug="on" + source="1.5" + target="1.5"> + <classpath> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + </classpath> + </javac> + <copy todir="target/classes"> + <fileset dir="src/main/resources"/> + </copy> + <jar destfile="target/demo-bigbank-calculator.jar" basedir="target/classes"> + <manifest> + <attribute name="Main-Class" value="${test.class}" /> + </manifest> + </jar> + </target> + + <target name="run"> + <java classname="${test.class}" + fork="true"> + <classpath> + <path refid="test.classpath"/> + </classpath> + </java> + </target> + +</project> + diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/pom.xml b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/pom.xml new file mode 100644 index 0000000000..65835f27aa --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/pom.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-demos</artifactId> + <version>1.0-incubating</version> + <relativePath>../pom.xml</relativePath> + </parent> + <artifactId>demo-bigbank-calculator</artifactId> + <name>Apache Tuscany SCA BigBank Calculator Demo</name> + + <repositories> + <repository> + <id>apache.incubator</id> + <url>http://people.apache.org/repo/m2-incubating-repository</url> + </repository> + </repositories> + + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-embedded</artifactId> + <version>1.0-incubating</version> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-java-runtime</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-script</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-rmi</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.2</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <build> + <finalName>${artifactId}</finalName> + </build> +</project> diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/AddService.java b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/AddService.java new file mode 100644 index 0000000000..4eeb30a9c2 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/AddService.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package calculator; + +public interface AddService { + + double add(double n1, double n2); + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java new file mode 100644 index 0000000000..c89043276e --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/CalculatorService.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package calculator; + +/** + * The Calculator service interface. + */ +public interface CalculatorService { + + double add(double n1, double n2); + + double subtract(double n1, double n2); + + double multiply(double n1, double n2); + + double divide(double n1, double n2); + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java new file mode 100644 index 0000000000..ed7bee0f4e --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/CalculatorServiceImpl.java @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package calculator; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of the Calculator service. + */ +@Service(CalculatorService.class) +public class CalculatorServiceImpl implements CalculatorService { + + private AddService addService; + private SubtractService subtractService; + private MultiplyService multiplyService; + private DivideService divideService; + + @Reference + public void setAddService(AddService addService) { + this.addService = addService; + } + + @Reference + public void setSubtractService(SubtractService subtractService) { + this.subtractService = subtractService; + } + + @Reference + public void setDivideService(DivideService divideService) { + this.divideService = divideService; + } + + @Reference + public void setMultiplyService(MultiplyService multiplyService) { + this.multiplyService = multiplyService; + } + + public double add(double n1, double n2) { + return addService.add(n1, n2); + } + + public double subtract(double n1, double n2) { + return subtractService.subtract(n1, n2); + } + + public double multiply(double n1, double n2) { + System.err.println("Multiply"); + return multiplyService.multiply(n1, n2); + } + + public double divide(double n1, double n2) { + return divideService.divide(n1, n2); + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/DivideService.java b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/DivideService.java new file mode 100644 index 0000000000..131c5a8014 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/DivideService.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package calculator; + +public interface DivideService { + + double divide(double n1, double n2); + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java new file mode 100644 index 0000000000..a917896aeb --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/MultiplyService.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package calculator; + +public interface MultiplyService { + + double multiply(double n1, double n2); + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java new file mode 100644 index 0000000000..e328f024ea --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/SubtractService.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package calculator; + +public interface SubtractService { + + double subtract(double n1, double n2); + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java new file mode 100644 index 0000000000..b1861daafc --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/java/calculator/demo/CalculatorServer.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package calculator.demo; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * @version $Rev$ $Date$ + */ +public class CalculatorServer { + + public static void main(String[] args) throws Exception { + + System.out.println("Starting the Sample SCA Calculator..."); + + SCADomain domain = SCADomain.newInstance("Calculator.composite"); + + System.out.println("Press Enter to Exit..."); + System.in.read(); + + domain.close(); + + System.out.println("Bye"); + System.exit(0); + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/Calculator.composite b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/Calculator.composite new file mode 100644 index 0000000000..890221245b --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/Calculator.composite @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0" + targetNamespace="http://calc"
+ xmlns:c="http://calc"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <service name="CalculatorService">
+ <tuscany:binding.rmi host="localhost" port="8099" serviceName="CalculatorRMIService"/>
+ </service>
+
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <tuscany:implementation.script script="calculator/AddServiceImpl.js"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <tuscany:implementation.script script="calculator/SubtractServiceImpl.rb"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <tuscany:implementation.script script="calculator/MultiplyServiceImpl.py"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <tuscany:implementation.script script="calculator/DivideServiceImpl.groovy"/>
+ </component>
+
+</composite>
diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js new file mode 100644 index 0000000000..1d4d221364 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/AddServiceImpl.js @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +function add(n1, n2) { + return n1 + n2; +}
\ No newline at end of file diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy new file mode 100644 index 0000000000..c31c1e8fd6 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/DivideServiceImpl.groovy @@ -0,0 +1,22 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+def divide(n1, n2) {
+ return n1 / n2
+}
\ No newline at end of file diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py new file mode 100644 index 0000000000..dd56af0ad8 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/MultiplyServiceImpl.py @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +def multiply(n1, n2): + print "Python Calculator component: multiply(", n1, ",", n2, ")" + return n1 * n2
\ No newline at end of file diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb new file mode 100644 index 0000000000..08fa310f46 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-calculator/src/main/resources/calculator/SubtractServiceImpl.rb @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +def subtract(n1, n2) + print "Ruby Calculator subtract(", n1, ",", n2, ")\n" + return n1 - n2 +end
\ No newline at end of file diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/README b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/README new file mode 100644 index 0000000000..4ac5b79237 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/README @@ -0,0 +1,3 @@ +bigbank-stockquote is a part of a larger demo called bigbank-account. Please see the Readme file under bigbank-account to understand how bigbank-stockquote fits into the overall demo. + + diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/build.xml b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/build.xml new file mode 100644 index 0000000000..e5c2e58951 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/build.xml @@ -0,0 +1,61 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project name="calculator" default="run"> + <property name="test.class" value="stockquote.demo.StockQuoteServer" /> + + <path id="test.classpath"> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + <pathelement location="target/demo-bigbank-stockquote.jar"/> + </path> + + <target name="init"> + <mkdir dir="target/classes"/> + </target> + + <target name="compile" depends="init"> + <javac srcdir="src/main/java" + destdir="target/classes" + debug="on" + source="1.5" + target="1.5"> + <classpath> + <pathelement location="../../lib/tuscany-sca-manifest.jar"/> + </classpath> + </javac> + <copy todir="target/classes"> + <fileset dir="src/main/resources"/> + </copy> + <jar destfile="target/demo-bigbank-stockquote.jar" basedir="target/classes"> + <manifest> + <attribute name="Main-Class" value="${test.class}" /> + </manifest> + </jar> + </target> + + <target name="run"> + <java classname="${test.class}" + fork="true"> + <classpath> + <path refid="test.classpath"/> + </classpath> + </java> + </target> + +</project> + diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/pom.xml b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/pom.xml new file mode 100644 index 0000000000..91871d0777 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/pom.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-demos</artifactId> + <version>1.0-incubating</version> + <relativePath>../pom.xml</relativePath> + </parent> + <artifactId>demo-bigbank-stockquote</artifactId> + <name>Apache Tuscany SCA BigBank StockQuote Demo</name> + + <repositories> + <repository> + <id>apache.incubator</id> + <url>http://people.apache.org/repo/m2-incubating-repository</url> + </repository> + </repositories> + + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-embedded</artifactId> + <version>1.0-incubating</version> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-java-runtime</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-ws-axis2</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-tomcat</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.2</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <build> + <finalName>${artifactId}</finalName> + </build> + +</project> diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java new file mode 100644 index 0000000000..2a0801f9b8 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteImpl.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package stockquote; + +import org.osoa.sca.annotations.Service; + +/** + * This class implements the StockQuote service. + */ +@Service(StockQuoteService.class) +public class StockQuoteImpl implements StockQuoteService { + + public double getQuote(String symbol) { + double price = 104.0 + Math.random(); + price = ((int)(price * 100)) / 100.0; + + System.out.println("Getting stock quote for: " + symbol + ", value: "+ price); + + return price; + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java new file mode 100644 index 0000000000..9d128657eb --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/java/stockquote/StockQuoteService.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package stockquote; + +import org.osoa.sca.annotations.Remotable; + +/** + * This is the business interface of the StockQuote service. + */ +@Remotable +public interface StockQuoteService { + + public double getQuote(String symbol); +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.java b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.java new file mode 100644 index 0000000000..04ed762602 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/java/stockquote/demo/StockQuoteServer.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package stockquote.demo; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * This server program shows how to bootstrap SCA from a simple J2SE program + * and start it which activates the StockQuote Web service endpoint. + */ +public class StockQuoteServer { + + public static void main(String[] args) throws Exception { + + System.out.println("Starting the Sample SCA StockQuote Service..."); + + SCADomain domain = SCADomain.newInstance("StockQuote.composite"); + + System.out.println("Press Enter to Exit..."); + System.in.read(); + + domain.close(); + System.out.println("Bye"); + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/resources/StockQuote.composite b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/resources/StockQuote.composite new file mode 100644 index 0000000000..b793985c44 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/bigbank-stockquote/src/main/resources/StockQuote.composite @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + targetNamespace="http://stockquote" + xmlns:hw="http://stockquote" + name="StockQuote"> + + <component name="StockQuoteServiceComponent"> + <service name="StockQuoteService"> + <binding.ws uri="http://localhost:8081/services/StockQuoteWebService"/> + </service> + <implementation.java class="stockquote.StockQuoteImpl" /> + </component> + +</composite> diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/.ruleset b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/.ruleset new file mode 100644 index 0000000000..2a06794776 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/.ruleset @@ -0,0 +1,172 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<ruleset name="pmd-eclipse">
+ <description>PMD Plugin preferences rule set</description>
+
+
+ <rule ref="rulesets/basic.xml/BooleanInstantiation"/>
+ <rule ref="rulesets/basic.xml/CollapsibleIfStatements"/>
+ <rule ref="rulesets/basic.xml/DoubleCheckedLocking"/>
+<!--<rule ref="rulesets/basic.xml/EmptyCatchBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyFinallyBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyIfStmt"/>-->
+ <rule ref="rulesets/basic.xml/EmptyStatementNotInLoop"/>
+<!--<rule ref="rulesets/basic.xml/EmptyStaticInitializer"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptySwitchStatements"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptySynchronizedBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyTryBlock"/>-->
+<!--<rule ref="rulesets/basic.xml/EmptyWhileStmt"/>-->
+ <rule ref="rulesets/basic.xml/ForLoopShouldBeWhileLoop"/>
+ <rule ref="rulesets/basic.xml/JumbledIncrementer"/>
+<!--<rule ref="rulesets/basic.xml/OverrideBothEqualsAndHashcode"/>-->
+ <rule ref="rulesets/basic.xml/ReturnFromFinallyBlock"/>
+ <rule ref="rulesets/basic.xml/UnconditionalIfStatement"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryConversionTemporary"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryFinalModifier"/>
+ <rule ref="rulesets/basic.xml/UnnecessaryReturn"/>
+<!--<rule ref="rulesets/basic.xml/UselessOverridingMethod"/>-->
+
+<!--<rule ref="rulesets/braces.xml/ForLoopsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/IfElseStmtsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/IfStmtsMustUseBraces"/>-->
+<!--<rule ref="rulesets/braces.xml/WhileLoopsMustUseBraces"/>-->
+
+<!--<rule ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"/>-->
+<!--<rule ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"/>-->
+<!--<rule ref="rulesets/clone.xml/ProperCloneImplementation"/>-->
+
+<!--<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>-->
+<!--<rule ref="rulesets/codesize.xml/ExcessivePublicCount"/>-->
+<!--<rule ref="rulesets/codesize.xml/TooManyFields"/>-->
+
+<rule ref="rulesets/controversial.xml/AssignmentInOperand"/>
+<!--<rule ref="rulesets/controversial.xml/AtLeastOneConstructor"/>-->
+<!--<rule ref="rulesets/controversial.xml/CallSuperInConstructor"/>-->
+<!--<rule ref="rulesets/controversial.xml/DontImportSun"/>-->
+<!--<rule ref="rulesets/controversial.xml/NullAssignment"/>-->
+<!--<rule ref="rulesets/controversial.xml/OnlyOneReturn"/>-->
+<!--<rule ref="rulesets/controversial.xml/SingularField"/>-->
+<!--<rule ref="rulesets/controversial.xml/SuspiciousOctalEscape"/>-->
+<!--<rule ref="rulesets/controversial.xml/UnnecessaryConstructor"/>-->
+<rule ref="rulesets/controversial.xml/UnnecessaryParentheses"/>
+<!--<rule ref="rulesets/controversial.xml/UnusedModifier"/>-->
+
+<!--<rule ref="rulesets/coupling.xml/CouplingBetweenObjects"/>-->
+<!--<rule ref="rulesets/coupling.xml/ExcessiveImports"/>-->
+<!--<rule ref="rulesets/coupling.xml/LooseCoupling"/>-->
+
+<!--<rule ref="rulesets/design.xml/AbstractClassWithoutAbstractMethod"/>-->
+<!--<rule ref="rulesets/design.xml/AccessorClassGeneration"/>-->
+<!--<rule ref="rulesets/design.xml/AssignmentToNonFinalStatic"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidDeeplyNestedIfStmts"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidInstanceofChecksInCatchClause"/>-->
+<rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass"/>
+<!--<rule ref="rulesets/design.xml/AvoidReassigningParameters"/>-->
+<!--<rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel"/>-->
+<!--<rule ref="rulesets/design.xml/BadComparison"/>-->
+<!--<rule ref="rulesets/design.xml/CloseConnection"/>-->
+<!--<rule ref="rulesets/design.xml/CompareObjectsWithEquals"/>-->
+<!--<rule ref="rulesets/design.xml/ConfusingTernary"/>-->
+<rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod"/>
+<!--<rule ref="rulesets/design.xml/DefaultLabelNotLastInSwitchStmt"/>-->
+<!--<rule ref="rulesets/design.xml/FinalFieldCouldBeStatic"/>-->
+<rule ref="rulesets/design.xml/IdempotentOperations"/>
+<!--<rule ref="rulesets/design.xml/ImmutableField"/>-->
+<!--<rule ref="rulesets/design.xml/InstantiationToGetClass"/>-->
+<!--<rule ref="rulesets/design.xml/MissingBreakInSwitch"/>-->
+<!--<rule ref="rulesets/design.xml/MissingStaticMethodInNonInstantiatableClass"/>-->
+<!--<rule ref="rulesets/design.xml/NonCaseLabelInSwitchStatement"/>-->
+<!--<rule ref="rulesets/design.xml/NonStaticInitializer"/>-->
+<rule ref="rulesets/design.xml/OptimizableToArrayCall"/>
+<rule ref="rulesets/design.xml/PositionLiteralsFirstInComparisons"/>
+<rule ref="rulesets/design.xml/SimplifyBooleanExpressions"/>
+<rule ref="rulesets/design.xml/SimplifyBooleanReturns"/>
+<rule ref="rulesets/design.xml/SimplifyConditional"/>
+<!--<rule ref="rulesets/design.xml/SwitchDensity"/>-->
+<!--<rule ref="rulesets/design.xml/SwitchStmtsShouldHaveDefault"/>-->
+<!--<rule ref="rulesets/design.xml/UnnecessaryLocalBeforeReturn"/>-->
+<!--<rule ref="rulesets/design.xml/UseLocaleWithCaseConversions"/>-->
+<!--<rule ref="rulesets/design.xml/UseNotifyAllInsteadOfNotify"/>-->
+<!--<rule ref="rulesets/design.xml/UseSingleton"/>-->
+
+<!--<rule ref="rulesets/finalizers.xml/EmptyFinalizer"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeOnlyCallsSuperFinalize"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeOverloaded"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeDoesNotCallSuperFinalize"/>-->
+<!--<rule ref="rulesets/finalizers.xml/FinalizeShouldBeProtected"/>-->
+<!--<rule ref="rulesets/finalizers.xml/AvoidCallingFinalize"/>-->
+
+<!--<rule ref="rulesets/imports.xml/DuplicateImports"/>-->
+<!--<rule ref="rulesets/imports.xml/DontImportJavaLang"/>-->
+<!--<rule ref="rulesets/imports.xml/UnusedImports"/>-->
+<!--<rule ref="rulesets/imports.xml/ImportFromSamePackage"/>-->
+
+<!--<rule ref="rulesets/javabeans.xml/BeanMembersShouldSerialize"/>-->
+<!--<rule ref="rulesets/javabeans.xml/MissingSerialVersionUID"/>-->
+
+<!--<rule ref="rulesets/junit.xml/JUnitStaticSuite"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitSpelling"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitAssertionsShouldIncludeMessage"/>-->
+<!--<rule ref="rulesets/junit.xml/JUnitTestsShouldIncludeAssert"/>-->
+<!--<rule ref="rulesets/junit.xml/TestClassWithoutTestCases"/>-->
+<!--<rule ref="rulesets/junit.xml/UnnecessaryBooleanAssertion"/>-->
+<!--<rule ref="rulesets/junit.xml/UseAssertEqualsInsteadOfAssertTrue"/>-->
+<!--<rule ref="rulesets/junit.xml/UseAssertSameInsteadOfAssertTrue"/>-->
+
+ <!--<rule ref="rulesets/logging-java.xml/AvoidPrintStackTrace"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/MoreThanOneLogger"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/LogBlockWithoutIf"/>-->
+ <!--<rule ref="rulesets/logging-java.xml/SystemPrintln"/>-->
+ <!--<rule ref="rulesets/logging-jakarta-commons.xml/UseCorrectExceptionLogging"/>-->
+ <!--<rule ref="rulesets/logging-jakarta-commons.xml/ProperLogger"/>-->
+
+ <!--<rule ref="rulesets/naming.xml/ShortVariable"/>-->
+ <!--<rule ref="rulesets/naming.xml/LongVariable"/>-->
+ <!--<rule ref="rulesets/naming.xml/ShortMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/VariableNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/MethodNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/ClassNamingConventions"/>-->
+ <!--<rule ref="rulesets/naming.xml/AbstractNaming"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidDollarSigns"/>-->
+ <!--<rule ref="rulesets/naming.xml/MethodWithSameNameAsEnclosingClass"/>-->
+ <!--<rule ref="rulesets/naming.xml/SuspiciousHashcodeMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/SuspiciousConstantFieldName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidFieldNameMatchingTypeName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidFieldNameMatchingMethodName"/>-->
+ <!--<rule ref="rulesets/naming.xml/AvoidNonConstructorMethodsWithClassName"/>-->
+ <!--<rule ref="rulesets/naming.xml/NoPackage"/>-->
+ <!--<rule ref="rulesets/naming.xml/PackageCase"/>-->
+
+ <!--<rule ref="rulesets/optimizations.xml/LocalVariableCouldBeFinal"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/MethodArgumentCouldBeFinal"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/AvoidInstantiatingObjectsInLoops"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/UseArrayListInsteadOfVector"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/SimplifyStartsWith"/>-->
+ <!--<rule ref="rulesets/optimizations.xml/UseStringBufferForStringAppends"/>-->
+
+ <!--<rule ref="rulesets/strictexception.xml/AvoidCatchingThrowable"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/SignatureDeclareThrowsException"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/ExceptionAsFlowControl"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidCatchingNPE"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes"/>-->
+ <!--<rule ref="rulesets/strictexception.xml/AvoidThrowingNullPointerException"/>-->
+
+ <!--<rule ref="rulesets/strings.xml/AvoidDuplicateLiterals"/>-->
+ <!--<rule ref="rulesets/strings.xml/StringInstantiation"/>-->
+ <!--<rule ref="rulesets/strings.xml/StringToString"/>-->
+ <!--<rule ref="rulesets/strings.xml/AvoidConcatenatingNonLiteralsInStringBuffer"/>-->
+ <!--<rule ref="rulesets/strings.xml/UnnecessaryCaseChange"/>-->
+
+ <!--<rule ref="rulesets/sunsecure.xml/MethodReturnsInternalArray"/>-->
+ <!--<rule ref="rulesets/sunsecure.xml/ArrayIsStoredDirectly"/>-->
+
+ <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
+ <!--<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>-->
+
+</ruleset>
diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/build.xml b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/build.xml new file mode 100644 index 0000000000..59f1342276 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/build.xml @@ -0,0 +1,66 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project name="mortgage-creditcheck" default="compile"> + <property name="test.class" value="credit.CreditCheckServer" /> + <property name="test.jar" value="demo-mortgage-creditcheck.jar" /> + + <target name="init"> + <mkdir dir="target/classes" /> + </target> + + <target name="compile" depends="init"> + <javac srcdir="src/main/java" destdir="target/classes" debug="on" source="1.5" target="1.5"> + <classpath> + <pathelement location="../../lib/tuscany-sca-manifest.jar" /> + </classpath> + </javac> + <copy todir="target/classes"> + <fileset dir="src/main/resources" /> + </copy> + <jar destfile="target/${test.jar}" basedir="target/classes"> + <manifest> + <attribute name="Main-Class" value="${test.class}" /> + </manifest> + </jar> + </target> + + <target name="run-classes"> + <java classname="${test.class}" fork="true"> + <classpath> + <pathelement path="target/classes" /> + <pathelement location="../../lib/tuscany-sca-manifest.jar" /> + </classpath> + </java> + </target> + + <target name="run"> + <java classname="${test.class}" fork="true"> + <classpath> + <pathelement path="target/${test.jar}" /> + <pathelement location="../../lib/tuscany-sca-manifest.jar" /> + </classpath> + </java> + </target> + + <target name="clean"> + <delete quiet="true" includeemptydirs="true"> + <fileset dir="target" /> + </delete> + </target> +</project> diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/pom.xml b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/pom.xml new file mode 100644 index 0000000000..0dd3ffd779 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/pom.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-demos</artifactId> + <version>1.0-incubating</version> + <relativePath>../pom.xml</relativePath> + </parent> + <artifactId>demo-mortgage-creditcheck</artifactId> + <packaging>war</packaging> + <name>Apache Tuscany SCA Mortgage Credit Check Demo</name> + <description>A sample Mortgage application made of several SCA components wired together.</description> + + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-embedded</artifactId> + <version>1.0-incubating</version> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-java-runtime</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-ws-axis2</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-tomcat</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.2</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <build> + <finalName>${artifactId}</finalName> + </build> + + +</project> diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java new file mode 100644 index 0000000000..ec95a60227 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package credit; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +public interface CreditCheck { + int getCreditScore(String ssn); +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java new file mode 100644 index 0000000000..f19e8a1250 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package credit; + +import org.osoa.sca.annotations.Service; + +/** + * An implementation of the CreditReportService service + */ +@Service(CreditCheck.class) +public class CreditCheckImpl implements CreditCheck { + + public int getCreditScore(String ssn) { + int score = (int)(700 + (Math.random() - 0.5) * 100); + System.out.println("Credit score for " + ssn + ": " + score); + return score; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java new file mode 100644 index 0000000000..870ea1941d --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package credit; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * @version $Rev$ $Date$ + */ +public class CreditCheckServer { + public static void main(String[] args) throws Exception { + + System.out.println("Starting the CreditCheck Service..."); + + SCADomain domain = SCADomain.newInstance("http://localhost", "/", "CreditCheck.composite"); + + System.out.println("Press Enter to Exit..."); + System.in.read(); + + domain.close(); + System.out.println("Bye"); + } +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite new file mode 100644 index 0000000000..739a455801 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://credit"
+ name="CreditComposite">
+
+ <service name="CreditCheckService" promote="CreditCheckServiceComponent">
+ <interface.wsdl interface="http://credit#wsdl.interface(CreditCheck)" />
+ <binding.ws wsdlElement="http://credit#wsdl.endpoint(CreditCheckService/CreditCheckSoapPort)" />
+ </service>
+
+ <component name="CreditCheckServiceComponent">
+ <implementation.java class="credit.CreditCheckImpl" />
+ </component>
+
+</composite>
diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/META-INF/LICENSE.txt b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/META-INF/LICENSE.txt new file mode 100644 index 0000000000..25d78feeac --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/META-INF/LICENSE.txt @@ -0,0 +1,1277 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +APACHE TUSCANY SUBCOMPONENTS: + +The Apache Tuscany distribution includes a number of subcomponents with +separate copyright notices and license terms. Your use of the source +code for the these subcomponents is subject to the terms and +conditions of the following licenses. + +=============================================================================== + +For the Eclipse Modeling Framework component and the Celtix binding: + +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE +PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF +THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and +documentation distributed under this Agreement, and +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and +are distributed by that particular Contributor. A Contribution +'originates' from a Contributor if it was added to the Program by such +Contributor itself or anyone acting on such Contributor's behalf. +Contributions do not include additions to the Program which: (i) are +separate modules of software distributed in conjunction with the +Program under their own license agreement, and (ii) are not derivative +works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor +which are necessarily infringed by the use or sale of its Contribution +alone or when combined with the Program. + +"Program" means the Contributions distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this +Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby +grants Recipient a non-exclusive, worldwide, royalty-free copyright +license to reproduce, prepare derivative works of, publicly display, +publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and +object code form. + +b) Subject to the terms of this Agreement, each Contributor hereby +grants Recipient a non-exclusive, worldwide, royalty-free patent +license under Licensed Patents to make, use, sell, offer to sell, +import and otherwise transfer the Contribution of such Contributor, if +any, in source code and object code form. This patent license shall +apply to the combination of the Contribution and the Program if, at +the time the Contribution is added by the Contributor, such addition +of the Contribution causes such combination to be covered by the +Licensed Patents. The patent license shall not apply to any other +combinations which include the Contribution. No hardware per se is +licensed hereunder. + +c) Recipient understands that although each Contributor grants the +licenses to its Contributions set forth herein, no assurances are +provided by any Contributor that the Program does not infringe the +patent or other intellectual property rights of any other entity. Each +Contributor disclaims any liability to Recipient for claims brought by +any other entity based on infringement of intellectual property rights +or otherwise. As a condition to exercising the rights and licenses +granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For +example, if a third party patent license is required to allow +Recipient to distribute the Program, it is Recipient's responsibility +to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient +copyright rights in its Contribution, if any, to grant the copyright +license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form +under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties +and conditions, express and implied, including warranties or +conditions of title and non-infringement, and implied warranties or +conditions of merchantability and fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability +for damages, including direct, indirect, special, incidental and +consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are +offered by that Contributor alone and not by any other party; and + +iv) states that source code for the Program is available from such +Contributor, and informs licensees how to obtain it in a reasonable +manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the +Program. + +Contributors may not remove or alter any copyright notices contained +within the Program. + +Each Contributor must identify itself as the originator of its +Contribution, if any, in a manner that reasonably allows subsequent +Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain +responsibilities with respect to end users, business partners and the +like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a +commercial product offering should do so in a manner which does not +create potential liability for other Contributors. Therefore, if a +Contributor includes the Program in a commercial product offering, +such Contributor ("Commercial Contributor") hereby agrees to defend +and indemnify every other Contributor ("Indemnified Contributor") +against any losses, damages and costs (collectively "Losses") arising +from claims, lawsuits and other legal actions brought by a third party +against the Indemnified Contributor to the extent caused by the acts +or omissions of such Commercial Contributor in connection with its +distribution of the Program in a commercial product offering. The +obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. +In order to qualify, an Indemnified Contributor must: a) promptly +notify the Commercial Contributor in writing of such claim, and b) +allow the Commercial Contributor to control, and cooperate with the +Commercial Contributor in, the defense and any related settlement +negotiations. The Indemnified Contributor may participate in any such +claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those +performance claims and warranties, and if a court requires any other +Contributor to pay any damages as a result, the Commercial Contributor +must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS +PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY +WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY +OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to +the risks and costs of program errors, compliance with applicable +laws, damage to or loss of data, programs or equipment, and +unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR +ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING +WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR +DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that +the Program itself (excluding combinations of the Program with other +software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of +the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any licenses +granted by Recipient relating to the Program shall continue and +survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and +may only be modified in the following manner. The Agreement Steward +reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement +Steward has the right to modify this Agreement. The Eclipse Foundation +is the initial Agreement Steward. The Eclipse Foundation may assign +the responsibility to serve as the Agreement Steward to a suitable +separate entity. Each new version of the Agreement will be given a +distinguishing version number. The Program (including Contributions) +may always be distributed subject to the version of the Agreement +under which it was received. In addition, after a new version of the +Agreement is published, Contributor may elect to distribute the +Program (including its Contributions) under the new version. Except as +expressly stated in Sections 2(a) and 2(b) above, Recipient receives +no rights or licenses to the intellectual property of any Contributor +under this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under this +Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and +the intellectual property laws of the United States of America. No +party to this Agreement will bring a legal action under this Agreement +more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation. + +=============================================================================== + +For the Rhino JavaScript container component: + +Mozilla Public License 1.1 (MPL 1.1) + +1. Definitions. + + 1.0.1. "Commercial Use" means distribution or otherwise making the +Covered Code available to a third party. + + 1.1. "Contributor" means each entity that creates or contributes to +the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original Code, +prior Modifications used by a Contributor, and the Modifications made by that +particular Contributor. + + 1.3. "Covered Code" means the Original Code or Modifications or the +combination of the Original Code and Modifications, in each case including +portions thereof. + + 1.4. "Electronic Distribution Mechanism" means a mechanism generally +accepted in the software development community for the electronic transfer of +data. + + 1.5. "Executable" means Covered Code in any form other than Source +Code. + + 1.6. "Initial Developer" means the individual or entity identified as +the Initial Developer in the Source Code notice required by Exhibit A. + + 1.7. "Larger Work" means a work which combines Covered Code or +portions thereof with code not governed by the terms of this License. + + 1.8. "License" means this document. + + 1.8.1. "Licensable" means having the right to grant, to the maximum +extent possible, whether at the time of the initial grant or subsequently +acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means any addition to or deletion from the +substance or structure of either the Original Code or any previous +Modifications. When Covered Code is released as a series of files, a +Modification is: + A. Any addition to or deletion from the contents of a file +containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or +previous Modifications. + + 1.10. "Original Code" means Source Code of computer software code +which is described in the Source Code notice required by Exhibit A as Original +Code, and which, at the time of its release under this License is not already +Covered Code governed by this License. + + 1.10.1. "Patent Claims" means any patent claim(s), now owned or +hereafter acquired, including without limitation, method, process, and +apparatus claims, in any patent Licensable by grantor. + + 1.11. "Source Code" means the preferred form of the Covered Code for +making modifications to it, including all modules it contains, plus any +associated interface definition files, scripts used to control compilation and +installation of an Executable, or source code differential comparisons against +either the Original Code or another well known, available Covered Code of the +Contributor's choice. The Source Code can be in a compressed or archival form, +provided the appropriate decompression or de-archiving software is widely +available for no charge. + + 1.12. "You" (or "Your") means an individual or a legal entity +exercising rights under, and complying with all of the terms of, this License +or a future version of this License issued under Section 6.1. For legal +entities, "You" includes any entity which controls, is controlled by, or is +under common control with You. For purposes of this definition, "control" +means (a) the power, direct or indirect, to cause the direction or management +of such entity, whether by contract or otherwise, or (b) ownership of more +than fifty percent (50%) of the outstanding shares or beneficial ownership of +such entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. + The Initial Developer hereby grants You a world-wide, royalty-free, +non-exclusive license, subject to third party intellectual property claims: + (a) under intellectual property rights (other than patent or +trademark) Licensable by Initial Developer to use, reproduce, modify, display, +perform, sublicense and distribute the Original Code (or portions thereof) +with or without Modifications, and/or as part of a Larger Work; and + + (b) under Patents Claims infringed by the making, using or selling +of Original Code, to make, have made, use, practice, sell, and offer for sale, +and/or otherwise dispose of the Original Code (or portions thereof). + (c) the licenses granted in this Section 2.1(a) and +(b) are effective on the date Initial Developer first distributes Original +Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is +granted: 1) for code that You delete from the Original Code; 2) separate from +the Original Code; or 3) for infringements caused by: i) the modification of +the Original Code or ii) the combination of the Original Code with other +software or devices. + + 2.2. Contributor Grant. + Subject to third party intellectual property claims, each Contributor +hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or +trademark) Licensable by Contributor, to use, reproduce, modify, display, +perform, sublicense and distribute the Modifications created by such +Contributor (or portions thereof) either on an unmodified basis, with other +Modifications, as Covered Code and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling +of Modifications made by that Contributor either alone and/or in combination +with its Contributor Version (or portions of such combination), to make, use, +sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications +made by that Contributor (or portions thereof); and 2) the combination of +Modifications made by that Contributor with its Contributor Version (or +portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are +effective on the date Contributor first makes Commercial Use of the Covered +Code. + + (d) Notwithstanding Section 2.2(b) above, no patent license is +granted: 1) for any code that Contributor has deleted from the Contributor +Version; 2) separate from the Contributor Version; 3) for infringements +caused by: i) third party modifications of Contributor Version or ii) the +combination of Modifications made by that Contributor with other software +(except as part of the Contributor Version) or other devices; or 4) under +Patent Claims infringed by Covered Code in the absence of Modifications made +by that Contributor. + + +3. Distribution Obligations. + + 3.1. Application of License. + The Modifications which You create or to which You contribute are +governed by the terms of this License, including without limitation Section +2.2. The Source Code version of Covered Code may be distributed only under the +terms of this License or a future version of this License released under +Section 6.1, and You must include a copy of this License with every copy of +the Source Code You distribute. You may not offer or impose any terms on any +Source Code version that alters or restricts the applicable version of this +License or the recipients' rights hereunder. However, You may include an +additional document offering the additional rights described in Section 3.5. + + 3.2. Availability of Source Code. + Any Modification which You create or to which You contribute must be +made available in Source Code form under the terms of this License either on +the same media as an Executable version or via an accepted Electronic +Distribution Mechanism to anyone to whom you made an Executable version +available; and if made available via Electronic Distribution Mechanism, must +remain available for at least twelve (12) months after the date it initially +became available, or at least six (6) months after a subsequent version of +that particular Modification has been made available to such recipients. You +are responsible for ensuring that the Source Code version remains available +even if the Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. + You must cause all Covered Code to which You contribute to contain a +file documenting the changes You made to create that Covered Code and the date +of any change. You must include a prominent statement that the Modification is +derived, directly or indirectly, from Original Code provided by the Initial +Developer and including the name of the Initial Developer in (a) the Source +Code, and (b) in any notice in an Executable version or related documentation +in which You describe the origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + (a) Third Party Claims. + If Contributor has knowledge that a license under a third party's +intellectual property rights is required to exercise the rights granted by +such Contributor under Sections 2.1 or 2.2, Contributor must include a text +file with the Source Code distribution titled "LEGAL" which describes the +claim and the party making the claim in sufficient detail that a recipient +will know whom to contact. If Contributor obtains such knowledge after the +Modification is made available as described in Section 3.2, Contributor shall +promptly modify the LEGAL file in all copies Contributor makes available +thereafter and shall take other steps (such as notifying appropriate mailing +lists or newsgroups) reasonably calculated to inform those who received the +Covered Code that new knowledge has been obtained. + + (b) Contributor APIs. + If Contributor's Modifications include an application programming +interface and Contributor has knowledge of patent licenses which are +reasonably necessary to implement that API, Contributor must also include this +information in the LEGAL file. + + (c) Representations. + Contributor represents that, except as disclosed pursuant to +Section 3.4(a) above, Contributor believes that Contributor's Modifications +are Contributor's original creation(s) and/or Contributor has sufficient +rights to grant the rights conveyed by this License. + + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source +Code. If it is not possible to put such notice in a particular Source Code +file due to its structure, then You must include such notice in a location +(such as a relevant directory) where a user would be likely to look for such a +notice. If You created one or more Modification(s) You may add your name as a +Contributor to the notice described in Exhibit A. You must also duplicate +this License in any documentation for the Source Code where You describe +recipients' rights or ownership rights relating to Covered Code. You may +choose to offer, and to charge a fee for, warranty, support, indemnity or +liability obligations to one or more recipients of Covered Code. However, You +may do so only on Your own behalf, and not on behalf of the Initial Developer +or any Contributor. You must make it absolutely clear than any such warranty, +support, indemnity or liability obligation is offered by You alone, and You +hereby agree to indemnify the Initial Developer and every Contributor for any +liability incurred by the Initial Developer or such Contributor as a result of +warranty, support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the +requirements of Section 3.1-3.5 have been met for that Covered Code, and if +You include a notice stating that the Source Code version of the Covered Code +is available under the terms of this License, including a description of how +and where You have fulfilled the obligations of Section 3.2. The notice must +be conspicuously included in any notice in an Executable version, related +documentation or collateral in which You describe recipients' rights relating +to the Covered Code. You may distribute the Executable version of Covered Code +or ownership rights under a license of Your choice, which may contain terms +different from this License, provided that You are in compliance with the +terms of this License and that the license for the Executable version does not +attempt to limit or alter the recipient's rights in the Source Code version +from the rights set forth in this License. If You distribute the Executable +version under a different license You must make it absolutely clear that any +terms which differ from this License are offered by You alone, not by the +Initial Developer or any Contributor. You hereby agree to indemnify the +Initial Developer and every Contributor for any liability incurred by the +Initial Developer or such Contributor as a result of any such terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code +not governed by the terms of this License and distribute the Larger Work as a +single product. In such a case, You must make sure the requirements of this +License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + + If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Code due to statute, +judicial order, or regulation then You must: (a) comply with the terms of this +License to the maximum extent possible; and (b) describe the limitations and +the code they affect. Such description must be included in the LEGAL file +described in Section 3.4 and must be included with all distributions of the +Source Code. Except to the extent prohibited by statute or regulation, such +description must be sufficiently detailed for a recipient of ordinary skill to +be able to understand it. + +5. Application of this License. + + This License applies to code to which the Initial Developer has attached +the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Netscape Communications Corporation ("Netscape") may publish revised +and/or new versions of the License from time to time. Each version will be +given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the +License, You may always continue to use it under the terms of that version. +You may also choose to use such Covered Code under the terms of any subsequent +version of the License published by Netscape. No one other than Netscape has +the right to modify the terms applicable to Covered Code created under this +License. + + 6.3. Derivative Works. + If You create or use a modified version of this License (which you may +only do in order to apply it to code which is not already Covered Code +governed by this License), You must (a) rename Your license so that the +phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or +any confusingly similar phrase do not appear in your license (except to note +that your license differs from this License) and (b) otherwise make it clear +that Your version of the license contains terms which differ from the Mozilla +Public License and Netscape Public License. (Filling in the name of the +Initial Developer, Original Code or Contributor in the notice described in +Exhibit A shall not of themselves be deemed to be modifications of this +License.) + +7. DISCLAIMER OF WARRANTY. + + COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT +LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, +FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE +QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED +CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY +OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR +CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS +LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS +DISCLAIMER. + +8. TERMINATION. + + 8.1. This License and the rights granted hereunder will terminate +automatically if You fail to comply with terms herein and fail to cure such +breach within 30 days of becoming aware of the breach. All sublicenses to the +Covered Code which are properly granted shall survive any termination of this +License. Provisions which, by their nature, must remain in effect beyond the +termination of this License shall survive. + + 8.2. If You initiate litigation by asserting a patent infringement +claim (excluding declatory judgment actions) against Initial Developer or a +Contributor (the Initial Developer or Contributor against whom You file such +action is referred to as "Participant") alleging that: + + (a) such Participant's Contributor Version directly or indirectly +infringes any patent, then any and all rights granted by such Participant to +You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice +from Participant terminate prospectively, unless if within 60 days after +receipt of notice You either: (i) agree in writing to pay Participant a +mutually agreeable reasonable royalty for Your past and future use of +Modifications made by such Participant, or (ii) withdraw Your litigation claim +with respect to the Contributor Version against such Participant. If within +60 days of notice, a reasonable royalty and payment arrangement are not +mutually agreed upon in writing by the parties or the litigation claim is not +withdrawn, the rights granted by Participant to You under Sections 2.1 and/or +2.2 automatically terminate at the expiration of the 60 day notice period +specified above. + + (b) any software, hardware, or device, other than such Participant's +Contributor Version, directly or indirectly infringes any patent, then any +rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are +revoked effective as of the date You first made, used, sold, distributed, or +had made, Modifications made by that Participant. + + 8.3. If You assert a patent infringement claim against Participant +alleging that such Participant's Contributor Version directly or indirectly +infringes any patent where such claim is resolved (such as by license or +settlement) prior to the initiation of patent infringement litigation, then +the reasonable value of the licenses granted by such Participant under +Sections 2.1 or 2.2 shall be taken into account in determining the amount or +value of any payment or license. + + 8.4. In the event of termination under Sections 8.1 or 8.2 above, all +end user license agreements (excluding distributors and resellers) which have +been validly granted by You or any distributor hereunder prior to termination +shall survive termination. + +9. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT +(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL +DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY +SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, +WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER +FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, +EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH +DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH +OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT +APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE +EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS +EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + + The Covered Code is a "commercial item," as that term is defined in 48 +C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and +"commercial computer software documentation," as such terms are used in 48 +C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. +227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users +acquire Covered Code with only those rights set forth herein. + +11. MISCELLANEOUS. + + This License represents the complete agreement concerning subject matter +hereof. If any provision of this License is held to be unenforceable, such +provision shall be reformed only to the extent necessary to make it +enforceable. This License shall be governed by California law provisions +(except to the extent applicable law, if any, provides otherwise), excluding +its conflict-of-law provisions. With respect to disputes in which at least one +party is a citizen of, or an entity chartered or registered to do business in +the United States of America, any litigation relating to this License shall be +subject to the jurisdiction of the Federal Courts of the Northern District of +California, with venue lying in Santa Clara County, California, with the +losing party responsible for costs, including without limitation, court costs +and reasonable attorneys' fees and expenses. The application of the United +Nations Convention on Contracts for the International Sale of Goods is +expressly excluded. Any law or regulation which provides that the language of +a contract shall be construed against the drafter shall not apply to this +License. + +12. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is +responsible for claims and damages arising, directly or indirectly, out of its +utilization of rights under this License and You agree to work with Initial +Developer and Contributors to distribute such responsibility on an equitable +basis. Nothing herein is intended or shall be deemed to constitute any +admission of liability. + +13. MULTIPLE-LICENSED CODE. + + Initial Developer may designate portions of the Covered Code as +Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits +you to utilize portions of the Covered Code under Your choice of the MPL or +the alternative licenses, if any, specified by the Initial Developer in the +file described in Exhibit A. + + +EXHIBIT A -Mozilla Public License. + + ``The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" +basis, WITHOUT WARRANTY OF + ANY KIND, either express or implied. See the License for the specific +language governing rights and + limitations under the License. + + The Original Code is ______________________________________. + + The Initial Developer of the Original Code is ________________________. +Portions created by + ______________________ are Copyright (C) ______ +_______________________. All Rights + Reserved. + + Contributor(s): ______________________________________. + + Alternatively, the contents of this file may be used under the terms of +the _____ license (the [___] License), in which case the provisions of +[______] License are applicable instead of those above. If you wish to allow +use of your version of this file only under the terms of the [____] License +and not to allow others to use your version of this file under the MPL, +indicate your decision by deleting the provisions above and replace them +with the notice and other provisions required by the [___] License. If you do +not delete the provisions above, a recipient may use your version of this file +under either the MPL or the [___] License." + + [NOTE: The text of this Exhibit A may differ slightly from the text of +the notices in the Source Code files of the Original Code. You should use the +text of this Exhibit A rather than the text found in the Original Code Source +Code for Your Modifications.] + + +=============================================================================== + +For the JAX-WS Reference Implementation component: + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + + + 1. Definitions. + + 1.1. "Contributor" means each individual or entity that + creates or contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the + Original Software, prior Modifications used by a + Contributor (if any), and the Modifications made by that + particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or + (b) Modifications, or (c) the combination of files + containing Original Software with files containing + Modifications, in each case including portions thereof. + + 1.4. "Executable" means the Covered Software in any form + other than Source Code. + + 1.5. "Initial Developer" means the individual or entity + that first makes Original Software available under this + License. + + 1.6. "Larger Work" means a work which combines Covered + Software or portions thereof with code not governed by the + terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the + maximum extent possible, whether at the time of the initial + grant or subsequently acquired, any and all of the rights + conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable + form of any of the following: + + A. Any file that results from an addition to, + deletion from or modification of the contents of a + file containing Original Software or previous + Modifications; + + B. Any new file that contains any part of the + Original Software or previous Modification; or + + C. Any new file that is contributed or otherwise made + available under the terms of this License. + + 1.10. "Original Software" means the Source Code and + Executable form of computer software code that is + originally released under this License. + + 1.11. "Patent Claims" means any patent claim(s), now owned + or hereafter acquired, including without limitation, + method, process, and apparatus claims, in any patent + Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer + software code in which modifications are made and (b) + associated documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal + entity exercising rights under, and complying with all of + the terms of, this License. For legal entities, "You" + includes any entity which controls, is controlled by, or is + under common control with You. For purposes of this + definition, "control" means (a) the power, direct or + indirect, to cause the direction or management of such + entity, whether by contract or otherwise, or (b) ownership + of more than fifty percent (50%) of the outstanding shares + or beneficial ownership of such entity. + + 2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, the + Initial Developer hereby grants You a world-wide, + royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Initial Developer, + to use, reproduce, modify, display, perform, + sublicense and distribute the Original Software (or + portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, + using or selling of Original Software, to make, have + made, use, practice, sell, and offer for sale, and/or + otherwise dispose of the Original Software (or + portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) + are effective on the date Initial Developer first + distributes or otherwise makes the Original Software + available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent + license is granted: (1) for code that You delete from + the Original Software, or (2) for infringements + caused by: (i) the modification of the Original + Software, or (ii) the combination of the Original + Software with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, each + Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Contributor to + use, reproduce, modify, display, perform, sublicense + and distribute the Modifications created by such + Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as + Covered Software and/or as part of a Larger Work; and + + + (b) under Patent Claims infringed by the making, + using, or selling of Modifications made by that + Contributor either alone and/or in combination with + its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, + have made, and/or otherwise dispose of: (1) + Modifications made by that Contributor (or portions + thereof); and (2) the combination of Modifications + made by that Contributor with its Contributor Version + (or portions of such combination). + + (c) The licenses granted in Sections 2.2(a) and + 2.2(b) are effective on the date Contributor first + distributes or otherwise makes the Modifications + available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent + license is granted: (1) for any code that Contributor + has deleted from the Contributor Version; (2) for + infringements caused by: (i) third party + modifications of Contributor Version, or (ii) the + combination of Modifications made by that Contributor + with other software (except as part of the + Contributor Version) or other devices; or (3) under + Patent Claims infringed by Covered Software in the + absence of Modifications made by that Contributor. + + 3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make + available in Executable form must also be made available in + Source Code form and that Source Code form must be + distributed only under the terms of this License. You must + include a copy of this License with every copy of the + Source Code form of the Covered Software You distribute or + otherwise make available. You must inform recipients of any + such Covered Software in Executable form as to how they can + obtain such Covered Software in Source Code form in a + reasonable manner on or through a medium customarily used + for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You + contribute are governed by the terms of this License. You + represent that You believe Your Modifications are Your + original creation(s) and/or You have sufficient rights to + grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications + that identifies You as the Contributor of the Modification. + You may not remove or alter any copyright, patent or + trademark notices contained within the Covered Software, or + any notices of licensing or any descriptive text giving + attribution to any Contributor or the Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered + Software in Source Code form that alters or restricts the + applicable version of this License or the recipients' + rights hereunder. You may choose to offer, and to charge a + fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on + behalf of the Initial Developer or any Contributor. You + must make it absolutely clear that any such warranty, + support, indemnity or liability obligation is offered by + You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred + by the Initial Developer or such Contributor as a result of + warranty, support, indemnity or liability terms You offer. + + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered + Software under the terms of this License or under the terms + of a license of Your choice, which may contain terms + different from this License, provided that You are in + compliance with the terms of this License and that the + license for the Executable form does not attempt to limit + or alter the recipient's rights in the Source Code form + from the rights set forth in this License. If You + distribute the Covered Software in Executable form under a + different license, You must make it absolutely clear that + any terms which differ from this License are offered by You + alone, not by the Initial Developer or Contributor. You + hereby agree to indemnify the Initial Developer and every + Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms + You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software + with other code not governed by the terms of this License + and distribute the Larger Work as a single product. In such + a case, You must make sure the requirements of this License + are fulfilled for the Covered Software. + + 4. Versions of the License. + + 4.1. New Versions. + + Sun Microsystems, Inc. is the initial license steward and + may publish revised and/or new versions of this License + from time to time. Each version will be given a + distinguishing version number. Except as provided in + Section 4.3, no one other than the license steward has the + right to modify this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. If the Initial Developer includes a + notice in the Original Software prohibiting it from being + distributed or otherwise made available under any + subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. Otherwise, You may also choose to + use, distribute or otherwise make the Covered Software + available under the terms of any subsequent version of the + License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a + new license for Your Original Software, You may create and + use a modified version of this License if You: (a) rename + the license and remove any references to the name of the + license steward (except to note that the license differs + from this License); and (b) otherwise make it clear that + the license contains terms which differ from this License. + + + 5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" + BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED + SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR + PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY + COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE + INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF + ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF + WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS + DISCLAIMER. + + 6. TERMINATION. + + 6.1. This License and the rights granted hereunder will + terminate automatically if You fail to comply with terms + herein and fail to cure such breach within 30 days of + becoming aware of the breach. Provisions which, by their + nature, must remain in effect beyond the termination of + this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or + a Contributor (the Initial Developer or Contributor against + whom You assert such claim is referred to as "Participant") + alleging that the Participant Software (meaning the + Contributor Version where the Participant is a Contributor + or the Original Software where the Participant is the + Initial Developer) directly or indirectly infringes any + patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial + Developer (if the Initial Developer is not the Participant) + and all Contributors under Sections 2.1 and/or 2.2 of this + License shall, upon 60 days notice from Participant + terminate prospectively and automatically at the expiration + of such 60 day notice period, unless if within such 60 day + period You withdraw Your claim with respect to the + Participant Software against such Participant either + unilaterally or pursuant to a written agreement with + Participant. + + 6.3. In the event of termination under Sections 6.1 or 6.2 + above, all end user licenses that have been validly granted + by You or any distributor hereunder prior to termination + (excluding licenses granted to You by any distributor) + shall survive termination. + + 7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE + LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK + STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL + INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT + APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO + NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR + CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT + APPLY TO YOU. + + 8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is + defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial + computer software" (as that term is defined at 48 C.F.R. + 252.227-7014(a)(1)) and "commercial computer software + documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. + 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 + through 227.7202-4 (June 1995), all U.S. Government End Users + acquire Covered Software with only those rights set forth herein. + This U.S. Government Rights clause is in lieu of, and supersedes, + any other FAR, DFAR, or other clause or provision that addresses + Government rights in computer software under this License. + + 9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the + extent necessary to make it enforceable. This License shall be + governed by the law of the jurisdiction specified in a notice + contained within the Original Software (except to the extent + applicable law, if any, provides otherwise), excluding such + jurisdiction's conflict-of-law provisions. Any litigation + relating to this License shall be subject to the jurisdiction of + the courts located in the jurisdiction and venue specified in a + notice contained within the Original Software, with the losing + party responsible for costs, including, without limitation, court + costs and reasonable attorneys' fees and expenses. The + application of the United Nations Convention on Contracts for the + International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall + be construed against the drafter shall not apply to this License. + You agree that You alone are responsible for compliance with the + United States export administration regulations (and the export + control laws and regulation of any other countries) when You use, + distribute or otherwise make available any Covered Software. + + 10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or + indirectly, out of its utilization of rights under this License + and You agree to work with Initial Developer and Contributors to + distribute such responsibility on an equitable basis. Nothing + herein is intended or shall be deemed to constitute any admission + of liability. + diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/META-INF/NOTICE b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/META-INF/NOTICE new file mode 100644 index 0000000000..11c564eb19 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/META-INF/NOTICE @@ -0,0 +1,18 @@ +=========================================================================
+== NOTICE file corresponding to the section 4 d of ==
+== the Apache License, Version 2.0, ==
+== in this case for the Apache Tuscany distribution. ==
+=========================================================================
+
+This product includes software developed by the Apache Software Foundation
+(http://www.apache.org/).
+
+This product also includes software developed by:
+- the Eclipse Modeling Framework project (http://www.eclipse.org/emf/)
+- the Celtix project (http://celtix.objectweb.org/)
+- the Mozilla Rhino project (http://www.mozilla.org/rhino/)
+- the GlassFish JAX-WS project (https://jax-ws.dev.java.net/)
+
+Please read the LICENSE.txt file present in the root directory of this
+distribution.
+
diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/META-INF/README.txt b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/META-INF/README.txt new file mode 100644 index 0000000000..9b26d1690a --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/META-INF/README.txt @@ -0,0 +1,35 @@ +Apache Tuscany M1 build (May, 2006) +=================================== + +http://incubator.apache.org/tuscany/ + +Tuscany is an effort undergoing incubation at the Apache Software Foundation +(ASF), sponsored by the Web Services PMC. + +Incubation is required of all newly accepted projects until a further review +indicates that the infrastructure, communications, and decision making process +have stabilized in a manner consistent with other successful ASF projects. + +While incubation status is not necessarily a reflection of the completeness or +stability of the code, it does indicate that the project has yet to be fully +endorsed by the ASF. + + +Support +------- + +Any problem with this release can be reported to the Tuscany mailing list +or in the JIRA issue tracker. + +Mailing list subscription: + tuscany-dev-subscribe@ws.apache.org + +Jira: + http://issues.apache.org/jira/browse/Tuscany + + +Thank you for using Tuscany! + + +The Tuscany Team. + diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl new file mode 100644 index 0000000000..4ec90f3f2b --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://credit" xmlns:tns="http://credit" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="credit">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://credit" xmlns:tns="http://credit"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getCreditScore">
+ <complexType>
+ <sequence>
+ <element name="ssn" type="xsd:string" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getCreditScoreResponse">
+ <complexType>
+ <sequence>
+ <element name="score" type="xsd:int" />
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getCreditScoreRequest">
+ <wsdl:part element="tns:getCreditScore" name="inputMsg" />
+ </wsdl:message>
+
+ <wsdl:message name="getCreditScoreResponse">
+ <wsdl:part element="tns:getCreditScoreResponse" name="outputMsg" />
+ </wsdl:message>
+
+
+ <wsdl:portType name="CreditCheck">
+ <wsdl:operation name="getCreditScore">
+ <wsdl:input message="tns:getCreditScoreRequest" name="getCreditScoreRequest" />
+ <wsdl:output message="tns:getCreditScoreResponse" name="getCreditScoreResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="CreditCheckSoapBinding" type="tns:CreditCheck">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getCreditScore">
+ <wsdlsoap:operation soapAction="" />
+ <wsdl:input name="getCreditScoreRequest">
+ <wsdlsoap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="getCreditScoreResponse">
+ <wsdlsoap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="CreditCheckService">
+ <wsdl:port binding="tns:CreditCheckSoapBinding" name="CreditCheckSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/CreditCheckService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..9e409b2403 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> + +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web +Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> +<web-app> + + <display-name>Tuscany Calculator Web Service Sample</display-name> + + <filter> + <filter-name>tuscany</filter-name> + <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class> + </filter> + + <filter-mapping> + <filter-name>tuscany</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + +</web-app> diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/build.xml b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/build.xml new file mode 100644 index 0000000000..9a0a83bf1d --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/build.xml @@ -0,0 +1,66 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project name="mortgage-loanapproval" default="compile"> + <property name="test.class" value="mortgage.MortgageClient" /> + <property name="test.jar" value="demo-mortgage-loanapproval.jar" /> + + <target name="init"> + <mkdir dir="target/classes" /> + </target> + + <target name="compile" depends="init"> + <javac srcdir="src/main/java" destdir="target/classes" debug="on" source="1.5" target="1.5"> + <classpath> + <pathelement location="../../lib/tuscany-sca-manifest.jar" /> + </classpath> + </javac> + <copy todir="target/classes"> + <fileset dir="src/main/resources" /> + </copy> + <jar destfile="target/${test.jar}" basedir="target/classes"> + <manifest> + <attribute name="Main-Class" value="${test.class}" /> + </manifest> + </jar> + </target> + + <target name="run-classes"> + <java classname="${test.class}" fork="true"> + <classpath> + <pathelement path="target/classes" /> + <pathelement location="../../lib/tuscany-sca-manifest.jar" /> + </classpath> + </java> + </target> + + <target name="run"> + <java classname="${test.class}" fork="true"> + <classpath> + <pathelement path="target/${test.jar}" /> + <pathelement location="../../lib/tuscany-sca-manifest.jar" /> + </classpath> + </java> + </target> + + <target name="clean"> + <delete quiet="true" includeemptydirs="true"> + <fileset dir="target" /> + </delete> + </target> +</project> diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/credit_composite.jpg b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/credit_composite.jpg Binary files differnew file mode 100644 index 0000000000..e28ed63cfb --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/credit_composite.jpg diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/credit_composite.png b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/credit_composite.png Binary files differnew file mode 100644 index 0000000000..0bfce0078d --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/credit_composite.png diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/loan_approval.jpg b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/loan_approval.jpg Binary files differnew file mode 100644 index 0000000000..3f00557c7f --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/loan_approval.jpg diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/loan_approval.png b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/loan_approval.png Binary files differnew file mode 100644 index 0000000000..9d5f829fe5 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/loan_approval.png diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg Binary files differnew file mode 100644 index 0000000000..515b6ecde7 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly0.jpg diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly0.png b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly0.png Binary files differnew file mode 100644 index 0000000000..4b815a4b82 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly0.png diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg Binary files differnew file mode 100644 index 0000000000..01a7c55a14 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly1.jpg diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly1.png b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly1.png Binary files differnew file mode 100644 index 0000000000..07422c4f45 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly1.png diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg Binary files differnew file mode 100644 index 0000000000..992c048684 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly2.jpg diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly2.png b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly2.png Binary files differnew file mode 100644 index 0000000000..4667956ed0 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_assembly2.png diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_composite.jpg b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_composite.jpg Binary files differnew file mode 100644 index 0000000000..5021f6a317 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_composite.jpg diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_composite.png b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_composite.png Binary files differnew file mode 100644 index 0000000000..1398c50ded --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_composite.png diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc Binary files differnew file mode 100644 index 0000000000..00d45e1084 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_diagrams.doc diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package1.jpg b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package1.jpg Binary files differnew file mode 100644 index 0000000000..e91c5f1bbd --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package1.jpg diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package1.png b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package1.png Binary files differnew file mode 100644 index 0000000000..db304a4c28 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package1.png diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package2.jpg b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package2.jpg Binary files differnew file mode 100644 index 0000000000..e8c2865e4a --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package2.jpg diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package2.png b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package2.png Binary files differnew file mode 100644 index 0000000000..502e538e94 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_package2.png diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg Binary files differnew file mode 100644 index 0000000000..fccf2e35c3 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_scenario.jpg diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_scenario.png b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_scenario.png Binary files differnew file mode 100644 index 0000000000..b8f42ad318 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/mortgage_scenario.png diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/readme.html b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/readme.html new file mode 100644 index 0000000000..bee954a198 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/doc/readme.html @@ -0,0 +1,136 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> + +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> +<meta http-equiv="Content-Style-Type" content="text/css"> + +<title>Mortgage Sample</title> +</head> + +<body> +<h3>Mortgage Sample</h3> + +<h4>Overview</h4> + +<p>The Tuscany Web services client Helloworld sample shows how to +call a remote Web service by wiring an SCA component to a reference +which uses a Web service binding.</p> + +<h4>Prerequisites</h4> + +<p>Obtain the following prerequisites and install according to their +documentation.</p> + +<ul> + <li><a href="http://java.sun.com/javase/downloads/index.jsp" + target="_blank">JDK 5.0</a></li> + + <li><a href="http://maven.apache.org/download.html" + target="_blank">Maven 2.0.4</a></li> +</ul> + +<h4>The business scenario</h4> +The "loan approval" application accepts a mortgage request including the +customer's details and the requested loan amount. It first checks the +credit of the customer to make sure the credit score meets the minimum +requirement. The interest rate is determined based on the principal +requested, the term for the loan and the customers home state. It then +uses a mortgage calculator to calculate the ratio by dividing potential +monthly payment by the customer's income. The ratio and credit score are +passed to perform the risk assessment which makes the final decision. +<p><img src="mortgage_scenario.png" /> +<h4>Packaging structure</h4> +<img src="mortgage_package2.png" /> + +<h4>Building</h4> + +<p>To build the sample issue :</p> +<pre> +<code>mvn<br></code> +</pre> + +<p>The result after executing is in the <span + style="font-weight: bold;">target</span> subdirectory the <span + style="font-weight: bold;">sample-mortgage.jar</span></p> + +<h4>Setup</h4> + +<p>Set up the Tuscany standalone runtime environment using the +following command:</p> +<pre> +<code>mvn dependency:unpack <br></code> +</pre> + +<p>After completion there should be a <span + style="font-weight: bold;">target\distribution</span> subdirectory +created that has the Tuscany standalone runtime.</p> + +<p>The Tuscany Web servivces binding requires the Axis2 and SDO +databinding extensions so copy these to the standalone launcher +extensions directory:</p> +<pre> +<code>copy target\distribution\contrib\axis2-1.0-incubator-M2.jar target\distribution\extensions<br></code> +<code>copy target\distribution\contrib\databinding-sdo-1.0-incubator-M2.jar target\distribution\extensions<br></code> +</pre> + +<h4>Running</h4> + +<p>Execute the following command: (<span style="font-style: italic;">cut +and paste to command line</span>)</p> +<pre> +<code>java -jar target/distribution/bin/launcher.jar target/sample-mortgage.jar</code> +</pre> + +<h4>Results</h4> + +<p>The sample when run should simply display to the standard output:<br> +<samp> <br> +Approved: John Smith[111-22-3333] </samp></p> + +We have two versions of the CreditCheck web service implementation in this sample application: +<ul> +<li>a web service developed with Apache axis2 1.1 release. It's packaged as an Axis2 aar. +<li>a SCA component exposed as a web service. It's packaged as a WAR. +</ul> + +<h4>Deploy the Axis2 CreditCheck web service to Tomcat</h4> +<ol> + <li>Download the WAR (Web Archive) ditribution from <a + href="http://ws.apache.org/axis2/download/1_1/download.cgi">Apache + Axis2 1.1 release download site</a>. + <li>Copy axis2.war to <tomcat_home>\webapps. + <li>Start Tomcat so that axis2.war get deployed to + <tomcat_home>\webapps\axis2. + <li>Copy creditws-axis2\build\lib\CreditCheckService.aar to + <tomcat_home>\webapps\axis2\WEB-INF\services. +</ol> + +<h4>Deploy the CreditComposite to Tomcat</h4> +<ol> + <li>Copy credit.war to <tomcat_home>\webapps. + <li>Start Tomcat so that credit.war get deployed to + <tomcat_home>\webapps\credit. The CreditCheck web serivice will + be up and running. +</ol> + +</body> +</html> diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/pom.xml b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/pom.xml new file mode 100644 index 0000000000..0ca5357232 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/pom.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-demos</artifactId> + <version>1.0-incubating</version> + <relativePath>../pom.xml</relativePath> + </parent> + <artifactId>demo-mortgage-loanapproval</artifactId> + <packaging>jar</packaging> + <name>Apache Tuscany SCA Mortgage Loan Approval Demo</name> + <description>A sample Mortgage application made of several SCA components wired together.</description> + + <properties> + <property name="tuscanyVersion">1.0-incubating</property> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-host-embedded</artifactId> + <version>1.0-incubating</version> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-java-runtime</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-binding-ws-axis2</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-script</artifactId> + <version>1.0-incubating</version> + <scope>runtime</scope> + </dependency> + + </dependencies> + + <build> + <defaultGoal>install</defaultGoal> + <finalName>${artifactId}</finalName> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <archive> + <manifest> + <mainClass>mortgage.MortgageClient</mainClass> + </manifest> + </archive> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java new file mode 100644 index 0000000000..c5787b7819 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheck.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package mortgage; + +import org.osoa.sca.annotations.Remotable; + +/** + * CreditCheck interface + */ +@Remotable +public interface CreditCheck { + int getCreditScore(String ssn); +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java new file mode 100644 index 0000000000..dc803d9688 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/CreditCheckImpl.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package mortgage; + +import org.osoa.sca.annotations.Service; + +/** + * A pojo implementation of the CreditCheck service + */ +@Service(CreditCheck.class) +public class CreditCheckImpl implements CreditCheck { + + public int getCreditScore(String ssn) { + int score = (int)(700 + (Math.random() - 0.5) * 100); + System.out.println("Credit score for " + ssn + ": " + score); + return score; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java new file mode 100644 index 0000000000..66a486d516 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/Customer.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package mortgage; + +/** + * A simple Customer object + */ +public class Customer { + private String ssn; + private String firstName; + private String lastName; + private double monthlyIncome; + private String state; + + public double getMonthlyIncome() { + return monthlyIncome; + } + + public void setMonthlyIncome(double monthlyIncome) { + this.monthlyIncome = monthlyIncome; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getSsn() { + return ssn; + } + + public void setSsn(String ssn) { + this.ssn = ssn; + } + + @Override + public String toString() { + return firstName + " " + lastName + "[" + ssn + "]"; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java new file mode 100644 index 0000000000..b5bafeb204 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuote.java @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package mortgage; + +public interface InterestRateQuote { + public float getRate(String state, double loanAmount, int termInYears); +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.java new file mode 100644 index 0000000000..8c642667f1 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/InterestRateQuoteImpl.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package mortgage; + +import org.osoa.sca.annotations.Service; + +@Service(InterestRateQuote.class) +public class InterestRateQuoteImpl implements InterestRateQuote { + public float getRate(String state, double loanAmount, int termInYears) { + float rate = 6.0f; + if (termInYears == 5) { + rate = 5.5f; + } else { + rate = 6.5f; + } + System.out.println("Interest rate for a " + termInYears + + "-year loan of $" + + loanAmount + + " in " + + state + + ": " + + rate + + "%"); + return rate; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.java new file mode 100644 index 0000000000..dcdad18496 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApproval.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package mortgage; + +/** + * Loan Approval interface + */ +public interface LoanApproval { + public boolean approve(Customer customer, double loanAmount, int years); +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java new file mode 100644 index 0000000000..40bfdc4a1d --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/LoanApprovalImpl.java @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package mortgage; + +import org.osoa.sca.annotations.Property; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of the LoanApproval service. + */ +@Service(LoanApproval.class) +// Service declaration +public class LoanApprovalImpl implements LoanApproval { + private CreditCheck[] creditCheck; + private MortgageCalculator mortgageCalculator; + private InterestRateQuote interestRateQuote; + + // Reference declaration using a protected or public field + @Reference + public RiskAssessment riskAssessment; + + private int minimumCreditScore = 650; + + // Property declaration using a setter method + @Property(name = "minimumCreditScore") + public void setMinimumCreditScore(int minimumCreditScore) { + this.minimumCreditScore = minimumCreditScore; + } + + // Reference declaration using a setter method + @Reference + public void setCreditCheck(CreditCheck[] creditCheck) { + this.creditCheck = creditCheck; + } + + @Reference + public void setInterestRateQuote(InterestRateQuote interestRateQuote) { + this.interestRateQuote = interestRateQuote; + } + + @Reference + public void setMortgageCalculator(MortgageCalculator mortgageCalculator) { + this.mortgageCalculator = mortgageCalculator; + } + + public boolean approve(Customer customer, double loanAmount, int years) { + int score = 0; + for (int i = 0; i < creditCheck.length; i++) { + score += creditCheck[i].getCreditScore(customer.getSsn()); + } + if (score != 0) { + score = score / creditCheck.length; + } + if (score < minimumCreditScore) { + System.err.println("Credit score " + score + " is below the minimum " + minimumCreditScore + "."); + return false; + } + float rate = interestRateQuote.getRate(customer.getState(), loanAmount, years); + double monthlyPayment = mortgageCalculator.getMonthlyPayment(loanAmount, years, rate); + double ratio = monthlyPayment / customer.getMonthlyIncome(); + boolean approved = riskAssessment.assess(score, ratio); + if (!approved) { + System.err.println("Debt/Income ratio " + ratio + " is too high."); + } + return approved; + } +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java new file mode 100644 index 0000000000..cacd8694de --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculator.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package mortgage; + +import org.osoa.sca.annotations.Remotable; + +/** + * The Mortgage Calculator service interface. + */ +@Remotable +public interface MortgageCalculator { + public double getMonthlyPayment(double principal, int years, float interestRate); +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java new file mode 100644 index 0000000000..015f1bae98 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageCalculatorImpl.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package mortgage; + +import org.osoa.sca.annotations.Service; + +/** + * An implementation of the Calculator service. + */ +@Service(MortgageCalculator.class) +public class MortgageCalculatorImpl implements MortgageCalculator { + + public double getMonthlyPayment(double principal, int years, float interestRate) { + double monthlyRate = interestRate / 12.0 / 100.0; + double p = Math.pow(1 + monthlyRate, years * 12); + double q = p / (p - 1); + double monthlyPayment = principal * monthlyRate * q; + System.out.println("Monthly payment for a " + years + "-year loan of $" + principal + ": " + monthlyPayment); + return monthlyPayment; + } + +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java new file mode 100644 index 0000000000..d69f0a1163 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/MortgageClient.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package mortgage; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * This client program to invoke the Mortgage LoanApproval service + */ +public class MortgageClient { + public static void main(String[] args) throws Exception { + + SCADomain domain = SCADomain.newInstance("Mortgage1.composite"); + LoanApproval loanApplication = domain.getService(LoanApproval.class, "LoanApprovalComponent"); + + // Create the customer + Customer customer = new Customer(); + customer.setSsn("111-22-3333"); + customer.setFirstName("John"); + customer.setLastName("Smith"); + customer.setMonthlyIncome(5000.0d); + customer.setState("CA"); + + // Invoke the service + boolean result = loanApplication.approve(customer, 200000d, 30); + System.out.println((result ? "Approved: " : "Rejected: ") + customer); + } +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.java new file mode 100644 index 0000000000..23c9589e85 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessment.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package mortgage; + +/** + * Risk Assessment interface + */ +public interface RiskAssessment { + public boolean assess(int creditScore, double ratio); +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java new file mode 100644 index 0000000000..c2116366ec --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/java/mortgage/RiskAssessmentImpl.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package mortgage; + +import org.osoa.sca.annotations.Service; + +/** + * A pojo implementation of RiskAssessment service + */ +@Service(RiskAssessment.class) +public class RiskAssessmentImpl implements RiskAssessment { + public boolean assess(int creditScore, double ratio) { + if (creditScore >= 750) { + return ratio < 0.35; + } else if (creditScore >= 700) { + return ratio < 0.30; + } else { + return ratio < 0.25; + } + } +} diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/META-INF/LICENSE.txt b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/META-INF/LICENSE.txt new file mode 100644 index 0000000000..25d78feeac --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/META-INF/LICENSE.txt @@ -0,0 +1,1277 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +APACHE TUSCANY SUBCOMPONENTS: + +The Apache Tuscany distribution includes a number of subcomponents with +separate copyright notices and license terms. Your use of the source +code for the these subcomponents is subject to the terms and +conditions of the following licenses. + +=============================================================================== + +For the Eclipse Modeling Framework component and the Celtix binding: + +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE +PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF +THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and +documentation distributed under this Agreement, and +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and +are distributed by that particular Contributor. A Contribution +'originates' from a Contributor if it was added to the Program by such +Contributor itself or anyone acting on such Contributor's behalf. +Contributions do not include additions to the Program which: (i) are +separate modules of software distributed in conjunction with the +Program under their own license agreement, and (ii) are not derivative +works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor +which are necessarily infringed by the use or sale of its Contribution +alone or when combined with the Program. + +"Program" means the Contributions distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this +Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby +grants Recipient a non-exclusive, worldwide, royalty-free copyright +license to reproduce, prepare derivative works of, publicly display, +publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and +object code form. + +b) Subject to the terms of this Agreement, each Contributor hereby +grants Recipient a non-exclusive, worldwide, royalty-free patent +license under Licensed Patents to make, use, sell, offer to sell, +import and otherwise transfer the Contribution of such Contributor, if +any, in source code and object code form. This patent license shall +apply to the combination of the Contribution and the Program if, at +the time the Contribution is added by the Contributor, such addition +of the Contribution causes such combination to be covered by the +Licensed Patents. The patent license shall not apply to any other +combinations which include the Contribution. No hardware per se is +licensed hereunder. + +c) Recipient understands that although each Contributor grants the +licenses to its Contributions set forth herein, no assurances are +provided by any Contributor that the Program does not infringe the +patent or other intellectual property rights of any other entity. Each +Contributor disclaims any liability to Recipient for claims brought by +any other entity based on infringement of intellectual property rights +or otherwise. As a condition to exercising the rights and licenses +granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For +example, if a third party patent license is required to allow +Recipient to distribute the Program, it is Recipient's responsibility +to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient +copyright rights in its Contribution, if any, to grant the copyright +license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form +under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties +and conditions, express and implied, including warranties or +conditions of title and non-infringement, and implied warranties or +conditions of merchantability and fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability +for damages, including direct, indirect, special, incidental and +consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are +offered by that Contributor alone and not by any other party; and + +iv) states that source code for the Program is available from such +Contributor, and informs licensees how to obtain it in a reasonable +manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the +Program. + +Contributors may not remove or alter any copyright notices contained +within the Program. + +Each Contributor must identify itself as the originator of its +Contribution, if any, in a manner that reasonably allows subsequent +Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain +responsibilities with respect to end users, business partners and the +like. While this license is intended to facilitate the commercial use +of the Program, the Contributor who includes the Program in a +commercial product offering should do so in a manner which does not +create potential liability for other Contributors. Therefore, if a +Contributor includes the Program in a commercial product offering, +such Contributor ("Commercial Contributor") hereby agrees to defend +and indemnify every other Contributor ("Indemnified Contributor") +against any losses, damages and costs (collectively "Losses") arising +from claims, lawsuits and other legal actions brought by a third party +against the Indemnified Contributor to the extent caused by the acts +or omissions of such Commercial Contributor in connection with its +distribution of the Program in a commercial product offering. The +obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. +In order to qualify, an Indemnified Contributor must: a) promptly +notify the Commercial Contributor in writing of such claim, and b) +allow the Commercial Contributor to control, and cooperate with the +Commercial Contributor in, the defense and any related settlement +negotiations. The Indemnified Contributor may participate in any such +claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those +performance claims and warranties, and if a court requires any other +Contributor to pay any damages as a result, the Commercial Contributor +must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS +PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY +WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY +OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to +the risks and costs of program errors, compliance with applicable +laws, damage to or loss of data, programs or equipment, and +unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR +ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING +WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR +DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that +the Program itself (excluding combinations of the Program with other +software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of +the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any licenses +granted by Recipient relating to the Program shall continue and +survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and +may only be modified in the following manner. The Agreement Steward +reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement +Steward has the right to modify this Agreement. The Eclipse Foundation +is the initial Agreement Steward. The Eclipse Foundation may assign +the responsibility to serve as the Agreement Steward to a suitable +separate entity. Each new version of the Agreement will be given a +distinguishing version number. The Program (including Contributions) +may always be distributed subject to the version of the Agreement +under which it was received. In addition, after a new version of the +Agreement is published, Contributor may elect to distribute the +Program (including its Contributions) under the new version. Except as +expressly stated in Sections 2(a) and 2(b) above, Recipient receives +no rights or licenses to the intellectual property of any Contributor +under this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under this +Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and +the intellectual property laws of the United States of America. No +party to this Agreement will bring a legal action under this Agreement +more than one year after the cause of action arose. Each party waives +its rights to a jury trial in any resulting litigation. + +=============================================================================== + +For the Rhino JavaScript container component: + +Mozilla Public License 1.1 (MPL 1.1) + +1. Definitions. + + 1.0.1. "Commercial Use" means distribution or otherwise making the +Covered Code available to a third party. + + 1.1. "Contributor" means each entity that creates or contributes to +the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original Code, +prior Modifications used by a Contributor, and the Modifications made by that +particular Contributor. + + 1.3. "Covered Code" means the Original Code or Modifications or the +combination of the Original Code and Modifications, in each case including +portions thereof. + + 1.4. "Electronic Distribution Mechanism" means a mechanism generally +accepted in the software development community for the electronic transfer of +data. + + 1.5. "Executable" means Covered Code in any form other than Source +Code. + + 1.6. "Initial Developer" means the individual or entity identified as +the Initial Developer in the Source Code notice required by Exhibit A. + + 1.7. "Larger Work" means a work which combines Covered Code or +portions thereof with code not governed by the terms of this License. + + 1.8. "License" means this document. + + 1.8.1. "Licensable" means having the right to grant, to the maximum +extent possible, whether at the time of the initial grant or subsequently +acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means any addition to or deletion from the +substance or structure of either the Original Code or any previous +Modifications. When Covered Code is released as a series of files, a +Modification is: + A. Any addition to or deletion from the contents of a file +containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or +previous Modifications. + + 1.10. "Original Code" means Source Code of computer software code +which is described in the Source Code notice required by Exhibit A as Original +Code, and which, at the time of its release under this License is not already +Covered Code governed by this License. + + 1.10.1. "Patent Claims" means any patent claim(s), now owned or +hereafter acquired, including without limitation, method, process, and +apparatus claims, in any patent Licensable by grantor. + + 1.11. "Source Code" means the preferred form of the Covered Code for +making modifications to it, including all modules it contains, plus any +associated interface definition files, scripts used to control compilation and +installation of an Executable, or source code differential comparisons against +either the Original Code or another well known, available Covered Code of the +Contributor's choice. The Source Code can be in a compressed or archival form, +provided the appropriate decompression or de-archiving software is widely +available for no charge. + + 1.12. "You" (or "Your") means an individual or a legal entity +exercising rights under, and complying with all of the terms of, this License +or a future version of this License issued under Section 6.1. For legal +entities, "You" includes any entity which controls, is controlled by, or is +under common control with You. For purposes of this definition, "control" +means (a) the power, direct or indirect, to cause the direction or management +of such entity, whether by contract or otherwise, or (b) ownership of more +than fifty percent (50%) of the outstanding shares or beneficial ownership of +such entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. + The Initial Developer hereby grants You a world-wide, royalty-free, +non-exclusive license, subject to third party intellectual property claims: + (a) under intellectual property rights (other than patent or +trademark) Licensable by Initial Developer to use, reproduce, modify, display, +perform, sublicense and distribute the Original Code (or portions thereof) +with or without Modifications, and/or as part of a Larger Work; and + + (b) under Patents Claims infringed by the making, using or selling +of Original Code, to make, have made, use, practice, sell, and offer for sale, +and/or otherwise dispose of the Original Code (or portions thereof). + (c) the licenses granted in this Section 2.1(a) and +(b) are effective on the date Initial Developer first distributes Original +Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is +granted: 1) for code that You delete from the Original Code; 2) separate from +the Original Code; or 3) for infringements caused by: i) the modification of +the Original Code or ii) the combination of the Original Code with other +software or devices. + + 2.2. Contributor Grant. + Subject to third party intellectual property claims, each Contributor +hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or +trademark) Licensable by Contributor, to use, reproduce, modify, display, +perform, sublicense and distribute the Modifications created by such +Contributor (or portions thereof) either on an unmodified basis, with other +Modifications, as Covered Code and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling +of Modifications made by that Contributor either alone and/or in combination +with its Contributor Version (or portions of such combination), to make, use, +sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications +made by that Contributor (or portions thereof); and 2) the combination of +Modifications made by that Contributor with its Contributor Version (or +portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are +effective on the date Contributor first makes Commercial Use of the Covered +Code. + + (d) Notwithstanding Section 2.2(b) above, no patent license is +granted: 1) for any code that Contributor has deleted from the Contributor +Version; 2) separate from the Contributor Version; 3) for infringements +caused by: i) third party modifications of Contributor Version or ii) the +combination of Modifications made by that Contributor with other software +(except as part of the Contributor Version) or other devices; or 4) under +Patent Claims infringed by Covered Code in the absence of Modifications made +by that Contributor. + + +3. Distribution Obligations. + + 3.1. Application of License. + The Modifications which You create or to which You contribute are +governed by the terms of this License, including without limitation Section +2.2. The Source Code version of Covered Code may be distributed only under the +terms of this License or a future version of this License released under +Section 6.1, and You must include a copy of this License with every copy of +the Source Code You distribute. You may not offer or impose any terms on any +Source Code version that alters or restricts the applicable version of this +License or the recipients' rights hereunder. However, You may include an +additional document offering the additional rights described in Section 3.5. + + 3.2. Availability of Source Code. + Any Modification which You create or to which You contribute must be +made available in Source Code form under the terms of this License either on +the same media as an Executable version or via an accepted Electronic +Distribution Mechanism to anyone to whom you made an Executable version +available; and if made available via Electronic Distribution Mechanism, must +remain available for at least twelve (12) months after the date it initially +became available, or at least six (6) months after a subsequent version of +that particular Modification has been made available to such recipients. You +are responsible for ensuring that the Source Code version remains available +even if the Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. + You must cause all Covered Code to which You contribute to contain a +file documenting the changes You made to create that Covered Code and the date +of any change. You must include a prominent statement that the Modification is +derived, directly or indirectly, from Original Code provided by the Initial +Developer and including the name of the Initial Developer in (a) the Source +Code, and (b) in any notice in an Executable version or related documentation +in which You describe the origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + (a) Third Party Claims. + If Contributor has knowledge that a license under a third party's +intellectual property rights is required to exercise the rights granted by +such Contributor under Sections 2.1 or 2.2, Contributor must include a text +file with the Source Code distribution titled "LEGAL" which describes the +claim and the party making the claim in sufficient detail that a recipient +will know whom to contact. If Contributor obtains such knowledge after the +Modification is made available as described in Section 3.2, Contributor shall +promptly modify the LEGAL file in all copies Contributor makes available +thereafter and shall take other steps (such as notifying appropriate mailing +lists or newsgroups) reasonably calculated to inform those who received the +Covered Code that new knowledge has been obtained. + + (b) Contributor APIs. + If Contributor's Modifications include an application programming +interface and Contributor has knowledge of patent licenses which are +reasonably necessary to implement that API, Contributor must also include this +information in the LEGAL file. + + (c) Representations. + Contributor represents that, except as disclosed pursuant to +Section 3.4(a) above, Contributor believes that Contributor's Modifications +are Contributor's original creation(s) and/or Contributor has sufficient +rights to grant the rights conveyed by this License. + + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source +Code. If it is not possible to put such notice in a particular Source Code +file due to its structure, then You must include such notice in a location +(such as a relevant directory) where a user would be likely to look for such a +notice. If You created one or more Modification(s) You may add your name as a +Contributor to the notice described in Exhibit A. You must also duplicate +this License in any documentation for the Source Code where You describe +recipients' rights or ownership rights relating to Covered Code. You may +choose to offer, and to charge a fee for, warranty, support, indemnity or +liability obligations to one or more recipients of Covered Code. However, You +may do so only on Your own behalf, and not on behalf of the Initial Developer +or any Contributor. You must make it absolutely clear than any such warranty, +support, indemnity or liability obligation is offered by You alone, and You +hereby agree to indemnify the Initial Developer and every Contributor for any +liability incurred by the Initial Developer or such Contributor as a result of +warranty, support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the +requirements of Section 3.1-3.5 have been met for that Covered Code, and if +You include a notice stating that the Source Code version of the Covered Code +is available under the terms of this License, including a description of how +and where You have fulfilled the obligations of Section 3.2. The notice must +be conspicuously included in any notice in an Executable version, related +documentation or collateral in which You describe recipients' rights relating +to the Covered Code. You may distribute the Executable version of Covered Code +or ownership rights under a license of Your choice, which may contain terms +different from this License, provided that You are in compliance with the +terms of this License and that the license for the Executable version does not +attempt to limit or alter the recipient's rights in the Source Code version +from the rights set forth in this License. If You distribute the Executable +version under a different license You must make it absolutely clear that any +terms which differ from this License are offered by You alone, not by the +Initial Developer or any Contributor. You hereby agree to indemnify the +Initial Developer and every Contributor for any liability incurred by the +Initial Developer or such Contributor as a result of any such terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code +not governed by the terms of this License and distribute the Larger Work as a +single product. In such a case, You must make sure the requirements of this +License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + + If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Code due to statute, +judicial order, or regulation then You must: (a) comply with the terms of this +License to the maximum extent possible; and (b) describe the limitations and +the code they affect. Such description must be included in the LEGAL file +described in Section 3.4 and must be included with all distributions of the +Source Code. Except to the extent prohibited by statute or regulation, such +description must be sufficiently detailed for a recipient of ordinary skill to +be able to understand it. + +5. Application of this License. + + This License applies to code to which the Initial Developer has attached +the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Netscape Communications Corporation ("Netscape") may publish revised +and/or new versions of the License from time to time. Each version will be +given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the +License, You may always continue to use it under the terms of that version. +You may also choose to use such Covered Code under the terms of any subsequent +version of the License published by Netscape. No one other than Netscape has +the right to modify the terms applicable to Covered Code created under this +License. + + 6.3. Derivative Works. + If You create or use a modified version of this License (which you may +only do in order to apply it to code which is not already Covered Code +governed by this License), You must (a) rename Your license so that the +phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or +any confusingly similar phrase do not appear in your license (except to note +that your license differs from this License) and (b) otherwise make it clear +that Your version of the license contains terms which differ from the Mozilla +Public License and Netscape Public License. (Filling in the name of the +Initial Developer, Original Code or Contributor in the notice described in +Exhibit A shall not of themselves be deemed to be modifications of this +License.) + +7. DISCLAIMER OF WARRANTY. + + COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT +LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, +FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE +QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED +CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY +OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR +CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS +LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS +DISCLAIMER. + +8. TERMINATION. + + 8.1. This License and the rights granted hereunder will terminate +automatically if You fail to comply with terms herein and fail to cure such +breach within 30 days of becoming aware of the breach. All sublicenses to the +Covered Code which are properly granted shall survive any termination of this +License. Provisions which, by their nature, must remain in effect beyond the +termination of this License shall survive. + + 8.2. If You initiate litigation by asserting a patent infringement +claim (excluding declatory judgment actions) against Initial Developer or a +Contributor (the Initial Developer or Contributor against whom You file such +action is referred to as "Participant") alleging that: + + (a) such Participant's Contributor Version directly or indirectly +infringes any patent, then any and all rights granted by such Participant to +You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice +from Participant terminate prospectively, unless if within 60 days after +receipt of notice You either: (i) agree in writing to pay Participant a +mutually agreeable reasonable royalty for Your past and future use of +Modifications made by such Participant, or (ii) withdraw Your litigation claim +with respect to the Contributor Version against such Participant. If within +60 days of notice, a reasonable royalty and payment arrangement are not +mutually agreed upon in writing by the parties or the litigation claim is not +withdrawn, the rights granted by Participant to You under Sections 2.1 and/or +2.2 automatically terminate at the expiration of the 60 day notice period +specified above. + + (b) any software, hardware, or device, other than such Participant's +Contributor Version, directly or indirectly infringes any patent, then any +rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are +revoked effective as of the date You first made, used, sold, distributed, or +had made, Modifications made by that Participant. + + 8.3. If You assert a patent infringement claim against Participant +alleging that such Participant's Contributor Version directly or indirectly +infringes any patent where such claim is resolved (such as by license or +settlement) prior to the initiation of patent infringement litigation, then +the reasonable value of the licenses granted by such Participant under +Sections 2.1 or 2.2 shall be taken into account in determining the amount or +value of any payment or license. + + 8.4. In the event of termination under Sections 8.1 or 8.2 above, all +end user license agreements (excluding distributors and resellers) which have +been validly granted by You or any distributor hereunder prior to termination +shall survive termination. + +9. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT +(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL +DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY +SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, +WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER +FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, +EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH +DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH +OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT +APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE +EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS +EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + + The Covered Code is a "commercial item," as that term is defined in 48 +C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and +"commercial computer software documentation," as such terms are used in 48 +C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. +227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users +acquire Covered Code with only those rights set forth herein. + +11. MISCELLANEOUS. + + This License represents the complete agreement concerning subject matter +hereof. If any provision of this License is held to be unenforceable, such +provision shall be reformed only to the extent necessary to make it +enforceable. This License shall be governed by California law provisions +(except to the extent applicable law, if any, provides otherwise), excluding +its conflict-of-law provisions. With respect to disputes in which at least one +party is a citizen of, or an entity chartered or registered to do business in +the United States of America, any litigation relating to this License shall be +subject to the jurisdiction of the Federal Courts of the Northern District of +California, with venue lying in Santa Clara County, California, with the +losing party responsible for costs, including without limitation, court costs +and reasonable attorneys' fees and expenses. The application of the United +Nations Convention on Contracts for the International Sale of Goods is +expressly excluded. Any law or regulation which provides that the language of +a contract shall be construed against the drafter shall not apply to this +License. + +12. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is +responsible for claims and damages arising, directly or indirectly, out of its +utilization of rights under this License and You agree to work with Initial +Developer and Contributors to distribute such responsibility on an equitable +basis. Nothing herein is intended or shall be deemed to constitute any +admission of liability. + +13. MULTIPLE-LICENSED CODE. + + Initial Developer may designate portions of the Covered Code as +Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits +you to utilize portions of the Covered Code under Your choice of the MPL or +the alternative licenses, if any, specified by the Initial Developer in the +file described in Exhibit A. + + +EXHIBIT A -Mozilla Public License. + + ``The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" +basis, WITHOUT WARRANTY OF + ANY KIND, either express or implied. See the License for the specific +language governing rights and + limitations under the License. + + The Original Code is ______________________________________. + + The Initial Developer of the Original Code is ________________________. +Portions created by + ______________________ are Copyright (C) ______ +_______________________. All Rights + Reserved. + + Contributor(s): ______________________________________. + + Alternatively, the contents of this file may be used under the terms of +the _____ license (the [___] License), in which case the provisions of +[______] License are applicable instead of those above. If you wish to allow +use of your version of this file only under the terms of the [____] License +and not to allow others to use your version of this file under the MPL, +indicate your decision by deleting the provisions above and replace them +with the notice and other provisions required by the [___] License. If you do +not delete the provisions above, a recipient may use your version of this file +under either the MPL or the [___] License." + + [NOTE: The text of this Exhibit A may differ slightly from the text of +the notices in the Source Code files of the Original Code. You should use the +text of this Exhibit A rather than the text found in the Original Code Source +Code for Your Modifications.] + + +=============================================================================== + +For the JAX-WS Reference Implementation component: + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + + + 1. Definitions. + + 1.1. "Contributor" means each individual or entity that + creates or contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the + Original Software, prior Modifications used by a + Contributor (if any), and the Modifications made by that + particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or + (b) Modifications, or (c) the combination of files + containing Original Software with files containing + Modifications, in each case including portions thereof. + + 1.4. "Executable" means the Covered Software in any form + other than Source Code. + + 1.5. "Initial Developer" means the individual or entity + that first makes Original Software available under this + License. + + 1.6. "Larger Work" means a work which combines Covered + Software or portions thereof with code not governed by the + terms of this License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the + maximum extent possible, whether at the time of the initial + grant or subsequently acquired, any and all of the rights + conveyed herein. + + 1.9. "Modifications" means the Source Code and Executable + form of any of the following: + + A. Any file that results from an addition to, + deletion from or modification of the contents of a + file containing Original Software or previous + Modifications; + + B. Any new file that contains any part of the + Original Software or previous Modification; or + + C. Any new file that is contributed or otherwise made + available under the terms of this License. + + 1.10. "Original Software" means the Source Code and + Executable form of computer software code that is + originally released under this License. + + 1.11. "Patent Claims" means any patent claim(s), now owned + or hereafter acquired, including without limitation, + method, process, and apparatus claims, in any patent + Licensable by grantor. + + 1.12. "Source Code" means (a) the common form of computer + software code in which modifications are made and (b) + associated documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal + entity exercising rights under, and complying with all of + the terms of, this License. For legal entities, "You" + includes any entity which controls, is controlled by, or is + under common control with You. For purposes of this + definition, "control" means (a) the power, direct or + indirect, to cause the direction or management of such + entity, whether by contract or otherwise, or (b) ownership + of more than fifty percent (50%) of the outstanding shares + or beneficial ownership of such entity. + + 2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, the + Initial Developer hereby grants You a world-wide, + royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Initial Developer, + to use, reproduce, modify, display, perform, + sublicense and distribute the Original Software (or + portions thereof), with or without Modifications, + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, + using or selling of Original Software, to make, have + made, use, practice, sell, and offer for sale, and/or + otherwise dispose of the Original Software (or + portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) + are effective on the date Initial Developer first + distributes or otherwise makes the Original Software + available to a third party under the terms of this + License. + + (d) Notwithstanding Section 2.1(b) above, no patent + license is granted: (1) for code that You delete from + the Original Software, or (2) for infringements + caused by: (i) the modification of the Original + Software, or (ii) the combination of the Original + Software with other software or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, each + Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than + patent or trademark) Licensable by Contributor to + use, reproduce, modify, display, perform, sublicense + and distribute the Modifications created by such + Contributor (or portions thereof), either on an + unmodified basis, with other Modifications, as + Covered Software and/or as part of a Larger Work; and + + + (b) under Patent Claims infringed by the making, + using, or selling of Modifications made by that + Contributor either alone and/or in combination with + its Contributor Version (or portions of such + combination), to make, use, sell, offer for sale, + have made, and/or otherwise dispose of: (1) + Modifications made by that Contributor (or portions + thereof); and (2) the combination of Modifications + made by that Contributor with its Contributor Version + (or portions of such combination). + + (c) The licenses granted in Sections 2.2(a) and + 2.2(b) are effective on the date Contributor first + distributes or otherwise makes the Modifications + available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent + license is granted: (1) for any code that Contributor + has deleted from the Contributor Version; (2) for + infringements caused by: (i) third party + modifications of Contributor Version, or (ii) the + combination of Modifications made by that Contributor + with other software (except as part of the + Contributor Version) or other devices; or (3) under + Patent Claims infringed by Covered Software in the + absence of Modifications made by that Contributor. + + 3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make + available in Executable form must also be made available in + Source Code form and that Source Code form must be + distributed only under the terms of this License. You must + include a copy of this License with every copy of the + Source Code form of the Covered Software You distribute or + otherwise make available. You must inform recipients of any + such Covered Software in Executable form as to how they can + obtain such Covered Software in Source Code form in a + reasonable manner on or through a medium customarily used + for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You + contribute are governed by the terms of this License. You + represent that You believe Your Modifications are Your + original creation(s) and/or You have sufficient rights to + grant the rights conveyed by this License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications + that identifies You as the Contributor of the Modification. + You may not remove or alter any copyright, patent or + trademark notices contained within the Covered Software, or + any notices of licensing or any descriptive text giving + attribution to any Contributor or the Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered + Software in Source Code form that alters or restricts the + applicable version of this License or the recipients' + rights hereunder. You may choose to offer, and to charge a + fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Software. + However, you may do so only on Your own behalf, and not on + behalf of the Initial Developer or any Contributor. You + must make it absolutely clear that any such warranty, + support, indemnity or liability obligation is offered by + You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred + by the Initial Developer or such Contributor as a result of + warranty, support, indemnity or liability terms You offer. + + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered + Software under the terms of this License or under the terms + of a license of Your choice, which may contain terms + different from this License, provided that You are in + compliance with the terms of this License and that the + license for the Executable form does not attempt to limit + or alter the recipient's rights in the Source Code form + from the rights set forth in this License. If You + distribute the Covered Software in Executable form under a + different license, You must make it absolutely clear that + any terms which differ from this License are offered by You + alone, not by the Initial Developer or Contributor. You + hereby agree to indemnify the Initial Developer and every + Contributor for any liability incurred by the Initial + Developer or such Contributor as a result of any such terms + You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software + with other code not governed by the terms of this License + and distribute the Larger Work as a single product. In such + a case, You must make sure the requirements of this License + are fulfilled for the Covered Software. + + 4. Versions of the License. + + 4.1. New Versions. + + Sun Microsystems, Inc. is the initial license steward and + may publish revised and/or new versions of this License + from time to time. Each version will be given a + distinguishing version number. Except as provided in + Section 4.3, no one other than the license steward has the + right to modify this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. If the Initial Developer includes a + notice in the Original Software prohibiting it from being + distributed or otherwise made available under any + subsequent version of the License, You must distribute and + make the Covered Software available under the terms of the + version of the License under which You originally received + the Covered Software. Otherwise, You may also choose to + use, distribute or otherwise make the Covered Software + available under the terms of any subsequent version of the + License published by the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a + new license for Your Original Software, You may create and + use a modified version of this License if You: (a) rename + the license and remove any references to the name of the + license steward (except to note that the license differs + from this License); and (b) otherwise make it clear that + the license contains terms which differ from this License. + + + 5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" + BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED + SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR + PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY + COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE + INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF + ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF + WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS + DISCLAIMER. + + 6. TERMINATION. + + 6.1. This License and the rights granted hereunder will + terminate automatically if You fail to comply with terms + herein and fail to cure such breach within 30 days of + becoming aware of the breach. Provisions which, by their + nature, must remain in effect beyond the termination of + this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or + a Contributor (the Initial Developer or Contributor against + whom You assert such claim is referred to as "Participant") + alleging that the Participant Software (meaning the + Contributor Version where the Participant is a Contributor + or the Original Software where the Participant is the + Initial Developer) directly or indirectly infringes any + patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial + Developer (if the Initial Developer is not the Participant) + and all Contributors under Sections 2.1 and/or 2.2 of this + License shall, upon 60 days notice from Participant + terminate prospectively and automatically at the expiration + of such 60 day notice period, unless if within such 60 day + period You withdraw Your claim with respect to the + Participant Software against such Participant either + unilaterally or pursuant to a written agreement with + Participant. + + 6.3. In the event of termination under Sections 6.1 or 6.2 + above, all end user licenses that have been validly granted + by You or any distributor hereunder prior to termination + (excluding licenses granted to You by any distributor) + shall survive termination. + + 7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE + LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK + STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL + INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT + APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO + NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR + CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT + APPLY TO YOU. + + 8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is + defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial + computer software" (as that term is defined at 48 C.F.R. + 252.227-7014(a)(1)) and "commercial computer software + documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. + 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 + through 227.7202-4 (June 1995), all U.S. Government End Users + acquire Covered Software with only those rights set forth herein. + This U.S. Government Rights clause is in lieu of, and supersedes, + any other FAR, DFAR, or other clause or provision that addresses + Government rights in computer software under this License. + + 9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the + extent necessary to make it enforceable. This License shall be + governed by the law of the jurisdiction specified in a notice + contained within the Original Software (except to the extent + applicable law, if any, provides otherwise), excluding such + jurisdiction's conflict-of-law provisions. Any litigation + relating to this License shall be subject to the jurisdiction of + the courts located in the jurisdiction and venue specified in a + notice contained within the Original Software, with the losing + party responsible for costs, including, without limitation, court + costs and reasonable attorneys' fees and expenses. The + application of the United Nations Convention on Contracts for the + International Sale of Goods is expressly excluded. Any law or + regulation which provides that the language of a contract shall + be construed against the drafter shall not apply to this License. + You agree that You alone are responsible for compliance with the + United States export administration regulations (and the export + control laws and regulation of any other countries) when You use, + distribute or otherwise make available any Covered Software. + + 10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or + indirectly, out of its utilization of rights under this License + and You agree to work with Initial Developer and Contributors to + distribute such responsibility on an equitable basis. Nothing + herein is intended or shall be deemed to constitute any admission + of liability. + diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/META-INF/NOTICE b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/META-INF/NOTICE new file mode 100644 index 0000000000..11c564eb19 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/META-INF/NOTICE @@ -0,0 +1,18 @@ +=========================================================================
+== NOTICE file corresponding to the section 4 d of ==
+== the Apache License, Version 2.0, ==
+== in this case for the Apache Tuscany distribution. ==
+=========================================================================
+
+This product includes software developed by the Apache Software Foundation
+(http://www.apache.org/).
+
+This product also includes software developed by:
+- the Eclipse Modeling Framework project (http://www.eclipse.org/emf/)
+- the Celtix project (http://celtix.objectweb.org/)
+- the Mozilla Rhino project (http://www.mozilla.org/rhino/)
+- the GlassFish JAX-WS project (https://jax-ws.dev.java.net/)
+
+Please read the LICENSE.txt file present in the root directory of this
+distribution.
+
diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite new file mode 100644 index 0000000000..fd71264fa7 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/Mortgage.composite @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://mortgage"
+ name="MortgageComposite">
+
+ <component name="LoanApprovalComponent">
+ <implementation.java class="mortgage.LoanApprovalImpl" />
+ <property name="minimumCreditScore">600</property>
+ <reference name="creditCheck" target="CreditCheckComponent" />
+ <reference name="interestRateQuote" target="InterestRateQuoteComponent" />
+ <reference name="riskAssessment" target="RiskAssessmentComponent" />
+ <reference name="mortgageCalculator" target="MortgageCalculatorComponent" />
+ </component>
+
+ <component name="CreditCheckComponent">
+ <implementation.java class="mortgage.CreditCheckImpl" />
+ </component>
+
+ <component name="InterestRateQuoteComponent">
+ <implementation.java class="mortgage.InterestRateQuoteImpl" />
+ </component>
+
+ <component name="RiskAssessmentComponent">
+ <implementation.java class="mortgage.RiskAssessmentImpl" />
+ </component>
+
+ <component name="MortgageCalculatorComponent">
+ <implementation.java class="mortgage.MortgageCalculatorImpl" />
+ </component>
+
+</composite>
diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite new file mode 100644 index 0000000000..6aec49ddaa --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/Mortgage1.composite @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://mortgage"
+ name="MortgageComposite">
+
+ <component name="LoanApprovalComponent">
+ <implementation.java class="mortgage.LoanApprovalImpl" />
+ <property name="minimumCreditScore">600</property>
+ <reference name="creditCheck" target="CreditCheckComponent" />
+ <reference name="interestRateQuote" target="InterestRateQuoteComponent" />
+ <reference name="riskAssessment" target="RiskAssessmentComponent" />
+ <reference name="mortgageCalculator" target="MortgageCalculatorJSComponent" />
+ </component>
+
+ <component name="CreditCheckComponent">
+ <implementation.java class="mortgage.CreditCheckImpl" />
+ </component>
+
+ <component name="InterestRateQuoteComponent">
+ <implementation.java class="mortgage.InterestRateQuoteImpl" />
+ </component>
+
+ <component name="RiskAssessmentComponent">
+ <implementation.java class="mortgage.RiskAssessmentImpl" />
+ </component>
+
+ <component name="MortgageCalculatorJSComponent">
+ <tuscany:implementation.script script="MortgageCalculator.js" />
+ </component>
+
+ <reference name="CreditCheckReference" promote="LoanApprovalComponent/creditCheck">
+ <interface.java interface="mortgage.CreditCheck" />
+ <binding.ws wsdlElement="http://credit#wsdl.port(CreditCheckService/CreditCheckSoapPort)" />
+ </reference>
+
+</composite>
diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType new file mode 100644 index 0000000000..bf7b10e0f7 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.componentType @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <service name="MortgageCalculatorService">
+ <interface.java interface="mortgage.MortgageCalculator"/>
+ </service>
+
+</componentType>
diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js new file mode 100644 index 0000000000..b25af1d039 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/MortgageCalculator.js @@ -0,0 +1,25 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+function getMonthlyPayment(principal, years, interestRate) {
+ var monthlyRate = interestRate / 12.0 / 100.0;
+ var p = Math.pow(1 + monthlyRate, years * 12);
+ var q = p / (p - 1);
+ var monthlyPayment = principal * monthlyRate * q;
+ return monthlyPayment;
+}
diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl new file mode 100644 index 0000000000..4ec90f3f2b --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/main/resources/wsdl/credit.wsdl @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://credit" xmlns:tns="http://credit" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="credit">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://credit" xmlns:tns="http://credit"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getCreditScore">
+ <complexType>
+ <sequence>
+ <element name="ssn" type="xsd:string" />
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getCreditScoreResponse">
+ <complexType>
+ <sequence>
+ <element name="score" type="xsd:int" />
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getCreditScoreRequest">
+ <wsdl:part element="tns:getCreditScore" name="inputMsg" />
+ </wsdl:message>
+
+ <wsdl:message name="getCreditScoreResponse">
+ <wsdl:part element="tns:getCreditScoreResponse" name="outputMsg" />
+ </wsdl:message>
+
+
+ <wsdl:portType name="CreditCheck">
+ <wsdl:operation name="getCreditScore">
+ <wsdl:input message="tns:getCreditScoreRequest" name="getCreditScoreRequest" />
+ <wsdl:output message="tns:getCreditScoreResponse" name="getCreditScoreResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="CreditCheckSoapBinding" type="tns:CreditCheck">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getCreditScore">
+ <wsdlsoap:operation soapAction="" />
+ <wsdl:input name="getCreditScoreRequest">
+ <wsdlsoap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="getCreditScoreResponse">
+ <wsdlsoap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="CreditCheckService">
+ <wsdl:port binding="tns:CreditCheckSoapBinding" name="CreditCheckSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/CreditCheckService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java new file mode 100644 index 0000000000..285cc72515 --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/mortgage-loanapproval/src/test/java/mortgage/MortgageClientTestCase.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package mortgage; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * This shows how to test the Calculator service component. + */ +public class MortgageClientTestCase extends TestCase { + private SCADomain domain; + private LoanApproval loanApproval; + + @Override + protected void setUp() throws Exception { + domain = SCADomain.newInstance("Mortgage.composite"); + loanApproval = domain.getService(LoanApproval.class, "LoanApprovalComponent"); + } + + @Override + protected void tearDown() throws Exception { + if (domain != null) { + domain.close(); + } + } + + public void testApprove() throws Exception { + Customer customer = new Customer(); + customer.setSsn("111-22-3333"); + customer.setFirstName("John"); + customer.setLastName("Smith"); + customer.setMonthlyIncome(5000.0d); + customer.setState("CA"); + + boolean approved = loanApproval.approve(customer, 200000d, 30); + System.out.println((approved ? "Approved: " : "Rejected: ") + customer); + } +} diff --git a/tags/java/sca/1.0-RC1/demos/pom.xml b/tags/java/sca/1.0-RC1/demos/pom.xml new file mode 100644 index 0000000000..822f07acdb --- /dev/null +++ b/tags/java/sca/1.0-RC1/demos/pom.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-sca</artifactId> + <version>1.0-incubating</version> + <relativePath>../pom.xml</relativePath> + </parent> + <artifactId>tuscany-demos</artifactId> + <packaging>pom</packaging> + <name>Apache Tuscany SCA Demos</name> + + <profiles> + <profile> + <id>default</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <modules> + <module>alert-aggregator-webapp</module> + <module>bigbank-account</module> + <module>bigbank-calculator</module> + <module>bigbank-stockquote</module> + <module>mortgage-creditcheck</module> + <module>mortgage-loanapproval</module> + </modules> + </profile> + + </profiles> + +</project> |