You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by br...@apache.org on 2006/06/20 18:26:23 UTC
svn commit: r415755 - in
/incubator/yoko/trunk/distribution/src/main/samples/ws: ./ etc/
hello_world/ hello_world/corba/ hello_world/corba/client/
hello_world/corba/server/ hello_world/yoko/ hello_world/yoko/client/
hello_world/yoko/server/ resources/
Author: bravi
Date: Tue Jun 20 11:26:22 2006
New Revision: 415755
URL: http://svn.apache.org/viewvc?rev=415755&view=rev
Log:
Adding the initial hello_world sample framework.
JIRA: http://issues.apache.org/jira/browse/YOKO-54
Added:
incubator/yoko/trunk/distribution/src/main/samples/ws/
incubator/yoko/trunk/distribution/src/main/samples/ws/etc/
incubator/yoko/trunk/distribution/src/main/samples/ws/etc/corba_bus_config.xml (with props)
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/README.txt (with props)
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/corba/
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/corba/client/
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/corba/server/
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/client/
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/client/Client.java (with props)
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/HelloWorldImpl.java (with props)
incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/Server.java (with props)
incubator/yoko/trunk/distribution/src/main/samples/ws/resources/
incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.idl
incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.wsdl (with props)
Added: incubator/yoko/trunk/distribution/src/main/samples/ws/etc/corba_bus_config.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/etc/corba_bus_config.xml?rev=415755&view=auto
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/etc/corba_bus_config.xml (added)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/etc/corba_bus_config.xml Tue Jun 20 11:26:22 2006
@@ -0,0 +1,41 @@
+<?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.
+-->
+<!DOCTYPE beans SYSTEM
+ "http://celtix.objectweb.org/configuration/spring/celtix-spring-beans.dtd">
+
+<beans
+ xmlns:ct="http://celtix.objectweb.org/configuration/types"
+ xmlns:bus="http://celtix.objectweb.org/bus/bus-config">
+
+ <bean id="celtix"
+ class="org.objectweb.celtix.bus.bus_config.spring.BusConfigBean">
+
+ <property name="bindingFactories">
+ <value>
+ <ct:classNamespaceMappingListValue>
+ <ct:map>
+ <ct:classname>org.apache.yoko.bindings.corba.CorbaBindingFactory</ct:classname>
+ <ct:namespace>http://schemas.apache.org/yoko/bindings/corba</ct:namespace>
+ </ct:map>
+ </ct:classNamespaceMappingListValue>
+ </value>
+ </property>
+ </bean>
+</beans>
\ No newline at end of file
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/etc/corba_bus_config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/etc/corba_bus_config.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/etc/corba_bus_config.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/README.txt
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/README.txt?rev=415755&view=auto
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/README.txt (added)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/README.txt Tue Jun 20 11:26:22 2006
@@ -0,0 +1,16 @@
+Hello World Demo
+=============================================
+
+Prerequisite
+------------
+
+If your environment already includes yoko.jar on the
+CLASSPATH, and the JDK and ant bin directories on the PATH
+it is not necessary to run the environment script described in
+the samples directory README. If your environment is not
+properly configured, or if you are planning on using wsdl2idl/idl2wsdl,
+javac, and java to build and run the demos, you must set the
+environment by running the script.
+
+
+
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/README.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/README.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/client/Client.java?rev=415755&view=auto
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/client/Client.java (added)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/client/Client.java Tue Jun 20 11:26:22 2006
@@ -0,0 +1,53 @@
+/**
+ * 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 yoko.client;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+
+public final class Client {
+
+ private static final QName SERVICE_NAME = new QName("http://schemas.apache.org/yoko/idl/HelloWorld", "HelloWorldCORBAService");
+
+ private Client() {
+ }
+
+ public static void main(String args[]) throws Exception {
+ if (args.length == 0) {
+ System.err.println("Please pass the greetMe argument.");
+ System.exit(1);
+ }
+ URL wsdlUrl = new URL("HelloWorld-corba.wsdl");
+
+ HelloWorldCORBAService ss = new HelloWorldCORBAService(wsdlUrl, SERVICE_NAME);
+ HelloWorld port = ss.getHelloWorldCORBAPort();
+
+
+ System.out.println("Invoking greetMe...");
+ java.lang.String _greetMe_outparameter = port.greetMe(new java.lang.String(args[0]));
+ System.out.println("greetMe.result=" + _greetMe_outparameter);
+
+
+ System.exit(0);
+ }
+
+}
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/client/Client.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/client/Client.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/HelloWorldImpl.java?rev=415755&view=auto
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/HelloWorldImpl.java (added)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/HelloWorldImpl.java Tue Jun 20 11:26:22 2006
@@ -0,0 +1,46 @@
+/**
+ * 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 yoko.server;
+
+import java.util.logging.Logger;
+import javax.jws.WebMethod;
+import javax.jws.WebResult;
+
+@javax.jws.WebService(name = "HelloWorld", serviceName = "HelloWorldCORBAService",
+ targetNamespace = "http://schemas.apache.org/yoko/idl/HelloWorld",
+ wsdlLocation = "file:./HelloWorld-corba.wsdl")
+
+public class HelloWorldImpl implements HelloWorld {
+
+ private static final Logger LOG =
+ Logger.getLogger(HelloWorldImpl.class.getPackage().getName());
+
+ /* (non-Javadoc)
+ * @see yoko.server.HelloWorld#greetMe(java.lang.String inparameter )*
+ */
+ public java.lang.String greetMe(
+ java.lang.String inparameter
+ )
+ {
+ LOG.info("Executing operation greetMe");
+ return new java.lang.String("Hi " + inparameter);
+ }
+
+}
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/HelloWorldImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/HelloWorldImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/Server.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/Server.java?rev=415755&view=auto
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/Server.java (added)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/Server.java Tue Jun 20 11:26:22 2006
@@ -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 yoko.server;
+
+import javax.xml.ws.Endpoint;
+
+public class Server {
+
+ protected Server() throws Exception {
+ System.out.println("Starting Server");
+
+ Object implementor = new HelloWorldImpl();
+ String address = "corbaloc:localhost:40000/hw";
+ Endpoint.publish(address, implementor);
+ }
+
+ public static void main(String args[]) throws Exception {
+ new Server();
+ System.out.println("Server ready...");
+
+ Thread.sleep(5 * 60 * 1000);
+ System.out.println("Server exiting");
+ System.exit(0);
+ }
+}
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/Server.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/hello_world/yoko/server/Server.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.idl?rev=415755&view=auto
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.idl (added)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.idl Tue Jun 20 11:26:22 2006
@@ -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.
+*/
+
+interface HelloWorld {
+ string
+ greetMe(
+ in string return_message
+ );
+};
Added: incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.wsdl?rev=415755&view=auto
==============================================================================
--- incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.wsdl (added)
+++ incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.wsdl Tue Jun 20 11:26:22 2006
@@ -0,0 +1,54 @@
+<?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://schemas.apache.org/yoko/idl/HelloWorld"
+ xmlns:tns="http://schemas.apache.org/yoko/idl/HelloWorld"
+ xmlns:corba="http://schemas.apache.org/yoko/bindings/corba"
+ xmlns:ns1="http://schemas.apache.org/yoko/idl/HelloWorld/corba/typemap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <xs:schema attributeFormDefault="unqualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://schemas.apache.org/yoko/idl/HelloWorld"
+ xmlns="http://schemas.apache.org/yoko/idl/HelloWorld"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="greetMeResponse" type="xs:string"/>
+ <xs:element name="greetMe" type="xs:string"/>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="greetMeResponse">
+ <wsdl:part name="outparameter" element="tns:greetMeResponse"/>
+ </wsdl:message>
+ <wsdl:message name="greetMe">
+ <wsdl:part name="inparameter" element="tns:greetMe"/>
+ </wsdl:message>
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="greetMe">
+ <wsdl:input name="greetMeRequest" message="tns:greetMe"/>
+ <wsdl:output name="greetMeResponse" message="tns:greetMeResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:service name="HelloWorldCORBAService">
+ <wsdl:port name="HelloWorldCORBAPort" binding="tns:HelloWorldCORBABinding">
+ <corba:address location="corbaloc:localhost:40000/hw"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/yoko/trunk/distribution/src/main/samples/ws/resources/HelloWorld.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml