Home > Apache Tuscany Docs 2.x > Index > SCA Java Extensions Guide > SCA Java binding.ws |
Apache Tuscany Docs 2.x > Index > SCA Java Extensions Guide > SCA Java binding.ws | Tuscany Home | User List | Dev List | Issue Tracker |
Apache Tuscany Docs 2.x
SCA Java binding.ws
<binding.ws>The Tuscany Java SCA runtime supports Web services by using the <binding.ws> SCDL extension. New Web service endpoints can be provided by using <binding.ws> within a SCA <service>, existing Web services can be invoked by using <binding.ws> within a SCA <reference>. The Web service binding is one of the SCA extensions which is being formalized in the OASIS Open Composite Services Architecture with a published specifications document. The Web service binding SCDL has the following format: <binding.ws name="NCName"? uri="xs:anyURI"? wsdlElement="xs:anyURI"? wsdli:wsdlLocation="list of xs:anyURI"? > <wsa:EndpointReference>...</wsa:EndpointReference>* </binding.ws> simple useAll the attributes and elements of the Web service binding are optional, so the simplest way to use it is to use all the defaults: <binding.ws/> With that simplest form the endpoint which will be used is derived from the names of the component and binding. This works well for services but for references its likely not what you want, so with references the following is a more useful simplest form: <binding.ws uri="http://someHost/someService"/>
wsdlElementThe wsdlElement attribute indicates that a WSDL document exists which should be used and it points to the element within that WSDL to use. The value of the wsdlElement attribute can have one of the following four forms:
wsdlLocationThe wsdlLocation attribute enables defining the location of the WSDL document to be used. Using wsdlLocation is not normally necessary as the Tuscany contrabution service will have discovered all the WSDL documents within a deployed SCA contrabution. wsa:EndpointReferenceThis attribute enables using a WS-Addressing EndpointReference that specifies the endpoint for the service or reference, or any WSA reference parameters, metadata and other EPR contents to be used. Some examples:This example shows making a HelloWorld component available as a Web service endpoint. All the Web service binding defaults are used so the endpoint of the Web service will be http://localhost:8080/HelloWorldComponent. <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://helloworld" xmlns:hw="http://helloworld" name="helloworldws"> <service name="HelloWorldService" promote="HelloWorldComponent"> <interface.java interface="helloworld.HelloWorldService" /> <binding.ws /> </service> <component name="HelloWorldComponent"> <implementation.java class="helloworld.HelloWorldImpl" /> </component> </composite> |
Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2010, The Apache Software Foundation, Licensed under ASL 2.0. |