On Jul 15, 2008, at 4:13 AM, jotr wrote:
Hi Dan,
My initial problem was that instantiating the port object takes too
long and
I assumed that this is because it needs to parse the wsdl and create
objects
dynamically based on the contents. Unfortunately with your code it
takes
longer.
What is the fastest way using CXF to instantiate a port object?
It really depends.
First, do a BusFactory.getDefaultBus() or similar first (early in your
app like at startup or so) to get that out of the way. (or
preferrably use a spring context and just include the minimum stuff
you need)
In a wsdl first scenario, we need to parse the wsdl and wire it to the
sei interface. Thus, for very large complex schemas and such, that
can be expensive.
However, in java first, we have to ask jaxb to generate the schemas
which is also not "quick".
In both of those cases, we have to pass the schemas into XmlSchema to
create the object model. Unfortunately, that process in XmlSchema is
very slow to some very bizarre DOM namespace map handling/creation.
I wish I had the time to submit a patch to fix it.
Basically, about 75% of the time is due to creating the JAXBContext
(which is then cached for future port creations) and dealing with
XmlSchema.
Dan
John
dkulp wrote:
I need to add this to the FAQ....
With JAX-WS, you don't need the wsdl. Here is a snippet from one
of
our tests:
QName portName = new
QName("http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService
",
"DocLitWrappedCodeFirstServicePort");
QName servName = new
QName("http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService
",
"DocLitWrappedCodeFirstService");
Service service = Service.create(servName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING,
serviceURL);
DocLitWrappedCodeFirstService port = service.getPort(portName,
DocLitWrappedCodeFirstService.class);
As Glen said, going forward, as more policies are added into wsdl,
that could pose an issue. However, we should allow some of those
policies to be set via spring config as well and also via API's.
Dan
On Jul 14, 2008, at 4:53 AM, jotr wrote:
Hi!
I create my web service client with CXF's wsdl2java tool, but when I
am
using the created classes I still get the message:
"org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL", and the service is created using the WSDL
file.
Is it possible to generate client code which does not parse through
the wsdl
file every time i start my program (and create the service class)?
The wsdl
won't change and I cannot see a point why it should read and process
that
file each time.
--
View this message in context:
http://www.nabble.com/CXF-client-without-building-from-wsdl-tp18439827p18439827.html
Sent from the cxf-user mailing list archive at Nabble.com.
---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog
--
View this message in context:
http://www.nabble.com/CXF-client-without-building-from-wsdl-tp18439827p18460135.html
Sent from the cxf-user mailing list archive at Nabble.com.
---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog