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
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com