Endpoint.publish and programmatically deploy web service
pkorros Jun 1, 2010 5:31 AMI am trying to dynamically (programmatically) create and deploy a new Web Service on JBoss 4.2.3. In order to do that I am using the following code:
Web service implementation:
@WebServiceProvider
@ServiceMode(Mode.MESSAGE)
public class ScoringDynamicWebService implements Provider<SOAPMessage> {
Source source = new StreamSource(new StringReader(wsdl));
source.setSystemId(url+"?wsdl");
metadata.add(source);
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(Endpoint.WSDL_PORT, new QName(
"http://scoring.exodussa.com/ws", webServiceName+"Port"));
properties.put(Endpoint.WSDL_SERVICE, new QName(
"http://scoring.exodussa.com/ws", webServiceName+"Service"));
properties.put("CUSTOM_URL", url);
Endpoint endpoint = Endpoint.create(SOAPBinding.SOAP12HTTP_BINDING, webService);
endpoint.setMetadata(metadata);
endpoint.setProperties(properties);
endpoint.publish(url);
This code works correctly when I am running it on a console application (using jdk 1.6) and I am able to invoke it using a web service client.
When I am trying the same code under JBoss 4.2.3 I get the following exception:
Can anyone point me to what I should do to in order to fix this?
Regards,
Panagiotis