cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarada, Hussam" <Hussam.Jar...@corp.aol.com>
Subject RE: help in setting JaxWsProxyFactoryBean endpoint/url in CXF 2.0.2
Date Wed, 10 Oct 2007 03:36:34 GMT
Hi James,
 
Madcap web service does not export wsdl from http://todev-mda09.tops.aol.com:8080/ <http://todev-mda09.tops.aol.com:8080/>
  which is main issue I have.
 
Any workaround of using JaxWsProxyFactoryBean or JAX-WS API's to invoke this third party web
service per above condition.
 
Also note that I am building client stub classes for the above web service via wsdl2java as
follows
 
C:\Program Files\Apache Software Foundation\apache-cxf-2.0.2-incubator\bin>wsdl2java.bat
-d C:\svnwork\reg\trunk\reg\reg-ws\ws-madcap\src\main\java -compile -all -exsh true -verbose
C:\svnwork\reg\trunk\reg\reg-ws\ws-madcap\src\wsdl\madcap.wsdl
 
Thanks in advance,
Hussam Jarada


________________________________

From: James Mao [mailto:james.mao@iona.com]
Sent: Tue 10/9/2007 10:14 PM
To: cxf-user@incubator.apache.org
Subject: Re: help in setting JaxWsProxyFactoryBean endpoint/url in CXF 2.0.2



Jarada, Hussam wrote:
> 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/");
>  


Can you get the wsdl from

http://todev-mda09.tops.aol.com:8080/

in the browser?

James


> 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
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message