From tuscany-commitsyruiz@example.com Mon Oct 01 09:18:30 2007 Return-Path: <tuscany-commitsyruiz@example.com> Delivered-To: yruiz@example.com Received: (qmail 46000 invoked from network); 1 Oct 2007 09:18:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2007 09:18:30 -0000 Received: (qmail 22031 invoked by uid 500); 1 Oct 2007 09:18:19 -0000 Delivered-To: yruiz@example.com Received: (qmail 22017 invoked by uid 500); 1 Oct 2007 09:18:19 -0000 Mailing-List: contact yruiz@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:yruiz@example.com> List-Unsubscribe: <mailto:yruiz@example.com> List-Post: <mailto:yruiz@example.com> List-Id: <tuscany-commits.ws.apache.org> Reply-To: yruiz@example.com Delivered-To: mailing list yruiz@example.com Received: (qmail 22007 invoked by uid 99); 1 Oct 2007 09:18:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 02:18:19 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 09:18:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D07A71A9832; Mon, 1 Oct 2007 02:17:38 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r580897 - /incubator/tuscany/java/sca/samples/helloworld-ws-service/pom.xml Date: Mon, 01 Oct 2007 09:17:38 -0000 To: yruiz@example.com From: yruiz@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <yruiz@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: slaws Date: Mon Oct 1 02:17:33 2007 New Revision: 580897 URL: http://svn.apache.org/viewvc?rev=580897&view=rev Log: Change scope of ActiveMQ dependency to "provided" as there is a compile time dependency on this library Modified: incubator/tuscany/java/sca/samples/helloworld-ws-service/pom.xml Modified: incubator/tuscany/java/sca/samples/helloworld-ws-service/pom.xml URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-service/pom.xml?rev=580897&r1=580896&r2=580897&view=diff ============================================================================== --- incubator/tuscany/java/sca/samples/helloworld-ws-service/pom.xml (original) +++ incubator/tuscany/java/sca/samples/helloworld-ws-service/pom.xml Mon Oct 1 02:17:33 2007 @@ -37,11 +37,19 @@ <dependencies> <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>apache-activemq</artifactId> + <version>4.1.1</version> + <scope>provided</scope> + </dependency> + + <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-host-embedded</artifactId> <version>1.1-incubating-SNAPSHOT</version> + <scope>compile</scope> </dependency> - + <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-implementation-java-runtime</artifactId> @@ -61,7 +69,7 @@ <artifactId>tuscany-host-tomcat</artifactId> <version>1.1-incubating-SNAPSHOT</version> <scope>runtime</scope> - </dependency> + </dependency> <dependency> <groupId>junit</groupId> @@ -69,14 +77,7 @@ <version>4.2</version> <scope>test</scope> </dependency> - - <dependency> - <groupId>org.apache.activemq</groupId> - <artifactId>apache-activemq</artifactId> - <version>4.1.1</version> - <scope>test</scope> - </dependency> - + </dependencies> <build> --------------------------------------------------------------------- To unsubscribe, e-mail: yruiz@example.com For additional commands, e-mail: yruiz@example.com From tuscany-commitsyruiz@example.com Mon Oct 01 09:25:15 2007 Return-Path: <tuscany-commitsyruiz@example.com> Delivered-To: yruiz@example.com Received: (qmail 47993 invoked from network); 1 Oct 2007 09:25:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2007 09:25:14 -0000 Received: (qmail 28026 invoked by uid 500); 1 Oct 2007 09:25:04 -0000 Delivered-To: yruiz@example.com Received: (qmail 28002 invoked by uid 500); 1 Oct 2007 09:25:03 -0000 Mailing-List: contact yruiz@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:yruiz@example.com> List-Unsubscribe: <mailto:yruiz@example.com> List-Post: <mailto:yruiz@example.com> List-Id: <tuscany-commits.ws.apache.org> Reply-To: yruiz@example.com Delivered-To: mailing list yruiz@example.com Received: (qmail 27993 invoked by uid 99); 1 Oct 2007 09:25:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 02:25:03 -0700 X-ASF-Spam-Status: No, hits=-98.8 required=10.0 tests=ALL_TRUSTED,DNS_FROM_DOB,RCVD_IN_DOB X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 09:25:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4EB071A9832; Mon, 1 Oct 2007 02:24:53 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r580899 - /incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java Date: Mon, 01 Oct 2007 09:24:52 -0000 To: yruiz@example.com From: yruiz@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <yruiz@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: slaws Date: Mon Oct 1 02:24:52 2007 New Revision: 580899 URL: http://svn.apache.org/viewvc?rev=580899&view=rev Log: TUSCANY-1821 Turn off the memory optimization while we work out why it's causing problems with ?wsdl Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java?rev=580899&r1=580898&r2=580899&view=diff ============================================================================== --- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java (original) +++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java Mon Oct 1 02:24:52 2007 @@ -100,10 +100,12 @@ wsdlExtensionRegistry = this.wsdl4jFactory.newPopulatedExtensionRegistry(); // REVIEW: [rfeng] Disable the schema extension for WSDL4J to avoid aggressive loading +/* ExtensionDeserializer deserializer = new UnknownExtensionDeserializer(); for (QName schema : XSD_QNAME_LIST) { wsdlExtensionRegistry.registerDeserializer(Types.class, schema, deserializer); } +*/ } /** --------------------------------------------------------------------- To unsubscribe, e-mail: yruiz@example.com For additional commands, e-mail: yruiz@example.com From tuscany-commitsyruiz@example.com Mon Oct 01 09:49:04 2007 Return-Path: <tuscany-commitsyruiz@example.com> Delivered-To: yruiz@example.com Received: (qmail 52234 invoked from network); 1 Oct 2007 09:49:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2007 09:49:03 -0000 Received: (qmail 58943 invoked by uid 500); 1 Oct 2007 09:48:53 -0000 Delivered-To: yruiz@example.com Received: (qmail 58917 invoked by uid 500); 1 Oct 2007 09:48:53 -0000 Mailing-List: contact yruiz@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:yruiz@example.com> List-Unsubscribe: <mailto:yruiz@example.com> List-Post: <mailto:yruiz@example.com> List-Id: <tuscany-commits.ws.apache.org> Reply-To: yruiz@example.com Delivered-To: mailing list yruiz@example.com Received: (qmail 58908 invoked by uid 99); 1 Oct 2007 09:48:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 02:48:53 -0700 X-ASF-Spam-Status: No, hits=-96.4 required=10.0 tests=ALL_TRUSTED,DNS_FROM_DOB,RCVD_IN_DOB,URIBL_RHS_DOB,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 09:48:53 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 293A31A983A; Mon, 1 Oct 2007 02:48:03 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r580908 - in /incubator/tuscany/java/sca: modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/ modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/ modules/policy-secu... Date: Mon, 01 Oct 2007 09:47:52 -0000 To: yruiz@example.com From: yruiz@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <yruiz@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: slaws Date: Mon Oct 1 02:47:50 2007 New Revision: 580908 URL: http://svn.apache.org/viewvc?rev=580908&view=rev Log: TUSCANY-1822 First baby steps in creating intents to control the web service binding transport Added: incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/definitions.xml incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite incubator/tuscany/java/sca/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java?rev=580908&r1=580907&r2=580908&view=diff ============================================================================== --- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java (original) +++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java Mon Oct 1 02:47:50 2007 @@ -88,6 +88,7 @@ import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.MessageFactory; +import org.apache.tuscany.sca.policy.Intent; import org.apache.tuscany.sca.policy.PolicySet; import org.apache.tuscany.sca.policy.PolicySetAttachPoint; import org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicy; @@ -121,8 +122,15 @@ // TODO: what to do about the base URI? // This port number may be used to construct callback URIs. The value 8085 is used // beacuse it matches the service port number used by the simple-callback-ws sample. - private static final String BASE_URI = "http://localhost:8085/"; - private static final String DEFAULT_QUEUE_CONENCTION_FACTORY = "TuscanyQueueConnectionFactory"; + private static final String BASE_HTTP_URI = "http://localhost:8085/"; + private static final String BASE_JMS_URI = "jms:"; + + private static final String DEFAULT_QUEUE_CONNECTION_FACTORY = "TuscanyQueueConnectionFactory"; + + private static final QName TRANSPORT_JMS_QUALIFIED_INTENT = new QName("http://www.osoa.org/xmlns/sca/1.0","transport.jms"); + + private PolicySet transportJmsPolicySet = null; + public Axis2ServiceProvider(RuntimeComponent component, AbstractContract contract, @@ -149,7 +157,45 @@ configContext.setContextRoot(servletHost.getContextPath()); - String uri = computeActualURI(BASE_URI, component, contract).normalize().toString(); + // pull out the binding intents to see what sort of transport is required + transportJmsPolicySet = getPolicySet(TRANSPORT_JMS_QUALIFIED_INTENT); + + String uri; + + if (transportJmsPolicySet != null){ + uri = computeActualURI(BASE_JMS_URI, component, contract).normalize().toString(); + + // construct the rest of the uri based on the policy. All the details are put + // into the uri here rather than being place directly into the Axis configuration + // as the Axis JMS sender relies on parsing the target URI + Axis2ConfigParamPolicy axis2ConfigParamPolicy = null; + for ( Object policy : transportJmsPolicySet.getPolicies() ) { + if ( policy instanceof Axis2ConfigParamPolicy ) { + axis2ConfigParamPolicy = (Axis2ConfigParamPolicy)policy; + Iterator paramIterator = axis2ConfigParamPolicy.getParamElements().get(DEFAULT_QUEUE_CONNECTION_FACTORY).getChildElements(); + + if (paramIterator.hasNext()){ + StringBuffer uriParams = new StringBuffer("?"); + + while (paramIterator.hasNext()){ + OMElement parameter = (OMElement)paramIterator.next(); + uriParams.append(parameter.getAttributeValue(new QName("","name"))); + uriParams.append("="); + uriParams.append(parameter.getText()); + + if (paramIterator.hasNext()){ + uriParams.append("&"); + } + } + + uri = uri + uriParams; + } + } + } + } else { + uri = computeActualURI(BASE_HTTP_URI, component, contract).normalize().toString(); + } + if (uri.endsWith("/")) { uri = uri.substring(0, uri.length() - 1); } @@ -191,18 +237,24 @@ jmsSender = new JMSSender(); ListenerManager listenerManager = configContext.getListenerManager(); TransportInDescription trsIn = configContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_JMS); - + + // get JMS transport parameters from the binding uri Map<String, String> jmsProps = JMSUtils.getProperties( wsBinding.getURI() ); + + // collect the parameters used to configure the JMS transport OMFactory fac = OMAbstractFactory.getOMFactory(); - OMElement parms = fac.createOMElement(DEFAULT_QUEUE_CONENCTION_FACTORY, null); + OMElement parms = fac.createOMElement(DEFAULT_QUEUE_CONNECTION_FACTORY, null); + for ( String key : jmsProps.keySet() ) { OMElement param = fac.createOMElement("parameter", null); param.addAttribute( "name", key, null ); param.addChild(fac.createOMText(param, jmsProps.get(key))); parms.addChild(param); } - Parameter queueConnectionFactory = new Parameter(DEFAULT_QUEUE_CONENCTION_FACTORY, parms); + + Parameter queueConnectionFactory = new Parameter(DEFAULT_QUEUE_CONNECTION_FACTORY, parms); trsIn.addParameter( queueConnectionFactory ); + trsIn.setReceiver(jmsListener); configContext.getAxisConfiguration().addTransportIn( trsIn ); @@ -222,7 +274,6 @@ } catch (AxisFault e) { throw new RuntimeException(e); } - } public void stop() { @@ -416,7 +467,7 @@ AxisEndpoint ae = (AxisEndpoint)i.next(); if (endpointURL.startsWith("jms") ) { Parameter qcf = new Parameter(JMSConstants.CONFAC_PARAM, null); - qcf.setValue(DEFAULT_QUEUE_CONENCTION_FACTORY); + qcf.setValue(DEFAULT_QUEUE_CONNECTION_FACTORY); axisService.addParameter(qcf); break; } @@ -548,6 +599,24 @@ protected Binding getBinding() { return wsBinding; } + + private PolicySet getPolicySet(QName intentName){ + PolicySet returnPolicySet = null; + + if ( wsBinding instanceof PolicySetAttachPoint ) { + PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)wsBinding; + for ( PolicySet policySet : policiedBinding.getPolicySets() ) { + for (Intent intent : policySet.getProvidedIntents()){ + if ( intent.getName().equals(intentName) ){ + returnPolicySet = policySet; + break; + } + } + } + } + + return returnPolicySet; + } private void configureSecurity() throws AxisFault { if ( wsBinding instanceof PolicySetAttachPoint ) { Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml?rev=580908&r1=580907&r2=580908&view=diff ============================================================================== --- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml (original) +++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml Mon Oct 1 02:47:50 2007 @@ -202,6 +202,26 @@ <!-- Added by Tuscany --> <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener"> + <!-- These configuation parameters now come from the binding.ws uri + or from a policy set + <parameter name="myTopicConnectionFactory"> + <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter> + <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter> + <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter> + </parameter> + + <parameter name="myQueueConnectionFactory"> + <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter> + <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter> + <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter> + </parameter> + + <parameter name="default"> + <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter> + <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter> + <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter> + </parameter> + --> </transportReceiver> <!-- ================================================= --> Modified: incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java?rev=580908&r1=580907&r2=580908&view=diff ============================================================================== --- incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java (original) +++ incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java Mon Oct 1 02:47:50 2007 @@ -106,7 +106,7 @@ while (true) { switch (reader.next()) { case XMLStreamConstants.START_ELEMENT: - //since the axis2 code checks against a no namespace we need to generate accordingly + //since the axis2 code checks against a no namespace we need to generate accordingly QName name = new QName(reader.getName().getLocalPart()); OMElement child = fac.createOMElement(name, current); @@ -129,9 +129,11 @@ String qname = reader.getAttributeLocalName(i); String value = reader.getAttributeValue(i); - child.addAttribute(qname, value, fac.createOMNamespace(ns, prefix)); if (ns != null) { + child.addAttribute(qname, value, fac.createOMNamespace(ns, prefix)); child.declareNamespace(ns, prefix); + } else { + child.addAttribute(qname, value, null); } } current = child; Added: incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/definitions.xml URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/definitions.xml?rev=580908&view=auto ============================================================================== --- incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/definitions.xml (added) +++ incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/definitions.xml Mon Oct 1 02:47:50 2007 @@ -0,0 +1,66 @@ +<?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. +--> +<sca:definitions xmlns="http://www.osoa.org/xmlns/sca/1.0" + targetNamespace="http://www.osoa.org/xmlns/sca/1.0" + xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"> + + <sca:intent name="transport" + constrains="sca:binding.ws"> + <sca:description> + The general intent that a transport is available over which SOAP messages flow + </sca:description> + </sca:intent> + + <sca:intent name="transport.jms"> + <sca:description> + A JMS transport is required + </sca:description> + </sca:intent> + + <sca:intent name="transport.http"> + <sca:description> + An HTTP transport is required + </sca:description> + </sca:intent> + + <!-- + how does the following relate to confidentiality intents + does confidentiality become a profile intent? + --> + <sca:intent name="transport.https"> + <sca:description> + An HTTPS transport is required + </sca:description> + </sca:intent> + + <sca:policySet name="wsJMSTransportPolicy" + provides="transport.jms" + appliesTo="sca:binding.ws"> + <tuscany:wsConfigParam> + <parameter name="TuscanyQueueConnectionFactory"> + <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter> + <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter> + <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter> + </parameter> + </tuscany:wsConfigParam> + </sca:policySet> + + </sca:definitions> \ No newline at end of file Added: incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite?rev=580908&view=auto ============================================================================== --- incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite (added) +++ incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite Mon Oct 1 02:47:50 2007 @@ -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://helloworld" + xmlns:hw="http://helloworld" + name="helloworldws"> + + <component name="HelloWorldServiceComponent"> + <implementation.java class="helloworld.HelloWorldImpl" /> + <service name="HelloWorldService"> + <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" /> + <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapJmsBinding)" requires="transport.jms"/> + </service> + </component> + +</composite> Added: incubator/tuscany/java/sca/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java?rev=580908&view=auto ============================================================================== --- incubator/tuscany/java/sca/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java (added) +++ incubator/tuscany/java/sca/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldJmsPolicyServerTestCase.java Mon Oct 1 02:47:50 2007 @@ -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. + */ +package helloworld; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertNotNull; + +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; +import org.apache.activemq.broker.BrokerService; + +/** + * Tests that the helloworld server is available + */ +public class HelloWorldJmsPolicyServerTestCase{ + + private SCADomain scaDomain; + private BrokerService broker = new BrokerService(); + + @Before + public void startServer() throws Exception { + broker.addConnector("tcp://localhost:61616"); + broker.start(); + scaDomain = SCADomain.newInstance("helloworldwsjmspolicy.composite"); + } + + + @Test + public void testServiceCall() throws IOException { + HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); + assertNotNull(helloWorldService); + assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); + } + + @After + public void stopServer() throws Exception { + scaDomain.close(); + broker.stop(); + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: yruiz@example.com For additional commands, e-mail: yruiz@example.com From tuscany-commitsyruiz@example.com Mon Oct 01 11:32:18 2007 Return-Path: <tuscany-commitsyruiz@example.com> Delivered-To: yruiz@example.com Received: (qmail 92638 invoked from network); 1 Oct 2007 11:32:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2007 11:32:18 -0000 Received: (qmail 88032 invoked by uid 500); 1 Oct 2007 11:32:08 -0000 Delivered-To: yruiz@example.com Received: (qmail 87957 invoked by uid 500); 1 Oct 2007 11:32:07 -0000 Mailing-List: contact yruiz@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:yruiz@example.com> List-Unsubscribe: <mailto:yruiz@example.com> List-Post: <mailto:yruiz@example.com> List-Id: <tuscany-commits.ws.apache.org> Reply-To: yruiz@example.com Delivered-To: mailing list yruiz@example.com Received: (qmail 87948 invoked by uid 99); 1 Oct 2007 11:32:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 04:32:07 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 11:32:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0BD291A9838; Mon, 1 Oct 2007 04:31:27 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r580925 - /incubator/tuscany/java/sca/samples/helloworld-bpel/ Date: Mon, 01 Oct 2007 11:31:26 -0000 To: yruiz@example.com From: yruiz@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <yruiz@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: slaws Date: Mon Oct 1 04:31:25 2007 New Revision: 580925 URL: http://svn.apache.org/viewvc?rev=580925&view=rev Log: ignore derby.log Modified: incubator/tuscany/java/sca/samples/helloworld-bpel/ (props changed) Propchange: incubator/tuscany/java/sca/samples/helloworld-bpel/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Mon Oct 1 04:31:25 2007 @@ -13,3 +13,4 @@ .settings .deployables .wtpmodules +derby.log --------------------------------------------------------------------- To unsubscribe, e-mail: yruiz@example.com For additional commands, e-mail: yruiz@example.com From tuscany-commitsyruiz@example.com Mon Oct 01 11:37:52 2007 Return-Path: <tuscany-commitsyruiz@example.com> Delivered-To: yruiz@example.com Received: (qmail 94676 invoked from network); 1 Oct 2007 11:37:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2007 11:37:52 -0000 Received: (qmail 91885 invoked by uid 500); 1 Oct 2007 11:37:41 -0000 Delivered-To: yruiz@example.com Received: (qmail 91852 invoked by uid 500); 1 Oct 2007 11:37:41 -0000 Mailing-List: contact yruiz@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:yruiz@example.com> List-Unsubscribe: <mailto:yruiz@example.com> List-Post: <mailto:yruiz@example.com> List-Id: <tuscany-commits.ws.apache.org> Reply-To: yruiz@example.com Delivered-To: mailing list yruiz@example.com Received: (qmail 91841 invoked by uid 99); 1 Oct 2007 11:37:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 04:37:41 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 11:37:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id F030C1A9832; Mon, 1 Oct 2007 04:37:22 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r580927 - /incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite Date: Mon, 01 Oct 2007 11:37:21 -0000 To: yruiz@example.com From: yruiz@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <yruiz@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: slaws Date: Mon Oct 1 04:37:17 2007 New Revision: 580927 URL: http://svn.apache.org/viewvc?rev=580927&view=rev Log: TUSCANY-1822 Remove wsdlElement from binding Modified: incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite Modified: incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite?rev=580927&r1=580926&r2=580927&view=diff ============================================================================== --- incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite (original) +++ incubator/tuscany/java/sca/samples/helloworld-ws-service/src/main/resources/helloworldwsjmspolicy.composite Mon Oct 1 04:37:17 2007 @@ -26,7 +26,7 @@ <implementation.java class="helloworld.HelloWorldImpl" /> <service name="HelloWorldService"> <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" /> - <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapJmsBinding)" requires="transport.jms"/> + <binding.ws requires="transport.jms"/> </service> </component> --------------------------------------------------------------------- To unsubscribe, e-mail: yruiz@example.com For additional commands, e-mail: yruiz@example.com From tuscany-commitsyruiz@example.com Mon Oct 01 17:07:06 2007 Return-Path: <tuscany-commitsyruiz@example.com> Delivered-To: yruiz@example.com Received: (qmail 65807 invoked from network); 1 Oct 2007 17:07:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2007 17:07:06 -0000 Received: (qmail 56043 invoked by uid 500); 1 Oct 2007 17:06:55 -0000 Delivered-To: yruiz@example.com Received: (qmail 56019 invoked by uid 500); 1 Oct 2007 17:06:55 -0000 Mailing-List: contact yruiz@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:yruiz@example.com> List-Unsubscribe: <mailto:yruiz@example.com> List-Post: <mailto:yruiz@example.com> List-Id: <tuscany-commits.ws.apache.org> Reply-To: yruiz@example.com Delivered-To: mailing list yruiz@example.com Received: (qmail 56010 invoked by uid 99); 1 Oct 2007 17:06:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 10:06:55 -0700 X-ASF-Spam-Status: No, hits=-98.8 required=10.0 tests=ALL_TRUSTED,DNS_FROM_DOB,RCVD_IN_DOB X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 17:07:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EA04C1A9832; Mon, 1 Oct 2007 10:06:44 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r581016 - /incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java Date: Mon, 01 Oct 2007 17:06:44 -0000 To: yruiz@example.com From: yruiz@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <yruiz@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: rfeng Date: Mon Oct 1 10:06:43 2007 New Revision: 581016 URL: http://svn.apache.org/viewvc?rev=581016&view=rev Log: Fix for TUSCANY-1821 Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java Modified: incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java?rev=581016&r1=581015&r2=581016&view=diff ============================================================================== --- incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java (original) +++ incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java Mon Oct 1 10:06:43 2007 @@ -35,8 +35,10 @@ import javax.wsdl.extensions.ExtensibilityElement; import javax.wsdl.extensions.ExtensionDeserializer; import javax.wsdl.extensions.ExtensionRegistry; +import javax.wsdl.extensions.ExtensionSerializer; import javax.wsdl.extensions.UnknownExtensibilityElement; import javax.wsdl.extensions.UnknownExtensionDeserializer; +import javax.wsdl.extensions.UnknownExtensionSerializer; import javax.wsdl.extensions.schema.Schema; import javax.wsdl.xml.WSDLLocator; import javax.wsdl.xml.WSDLReader; @@ -100,12 +102,12 @@ wsdlExtensionRegistry = this.wsdl4jFactory.newPopulatedExtensionRegistry(); // REVIEW: [rfeng] Disable the schema extension for WSDL4J to avoid aggressive loading -/* ExtensionDeserializer deserializer = new UnknownExtensionDeserializer(); + ExtensionSerializer serializer = new UnknownExtensionSerializer(); for (QName schema : XSD_QNAME_LIST) { + wsdlExtensionRegistry.registerSerializer(Types.class, schema, serializer); wsdlExtensionRegistry.registerDeserializer(Types.class, schema, deserializer); } -*/ } /** --------------------------------------------------------------------- To unsubscribe, e-mail: yruiz@example.com For additional commands, e-mail: yruiz@example.com From tuscany-commitsyruiz@example.com Mon Oct 01 17:40:00 2007 Return-Path: <tuscany-commitsyruiz@example.com> Delivered-To: yruiz@example.com Received: (qmail 85055 invoked from network); 1 Oct 2007 17:39:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2007 17:39:59 -0000 Received: (qmail 5732 invoked by uid 500); 1 Oct 2007 17:39:49 -0000 Delivered-To: yruiz@example.com Received: (qmail 5712 invoked by uid 500); 1 Oct 2007 17:39:49 -0000 Mailing-List: contact yruiz@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:yruiz@example.com> List-Unsubscribe: <mailto:yruiz@example.com> List-Post: <mailto:yruiz@example.com> List-Id: <tuscany-commits.ws.apache.org> Reply-To: yruiz@example.com Delivered-To: mailing list yruiz@example.com Received: (qmail 5703 invoked by uid 99); 1 Oct 2007 17:39:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 10:39:49 -0700 X-ASF-Spam-Status: No, hits=-98.8 required=10.0 tests=ALL_TRUSTED,DNS_FROM_DOB,RCVD_IN_DOB X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 17:39:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EFA481A9838; Mon, 1 Oct 2007 10:39:08 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r581024 - /incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java Date: Mon, 01 Oct 2007 17:39:08 -0000 To: yruiz@example.com From: yruiz@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <yruiz@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: rfeng Date: Mon Oct 1 10:39:07 2007 New Revision: 581024 URL: http://svn.apache.org/viewvc?rev=581024&view=rev Log: Apply the patch from Mark Combellack for TUSCANY-1819. Thank you, Mark! Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java?rev=581024&r1=581023&r2=581024&view=diff ============================================================================== --- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java (original) +++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java Mon Oct 1 10:39:07 2007 @@ -74,7 +74,11 @@ @SuppressWarnings("unchecked") public <CB> CB getCallback() { - return (CB) getCallbackReference().getService(); + CallableReference<CB> cb = getCallbackReference(); + if (cb == null) { + return null; + } + return cb.getService(); } @SuppressWarnings("unchecked") --------------------------------------------------------------------- To unsubscribe, e-mail: yruiz@example.com For additional commands, e-mail: yruiz@example.com From tuscany-commitsyruiz@example.com Mon Oct 01 17:45:48 2007 Return-Path: <tuscany-commitsyruiz@example.com> Delivered-To: yruiz@example.com Received: (qmail 87807 invoked from network); 1 Oct 2007 17:45:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2007 17:45:47 -0000 Received: (qmail 14612 invoked by uid 500); 1 Oct 2007 17:45:37 -0000 Delivered-To: yruiz@example.com Received: (qmail 14591 invoked by uid 500); 1 Oct 2007 17:45:37 -0000 Mailing-List: contact yruiz@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:yruiz@example.com> List-Unsubscribe: <mailto:yruiz@example.com> List-Post: <mailto:yruiz@example.com> List-Id: <tuscany-commits.ws.apache.org> Reply-To: yruiz@example.com Delivered-To: mailing list yruiz@example.com Received: (qmail 14573 invoked by uid 99); 1 Oct 2007 17:45:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 10:45:37 -0700 X-ASF-Spam-Status: No, hits=-98.8 required=10.0 tests=ALL_TRUSTED,DNS_FROM_DOB,RCVD_IN_DOB X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 17:45:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 73E1A1A9832; Mon, 1 Oct 2007 10:44:56 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r581027 - in /incubator/tuscany/java/sca/modules/databinding-json/src: main/java/org/apache/tuscany/sca/databinding/json/ test/java/org/apache/tuscany/sca/databinding/json/ Date: Mon, 01 Oct 2007 17:44:55 -0000 To: yruiz@example.com From: yruiz@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <yruiz@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: rfeng Date: Mon Oct 1 10:44:54 2007 New Revision: 581027 URL: http://svn.apache.org/viewvc?rev=581027&view=rev Log: Remove the duplicate XMLStreamSerializer Removed: incubator/tuscany/java/sca/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/XMLStreamSerializer.java Modified: incubator/tuscany/java/sca/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/XMLStreamReader2JSON.java incubator/tuscany/java/sca/modules/databinding-json/src/test/java/org/apache/tuscany/sca/databinding/json/JSONTransformerTestCase.java Modified: incubator/tuscany/java/sca/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/XMLStreamReader2JSON.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/XMLStreamReader2JSON.java?rev=581027&r1=581026&r2=581027&view=diff ============================================================================== --- incubator/tuscany/java/sca/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/XMLStreamReader2JSON.java (original) +++ incubator/tuscany/java/sca/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/XMLStreamReader2JSON.java Mon Oct 1 10:44:54 2007 @@ -28,6 +28,7 @@ import org.apache.tuscany.sca.databinding.TransformationContext; import org.apache.tuscany.sca.databinding.TransformationException; import org.apache.tuscany.sca.databinding.impl.BaseTransformer; +import org.apache.tuscany.sca.databinding.xml.XMLStreamSerializer; import org.codehaus.jettison.badgerfish.BadgerFishXMLStreamWriter; import org.codehaus.jettison.json.JSONObject; Modified: incubator/tuscany/java/sca/modules/databinding-json/src/test/java/org/apache/tuscany/sca/databinding/json/JSONTransformerTestCase.java URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/databinding-json/src/test/java/org/apache/tuscany/sca/databinding/json/JSONTransformerTestCase.java?rev=581027&r1=581026&r2=581027&view=diff ============================================================================== --- incubator/tuscany/java/sca/modules/databinding-json/src/test/java/org/apache/tuscany/sca/databinding/json/JSONTransformerTestCase.java (original) +++ incubator/tuscany/java/sca/modules/databinding-json/src/test/java/org/apache/tuscany/sca/databinding/json/JSONTransformerTestCase.java Mon Oct 1 10:44:54 2007 @@ -35,6 +35,7 @@ import org.apache.tuscany.sca.databinding.TransformationContext; import org.apache.tuscany.sca.databinding.impl.TransformationContextImpl; import org.apache.tuscany.sca.databinding.json.axiom.JSON2OMElement; +import org.apache.tuscany.sca.databinding.xml.XMLStreamSerializer; import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl; import org.apache.tuscany.sca.interfacedef.util.XMLType; --------------------------------------------------------------------- To unsubscribe, e-mail: yruiz@example.com For additional commands, e-mail: yruiz@example.com From tuscany-commitsyruiz@example.com Mon Oct 01 19:48:01 2007 Return-Path: <tuscany-commitsyruiz@example.com> Delivered-To: yruiz@example.com Received: (qmail 41631 invoked from network); 1 Oct 2007 19:47:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2007 19:47:59 -0000 Received: (qmail 90682 invoked by uid 500); 1 Oct 2007 19:47:49 -0000 Delivered-To: yruiz@example.com Received: (qmail 90667 invoked by uid 500); 1 Oct 2007 19:47:49 -0000 Mailing-List: contact yruiz@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:yruiz@example.com> List-Unsubscribe: <mailto:yruiz@example.com> List-Post: <mailto:yruiz@example.com> List-Id: <tuscany-commits.ws.apache.org> Reply-To: yruiz@example.com Delivered-To: mailing list yruiz@example.com Received: (qmail 90658 invoked by uid 99); 1 Oct 2007 19:47:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 12:47:49 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 19:47:50 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 263D271420A for <yruiz@example.com>; Mon, 1 Oct 2007 12:47:00 -0700 (PDT) Message-ID: <33517689.1191268020151.JavaMail.www-data@brutus> Date: Mon, 1 Oct 2007 12:47:00 -0700 (PDT) From: yruiz@example.com To: yruiz@example.com Subject: [CONF] Apache Tuscany: SCA Java User Guide (page edited) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org SCA Java User Guide (TUSCANY) edited by Simon Laws Page: http://cwiki.apache.org/confluence/display/TUSCANY/SCA+Java+User+Guide Changes: http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=44873&originalVersion=120&revisedVersion=121 Content: --------------------------------------------------------------------- {section:border=true} {column:width=15%} {include: SCA Java Subproject Menu} {include: Java SCA Menu New} {column} {column:width=85%} Welcome to the Apache Tuscany SCA User guide. Here you will find information aimed to help you understand SCA concepts and an example walk through for building your own SCA application. \\ {panel:title=Apache Tuscany SCA User Guide|borderStyle=solid|borderColor=#C3CDA1|titleBGColor=#C3CDA1|bgColor=#ECF4D1} * [*Introduction*|#Intro] * [*Quick Guide to SCA* |#Quick Guide to SCA] * [*Example Walkthrough*|#Example Walkthrough] ** [Getting Set Up|#Getting Set Up] ** [Running The Calculator Sample|#Running The Calculator Sample] ** [Building The Calculator Sample In Java|#Building The Calculator Sample In Java] ** [Using more advanced features in calculator|#What Next] * [*Create OnLineStore SCA composite application*|#OnlineStore application] * [*Tuscany SCA Domain Implementation*|#Tuscany SCA Domain Implementation] * [*Tuscany SCA Extensions*|#Tuscany SCA Extensions] ** [The Extensible Runtime|#The Extensible Runtime] ** [Available Extensions|#Available Extensions] ** [Using Extensions|#Using Extensions] * [*Hosting Environments*|#Hosting Tuscany Java SCA] * [*Tuscany SCA And IDEs*|#Tuscany SCA And IDEs] ** [Using The Samples In An IDE Without Maven|#Using The Samples In An IDE Without Maven] ** [Using The Samples In An IDE If You Have Maven|#Using The Samples In An IDE If You Have Maven] \\ &nbsp; {panel} {note:title:Notification}{center}This page is under construction\- You are welcome to help and complete it{center}{note} h2. {anchor:Intro}{bgcolor:#C3CDA1}Introduction{bgcolor} This user guide will help you become familiar with SCA concepts and walks you through an example that demonstrates how to build an SCA application. It also describes the different environments that Tuscany supports (such as command line clients or web applications) and how to package up applications to run in these environments. *There's nothing to it really!* Building SCA applications is easy. One of the main goals of Tuscany and SCA is to avoid imposing rules and requirements on how people write applications. We want to let people write application code the way they want without being concerned about the environment in which it will be used. After all, writing code to handle plumbing just gets in the way of writing the interesting stuff. So basically, you write the code for interesting bits, and Tuscany provides the environment that lets it run. Therefore, this guide is just an example of how an SCA application can be developed and is not a rule. h2. {anchor:Quick Guide to SCA}{bgcolor:#C3CDA1}Quick Guide to SCA {bgcolor} The [*quick guide to SCA*|Quick Guide To SCA] gives you an overview of SCA concepts and prepares you to work on the example below. You can skip this step if you are already familiar with SCA. For more details on SCA please refer to the specifications at [Open SOA web site|http://www.osoa.org]. h2. {anchor:Example Walkthrough}{bgcolor:#C3CDA1}Example Walkthrough{bgcolor} h3. {anchor:Overview of Example}{bgcolor:#C3CDA1}Overview of Example{bgcolor} We will use the calculator sample to walk through the steps for building an SCA application. As the name indicates, this example performs typical calculator operations. It is given two numbers and asked to perform an operation on them. Our calculator will handle add, subtract, multiply and divide. We start with a simple variation of the calculator example and extend it to include more advanced SCA features. h3. {anchor:Getting Set Up}{bgcolor:#C3CDA1}Getting Set Up{bgcolor} * Download [Tuscany Java SCA release|http://incubator.apache.org/tuscany/sca-java-releases.html]. Please download the latest binary release. You can use the source code release but you will have to use Maven at all stages. * Download prerequisites ** [Java 5|http://java.sun.com/javase/downloads/index.jsp] ** [Maven 2.0.4+|http://maven.apache.org/download.html] If you want to build the sample with Ant rather than Maven you will need to download Ant instead ** [Ant 1.7.0|http://ant.apache.org/bindownload.cgi] h3. {anchor:Running The Calculator Sample}{bgcolor:#C3CDA1}Running The Calculator Sample{bgcolor} Calculator is provided as a sample under SCA Java binary distribution. Let's first run the sample before we go about building it. It is easy! * Go to the directory ..\samples\calculator {code} ant run {code} Alternatively if you want to run the sample directly from the command line try the following. * if you are using Windows issue the command: {code} java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient {code} * if you are using *nix issue the command: {code} java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient {code} You should see the following result: 3 + 2=5.0 3 - 2=1.0 3 * 2=6.0 3 / 2=1.5 If you are using the source disitribution then we suggest you use Maven to build and run the calculator sample because the tuscany-sca-manifest.jar is not provided with the source distribution. This jar is part of the binary distribution and collects together all of the tuscany jars in one place so that the java command line is nice and short when running samples. h3. {anchor:Building The Calculator Sample In Java}{bgcolor:#C3CDA1}Building The Calculator Sample In Java{bgcolor} h4. What you will learn This example illustrates how to define your application while staying focused on the business logic. It walks you through the steps of building a composite application called calculator. All connections between the components within the composite are local and defined using Java interfaces. h4. Example walk-through *Step 1 - Define what building blocks are needed:* Think about how your application can be broken down into smaller functions/services. Each block is a logical unit of operation that can be used in the overall application. In this case, calculator application can be divided into five blocks: AddService block, SubstractService block, MultiplyService block and DivideService block and a main block that takes a request and routes it to the right operation. We have called this main block the CalculatorService !CalculatorBlocks2.jpg|align=centre! (?)TODO - need to update the diagram to change Add -> AddService etc. Who has the editable version? *Step 2 - Implement each block:* Now that you have identified the blocks of functionality in your application, you are ready to create each block. In SCA the blocks of functionality are referred to as components so let's look at how we implement a component. We'll take the AddService component as our first example. The AddService component will provide a service that adds two numbers together. The CalcualtorService component uses the AddService component whenever it is asked to perform additions. If we were writing the AddService component in plain old Java we would start by describing a (Java) interface. {code} public interface AddService { double add(double n1, double n2); } {code} Now, we provide an implementation of this interface. {code} public class AddServiceImpl implements AddService { public double add(double n1, double n2) { return n1 + n2; } } {code} But wait! Aren't we writing an SCA component? It must be more complicated that that - the mere, plain old Java interface and implementation, right? Well, actually an SCA component can just be plain old Java so we have just done all the coding we needed to implement the SCA AddService component. We can use SCA to expose the service that the AddService component provides over any of the supported bindings, for example, WebServices, JMS or RMI, without changing out the AddService implementation. Let's take a look at the CalculatorService component. This is interesting because it's going to call the AddService component. In the full application it will call the SubtractService, MultiplyService and DivideService components as well, but we will ignore these for the time being as they follow the same pattern as we will implement for the AddService component. Again we will start by defining an interface because CalcultorService is itself providing an interface that others will call. {code} 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); } {code} Now we implement this interface. {code} 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; } ...set methods for the other attributes would go here public double add(double n1, double n2) { return addService.add(n1, n2); } ...implementations of the other methods would go here } {code} *Step 3 - Assembling the application:* So all well and good but how do we actually run these two components. Well of course the java programmer in us want's to get down to it, write a mainline to connect our two components together and run then. We could still do that easily in this case. {code} public class CalculatorClient { public static void main(String[] args) throws Exception { CalculatorServiceImpl calculatorService = new CalculatorServiceImpl(); AddService addService = new AddServiceImpl(); calculatorService.setAddService(addService); System.out.println("3 + 2=" + calculatorService.add(3, 2)); // calls to other methods go here if we have implemented SubtractService, MultiplyService, DivideService } } {code} But this doesn't run using the Tuscany SCA runtime and extending this code to provide web services interfaces, for example, would be a little more complicated. What do we have to do to make it run in Tuscany where we get all things like web service support for free? Well, not much actually. First let's change the client to fire up the Tuscany SCA runtime before calling our components. {code} public class CalculatorClient { public static void main(String[] args) throws Exception { SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); CalculatorService calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); System.out.println("3 + 2=" + calculatorService.add(3, 2)); // calls to other methods go here if we have implemented SubtractService, MultiplyService, DivideService scaDomain.close(); } } {code} You can see that we start by using a static method on SCADomain to create a new instance of itself. The SCADomain is a concept in SCA that represents the boundary of an SCA system. This could be distributed across many processors. For now, lets concentrate on getting this working inside a single Java VM. The parameter "Calculator.composite" refers to an XML file that tells SCA how the components in our calculator application are assembled into a working application. Here is the XML that's inside Calculator.composite. {code} <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="Calculator"> <component name="CalculatorServiceComponent"> <implementation.java class="calculator.CalculatorServiceImpl"/> <reference name="addService" target="AddServiceComponent" /> <!-- references to SubtractComponent, MultiplyComponent and DivideComponent --> </component> <component name="AddServiceComponent"> <implementation.java class="calculator.AddServiceImpl"/> </component> <!-- definitions of SubtractComponent, MultiplyComponent and DivideComponent --> </composite> {code} You can see that we define two components here and specify the Java implementation classes that Tuscany SCA needs to load to make them work. These are the classes we have just implemented. Also note that the CalculatorServiceComponent has a reference named "addService". In the XML, this reference targets the AddServiceComponent. It is no coincidence that the reference name, "addService", matches the name of the addService field we created when we implemented CalculatorServiceImpl. The Tuscany SCA runtime parses the information from the XML composite file and uses it to build the objects and relationships that represent our calculator application. It first creates instances of AddServiceImpl and CalcualtorSreviceImpl. It then injects a reference to the AddServiceImpl object into the addService field in the CalculatorServiceImpl object. If you look back at how we implemented the CalculatorService you will see an @Reference annotation that tells SCA which fields are expecting to be set automatically by SCA. This is equivalent to this piece of code from our normal Java client. {code} CalculatorServiceImpl calculatorService = new CalculatorServiceImpl(); AddService addService = new AddServiceImpl(); calculatorService.setAddService(addService); {code} Once the composite file is loaded into the SCADomain our client code asks the SCADomain to give us a reference to the component called "CalculatorServiceComponent". {code} CalculatorService calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); {code} We can now use this reference as though we had created it ouselves, for example, from the CalculatorServiceImpl.add() method implementation. {code} return addService.add(n1, n2); {code} The SCA specifications often descibe SCA applications is diagramatic form. This often helps give a quick overview of what components ar part of an application and how they are wired together. If we draw a diagram of what we have build in the calculator sample we come up with something like. !calculator.png|align=centre! You will notice that diagrams are provided with all of our samples. If you like to take a visual approach to things this may help you become quickly familiar with the components in the samples. Take a look at the ".png" files in the top level directory of each sample. *Step 4 - Deploying the applcation:* So as long as the "Calculator.composite" file is present on our class path, along with the rest of the tuscany jars, we can run our sample as we did previously. The samples come with an Ant build.xml file that allows the sample files to be rebuilt so if you want to experiment with the sample code you can do so and then recompile it. {code} ant compile {code} Once recompiled you can run it as before in the [Running The Calculator Sample|SCA Java User Guide#Running The Calculator Sample] section, for example, we provide a run target in the Ant build.xml file so the calculator sample can also be run using. {noformat} ant run {noformat} h3. {anchor:What Next}{bgcolor:#C3CDA1}Using more advanced features in calculator{bgcolor} Looking back, the client code we have written to start the calculator application using the Tuscany SCA runtime is no longer than a normal Java client for the application. However we do now have the XML composite file that describes how our application is assembled. This concept of assembly is a great advantage as our applications become more complex and we want to change them, reuse them, integrate them with other applications or just further develop them using a programming model consistent with all our other SCA applications. Regardless of what language is used to implement each of them. For example, lets say our calculator sample is so poweful and popular that we want to put it on the company intranet and let other people access it as a service directly from their browser based Web2.0 applications. It's at this point we would normally start reaching for the text books to work out how to make this happen. As we have an XML file that describes our application it's easy in Tuscany SCA. The following should do the trick. {code} <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="Calculator"> <service name="CalculatorService" promote="CalculatorServiceComponent/CalculatorService"> <interface.java interface="calculator.CalculatorService"/> <binding.jsonrpc/> </service> <component name="CalculatorServiceComponent"> <implementation.java class="calculator.CalculatorServiceImpl"/> <reference name="addService" target="AddServiceComponent" /> <!-- references to SubtractComponent, MultiplyComponent and DivideComponent --> </component> <component name="AddServiceComponent"> <implementation.java class="calculator.AddServiceImpl"/> </component> <!-- definitions of SubtractComponent, MultiplyComponent and DivideComponent --> </composite> {code} All we have done is added the <service> element which tells Tuscany SCA how to expose our CalculatorServiceComponent as a JSONRPC service. Note that we didn't have to change the Java code of our components. This is just a configuration change. The helloworld-jsonrpc sample shows a working example of the jsonrpc binding. (?) TODO - we don't have a JSONRPC version of the calculator sample If we really wanted a SOAP/HTTP web service we can do that easily too. The helloworld-ws-service and helloworld-ws-reference samples show you how to work with web services. (?) TODO - we don't have a web services version of the calcualtor sample SCA allows other kinds of flexibility. We can rewire our components, for example, using a one of the remote bindings, like RMI, we could have the CalculatorServiceComponent running on one machine wired to a remote version of the application running on another machine. The calculator-rmi-service and calculator-rmi-reference samples show the RMI yruiz@example.com. We could also introduce components implemented in different languages, for example, let's add the SubtractServiceComponent implemented in Ruby. {code} <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="Calculator"> <component name="CalculatorServiceComponent"> <implementation.java class="calculator.CalculatorServiceImpl"/> <reference name="addService" target="AddServiceComponent" /> <reference name="subtractService" target="SubtractServiceComponent" /> <!-- references to MultiplyComponent and DivideComponent --> </component> <component name="AddServiceComponent"> <implementation.java class="calculator.AddServiceImpl"/> </component> <component name="SubtractServiceComponent"> <implementation.script script="calculator/SubtractServiceImpl.rb"/> </component> <!-- definitions of MultiplyComponent and DivideComponent --> </composite> {code} Of course we need the Ruby code that implements the component. {code} def subtract(n1, n2) return n1 - n2 end {code} The Tuscany SCA runtime handles wiring Java components to Ruby components and performs any required data transformations. The calculator-script sample shows different script languages in use. So, now that our application is desribed as an SCA assembly there are lots of possibilities as we futher develop it and integration it with other applications. The following sections provide more detail on the features provided by Tuscany SCA. h2. {anchor:OnlineStore application}{bgcolor:#C3CDA1}Creating An OnLineStore SCA composite appllication{bgcolor} Now that you are familiar with SCA concepts you can use this step by step guide to create an OnlinStore composite SCA application which provides a web interface to a shopping cart. This excercise will take less than half an hour and it familiarizes you with the steps of creating and running a real SCA composite application. Although Eclipse IDE is used, no previous knowledge of Eclipse is required. You can easily see how the same steps can be used in your favorite IDE. [Want to Create my own OnlineStore SCA application|http://incubator.apache.org/tuscany/sca-java-releases.data/onlineStore.pdf] h2. {anchor:Tuscany SCA Domain Implementation}{bgcolor:#C3CDA1}Tuscany SCA Domain Implementation{bgcolor} You will have seen from the previous example walkthrough, and from the SCA overview, that SCA has the concept of a domain. Section 10 of the SCA Assembly specification describes an SCA Domain as defining "the boundary of visibility for all SCA mechanisms". SCA wires can be used to connect components within a single SCA Domain. >From the previous calculator sample you can see that the wires between the component references and services, formed by adding a target component name to a reference, are resolved inside an SCA domain. {code} <component name="CalculatorServiceComponent"> <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"> <implementation.java class="calculator.AddServiceImpl"/> </component> {code} To connect to services outside of the SCA Domain (whether they be services provided by SCA or by other means) you configure an explicit binding, for example, lets assume that the AddServiceComponent is a non-sca web service out there on the network somewhere. As this is outside the SCA domain we can use an explicit remote binding to talk to it. {code} <component name="CalculatorServiceComponent"> <implementation.java class="calculator.CalculatorServiceImpl"/> <reference name="addService" > <interface.java interface="calculator.AddService" /> <binding.ws uri="http://localhost:8080/sample-calculator-ws-webapp/AddServiceComponent"/> </reference> <reference name="subtractService" target="SubtractServiceComponent"></reference> <reference name="multiplyService" target="MultiplyServiceComponent"></reference> <reference name="divideService" target="DivideServiceComponent"></reference> </component> {code} Tuscany SCA supports running an SCA Domain in a single JVM or spread across multiple JVMs, potentially on different machines. !distributed-abstract.png|align=centre! Tuscany doesn't provide a single Java program that is the domain or the node. If you look at the samples provided with Tuscany you will see them using the SCA Domain interfaces in various different ways. Follow the links for instructions for using the [Standalone SCA Domain] and the [Distributed SCA Domain] interfaces. h2. {anchor:Tuscany SCA Extensions}{bgcolor:#C3CDA1}Tuscany SCA Extensions{bgcolor} h3. {anchor:The Extensible Runtime}{bgcolor:#C3CDA1}The Extensible Runtime{bgcolor} The Tuscany SCA runtime comprises a small set of core software which deals with: * Managing extesions to the Tuscany SCA Runtime(_core_) * Building and in memory assembly model of SCA applications (_assembly_) * Processing SCA applcations that are contributed (_contribution_) * Supporting databindings (_databinding_) * Supporting Tuscany SCA when its embedded in other environments (_embedded_) * Supporting Tuscany SCA when its running in a servlet container (_http_) The collections of interfaces that describe these features are referred to as the System Programming Interface (SPI). The [developer guide|SCA Java Developer Guide] discusses them in more detail but from a user perspective the important thing to realize is that the majority of interesting functionality in Tuscany SCA is provided by extensions which build upon this core SPI. These extensions provide Tuscany SCA with its ability to support a wide variety features. * Implementation types * Binding types * Databinding types * Interface description styles * Hosting environments So to understand how to use the Tuscany SCA runtime is to understand how to use its extensions. h3. {anchor:Available Extensions}{bgcolor:#C3CDA1}Available Extensions{bgcolor} More often than not using an extension involves adding information to the SCDL files or the implementation files but this is not always the case. The links below describe each of the extensions and how they can be used and configured. {table:border=0} {table-row} {table-cell} h3. {anchor:Implementation Types}{bgcolor:#C3CDA1}Implementation Types{bgcolor} {table-cell} {table-row} {table-row} {table-cell}[implementation.java|SCA Java implementation.java]{table-cell} {table-cell}Support for SCA components implemented with Java classes{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}[implementation.script|SCA Java implementation.script] {table-cell} {table-cell}Support for SCA components implemented with scripting languages{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}[implementation.bpel|SCA Java implementation.bpel]{table-cell} {table-cell}Support for components implemented in BPEL{table-cell} {table-cell}Available from 1.0{table-cell} {table-row} {table-row} {table-cell}[implementation.spring|SCA Java implementation.spring]{table-cell} {table-cell}Support for spring{table-cell} {table-cell}Available from 0.91{table-cell} {table-row} {table-row} {table-cell}[implementation.resource|SCA Java implementation.resource]{table-cell} {table-cell}exposes file resources{table-cell} {table-cell}Available from 0.91{table-cell} {table-row} {table-row} {table-cell}[implementation.osgi|SCA Java implementation.osgi]{table-cell} {table-cell}Support for osgi{table-cell} {table-cell}Available from 1.0{table-cell} {table-row} {table-cell}[implementation.xquery|SCA Java implementation.xquery]{table-cell} {table-cell}Support for components implemented in xquery{table-cell} {table-cell}Available from 1.0{table-cell} {table-row} {table-row} {table-cell} h3. {anchor:Protocol Bindings}{bgcolor:#C3CDA1}Protocol Bindings{bgcolor} {table-cell} {table-row} {table-row} {table-cell}[binding.ajax|SCA Java binding.ajax]{table-cell} {table-cell}Communication with AJAX clients{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}[binding.jms|SCA Java binding.jms]{table-cell} {table-cell}Asynchronous JMS messaging{table-cell} {table-cell}Under development{table-cell} {table-row} {table-row} {table-cell}[binding.jsonrpc|SCA Java binding.jsonrpc]{table-cell} {table-cell}The JSON-RPC protocol{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}[binding.rmi|SCA Java binding.rmi]{table-cell} {table-cell}The Java RMI protocol{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}[binding.ws|SCA Java binding.ws]{table-cell} {table-cell}SOAP/HTTP web services{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}[binding.ejb|SCA Java binding.ejb]{table-cell} {table-cell}EJB Binding{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}[binding.rss|SCA Java binding.rss]{table-cell} {table-cell}Consumes or provides an RSS feed{table-cell} {table-cell}Available from 0.91{table-cell} {table-row} {table-cell}[binding.atom|SCA Java binding.atom]{table-cell} {table-cell}supports Atom-publishing (a standard REST protocol), allowing you to create, retrieve, update, delete Atom entries {table-cell} {table-cell}Available from 0.91{table-cell} {table-row} {table-row} {table-cell} h3. {anchor:Data Bindings}{bgcolor:#C3CDA1}Data Bindings{bgcolor} {table-cell} {table-row} {table-row} {table-cell}databinding-axiom{table-cell} {table-cell}Support for AXIOM databinding{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}databinding-jaxb {table-cell} {table-cell}Support for&nbsp;JAXB databinding {table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}databinding-sdo{table-cell} {table-cell}Support for&nbsp;SDO databinding&nbsp;{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}databinding-sdo-axiom{table-cell} {table-cell}Support optimzed SDO to AXIOM transformation{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell} {table} h3. {anchor:Using Extensions}{bgcolor:#C3CDA1}Using Extensions{bgcolor} Extensions are loaded into the Tuscany SCA runtime using the Java service loading mechanism. Each extension is packaged as a jar and provides a file; {code} META-INF/services/org.apache.tuscany.sca.core.ModuleActivator {code} Using this information the Tuscany SCA runtime will load each extensions present on the the Java CLASSPATH. So if you want to use a particular feature make sure that it's available on your classpath. Conversely if you don't want a particular feature to be active remove it from the classpath. Writing a new extension is a subject in its own right and is described in the [extension guide|SCA Java Extension Development Guide] h2. {anchor:Hosting Tuscany Java SCA}{bgcolor:#C3CDA1}Hosting Environments{bgcolor} Apache Tuscany SCA Java runs in the following host environments. {table:border=0} {table-row} {table-cell} {table-cell} {table-row} {table-row} {table-cell}[host.embedded|SCA JAVA host.embedded]{table-cell} {table-cell}A simple embedded host that boots Tuscany core and application from the same classpath{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}host-webapp{table-cell} {table-cell}Intialises the Tuscany runtime for use in a Web Application{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}http-jetty{table-cell} {table-cell}The integration between Tuscany and the Jetty&nbsp;web container{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}http-tomcat{table-cell} {table-cell}The integration between Tuscany and the Tomcat web container{table-cell} {table-cell}Available from 0.90{table-cell} {table-row} {table-row} {table-cell}Apache Geronimo{table-cell} {table-cell}[How to run in Geronimo?|SCA Java host.geronimo]{table-cell} {table-cell}Available from 1.0{table-cell} {table-row} {table-row} {table-cell}Websphere Application Server {table-cell} {table-cell}[How to run with Websphere Application Server?|SCA Java host.Websphere]{table-cell} {table-row} {table-row} {table-cell} {table} h2. {anchor:Tuscany SCA And IDEs}{bgcolor:#C3CDA1}Tuscany SCA And IDEs{bgcolor} h3. {anchor:Using The Samples In An IDE Without Maven}{bgcolor:#C3CDA1}Using The Samples In An IDE Without Maven{bgcolor} We don't provide any IDE project files with our disitributions so you will have to import the sample files into your IDE manually. Here's an example of how it can be done using Eclipse. Here the directory tuscany_sca_install_dir is the directory whch holds the Tuscany SCA Java binary installation after it's been extracted from its archive file, for example, for the 0.90 release this will be tuscany-sca-0.90-incubating. In a new or existing workspace * Create a new java project to represent the sample you want to work on, e.g. {noformat} my working dir/calculator {noformat} * Import all of the sample code and resources into this project, e.g. {noformat} Use the File,Import menu and then select tuscany_sca_install_dir/samples/calculator from the filesystem {noformat} * Configure the source path to include {noformat} tuscany_sca_install_dir/samples/calculator/src/main/java tuscany_sca_install_dir/samples/calculator/src/main/resources {noformat} * Configure the output folder to be {noformat} tuscany_sca_install_dir/samples/calculator/target {noformat} * Configure the build path to include all of the jars provided in {noformat} tuscany_sca_install_dir/lib {noformat} * If you select calculator.CalculatorClient.java and run as "Java Application" you should see {noformat} 3 + 2=5.0 3 - 2=1.0 3 * 2=6.0 3 / 2=1.5 {noformat} The details of how to do this for other development environments will vary but the process will be similar. h3. {anchor:Using The Samples In An IDE If You Have Maven}{bgcolor:#C3CDA1}Using The Samples In An IDE If You Have Maven{bgcolor} If you are a Maven user you can use it to generate all of the IDE project files for you automatically. This works best if you generate IDE projects for all of the Apache Tuscany modules. You can then include the ones you are interested in working with in you IDE. To build IDE project files for all of the modules in Apache Tuscany SCA; {noformat} cd sca {noformat} If you are an Eclipse user do the following {noformat} mvn -Peclipse eclipse:eclipse {noformat} If you are an IDEA user do the following {noformat} mvn idea:idea {noformat} These commands generate project files for each module in Apache Tuscany SCA. The modules you are interested in can now be included in your IDE, for example, in Eclipse, if you create a new Java project and use the option to "create a new project from existing source" you can specify an SCA module directory, which includes the generated project files, and Eclipse will treat it like any other Java project. {HTMLcomment:hidden}{children:sort=creation}{HTMLcomment} {column} {section} --------------------------------------------------------------------- CONFLUENCE INFORMATION This message is automatically generated by Confluence Unsubscribe or edit your notifications preferences http://cwiki.apache.org/confluence/users/viewnotifications.action If you think it was sent incorrectly contact one of the administrators http://cwiki.apache.org/confluence/administrators.action If you want more information on Confluence, or have a bug to report see http://www.atlassian.com/software/confluence --------------------------------------------------------------------- To unsubscribe, e-mail: yruiz@example.com For additional commands, e-mail: yruiz@example.com From tuscany-commitsyruiz@example.com Mon Oct 01 20:21:11 2007 Return-Path: <tuscany-commitsyruiz@example.com> Delivered-To: yruiz@example.com
{'source': 'Apache Software Foundation Public Mail Archives'}