cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Mao <james....@iona.com>
Subject Re: help in setting JaxWsProxyFactoryBean endpoint/url in CXF 2.0.2
Date Wed, 10 Oct 2007 02:15:30 GMT
Jarada, Hussam wrote:
> Per finding info on setting client url from 
> http://www.nabble.com/Client-question-tf4357978.html#a12419843
>
> I changed my code as follows
> At which getServiceURL() return "http://todev-mda09.tops.aol.com:8080/"
>
> MadcapService ss = new MadcapService();
>             MadcapPort port = ss.getMadcap();
>             BindingProvider provider = (BindingProvider)port;
>   


In this case, Client trying to get the wsdl from the MadcapService, make 
sure the wsdl is accessible

James

>  
> provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPER
> TY, getServiceURL());
>             this.servicePort = port;
>
> The problem now MadcapService ss = new MadcapService(); throws this
> exception.
>
> Any help in resolving this cause I am almost running out of solutions
> for integrating third party web service into my application using CXF
> 2.0.2 and wsdl2java in Windows XP running on Tomcat.
>
> java.lang.IncompatibleClassChangeError
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.copyExtensionAttributes(WSDLSer
> viceBuilder.java:125)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
> r.java:229)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
> r.java:158)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
> 117)
> 	at
> org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:110)
> 	at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:101)
> 	at
> org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl
> .java:55)
> 	at javax.xml.ws.Service.<init>(Service.java:57)
> 	at
> com.aol.madcap._2007._06.MadcapService.<init>(MadcapService.java:41)
> 	at
> com.aol.reg.rsp.adapter.madcap.MADCAPAdapter.getService(MADCAPAdapter.ja
> va:74)
> 	at
> com.aol.reg.rsp.adapter.madcap.ExtServiceMADCAPImpl.nameSuggestionMADCAP
> (ExtServiceMADCAPImpl.java:86)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> com.aol.reg.rsp.engine.ProxyImplementor.methodInvoke(ProxyImplementor.ja
> va:132)
> 	at
> com.aol.reg.rsp.engine.ProxyImplementor.methodInvoke(ProxyImplementor.ja
> va:79)
> 	at
> com.aol.reg.rsp.engine.ServiceManagerProxy.methodInvoke(ServiceManagerPr
> oxy.java:349)
> 	at
> com.aol.reg.rsp.engine.ServiceManagerProxy.invoke(ServiceManagerProxy.ja
> va:258)
> 	at $Proxy15.nameSuggestionMADCAP(Unknown Source)
> 	at com.aol.reg.rsp.web.SnsReg.doGet(SnsReg.java:207)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:269)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:188)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:210)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:174)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :127)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :117)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:108)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
> 51)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
> 0)
> 	at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
> essConnection(Http11BaseProtocol.java:665)
> 	at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
> .java:528)
> 	at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
> erWorkerThread.java:81)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:685)
> 	at java.lang.Thread.run(Thread.java:595) 
>
> -----Original Message-----
> From: Jarada, Hussam [mailto:Hussam.Jarada@corp.aol.com] 
> Sent: Tuesday, October 09, 2007 11:49 AM
> To: cxf-user@incubator.apache.org
> Subject: help in setting JaxWsProxyFactoryBean endpoint/url in CXF 2.0.2
>
> Hi,
>  
> I have the following code at which I am trying to set factory client
> endpoint to third party web service
>  
> Can someone help me with a working sample on how to set
> JaxWsProxyFactoryBean endpoint with url cause I am getting exception
> when calling factory.create();  
>  
> WSDLException: faultCode=PARSER_ERROR: Problem parsing
> 'http://todev-mda09.tops.aol.com:8080/'.: The element type "HTML" must
> be terminated by the matching end-tag "</HTML>".:
> org.xml.sax.SAXParseException: The element type "HTML" must be
> terminated by the matching end-tag "</HTML>" which I believe cause the
> third party web service does NOT expose wsdl via ?wsdl from their url
>  
> private static final QName QNAME_SERVICE_NAME = new
> QName("http://madcap.aol.com/2007/06", "MadcapService");
>
> ...
>
> JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>
> factory.setServiceClass(com.aol.madcap._2007._06.MadcapPort.class);
>
> factory.setAddress(getServiceURL());
>
> factory.setWsdlURL("http://todev-mda09.tops.aol.com:8080/");
>
> factory.setServiceName(QNAME_SERVICE_NAME);
>
> MadcapPort port = (com.aol.madcap._2007._06.MadcapPort)
> factory.create();
>
>  
>  
>  INFO [11:38:14]
> (ExternalAdapter.java:throwServiceUnavailableException:197)
> http-8080-Processor25 com.aol.reg.rsp.adapter.ExternalAdapter - ***
> e.getCause().getMessage(): WSDLException: faultCode=PARSER_ERROR:
> Problem parsing 'http://todev-mda09.tops.aol.com:8080/'.: The element
> type "HTML" must be terminated by the matching end-tag "</HTML>".
> ERROR [11:38:14]
> (ExternalAdapter.java:throwServiceUnavailableException:200)
> http-8080-Processor25 com.aol.reg.rsp.adapter.ExternalAdapter -
> Exception Thrown in External Services: 
> org.apache.cxf.service.factory.ServiceConstructionException: Failed to
> create service.
>  at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:
> 83)
>  at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
> FromWSDL(ReflectionServiceFactoryBean.java:188)
>  at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
> rviceModel(ReflectionServiceFactoryBean.java:246)
>  at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
> ctionServiceFactoryBean.java:136)
>  at
> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractE
> ndpointFactory.java:83)
>  at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:
> 50)
>  at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactory
> Bean.java:82)
>  at
> com.aol.reg.rsp.adapter.madcap.MADCAPAdapter.getService(MADCAPAdapter.ja
> va:68)
>  at
> com.aol.reg.rsp.adapter.madcap.ExtServiceMADCAPImpl.nameSuggestionMADCAP
> (ExtServiceMADCAPImpl.java:87)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> com.aol.reg.rsp.engine.ProxyImplementor.methodInvoke(ProxyImplementor.ja
> va:132)
>  at
> com.aol.reg.rsp.engine.ProxyImplementor.methodInvoke(ProxyImplementor.ja
> va:79)
>  at
> com.aol.reg.rsp.engine.ServiceManagerProxy.methodInvoke(ServiceManagerPr
> oxy.java:349)
>  at
> com.aol.reg.rsp.engine.ServiceManagerProxy.invoke(ServiceManagerProxy.ja
> va:258)
>  at $Proxy15.nameSuggestionMADCAP(Unknown Source)  at
> com.aol.reg.rsp.web.SnsReg.doGet(SnsReg.java:207)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:269)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:188)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:210)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:174)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :127)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :117)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:108)
>  at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
> 51)
>  at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
> 0)
>  at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
> essConnection(Http11BaseProtocol.java:665)
>  at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
> .java:528)
>  at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
> erWorkerThread.java:81)
>  at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:685)
>  at java.lang.Thread.run(Thread.java:595)
> Caused by: WSDLException: faultCode=PARSER_ERROR: Problem parsing
> 'http://todev-mda09.tops.aol.com:8080/'.: The element type "HTML" must
> be terminated by the matching end-tag "</HTML>".:
> org.xml.sax.SAXParseException: The element type "HTML" must be
> terminated by the matching end-tag "</HTML>".
>  at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)  at
> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)  at
> com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)  at
> com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)  at
> com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)  at
> org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.jav
> a:199)
>  at
> org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java
> :163)
>  at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:
> 81)
>  at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
> FromWSDL(ReflectionServiceFactoryBean.java:188)
>  at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
> rviceModel(ReflectionServiceFactoryBean.java:246)
>  at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
> ctionServiceFactoryBean.java:136)
>  at
> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractE
> ndpointFactory.java:83)
>  at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:
> 50)
>  at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactory
> Bean.java:82)
>  at
> com.aol.reg.rsp.adapter.madcap.MADCAPAdapter.getService(MADCAPAdapter.ja
> va:68)
>  at
> com.aol.reg.rsp.adapter.madcap.ExtServiceMADCAPImpl.nameSuggestionMADCAP
> (ExtServiceMADCAPImpl.java:87)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:585)
>  at
> com.aol.reg.rsp.engine.ProxyImplementor.methodInvoke(ProxyImplementor.ja
> va:132)
>  at
> com.aol.reg.rsp.engine.ProxyImplementor.methodInvoke(ProxyImplementor.ja
> va:79)
>  at
> com.aol.reg.rsp.engine.ServiceManagerProxy.methodInvoke(ServiceManagerPr
> oxy.java:349)
>  at
> com.aol.reg.rsp.engine.ServiceManagerProxy.invoke(ServiceManagerProxy.ja
> va:258)
>  at $Proxy15.nameSuggestionMADCAP(Unknown Source)  at
> com.aol.reg.rsp.web.SnsReg.doGet(SnsReg.java:207)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:269)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:188)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:210)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:174)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :127)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :117)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:108)
>  at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
> 51)
>  at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
> 0)
>  at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
> essConnection(Http11BaseProtocol.java:665)
>  at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
> .java:528)
>  at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
> erWorkerThread.java:81)
>  at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:685)
>  at java.lang.Thread.run(Thread.java:595)
>  
>  at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)  at
> com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)  at
> com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)  at
> org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.jav
> a:199)
>  at
> org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java
> :163)
>  at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:
> 81)
>  ... 34 more
>
> Thanks in advance,
> Jarada
>
>   

Mime
View raw message