On Tue February 24 2009 3:30:58 am Christopher Cheng wrote:
> After migration from Axis 1.2 to CXF 2.1, I found that CXF has an overhead
> of loading wsdl definition during Runtime.
> That means it will take much longer for the first call of every web
> service. For a big wsdl, it may take more than 250 secs.

Jeesh...   that's got to be a HUGE wsdl.   Wow....

> It has not been the case for Axis, because the definiton seems to be
> generated in the stub with wsdl2java.
> Is it possible for CXF to have the wsdl definition to generated into the
> stub?

Well, not really.   However, CXF doesn't HAVE to use the wsdl in many cases.   
You can get it to work by not specifying a wsdl.   However, you will need to 
provide the URL of the service at runtime.   That's the main thing that isn't 
burned into the code anywhere.  

        QName portName = new QName(....);
        Service service = Service.create(new QName(.....));
        service.addPort(portName, 
                         SOAPBinding.SOAP11HTTP_BINDING, 
                        "http://localhost/blah/blah/blah";);
        MySoapService port = service.getPort(portName,
                                  MySoapService.class);



-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to