Hi,
I would like to initialize a web service by using the JAX-WS frontend.
I am using the CXF (single bundle distribution) Version 1.3 (it worths to
mention that I had never successfully managed to make the multi bundle
distribution to work) with Apache Felix.
"javax.jws.*" and "javax.xml.bind.annotation.*" has been imported into the
interface (ALEServicePortType) which has been generated from a WSDL by using
CXF 2.2.9 (wsdl2java).
I am using the following code at the Activator:
public void start(BundleContext bundleContext) throws Exception {
// ===================Initialize Service using CXF JAX-WS
frontend ===========
Dictionary<String, String> dictionaryProps = new
Hashtable<String, String>();
dictionaryProps.put("service.exported.interfaces", "*");
dictionaryProps.put("service.exported.configs",
"org.apache.cxf.ws");
dictionaryProps.put("org.apache.cxf.ws.address ",
"http://localhost:9090/ALEService" );
dictionaryProps.put("org.apache.cxf.ws.frontend","jaxws");
dictionaryProps.put("org.apache.cxf.ws.databinding","jaxb");
ServiceRegistration =
bundleContext.registerService(ALEServicePortType.class.getName(),
new ALEServicePortTypeImpl(), dictionaryProps);
}
Although I have successfully managed to make the service run by using the
CXF 'simple' frontend by only using :
dictionaryProps.put("service.exported.interfaces", "*");
dictionaryProps.put("service.exported.configs",
"org.apache.cxf.ws");
dictionaryProps.put("org.apache.cxf.ws.address",
aleLrServiceURL);
ServiceRegistration =
bundleContext.registerService(ALEServicePortType.class.getName(),
new ALEServicePortTypeImpl(), dictionaryProps);
Where I get the complete WSDL by using the
"http://localhost:9090/ALEService?wsdl" in a browser I am not able to make
it work by using the jaxws frontend where I get the following:
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions name="ALEServicePortTypeService"
targetNamespace="http://ale.wsdl.ale.commons.aspirerfid.ow2.org/"
xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://ale.wsdl.ale.commons.aspirerfid.ow2.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:portType name="ALEServicePortType" />
- <wsdl:binding name="ALEServicePortTypeServiceSoapBinding"
type="tns:ALEServicePortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
- <wsdl:service name="ALEServicePortTypeService">
- <wsdl:port binding="tns:ALEServicePortTypeServiceSoapBinding"
name="ALEServicePortTypePort">
<soap:address location="http://localhost:9090/ALEService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Where the service name is "ALEServicePortTypeService" instead of
"ALEServicePortType"
Could anyone help me with this?
Thank you in advance!
Best Regards,
Nikos Kefalakis.