Hi all

I want to build a service for deployment using the wsdl and services.xml so
I can deploy it "locally", as not in a container, using the SimpleHTTPServer
class. But I'm facing some problems using the services.xml, the
ServiceBuilder don't seem to use it very much here is how I create my
service

Making first the service based on the wsdl

InputStream wsdlStream = new FileInputStream(
                        "wsdl/ProjectMgntService.wsdl");

                AxisService wsdlService = null;
                if (wsdlStream != null) {
                    WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new
WSDL11ToAxisServiceBuilder(
                            wsdlStream, null, null);

                    wsdlService = wsdl2AxisServiceBuilder.populateService();
                    wsdlService.setWsdlFound(true);
                    wsdlService.setCustomWsdl(true);
                    wsdlService.setClassLoader(BaseWSTestCase.class
                            .getClassLoader());

                }


ConfigurationContext configContext = ConfigurationContextFactory
                        .createDefaultConfigurationContext();

                InputStream servicexmlStream = new FileInputStream(
                        "src/test/resources/services.xml");
                DescriptionBuilder builder = new DescriptionBuilder(
                        servicexmlStream, configContext);
                OMElement rootElement = builder.buildOM();

                ServiceBuilder serviceBuilder = new ServiceBuilder(
                        configContext, wsdlService);

                AxisService projectMgntService = serviceBuilder
                        .populateService(rootElement);


When I deploy this I get an error saying the no message receiver is
configured for the operation, so I have to add these to my code, specifying
the class implementing the service and message receiver

   wsdlService
                            .addParameter("ServiceClass",
                                    "ProjectMgntServiceImpl");
                    wsdlService.addMessageReceiver(
                            "http://www.w3.org/ns/wsdl/in-out";,
                            new ProjectMgntServiceMessageReceiverInOut());

But these parameters is in the services.xml so my question is, how can I
build a and deploy the service using ServiceBuilder where it uses the
services.xml file.

cheers, Håkon

-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)

Reply via email to