Added: incubator/tuscany/java/samples/JavaScript/sample7/src/main/resources/sca.module URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/samples/JavaScript/sample7/src/main/resources/sca.module?rev=389082&view=auto ============================================================================== --- incubator/tuscany/java/samples/JavaScript/sample7/src/main/resources/sca.module (added) +++ incubator/tuscany/java/samples/JavaScript/sample7/src/main/resources/sca.module Mon Mar 27 01:30:34 2006 @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2005 BEA Sytems Inc. + Copyright (c) 2005 International Business Machines + + 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. + --> +<module xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9" + xmlns:js="http://org.apache.tuscany/xmlns/js/0.9" + + name="JavaScriptSample7"> + + <component name="HelloWorldComponent"> + <js:implementation.js style="e4x" scriptFile="sample/HelloWorldImpl.js"/> + </component> + + <import.wsdl + location="wsdl/helloworld.wsdl" + namespace="http://helloworld.samples.tuscany.apache.org"/> + +</module>
Added: incubator/tuscany/java/samples/JavaScript/sample7/src/main/resources/wsdl/helloworld.wsdl URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/samples/JavaScript/sample7/src/main/resources/wsdl/helloworld.wsdl?rev=389082&view=auto ============================================================================== --- incubator/tuscany/java/samples/JavaScript/sample7/src/main/resources/wsdl/helloworld.wsdl (added) +++ incubator/tuscany/java/samples/JavaScript/sample7/src/main/resources/wsdl/helloworld.wsdl Mon Mar 27 01:30:34 2006 @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable. + + 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. + --> +<wsdl:definitions targetNamespace="http://helloworld.samples.tuscany.apache.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://helloworld.samples.tuscany.apache.org" xmlns:intf="http://helloworld.samples.tuscany.apache.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="helloworld"> + <!--WSDL created by Apache Axis version: 1.2.1 +Built on Jun 14, 2005 (09:15:57 EDT)--> + <wsdl:types> + <schema elementFormDefault="qualified" targetNamespace="http://helloworld.samples.tuscany.apache.org" xmlns="http://www.w3.org/2001/XMLSchema"> + <element name="getGreetings"> + <complexType> + <sequence> + <element name="in0" type="xsd:string"/> + </sequence> + </complexType> + </element> + <element name="getGreetingsResponse"> + <complexType> + <sequence> + <element name="getGreetingsReturn" type="xsd:string"/> + </sequence> + </complexType> + </element> + </schema> + </wsdl:types> + + <wsdl:message name="getGreetingsRequest"> + + <wsdl:part element="impl:getGreetings" name="parameters"/> + + </wsdl:message> + + <wsdl:message name="getGreetingsResponse"> + + <wsdl:part element="impl:getGreetingsResponse" name="parameters"/> + + </wsdl:message> + + <wsdl:portType name="HelloWorldServiceImpl"> + + <wsdl:operation name="getGreetings"> + + <wsdl:input message="impl:getGreetingsRequest" name="getGreetingsRequest"/> + + <wsdl:output message="impl:getGreetingsResponse" name="getGreetingsResponse"/> + + </wsdl:operation> + + </wsdl:portType> + + <wsdl:binding name="helloworldSoapBinding" type="impl:HelloWorldServiceImpl"> + + <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + + <wsdl:operation name="getGreetings"> + + <wsdlsoap:operation soapAction=""/> + + <wsdl:input name="getGreetingsRequest"> + + <wsdlsoap:body use="literal"/> + + </wsdl:input> + + <wsdl:output name="getGreetingsResponse"> + + <wsdlsoap:body use="literal"/> + + </wsdl:output> + + </wsdl:operation> + + </wsdl:binding> + + <wsdl:service name="HelloWorldServiceImplService"> + + <wsdl:port binding="impl:helloworldSoapBinding" name="helloworld"> + + <wsdlsoap:address location="http://localhost:8080/helloworldws-SNAPSHOT/services/HelloWorldService"/> + + </wsdl:port> + + </wsdl:service> + +</wsdl:definitions> Added: incubator/tuscany/java/samples/JavaScript/sample7/src/test/java/sample/Sample7TestCase.java URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/samples/JavaScript/sample7/src/test/java/sample/Sample7TestCase.java?rev=389082&view=auto ============================================================================== --- incubator/tuscany/java/samples/JavaScript/sample7/src/test/java/sample/Sample7TestCase.java (added) +++ incubator/tuscany/java/samples/JavaScript/sample7/src/test/java/sample/Sample7TestCase.java Mon Mar 27 01:30:34 2006 @@ -0,0 +1,31 @@ +/** + * + * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. + * + * 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. + */ +package sample; + +import junit.framework.TestCase; + +/** + * + */ +public class Sample7TestCase extends TestCase { + + public void testGeetings() throws Exception { + String in = "pzf"; + String out = Sample7Client.invoke(in); + assertEquals("e4xHello pzf", out); + } +}
