[
https://wso2.org/jira/browse/MASHUP-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16252#action_16252
]
Yumani Ranaweera commented on MASHUP-724:
-----------------------------------------
It returns an error when a feed.feedType is not specified.
Code for the service;
------------------------
function feed(){
var feed = new Feed();
//feed.feedType = "rss_2.0";
feed.title = "This is a test Feed";
feed.description = "This feed demonsrates the use of Feed host object to create
an RSS 2.0 feed.";
feed.link = "http://mooshup.com/rss20.xml";
var result = feed.writeTo("test-created-rss-feed.xml");
}
Resulted error;
-----------------
org.apache.axis2.AxisFault: Feed type cannot be null
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:431)
at
org.wso2.javascript.rhino.JavaScriptEngine.call(JavaScriptEngine.java:182)
at
org.wso2.javascript.rhino.JavaScriptEngine.call(JavaScriptEngine.java:210)
at
org.wso2.javascript.rhino.JavaScriptReceiver.invokeBusinessLogic(JavaScriptReceiver.java:193)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:148)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:121)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.wso2.mashup.transport.ServiceUIFilter.doFilter(ServiceUIFilter.java:197)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
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.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:667)
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: java.lang.IllegalArgumentException: Feed type cannot be null
at
com.sun.syndication.feed.synd.SyndFeedImpl.createWireFeed(SyndFeedImpl.java:198)
at
com.sun.syndication.feed.synd.SyndFeedImpl.createWireFeed(SyndFeedImpl.java:186)
at com.sun.syndication.io.SyndFeedOutput.output(SyndFeedOutput.java:97)
at
org.wso2.mashup.hostobjects.feed.Feed.jsFunction_writeTo(Feed.java:350)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:411)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
at org.mozilla.javascript.gen.c65._c1(admin-feed:10)
at org.mozilla.javascript.gen.c65.call(admin-feed)
at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
at org.mozilla.javascript.gen.c65.call(admin-feed)
at
org.wso2.javascript.rhino.JavaScriptEngine.call(JavaScriptEngine.java:180)
... 26 more
> Feed.feedType could be defaulted.
> ---------------------------------
>
> Key: MASHUP-724
> URL: https://wso2.org/jira/browse/MASHUP-724
> Project: WSO2 Mashup Server
> Issue Type: Improvement
> Reporter: Jonathan Marsh
> Assignee: Tyrell Perera
> Fix For: 1.1
>
>
> Currently one cannot use a new Feed object without setting the feedType.
> Since many authors won't care what the version is (and most clients seem able
> to deal with multiple formats), can we default feedType to the most widely
> supported type?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev