You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Andrew <su...@gmail.com> on 2011/11/15 20:58:36 UTC
Slow WSDL Initialization
It's taking around 15 seconds to initialize a client to a third party web
service. I generated the soap classes with the wsdl2java converter, with
cxf 2.2.1. Here's the code:
URL url = new URL("file:/WSDL_v2011_1_0/netsuite.wsdl");
NetSuiteService ss = new NetSuiteService(url);
NetSuitePortType port = ss.getNetSuitePort();
I've tried different versions of CXF but I get the same performance.
Here's the log output. There are around 1000 classes generated.. I removed
all but a few for readability.
2226 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - creating port for
portName
2227 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - endpoint reference:
2227 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - endpoint interface:
2535 [main] INFO
org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
Service {urn:platform_2011_1.webservices.netsuite.com}NetSuiteService from
WSDL: file:/netsuite/WSDL_v2011_1_0/netsuite.wsdl
14002 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created
JAXBContext
"jar:file:/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.13/jaxb-impl-2.1.13.jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class
Build-Id: 2.1.13
Classes known to this context:
[B
boolean
byte
char
com.netsuite.webservices.activities.scheduling_2011_1.CalendarEvent
... 1000 more classes
com.netsuite.webservices.transactions.sales_2011_1.types.TransactionPaymentEventType
com.sun.xml.bind.api.CompositeStructure
double
float
int
java.awt.Image
java.io.File
java.lang.Boolean
java.lang.Byte
java.lang.Character
java.lang.Class
java.lang.Double
java.lang.Float
java.lang.Integer
java.lang.Long
java.lang.Object
java.lang.Short
java.lang.String
java.lang.Void
java.math.BigDecimal
java.math.BigInteger
java.net.URI
java.net.URL
java.util.Calendar
java.util.Date
java.util.GregorianCalendar
java.util.UUID
javax.activation.DataHandler
javax.xml.bind.JAXBElement
javax.xml.datatype.Duration
javax.xml.datatype.XMLGregorianCalendar
javax.xml.namespace.QName
javax.xml.transform.Source
long
short
void
" with classes [class
com.netsuite.webservices.platform.messages_2011_1.SsoLoginRequest, ...
class com.netsuite.webservices.lists.support_2011_1.ObjectFactory].
14203 [main] DEBUG
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - building
handler chain
14204 [main] DEBUG
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - Checking for
HandlerChain annotation on
com.netsuite.webservices.platform_2011_1.NetSuiteService
14206 [main] DEBUG
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - Checking for
HandlerChain annotation on javax.xml.ws.Service
14206 [main] DEBUG
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - Checking for
HandlerChain annotation on java.lang.Object
14206 [main] DEBUG
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - no
HandlerChain annotation on class
com.netsuite.webservices.platform_2011_1.NetSuiteService
14207 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - created proxy
Is there any way to speed this up? I only need a few of the ~1000 classes
but didn't want to modify the WSDL if possible since I don't own it.
Thanks,
Andrew
Re: Slow WSDL Initialization
Posted by Andrew <su...@gmail.com>.
It's much faster with the fastBoot property. Down to about 7 seconds now,
from 15. About 2 seconds to create the service and 5 to get the port. I
think I can live with this. Thanks
On Wed, Nov 16, 2011 at 12:54 PM, Daniel Kulp <dk...@apache.org> wrote:
>
> There is a system property:
>
> System.setProperty(JAXBContextImpl.class.getName()+".fastBoot", "true")
>
> that you can set that tells JAXB not to optimize these things. Runtime
> performance would be a little bit worse though.
>
> Other than that, I'm not sure what to suggest.
>
> Dan
>
>
> On Wednesday, November 16, 2011 11:45:01 AM Andrew wrote:
> > I configured Java logging here's what I'm seeing:
> >
> > The first three seconds:
> >
> > 573 Nov 16, 2011 11:23:34 AM com.sun.xml.bind.v2.ContextFactory
> > createContext
> > 574 FINE: Property com.sun.xml.bind.XmlAccessorFactoryis not active.
> > Using JAXB's implementation
> >
> > Then, I'm seeing about 10 seconds (~37K lines) of this:
> >
> > 1166 FINE: Using optimized Accessor for protected
> > com.netsuite.webservices.platform.core_2011_1.RecordRef
> > com.netsuite.webservices.transactions.bank_2011_1.CheckItem.units
> > 1167 Nov 16, 2011 11:23:37 AM
> > com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory get
> > 1168 FINE: Using optimized Accessor for protected java.lang.String
> > com.netsuite.webservices.transactions.bank_2011_1.CheckItem.description
> >
> > and more
> >
> > 34792 FINE: Using optimized Accessor for protected java.lang.Integer
> >
> com.netsuite.webservices.platform.messages_2011_1.SearchPreferences.pageSize
> > 34793 Nov 16, 2011 11:23:45 AM
> > com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory get
> > 34794 FINE: Using optimized Accessor for protected java.lang.String
> > com.netsuite.webservices.platform.messages_2011_1.PartnerInfo.partnerId
> > 34795 Nov 16, 2011 11:23:45 AM
> > com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory get
> > 34796 FINE: Using optimized Accessor for protected java.lang.String
> > com.netsuite.webservices.platform.messages_2011_1.PartnerInfo.partnerId
> >
> > So it appears to be doing an inordinate amount of reflection. Is it
> > possible to suppress this?
> >
> > On Tue, Nov 15, 2011 at 1:46 PM, Daniel Kulp <dk...@apache.org> wrote:
> > > Well, there are a couple parts to this. There aren't timestamps
> > > between
> > > the
> > >
> > > logs:
> > > > 2535 [main] INFO
> > > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean -
> > > > Creating
> > > > Service
> > > > {urn:platform_2011_1.webservices.netsuite.com}NetSuiteService
> > >
> > > from
> > >
> > > > WSDL: file:/netsuite/WSDL_v2011_1_0/netsuite.wsdl
> > > > 14002 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created
> > > > JAXBContext
> > >
> > > to really figure out what is happening there. :-( It could be in
> the
> > > WSDL
> > > loading/processing or the JAXBContext creation or Annotation processing
> > > or, well, a bunch of things. Not really sure. If you run with a
> > > newer version
> > > of CXF, does it show anything else?
> > >
> > > Also, use plain java.util.logging and turn on FINEST level logging and
> > > see if
> > > anything else pops up. CXF and JAXB both use java.util.logging by
> > > default
> > > and it may print out extra information.
> > >
> > > Dan
> > >
> > > On Tuesday, November 15, 2011 12:58:36 PM Andrew wrote:
> > > > It's taking around 15 seconds to initialize a client to a third
> > > > party web service. I generated the soap classes with the wsdl2java
> > > > converter, with> >
> > > > cxf 2.2.1. Here's the code:
> > > > URL url = new
> > > > URL("file:/WSDL_v2011_1_0/netsuite.wsdl");
> > > > NetSuiteService ss = new NetSuiteService(url);
> > > > NetSuitePortType port = ss.getNetSuitePort();
> > > >
> > > > I've tried different versions of CXF but I get the same performance.
> > > >
> > > > Here's the log output. There are around 1000 classes generated.. I
> > >
> > > removed
> > >
> > > > all but a few for readability.
> > > >
> > > > 2226 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - creating port
> > > > for
> > > > portName
> > > > 2227 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - endpoint
> > > > reference: 2227 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl -
> > > > endpoint interface: 2535 [main] INFO
> > > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean -
> > > > Creating
> > > > Service
> > > > {urn:platform_2011_1.webservices.netsuite.com}NetSuiteService
> > >
> > > from
> > >
> > > > WSDL: file:/netsuite/WSDL_v2011_1_0/netsuite.wsdl
> > > > 14002 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created
> > > > JAXBContext
> > >
> > >
> "jar:file:/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.13/jaxb-impl-2.
> > > 1.13>
> > > > .jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class Build-Id:
> > > > 2.1.13> >
> > > > Classes known to this context:
> > > > [B
> > > > boolean
> > > > byte
> > > > char
> > > > com.netsuite.webservices.activities.scheduling_2011_1.CalendarEv
> > > > ent
> > > >
> > > > ... 1000 more classes
> > >
> > >
> com.netsuite.webservices.transactions.sales_2011_1.types.TransactionPaym
> > > entE>
> > > > ventType com.sun.xml.bind.api.CompositeStructure
> > > >
> > > > double
> > > > float
> > > > int
> > > > java.awt.Image
> > > > java.io.File
> > > > java.lang.Boolean
> > > > java.lang.Byte
> > > > java.lang.Character
> > > > java.lang.Class
> > > > java.lang.Double
> > > > java.lang.Float
> > > > java.lang.Integer
> > > > java.lang.Long
> > > > java.lang.Object
> > > > java.lang.Short
> > > > java.lang.String
> > > > java.lang.Void
> > > > java.math.BigDecimal
> > > > java.math.BigInteger
> > > > java.net.URI
> > > > java.net.URL
> > > > java.util.Calendar
> > > > java.util.Date
> > > > java.util.GregorianCalendar
> > > > java.util.UUID
> > > > javax.activation.DataHandler
> > > > javax.xml.bind.JAXBElement
> > > > javax.xml.datatype.Duration
> > > > javax.xml.datatype.XMLGregorianCalendar
> > > > javax.xml.namespace.QName
> > > > javax.xml.transform.Source
> > > > long
> > > > short
> > > > void
> > > >
> > > > " with classes [class
> > > > com.netsuite.webservices.platform.messages_2011_1.SsoLoginRequest,
> > > > ...
> > > > class com.netsuite.webservices.lists.support_2011_1.ObjectFactory].
> > > > 14203 [main] DEBUG
> > > > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder -
> > > > building
> > > > handler chain
> > > > 14204 [main] DEBUG
> > > > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder -
> > > > Checking for HandlerChain annotation on
> > > > com.netsuite.webservices.platform_2011_1.NetSuiteService
> > > > 14206 [main] DEBUG
> > > > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder -
> > > > Checking for HandlerChain annotation on javax.xml.ws.Service
> > > > 14206 [main] DEBUG
> > > > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder -
> > > > Checking for HandlerChain annotation on java.lang.Object
> > > > 14206 [main] DEBUG
> > > > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - no
> > > > HandlerChain annotation on class
> > > > com.netsuite.webservices.platform_2011_1.NetSuiteService
> > > > 14207 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - created proxy
> > > >
> > > > Is there any way to speed this up? I only need a few of the ~1000
> > >
> > > classes
> > >
> > > > but didn't want to modify the WSDL if possible since I don't own it.
> > > > Thanks,
> > > >
> > > > Andrew
> > >
> > > --
> > > Daniel Kulp
> > > dkulp@apache.org
> > > http://dankulp.com/blog
> > > Talend - http://www.talend.com
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
> Talend - http://www.talend.com
>
Re: Slow WSDL Initialization
Posted by Daniel Kulp <dk...@apache.org>.
There is a system property:
System.setProperty(JAXBContextImpl.class.getName()+".fastBoot", "true")
that you can set that tells JAXB not to optimize these things. Runtime
performance would be a little bit worse though.
Other than that, I'm not sure what to suggest.
Dan
On Wednesday, November 16, 2011 11:45:01 AM Andrew wrote:
> I configured Java logging here's what I'm seeing:
>
> The first three seconds:
>
> 573 Nov 16, 2011 11:23:34 AM com.sun.xml.bind.v2.ContextFactory
> createContext
> 574 FINE: Property com.sun.xml.bind.XmlAccessorFactoryis not active.
> Using JAXB's implementation
>
> Then, I'm seeing about 10 seconds (~37K lines) of this:
>
> 1166 FINE: Using optimized Accessor for protected
> com.netsuite.webservices.platform.core_2011_1.RecordRef
> com.netsuite.webservices.transactions.bank_2011_1.CheckItem.units
> 1167 Nov 16, 2011 11:23:37 AM
> com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory get
> 1168 FINE: Using optimized Accessor for protected java.lang.String
> com.netsuite.webservices.transactions.bank_2011_1.CheckItem.description
>
> and more
>
> 34792 FINE: Using optimized Accessor for protected java.lang.Integer
> com.netsuite.webservices.platform.messages_2011_1.SearchPreferences.pageSize
> 34793 Nov 16, 2011 11:23:45 AM
> com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory get
> 34794 FINE: Using optimized Accessor for protected java.lang.String
> com.netsuite.webservices.platform.messages_2011_1.PartnerInfo.partnerId
> 34795 Nov 16, 2011 11:23:45 AM
> com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory get
> 34796 FINE: Using optimized Accessor for protected java.lang.String
> com.netsuite.webservices.platform.messages_2011_1.PartnerInfo.partnerId
>
> So it appears to be doing an inordinate amount of reflection. Is it
> possible to suppress this?
>
> On Tue, Nov 15, 2011 at 1:46 PM, Daniel Kulp <dk...@apache.org> wrote:
> > Well, there are a couple parts to this. There aren't timestamps
> > between
> > the
> >
> > logs:
> > > 2535 [main] INFO
> > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean -
> > > Creating
> > > Service
> > > {urn:platform_2011_1.webservices.netsuite.com}NetSuiteService
> >
> > from
> >
> > > WSDL: file:/netsuite/WSDL_v2011_1_0/netsuite.wsdl
> > > 14002 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created
> > > JAXBContext
> >
> > to really figure out what is happening there. :-( It could be in the
> > WSDL
> > loading/processing or the JAXBContext creation or Annotation processing
> > or, well, a bunch of things. Not really sure. If you run with a
> > newer version
> > of CXF, does it show anything else?
> >
> > Also, use plain java.util.logging and turn on FINEST level logging and
> > see if
> > anything else pops up. CXF and JAXB both use java.util.logging by
> > default
> > and it may print out extra information.
> >
> > Dan
> >
> > On Tuesday, November 15, 2011 12:58:36 PM Andrew wrote:
> > > It's taking around 15 seconds to initialize a client to a third
> > > party web service. I generated the soap classes with the wsdl2java
> > > converter, with> >
> > > cxf 2.2.1. Here's the code:
> > > URL url = new
> > > URL("file:/WSDL_v2011_1_0/netsuite.wsdl");
> > > NetSuiteService ss = new NetSuiteService(url);
> > > NetSuitePortType port = ss.getNetSuitePort();
> > >
> > > I've tried different versions of CXF but I get the same performance.
> > >
> > > Here's the log output. There are around 1000 classes generated.. I
> >
> > removed
> >
> > > all but a few for readability.
> > >
> > > 2226 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - creating port
> > > for
> > > portName
> > > 2227 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - endpoint
> > > reference: 2227 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl -
> > > endpoint interface: 2535 [main] INFO
> > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean -
> > > Creating
> > > Service
> > > {urn:platform_2011_1.webservices.netsuite.com}NetSuiteService
> >
> > from
> >
> > > WSDL: file:/netsuite/WSDL_v2011_1_0/netsuite.wsdl
> > > 14002 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created
> > > JAXBContext
> >
> > "jar:file:/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.13/jaxb-impl-2.
> > 1.13>
> > > .jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class Build-Id:
> > > 2.1.13> >
> > > Classes known to this context:
> > > [B
> > > boolean
> > > byte
> > > char
> > > com.netsuite.webservices.activities.scheduling_2011_1.CalendarEv
> > > ent
> > >
> > > ... 1000 more classes
> >
> > com.netsuite.webservices.transactions.sales_2011_1.types.TransactionPaym
> > entE>
> > > ventType com.sun.xml.bind.api.CompositeStructure
> > >
> > > double
> > > float
> > > int
> > > java.awt.Image
> > > java.io.File
> > > java.lang.Boolean
> > > java.lang.Byte
> > > java.lang.Character
> > > java.lang.Class
> > > java.lang.Double
> > > java.lang.Float
> > > java.lang.Integer
> > > java.lang.Long
> > > java.lang.Object
> > > java.lang.Short
> > > java.lang.String
> > > java.lang.Void
> > > java.math.BigDecimal
> > > java.math.BigInteger
> > > java.net.URI
> > > java.net.URL
> > > java.util.Calendar
> > > java.util.Date
> > > java.util.GregorianCalendar
> > > java.util.UUID
> > > javax.activation.DataHandler
> > > javax.xml.bind.JAXBElement
> > > javax.xml.datatype.Duration
> > > javax.xml.datatype.XMLGregorianCalendar
> > > javax.xml.namespace.QName
> > > javax.xml.transform.Source
> > > long
> > > short
> > > void
> > >
> > > " with classes [class
> > > com.netsuite.webservices.platform.messages_2011_1.SsoLoginRequest,
> > > ...
> > > class com.netsuite.webservices.lists.support_2011_1.ObjectFactory].
> > > 14203 [main] DEBUG
> > > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder -
> > > building
> > > handler chain
> > > 14204 [main] DEBUG
> > > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder -
> > > Checking for HandlerChain annotation on
> > > com.netsuite.webservices.platform_2011_1.NetSuiteService
> > > 14206 [main] DEBUG
> > > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder -
> > > Checking for HandlerChain annotation on javax.xml.ws.Service
> > > 14206 [main] DEBUG
> > > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder -
> > > Checking for HandlerChain annotation on java.lang.Object
> > > 14206 [main] DEBUG
> > > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - no
> > > HandlerChain annotation on class
> > > com.netsuite.webservices.platform_2011_1.NetSuiteService
> > > 14207 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - created proxy
> > >
> > > Is there any way to speed this up? I only need a few of the ~1000
> >
> > classes
> >
> > > but didn't want to modify the WSDL if possible since I don't own it.
> > > Thanks,
> > >
> > > Andrew
> >
> > --
> > Daniel Kulp
> > dkulp@apache.org
> > http://dankulp.com/blog
> > Talend - http://www.talend.com
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com
Re: Slow WSDL Initialization
Posted by Andrew <su...@gmail.com>.
I configured Java logging here's what I'm seeing:
The first three seconds:
573 Nov 16, 2011 11:23:34 AM com.sun.xml.bind.v2.ContextFactory
createContext
574 FINE: Property com.sun.xml.bind.XmlAccessorFactoryis not active.
Using JAXB's implementation
Then, I'm seeing about 10 seconds (~37K lines) of this:
1166 FINE: Using optimized Accessor for protected
com.netsuite.webservices.platform.core_2011_1.RecordRef
com.netsuite.webservices.transactions.bank_2011_1.CheckItem.units
1167 Nov 16, 2011 11:23:37 AM
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory get
1168 FINE: Using optimized Accessor for protected java.lang.String
com.netsuite.webservices.transactions.bank_2011_1.CheckItem.description
and more
34792 FINE: Using optimized Accessor for protected java.lang.Integer
com.netsuite.webservices.platform.messages_2011_1.SearchPreferences.pageSize
34793 Nov 16, 2011 11:23:45 AM
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory get
34794 FINE: Using optimized Accessor for protected java.lang.String
com.netsuite.webservices.platform.messages_2011_1.PartnerInfo.partnerId
34795 Nov 16, 2011 11:23:45 AM
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory get
34796 FINE: Using optimized Accessor for protected java.lang.String
com.netsuite.webservices.platform.messages_2011_1.PartnerInfo.partnerId
So it appears to be doing an inordinate amount of reflection. Is it
possible to suppress this?
On Tue, Nov 15, 2011 at 1:46 PM, Daniel Kulp <dk...@apache.org> wrote:
>
> Well, there are a couple parts to this. There aren't timestamps between
> the
> logs:
>
> > 2535 [main] INFO
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
> > Service {urn:platform_2011_1.webservices.netsuite.com}NetSuiteService
> from
> > WSDL: file:/netsuite/WSDL_v2011_1_0/netsuite.wsdl
> > 14002 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created
> > JAXBContext
>
> to really figure out what is happening there. :-( It could be in the
> WSDL
> loading/processing or the JAXBContext creation or Annotation processing or,
> well, a bunch of things. Not really sure. If you run with a newer
> version
> of CXF, does it show anything else?
>
> Also, use plain java.util.logging and turn on FINEST level logging and see
> if
> anything else pops up. CXF and JAXB both use java.util.logging by
> default
> and it may print out extra information.
>
> Dan
>
>
>
>
>
> On Tuesday, November 15, 2011 12:58:36 PM Andrew wrote:
> > It's taking around 15 seconds to initialize a client to a third party web
> > service. I generated the soap classes with the wsdl2java converter, with
> > cxf 2.2.1. Here's the code:
> >
> > URL url = new URL("file:/WSDL_v2011_1_0/netsuite.wsdl");
> > NetSuiteService ss = new NetSuiteService(url);
> > NetSuitePortType port = ss.getNetSuitePort();
> >
> > I've tried different versions of CXF but I get the same performance.
> >
> > Here's the log output. There are around 1000 classes generated.. I
> removed
> > all but a few for readability.
> >
> > 2226 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - creating port for
> > portName
> > 2227 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - endpoint reference:
> > 2227 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - endpoint interface:
> > 2535 [main] INFO
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
> > Service {urn:platform_2011_1.webservices.netsuite.com}NetSuiteService
> from
> > WSDL: file:/netsuite/WSDL_v2011_1_0/netsuite.wsdl
> > 14002 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created
> > JAXBContext
> >
> "jar:file:/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.13/jaxb-impl-2.1.13
> > .jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class Build-Id: 2.1.13
> > Classes known to this context:
> > [B
> > boolean
> > byte
> > char
> > com.netsuite.webservices.activities.scheduling_2011_1.CalendarEvent
> > ... 1000 more classes
> >
> >
> com.netsuite.webservices.transactions.sales_2011_1.types.TransactionPaymentE
> > ventType com.sun.xml.bind.api.CompositeStructure
> > double
> > float
> > int
> > java.awt.Image
> > java.io.File
> > java.lang.Boolean
> > java.lang.Byte
> > java.lang.Character
> > java.lang.Class
> > java.lang.Double
> > java.lang.Float
> > java.lang.Integer
> > java.lang.Long
> > java.lang.Object
> > java.lang.Short
> > java.lang.String
> > java.lang.Void
> > java.math.BigDecimal
> > java.math.BigInteger
> > java.net.URI
> > java.net.URL
> > java.util.Calendar
> > java.util.Date
> > java.util.GregorianCalendar
> > java.util.UUID
> > javax.activation.DataHandler
> > javax.xml.bind.JAXBElement
> > javax.xml.datatype.Duration
> > javax.xml.datatype.XMLGregorianCalendar
> > javax.xml.namespace.QName
> > javax.xml.transform.Source
> > long
> > short
> > void
> > " with classes [class
> > com.netsuite.webservices.platform.messages_2011_1.SsoLoginRequest, ...
> > class com.netsuite.webservices.lists.support_2011_1.ObjectFactory].
> > 14203 [main] DEBUG
> > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - building
> > handler chain
> > 14204 [main] DEBUG
> > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - Checking for
> > HandlerChain annotation on
> > com.netsuite.webservices.platform_2011_1.NetSuiteService
> > 14206 [main] DEBUG
> > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - Checking for
> > HandlerChain annotation on javax.xml.ws.Service
> > 14206 [main] DEBUG
> > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - Checking for
> > HandlerChain annotation on java.lang.Object
> > 14206 [main] DEBUG
> > org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - no
> > HandlerChain annotation on class
> > com.netsuite.webservices.platform_2011_1.NetSuiteService
> > 14207 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - created proxy
> >
> > Is there any way to speed this up? I only need a few of the ~1000
> classes
> > but didn't want to modify the WSDL if possible since I don't own it.
> > Thanks,
> >
> > Andrew
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
> Talend - http://www.talend.com
>
Re: Slow WSDL Initialization
Posted by Daniel Kulp <dk...@apache.org>.
Well, there are a couple parts to this. There aren't timestamps between the
logs:
> 2535 [main] INFO
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
> Service {urn:platform_2011_1.webservices.netsuite.com}NetSuiteService from
> WSDL: file:/netsuite/WSDL_v2011_1_0/netsuite.wsdl
> 14002 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created
> JAXBContext
to really figure out what is happening there. :-( It could be in the WSDL
loading/processing or the JAXBContext creation or Annotation processing or,
well, a bunch of things. Not really sure. If you run with a newer version
of CXF, does it show anything else?
Also, use plain java.util.logging and turn on FINEST level logging and see if
anything else pops up. CXF and JAXB both use java.util.logging by default
and it may print out extra information.
Dan
On Tuesday, November 15, 2011 12:58:36 PM Andrew wrote:
> It's taking around 15 seconds to initialize a client to a third party web
> service. I generated the soap classes with the wsdl2java converter, with
> cxf 2.2.1. Here's the code:
>
> URL url = new URL("file:/WSDL_v2011_1_0/netsuite.wsdl");
> NetSuiteService ss = new NetSuiteService(url);
> NetSuitePortType port = ss.getNetSuitePort();
>
> I've tried different versions of CXF but I get the same performance.
>
> Here's the log output. There are around 1000 classes generated.. I removed
> all but a few for readability.
>
> 2226 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - creating port for
> portName
> 2227 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - endpoint reference:
> 2227 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - endpoint interface:
> 2535 [main] INFO
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating
> Service {urn:platform_2011_1.webservices.netsuite.com}NetSuiteService from
> WSDL: file:/netsuite/WSDL_v2011_1_0/netsuite.wsdl
> 14002 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created
> JAXBContext
> "jar:file:/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.13/jaxb-impl-2.1.13
> .jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class Build-Id: 2.1.13
> Classes known to this context:
> [B
> boolean
> byte
> char
> com.netsuite.webservices.activities.scheduling_2011_1.CalendarEvent
> ... 1000 more classes
>
> com.netsuite.webservices.transactions.sales_2011_1.types.TransactionPaymentE
> ventType com.sun.xml.bind.api.CompositeStructure
> double
> float
> int
> java.awt.Image
> java.io.File
> java.lang.Boolean
> java.lang.Byte
> java.lang.Character
> java.lang.Class
> java.lang.Double
> java.lang.Float
> java.lang.Integer
> java.lang.Long
> java.lang.Object
> java.lang.Short
> java.lang.String
> java.lang.Void
> java.math.BigDecimal
> java.math.BigInteger
> java.net.URI
> java.net.URL
> java.util.Calendar
> java.util.Date
> java.util.GregorianCalendar
> java.util.UUID
> javax.activation.DataHandler
> javax.xml.bind.JAXBElement
> javax.xml.datatype.Duration
> javax.xml.datatype.XMLGregorianCalendar
> javax.xml.namespace.QName
> javax.xml.transform.Source
> long
> short
> void
> " with classes [class
> com.netsuite.webservices.platform.messages_2011_1.SsoLoginRequest, ...
> class com.netsuite.webservices.lists.support_2011_1.ObjectFactory].
> 14203 [main] DEBUG
> org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - building
> handler chain
> 14204 [main] DEBUG
> org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - Checking for
> HandlerChain annotation on
> com.netsuite.webservices.platform_2011_1.NetSuiteService
> 14206 [main] DEBUG
> org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - Checking for
> HandlerChain annotation on javax.xml.ws.Service
> 14206 [main] DEBUG
> org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - Checking for
> HandlerChain annotation on java.lang.Object
> 14206 [main] DEBUG
> org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder - no
> HandlerChain annotation on class
> com.netsuite.webservices.platform_2011_1.NetSuiteService
> 14207 [main] DEBUG org.apache.cxf.jaxws.ServiceImpl - created proxy
>
> Is there any way to speed this up? I only need a few of the ~1000 classes
> but didn't want to modify the WSDL if possible since I don't own it.
> Thanks,
>
> Andrew
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com