Can you provide me the link ? I am unable to find it on GitHub. On Fri, Aug 12, 2016 at 5:40 PM, Ian Dunlop <[email protected]> wrote:
> Hello, > > I changed the User class using your code snippet but I am still getting the > same error. I have pushed a branch into the apache git repo called > ian_my_workflows. This should be mirrored into github (hopefully) and you > can see the code I have added - mainly a MyWorkflow fragment etc plus data > manager/API addition to fetch the worklfows for the logged in user. I guess > this is a good chance for us to understand and document how to add > functionality to the app. > > Cheers, > > Ian > > On 12 August 2016 at 12:40, Ian Dunlop <[email protected]> wrote: > > > Hello, > > > > Thanks for the tips and code Sagar. Much appreciated. > > > > Cheers, > > > > Ian > > > > On 12 August 2016 at 10:09, Sagar <[email protected]> wrote: > > > >> Hi Ian, > >> > >> To parse the xml that was given by you . You have to add some object in > >> Java Beans in user . > >> > >> 1. *Workflows* object's element in User java bean > >> > >> 2. Add required = false in @element annotation of title and type in > >> *Workflow* java bean. > >> > >> You can see the changed code at Github Gist > >> <https://gist.github.com/sagar15795/ec65c84a5a14c32691b493f4841331ce> > >> > >> I have tried it. And I found an error that we can not use @element and @ > >> text annotation together in SimpleXML parser . So we can not get the > >> workflow as element's text using current java bean. we can get all the > >> rest > >> elements and attribute. > >> > >> I am trying to rectify it. > >> > >> On Thu, Aug 11, 2016 at 8:20 PM, Ian Dunlop <[email protected]> > wrote: > >> > >> > Hello, > >> > > >> > I have been trying to understand how the taverna mobile application > >> works. > >> > I added some functionality to list your own workflows (rather than all > >> of > >> > them or your favourites). I can get the app to request 'my' workflow > >> list > >> > from myExperiment but when the app tries to parse it I get the > following > >> > error: > >> > > >> > org.simpleframework.xml.core.AttributeException: Attribute 'uri' does > >> not > >> > have a match in class org.apache.taverna.mobile.data.model.Workflows > at > >> > line 2 > >> > > >> > Here is the xml that is returned: > >> > > >> > <?xml version="1.0" encoding="UTF-8"?> > >> > <user uri="http://www.myexperiment.org/user.xml?id=474" resource=" > >> > http://www.myexperiment.org/users/474" id="474"> > >> > <workflows> > >> > <workflow uri="http://www.myexperiment.org/workflow.xml?id=2770" > >> > resource="http://www.myexperiment.org/workflows/2770" id="2770" > >> > version="1">Disability estimates by year</workflow> > >> > <workflow uri="http://www.myexperiment.org/workflow.xml?id=3628" > >> > resource="http://www.myexperiment.org/workflows/3628" id="3628" > >> > version="4">Free text search to Concept Wiki URI</workflow> > >> > </workflows> > >> > </user> > >> > > >> > > >> > This is different from the format that the 'All workflows' returns > >> within > >> > the app. > >> > I'm not sure what line 2 refers to here, is it the class or the xml? > If > >> it > >> > is the xml then is it the <user> node that it doesn't like. The > >> > simpleframework docs seem to suggest that you can have optional > elements > >> > http://simple.sourceforge.net/download/stream/doc/tutorial/ > >> > tutorial.php#optional. > >> > Can it be told to ignore elements? > >> > So....how can I change the org.apache.taverna.mobile.data > >> .model.Workflows > >> > and I guess the org.apache.taverna.mobile.data.model.Workflow code to > >> > accept the above xml format as well? > >> > > >> > Cheers, > >> > > >> > Ian > >> > > >> > >> > >> > >> -- > >> > >> *With warm regards * > >> *Sincerely yours* > >> Sagar > >> > >> > >> *Student ,(6th Semester )B.Tech IT and mathematical innovation* > >> *Cluster Innovation Centre* > >> *University of Delhi * > >> > > > > > -- *With warm regards * *Sincerely yours* Sagar *Student ,(6th Semester )B.Tech IT and mathematical innovation* *Cluster Innovation Centre* *University of Delhi *
