diff options
Diffstat (limited to '')
15 files changed, 762 insertions, 0 deletions
diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java new file mode 100644 index 0000000000..532b84bd22 --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java @@ -0,0 +1,31 @@ +/* + * 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 greetings; + +import org.osoa.sca.annotations.Remotable; + +/** + * This is the business interface of the HelloWorld greetings service. + */ +@Remotable +public interface GreetingsService { + + public String getGreetings(String name); +} + diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java new file mode 100644 index 0000000000..86d7f245e8 --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.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 greetings; + +import org.osoa.sca.annotations.Service; + +/** + * This class implements the HelloWorld service. + */ +@Service(GreetingsService.class) +public class GreetingsServiceImpl implements GreetingsService { + + public String getGreetings(String name) { + return "Hello " + name; + } + +} diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java new file mode 100644 index 0000000000..182d7c2c55 --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java @@ -0,0 +1,63 @@ +/* + * 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 greetings; + +import java.io.IOException; +import java.net.Socket; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * Tests the Greetings service + * + * @version $Rev$ $Date$ + */ +public class GreetingsTestCase extends TestCase { + + private SCADomain scaDomain; + GreetingsService greetingsService = null; + + /** + * @throws java.lang.Exception + */ + @Override + protected void setUp() throws Exception { + scaDomain = SCADomain.newInstance("greetings/greetings.composite"); + greetingsService = scaDomain.getService(GreetingsService.class, "GreetingsServiceComponent"); + } + + /** + * @throws java.lang.Exception + */ + @Override + protected void tearDown() throws Exception { + scaDomain.close(); + } + + public void testPing() throws IOException { + new Socket("127.0.0.1", 8085); + } + public void testInvoke() { + String response = greetingsService.getGreetings("Luciano"); + assertEquals("Hello Luciano", response); + } +} diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestServer.java b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestServer.java new file mode 100644 index 0000000000..86e97361df --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestServer.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 greetings; + +import java.io.IOException; +import java.net.Socket; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + * Starts up the SCA runtime which starts listening for service requests + */ +public class GreetingsTestServer { + + private SCADomain scaDomain; + + @Before + public void startServer() throws Exception { + try { + scaDomain = SCADomain.newInstance("greetings/greetings.composite"); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Test + public void testPing() throws IOException { + new Socket("127.0.0.1", 8085); + } + + @After + public void stopServer() throws Exception { + scaDomain.close(); + } + +} diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..672dbdc0b5 --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.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 helloworld; + +import org.osoa.sca.annotations.Remotable; + +/** + * The interface for the helloworld service + */ +@Remotable +public interface HelloWorldService { + public String hello(String name); +} diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java new file mode 100644 index 0000000000..d7ebd5cbb8 --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java @@ -0,0 +1,47 @@ +/* + * 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 helloworld; + +import greetings.GreetingsService; + +import org.osoa.sca.annotations.Reference; + +/** + * The HelloWorld service implementation + */ +public class HelloWorldServiceImpl implements HelloWorldService { + + protected GreetingsService greetingsService; + + public GreetingsService getGreetingsService() { + System.out.println("Got Injected greetingsService"); + return greetingsService; + } + + @Reference + public void setGreetingsService(GreetingsService greetingsService) { + System.out.println("Injected greetingsService"); + this.greetingsService = greetingsService; + } + + public String hello(String name) { + System.out.println("Calling greeting services getGreetings"); + return greetingsService.getGreetings(name); + } +}
\ No newline at end of file diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java new file mode 100644 index 0000000000..900f59ca9c --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java @@ -0,0 +1,63 @@ +/* + * 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 helloworld; + +import greetings.GreetingsTestServer; +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.host.embedded.SCATestCaseRunner; + +/** + * Tests the BPEL Helloworld Service + * + * @version $Rev$ $Date$ + */ +public class HelloWorldTestCase extends TestCase { + private SCADomain scaDomain; + + //private SCATestCaseRunner server; + + /** + * @throws java.lang.Exception + */ + @Override + protected void setUp() throws Exception { + scaDomain = SCADomain.newInstance("helloworld/helloworld.composite"); + + //server = new SCATestCaseRunner(GreetingsTestServer.class); + //server.before(); + } + + /** + * @throws java.lang.Exception + */ + @Override + protected void tearDown() throws Exception { + //server.after(); + scaDomain.close(); + } + + public void testServiceInvocation() { + HelloWorldService bpelService = scaDomain.getService(HelloWorldService.class, "HelloWorldService"); + String response = bpelService.hello("Luciano"); + assertEquals("Hello Luciano", response); + } +} diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite new file mode 100644 index 0000000000..fde89667cd --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.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://greetings" + xmlns:hw="http://greetings" + name="greetings"> + + <component name="GreetingsServiceComponent"> + <implementation.java class="greetings.GreetingsServiceImpl" /> + <service name="GreetingsService"> + <interface.wsdl interface="http://greetings#wsdl.interface(Greetings)" /> + <binding.ws uri="http://localhost:8085/GreetingsService"/> + </service> + </component> + +</composite> diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl new file mode 100644 index 0000000000..e768707ccd --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl @@ -0,0 +1,87 @@ +<?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 name="greetings" + targetNamespace="http://greetings" + xmlns:tns="http://greetings" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> + + <wsdl:types> + <schema elementFormDefault="qualified" targetNamespace="http://greetings" xmlns="http://www.w3.org/2001/XMLSchema"> + + <element name="getGreetings"> + <complexType> + <sequence> + <element name="name" 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="tns:getGreetings" name="parameters"/> + </wsdl:message> + + <wsdl:message name="getGreetingsResponse"> + <wsdl:part element="tns:getGreetingsResponse" name="parameters"/> + </wsdl:message> + + <wsdl:portType name="Greetings"> + <wsdl:operation name="getGreetings"> + <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/> + <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> + </wsdl:operation> + </wsdl:portType> + + <wsdl:binding name="GreetingsSoapBinding" type="tns:Greetings"> + <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="GreetingsService"> + <wsdl:port name="GreetingsSoapPort" binding="tns:GreetingsSoapBinding"> + <wsdlsoap:address location="http://localhost:8085/GreetingsServiceComponent"/> + </wsdl:port> + </wsdl:service> + + <plnk:partnerLinkType name="GreetingsPartnerLinkType"> + <plnk:role name="Provider" portType="tns:Greetings"/> + </plnk:partnerLinkType> +</wsdl:definitions> diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/deploy.xml b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/deploy.xml new file mode 100644 index 0000000000..f6f9bbfc2e --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/deploy.xml @@ -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. + --> +<deploy xmlns="http://www.apache.org/ode/schemas/dd/2007/03" + xmlns:tns="http://helloworld" + xmlns:helloworld="http://helloworld" + xmlns:greetings="http://greetings"> + + + <process name="tns:HelloWorld"> + <active>true</active> + <provide partnerLink="helloPartnerLink"> + <service name="helloworld:HelloWorldService" port="HelloWorld"/> + </provide> + <invoke partnerLink="greetingsPartnerLink"> + <service name="greetings:GreetingsService" port="Greetings"/> + </invoke> + </process> +</deploy> diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel new file mode 100644 index 0000000000..d9b91ed8ba --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel @@ -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. + --> +<process name="HelloWorld" + targetNamespace="http://helloworld" + xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" + xmlns:tns="http://helloworld" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:helloworld="http://helloworld"
+ xmlns:greetings="http://greetings" + queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" + expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"> + + <import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/" + namespace="http://helloworld"/> +
+ <import location="../greetings/greetings.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
+ namespace="http://greetings"/>
+ + <partnerLinks> + <partnerLink name="helloPartnerLink" partnerLinkType="helloworld:HelloPartnerLinkType" myRole="me" />
+ <partnerLink name="greetingsPartnerLink" partnerLinkType="greetings:GreetingsPartnerLinkType" partnerRole="Provider" initializePartnerRole="yes" /> + </partnerLinks> + + <variables> + <variable name="helloMessage" messageType="helloworld:HelloMessage"/>
+ <variable name="helloResponse" messageType="helloworld:HelloMessage"/>
+ <variable name="greetingsRequest" messageType="greetings:getGreetingsRequest"/>
+ <variable name="greetingsResponse" messageType="greetings:getGreetingsResponse"/>
+ </variables> + + <sequence> + <receive + name="start"
+ createInstance="yes" + operation="hello"
+ variable="helloMessage"
+ partnerLink="helloPartnerLink" + portType="helloworld:HelloWorld" /> +
+ <assign name="assignToGreetingsRequest">
+ <copy>
+ <from>$helloMessage.TestPart</from>
+ <to>$greetingsRequest.parameters</to>
+ </copy>
+ </assign>
+ + <invoke name="invokeGreetings"
+ operation="getGreetings"
+ inputVariable="greetingsRequest"
+ outputVariable="greetingsResponse"
+ partnerLink="greetingsPartnerLink"
+ portType="greetings:Greetings" />
+
+ <assign name="assignToHelloResponse">
+ <copy>
+ <from>$greetingsResponse.parameters</from>
+ <to>$helloResponse.TestPart</to>
+ </copy>
+ </assign>
+
+ <reply name="end"
+ operation="hello" + partnerLink="helloPartnerLink" + portType="helloworld:HelloWorld" + variable="helloResponse"/> + </sequence> +</process> diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.componentType b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.componentType new file mode 100644 index 0000000000..de765c986f --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.componentType @@ -0,0 +1,36 @@ +<?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:wsdli="http://www.w3.org/2006/01/wsdl-instance" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + + <service name="HelloWorldService"> + <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" /> + </service> + + + <reference name="greetingsService" target="GreetingsServiceComponent"> + <interface.java interface="greetings.GreetingsService" /> + </reference> + +</componentType> +
\ No newline at end of file diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite new file mode 100644 index 0000000000..7207398eba --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.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" + targetNamespace="http://bpel" + xmlns:hns="http://helloworld" + name="helloworld"> + + <!-- component name="BPELHelloWorldServiceComponent"> + <implementation.bpel process="hns:HelloWorld"/> + </component --> + + <component name="HelloWorldService"> + <implementation.bpel process="hns:HelloWorld"/> + <reference name="greetingsService" target="GreetingsServiceComponent"/> + </component> + + <component name="GreetingsServiceComponent"> + <implementation.java class="greetings.GreetingsServiceImpl" /> + <service name="GreetingsService"> + <interface.java interface="greetings.GreetingsService" /> + </service> + </component> + + <!-- Simple ws-reference --> + <!-- + <component name="HelloWorldService"> + <implementation.java class="helloworld.HelloWorldServiceImpl"/> + <reference name="greetingsService"> + <binding.ws uri="http://localhost:8085/GreetingsService"/> + </reference> + </component> + --> +</composite> diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl new file mode 100644 index 0000000000..0f51b96b27 --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl @@ -0,0 +1,82 @@ +<?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 name="helloworld" + targetNamespace="http://helloworld" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:tns="http://helloworld" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" + xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> + + <wsdl:types> + <schema elementFormDefault="qualified" + targetNamespace="http://helloworld" + xmlns="http://www.w3.org/2001/XMLSchema"> + + <element name="hello"> + <complexType> + <sequence> + <element name="message" type="xsd:string"/> + </sequence> + </complexType> + </element> + </schema> + </wsdl:types> + + <wsdl:message name="HelloMessage"> + <wsdl:part element="tns:hello" name="TestPart"/> + </wsdl:message> + + <wsdl:portType name="HelloWorld"> + <wsdl:operation name="hello"> + <wsdl:input message="tns:HelloMessage" name="TestIn"/> + <wsdl:output message="tns:HelloMessage" name="TestOut"/> + </wsdl:operation> + </wsdl:portType> + + + <wsdl:binding name="HelloSoapBinding" type="tns:HelloWorld"> + <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="hello"> + <wsdlsoap:operation soapAction=""/> + <wsdl:input name="TestIn"> + <wsdlsoap:body use="literal"/> + </wsdl:input> + <wsdl:output name="TestOut"> + <wsdlsoap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + + <wsdl:service name="HelloWorldService"> + <wsdl:port name="HelloSoapPort" binding="tns:HelloSoapBinding"> + <soap:address location="http://localhost:8085/ode/processes/helloWorld"/> + </wsdl:port> + </wsdl:service> + + <plnk:partnerLinkType name="HelloPartnerLinkType"> + <plnk:role name="me" portType="tns:HelloWorld"/> + <plnk:role name="you" portType="tns:HelloWorld"/> + </plnk:partnerLinkType> +</wsdl:definitions>
\ No newline at end of file diff --git a/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/log4j.properties b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/log4j.properties new file mode 100644 index 0000000000..6c7c7e7ab1 --- /dev/null +++ b/branches/sca-java-1.2.1/itest/bpel/helloworld-reference/src/test/resources/log4j.properties @@ -0,0 +1,35 @@ +# +# 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. +# + +# Set root logger level to WARN and its only appender to CONSOLE +log4j.rootLogger=OFF, CONSOLE + +# log4j properties to work with commandline tools. +log4j.category.org.mortbay=OFF +log4j.category.org.hibernate.type=OFF +log4j.category.org.objectweb=OFF +log4j.category.org.apache.ode.axis2=OFF +log4j.category.org.apache.ode.bpel.engine=OFF +log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF +log4j.category.org.apache.ode.bpel.epr=OFF +log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG +log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG + +# Console appender +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%p - %C{1}.%M(%L) | %m%n |