diff options
14 files changed, 30 insertions, 31 deletions
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/pom.xml b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/pom.xml index 47d59be4c1..fd862f918d 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/pom.xml +++ b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/pom.xml @@ -135,5 +135,4 @@ </plugin> </plugins> </build> - </project> diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceInterceptor.java b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java index 1b629962e5..68152b0321 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceInterceptor.java +++ b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatInterceptor.java @@ -23,7 +23,7 @@ import org.apache.tuscany.sca.invocation.Interceptor; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.Message; -public class JSONRPCWireFormatServiceInterceptor implements Interceptor { +public class JSONRPCWireFormatInterceptor implements Interceptor { public Invoker getNext() { // TODO Auto-generated method stub diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatReferenceProvider.java b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatReferenceProvider.java index d75e730949..5e1151dc95 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatReferenceProvider.java +++ b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatReferenceProvider.java @@ -23,6 +23,7 @@ import org.apache.tuscany.sca.assembly.Binding; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.invocation.Interceptor; +import org.apache.tuscany.sca.invocation.Phase; import org.apache.tuscany.sca.provider.WireFormatProvider; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentReference; @@ -40,18 +41,15 @@ public class JSONRPCWireFormatReferenceProvider implements WireFormatProvider { } public InterfaceContract configureWireFormatInterfaceContract(InterfaceContract interfaceContract) { - // TODO Auto-generated method stub return null; } public Interceptor createInterceptor() { - // TODO Auto-generated method stub return null; } public String getPhase() { - // TODO Auto-generated method stub - return null; + return Phase.REFERENCE_BINDING_WIREFORMAT; } } diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java index 1de2171a07..983e54c1a7 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java +++ b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/provider/JSONRPCWireFormatServiceProvider.java @@ -23,6 +23,7 @@ import org.apache.tuscany.sca.assembly.Binding; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.invocation.Interceptor; +import org.apache.tuscany.sca.invocation.Phase; import org.apache.tuscany.sca.provider.WireFormatProvider; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentService; @@ -50,8 +51,7 @@ public class JSONRPCWireFormatServiceProvider implements WireFormatProvider { } public String getPhase() { - // TODO Auto-generated method stub - return null; + return Phase.SERVICE_BINDING_WIREFORMAT; } } diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java index 444d45cf37..b9608115be 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java +++ b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/JSONRPCServiceTestCase.java @@ -37,7 +37,7 @@ import com.meterware.httpunit.WebResponse; /** * @version $Rev$ $Date$ */ -public class JSONRPCServiceTestCase{ +public class JSONRPCServiceTestCase { private static final String SERVICE_PATH = "/EchoService"; diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite index 978fdcfa7f..692918fa69 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite +++ b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite @@ -18,14 +18,16 @@ * under the License.
-->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
targetNamespace="http://jsonrpc"
xmlns:jsonrpc="http://jsonrpc"
name="JSONRPCBinding">
<service name="EchoService" promote="EchoComponent">
<interface.java interface="echo.Echo"/>
- <tuscany:binding.jsonrpc uri="http://localhost:8085/SCADomain/EchoService"/>
+ <binding.http uri="http://localhost:8085/SCADomain/EchoService">
+ <wireFormat.jsonrpc/>
+ <operationSelector.jsonrpc/>
+ </binding.http>
</service>
<component name="EchoComponent">
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor index 60c504b4be..17a340c06c 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor @@ -16,5 +16,5 @@ # under the License. # Implementation class for the artifact processor extension -org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#wireFormat.jsonrpc,model=org.apache.tuscany.sca.binding.http.wireformat.jsonrpc.JSONRPCWireFormat,factory=org.apache.tuscany.sca.binding.http.wireformat.jsonrpc.JSONRPCWireFormatFactory -org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#operationSelector.jsonrpc,model=org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelector,factory=org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelectorFactory
\ No newline at end of file +org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#wireFormat.jsonrpc,model=org.apache.tuscany.sca.binding.http.wireformat.jsonrpc.JSONRPCWireFormat,factory=org.apache.tuscany.sca.binding.http.wireformat.jsonrpc.JSONRPCWireFormatFactory +org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#operationSelector.jsonrpc,model=org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelector,factory=org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelectorFactory
\ No newline at end of file diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorProcessorTestCase.java b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorProcessorTestCase.java index 14ea721546..f86f580cf6 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorProcessorTestCase.java +++ b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/impl/JSONRPCOperationSelectorProcessorTestCase.java @@ -51,15 +51,15 @@ import org.junit.Test; */ public class JSONRPCOperationSelectorProcessorTestCase { - public static final String WIRE_FORMAT = + public static final String COMPOSITE_WITH_OPERATION_SELECTOR = "<?xml version=\"1.0\" encoding=\"ASCII\"?>" + "<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" targetNamespace=\"http://binding-http\" xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.0\" name=\"binding-http\">" + " <component name=\"HelloWorldComponent\">" + " <implementation.java class=\"services.HelloWorld\"/>" + " <service name=\"HelloWorldService\">" - + " <binding.http uri=\"http://localhost:8080/uri\" >" - + " <operationSelector.jsonrpc/>" - + " </binding.http>" + + " <tuscany:binding.http uri=\"http://localhost:8080/uri\" >" + + " <tuscany:operationSelector.jsonrpc/>" + + " </tuscany:binding.http>" + " </service>" + " </component>" + "</composite>"; @@ -92,7 +92,7 @@ public class JSONRPCOperationSelectorProcessorTestCase { */ @Test public void testWireFormat() throws Exception { - XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(WIRE_FORMAT)); + XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(COMPOSITE_WITH_OPERATION_SELECTOR)); Composite composite = (Composite)staxProcessor.read(reader); HTTPBinding binding = (HTTPBinding) composite.getComponents().get(0).getServices().get(0).getBindings().get(0); diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatProcessorTestCase.java b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatProcessorTestCase.java index 04719bf7b0..8d08f2a450 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatProcessorTestCase.java +++ b/branches/sca-java-1.x/modules/binding-http-oasis-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/http/wireformat/jsonrpc/impl/JSONRPCWireFormatProcessorTestCase.java @@ -51,15 +51,15 @@ import org.junit.Test; */ public class JSONRPCWireFormatProcessorTestCase { - public static final String WIRE_FORMAT = + public static final String COMPOSITE_WITH_WIRE_FORMAT = "<?xml version=\"1.0\" encoding=\"ASCII\"?>" + "<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" targetNamespace=\"http://binding-http\" xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.0\" name=\"binding-http\">" + " <component name=\"HelloWorldComponent\">" + " <implementation.java class=\"services.HelloWorld\"/>" + " <service name=\"HelloWorldService\">" - + " <binding.http uri=\"http://localhost:8080/uri\" >" - + " <wireFormat.jsonrpc/>" - + " </binding.http>" + + " <tuscany:binding.http uri=\"http://localhost:8080/uri\" >" + + " <tuscany:wireFormat.jsonrpc/>" + + " </tuscany:binding.http>" + " </service>" + " </component>" + "</composite>"; @@ -93,7 +93,7 @@ public class JSONRPCWireFormatProcessorTestCase { */ @Test public void testWireFormat() throws Exception { - XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(WIRE_FORMAT)); + XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(COMPOSITE_WITH_WIRE_FORMAT)); Composite composite = (Composite)staxProcessor.read(reader); HTTPBinding binding = (HTTPBinding) composite.getComponents().get(0).getServices().get(0).getBindings().get(0); diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/test.composite b/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/test.composite index 704ff54b6e..62c4af4e22 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/test.composite +++ b/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/test.composite @@ -26,21 +26,21 @@ <component name="ResourceServiceComponent"> <tuscany:implementation.resource location="content"/> <service name="Resource"> - <binding.http uri="http://localhost:8085/webcontent"/> + <tuscany:binding.http uri="http://localhost:8085/webcontent"/> </service> </component> <component name="HTTPServiceComponent"> <implementation.java class="org.apache.tuscany.sca.binding.http.TestServiceImpl"/> <service name="Servlet"> - <binding.http uri="http://localhost:8085/httpservice"/> + <tuscany:binding.http uri="http://localhost:8085/httpservice"/> </service> </component> <component name="HTTPGetComponent"> <implementation.java class="org.apache.tuscany.sca.binding.http.TestGetImpl"/> <service name="TestGetImpl"> - <binding.http uri="http://localhost:8085/httpget"/> + <tuscany:binding.http uri="http://localhost:8085/httpget"/> </service> </component> diff --git a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/testCache.composite b/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/testCache.composite index d039a6493c..d805402c4f 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/testCache.composite +++ b/branches/sca-java-1.x/modules/binding-http-oasis-runtime/src/test/resources/testCache.composite @@ -26,7 +26,7 @@ <component name="HTTPBindingComponent">
<implementation.java class="org.apache.tuscany.sca.binding.http.TestBindingCacheImpl"/>
<service name="TestBindingCacheImpl">
- <binding.http uri="http://localhost:8085/httpbinding"/>
+ <tuscany:binding.http uri="http://localhost:8085/httpbinding"/>
</service>
</component>
diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java b/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java index b7b0df38db..874c23c7e0 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java +++ b/branches/sca-java-1.x/modules/binding-http-oasis/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java @@ -48,7 +48,7 @@ import org.apache.tuscany.sca.monitor.Problem.Severity; public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<HTTPBinding> { private static final String BINDING_HTTP = "binding.http"; - private static final QName BINDING_HTTP_QNAME = new QName(Constants.SCA10_NS, BINDING_HTTP); + private static final QName BINDING_HTTP_QNAME = new QName(Constants.SCA10_TUSCANY_NS, BINDING_HTTP); private static final String NAME = "name"; private static final String URI = "uri"; @@ -158,7 +158,7 @@ public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements S */ private void error(String message, Object model, Object... messageParameters) { if (monitor != null) { - Problem problem = new ProblemImpl(this.getClass().getName(), "impl-bpel-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters); + Problem problem = new ProblemImpl(this.getClass().getName(), "binding-http-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters); monitor.problem(problem); } } diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-java-1.x/modules/binding-http-oasis/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor index bbdf9414c8..ac004e826a 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ b/branches/sca-java-1.x/modules/binding-http-oasis/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor @@ -16,4 +16,4 @@ # under the License. # Implementation class for the artifact processor extension -org.apache.tuscany.sca.binding.http.xml.HTTPBindingProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#binding.http,model=org.apache.tuscany.sca.binding.http.HTTPBinding,factory=org.apache.tuscany.sca.binding.http.HTTPBindingFactory +org.apache.tuscany.sca.binding.http.xml.HTTPBindingProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#binding.http,model=org.apache.tuscany.sca.binding.http.HTTPBinding,factory=org.apache.tuscany.sca.binding.http.HTTPBindingFactory diff --git a/branches/sca-java-1.x/modules/binding-http-oasis/src/test/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessorTestCase.java b/branches/sca-java-1.x/modules/binding-http-oasis/src/test/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessorTestCase.java index 32eb19f6f0..b19935c1e0 100644 --- a/branches/sca-java-1.x/modules/binding-http-oasis/src/test/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessorTestCase.java +++ b/branches/sca-java-1.x/modules/binding-http-oasis/src/test/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessorTestCase.java @@ -46,7 +46,7 @@ import org.junit.Test; * @version $Rev$ $Date$ */ public class HTTPBindingProcessorTestCase { - private static final String XML = "<binding.http xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" xmlns:ns1=\"http://www.osoa.org/xmlns/sca/1.0\" name=\"name\" uri=\"uri\" />"; + private static final String XML = "<ns1:binding.http xmlns:ns1=\"http://tuscany.apache.org/xmlns/sca/1.0\" name=\"name\" uri=\"uri\" />"; private static XMLInputFactory inputFactory; private static XMLOutputFactory outputFactory; |