CWebProxy Channel exmple in 4.1???

Can anyone give me some example code or simple istructions (or even point me there) on how to setup and use a WebProxy Channel?

What all has to be done-

When I put in my URI location and tell it to pass uid in the setup screen it doesn't work-

I get an exception (below).

Thanks!!

    -Scott

Inner exception:
org.jasig.portal.GeneralRenderingException: Problem retrieving contents of http://myhost.com/test.aspx. Please restart channel. at org.jasig.portal.channels.webproxy.CWebProxy.renderXML(CWebProxy.java:699) at org.jasig.portal.MultithreadedChannelAdapter.renderXML(MultithreadedChannelAdapter.java:45) at campuspipeline.uportal.ScheduledChannelRenderer$ScheduledWorker.run(ScheduledChannelRenderer.java:900) at com.pipeline.uportal.ChannelRendererTaskInterceptor$1.run(ChannelRendererTaskInterceptor.java:154) at java.security.AccessController.doPrivileged(Native Method) at com.pipeline.uportal.ChannelRendererTaskInterceptor.run(ChannelRendererTaskInterceptor.java:138) at campuspipeline.uportal.ScheduledChannelRenderer$ScheduledWorker.execute(ScheduledChannelRenderer.java:1108) at campuspipeline.util.concurrent.ThreadPoolExecutor$ThreadPoolTask.execute(ThreadPoolExecutor.java:422) at campuspipeline.util.concurrent.ThreadPoolExecutor$LimitedExecutorTask.run(ThreadPoolExecutor.java:493) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1174) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98) at org.jasig.portal.channels.webproxy.CWebProxy.getXmlDocument(CWebProxy.java:790) at org.jasig.portal.channels.webproxy.CWebProxy.renderXML(CWebProxy.java:695) ... 11 more
Outer exception:
org.jasig.portal.PortalException: General channel rendering failure. at campuspipeline.uportal.ScheduledChannelRenderer.completeRendering(ScheduledChannelRenderer.java:518) at org.jasig.portal.ChannelManager.outputChannel(ChannelManager.java:491) at org.jasig.portal.UserInstance.renderState(UserInstance.java:1125) at org.jasig.portal.UserInstance.writeContent(UserInstance.java:421) at org.jasig.portal.PortalSessionManager.doGet(PortalSessionManager.java:298) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152) at com.pipeline.web.UPortalFilter$1.run(UPortalFilter.java:199) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at com.pipeline.web.UPortalFilter.doFilter(UPortalFilter.java:173) at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152) at com.pipeline.web.FosServletFilter.doFilter(FosServletFilter.java:92) at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152) at com.pipeline.web.MaxRequestsFilter.doFilter(MaxRequestsFilter.java:142) at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152) at com.pipeline.web.LuminisFilter$ProcessRequest$1.run(LuminisFilter.java:374) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:337) at com.sct.security.Session.doAs(Session.java:109) at com.pipeline.web.LuminisFilter$ProcessRequest.run(LuminisFilter.java:279) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:337) at com.sct.security.Session.doAs(Session.java:109) at com.pipeline.security.SubjectManager.doAs(SubjectManager.java:121) at com.pipeline.web.LuminisFilter.doFilter(LuminisFilter.java:238) at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: org.jasig.portal.GeneralRenderingException: Problem retrieving contents of http://myhost.com/test.aspx. Please restart channel. at org.jasig.portal.channels.webproxy.CWebProxy.renderXML(CWebProxy.java:699) at org.jasig.portal.MultithreadedChannelAdapter.renderXML(MultithreadedChannelAdapter.java:45) at campuspipeline.uportal.ScheduledChannelRenderer$ScheduledWorker.run(ScheduledChannelRenderer.java:900) at com.pipeline.uportal.ChannelRendererTaskInterceptor$1.run(ChannelRendererTaskInterceptor.java:154) at java.security.AccessController.doPrivileged(Native Method) at com.pipeline.uportal.ChannelRendererTaskInterceptor.run(ChannelRendererTaskInterceptor.java:138) at campuspipeline.uportal.ScheduledChannelRenderer$ScheduledWorker.execute(ScheduledChannelRenderer.java:1108) at campuspipeline.util.concurrent.ThreadPoolExecutor$ThreadPoolTask.execute(ThreadPoolExecutor.java:422) at campuspipeline.util.concurrent.ThreadPoolExecutor$LimitedExecutorTask.run(ThreadPoolExecutor.java:493) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) ... 1 more Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1174) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98) at org.jasig.portal.channels.webproxy.CWebProxy.getXmlDocument(CWebProxy.java:790) at org.jasig.portal.channels.webproxy.CWebProxy.renderXML(CWebProxy.java:695) ... 11 more

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

re webproxy

 It might be that your output isn't being strict enough with its xhtml formatting.  Make sure tags are closed, etc..  

And then:

Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

I'm not sure why you got a 503.  Can your server hosting your application wget that URL, and can your Luminis server wget that URL?

Not sure about your error but

Not sure about your error but this post helped me to set up a webproxy channel successfully.

 

http://www.lumdev.net/node/2239

 

Thanks.

Jonahlyn

This is what I know about the

This is what I know about the issue (we're having the same problem) - perhaps someone has found a solution; maybe a setting to turn off DTD downloading by the proxy?

W3C has intentionally turned off access to that URL because they have been getting hammered with hits from broken web clients' rendering engines for some time now.  Essentially, the proxy follows namespace DTD identifiers as though they were intended as links (they are not.)  If you look at a tcpdump trace of the connection from Luminis to the DTD URL, the response has a link to the following url: "see http://w3.org/brief/MTE2"

The issue will probably only happen when proxying to sites that produce correct XHTML pages that have something like the following at the top:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

If the DOCTYPE information is removed (making the XHTML-compliant page no longer correct,) then the problem should go away.

Obviously, that solution is unlikely to be practical since proprietary programs generally don't allow that level of tinkering, especially when all or most browsers will render their output correctly when connected to them directly.

In my experience using the

In my experience using the Web Proxy Channel, your code has to be perfect. Even if a page or script comes up correctly on its own in a browser, when you try to view it in Luminis, there may be something extremely minor off, which cases this error to come up. What I've done is just start messnig with the code and commenting stuff out until I can figure out what the rpoblem is.

Sorry I dont have more specific information, but these errors ususally dont say exactly what the issue is. As an example, I had this error once because I had a <br> instead of a <br />

 

Why would a URL not intended to be a link

Although I can believe that this is the case, I cannot see any reason why to expect something that looks like

http://..../xhtmll-strict.dtd

Not to be a resource available on the web at that URL. If the parser of the page needs to validate it against the DTD where should I get a copy from in order to store a copy locally?

I am happy for a browser to ignore the <!DOCTYPE>, but surely it is supposed to be there for a reason. It should indicate that the page complies to XHTML 1.0 Strict, and that means that it should be sensible for checks to be made as to whether that is or isn't the case.

Derek
University of Leeds, UK

Syndicate content