Working on this development including Basex and AngularJs, I'm stuck with
the Json output.
here is the error :

 [BXJS0002] JSON serializer: <objectType> has invalid attribute "label".

Here is the xqm :

module namespace _ = 'getObjectTypes';

(:~
 : test dev YMA
 :)
declare
  %rest:path("/getObjectTypes")
(:   %rest:query-param("name", "{$name}", "anonymous friend") :)
   %output:method("json")
   %output:json("lax=yes")
function _:getObjectTypes() {
   let $db := db:open("simplePLM_test1")//objectType
   return <json objects="json">{$db}</json>
};

If instead I export in XML I get this :

<resultat>
<objectType xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
label="nodes" name="nodes"/>
<objectType xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
label="links" name="links"/>
</resultat>

using this xqm:

module namespace _ = 'getObjectTypes';


(:~
 : test dev YMA
 :)
declare
  %rest:path("/getObjectTypes")
(:   %rest:query-param("name", "{$name}", "anonymous friend") :)
   %output:method("xml")
function _:getObjectTypes() {
   let $db := db:open("simplePLM_test1")//objectType

   return <resultat>{$db}</resultat>
};

any idea?




*Cordialement / Best Regards,*

*Yoann Maingon*
Minerva France

*+33 6 64 32 49 66*

Download Aras Innovator - Téléchargez Aras
Innovator<http://www.aras.com/support/downloads/downloadInnovator.aspx>




2014-05-14 20:59 GMT+02:00 Yoann Maingon <yoann.main...@minerva-plm.fr>:

> Thx for the blog post !
>
> I was close to make it work but now I've got an issue with Basex itself.
> It says can't communicate with server when I'm trying to launch the
> basexhttp
> I know it happened to me once on another computer never knew how I either
> fixed it or if I had my computer stolen since then.
>
> Is there any log I should check, any cleaning advice?
>
>
> *Cordialement / Best Regards,*
>
> *Yoann Maingon*
> Minerva France
>
> *+33 6 64 32 49 66 <%2B33%206%C2%A064%2032%2049%2066>*
>
> Download Aras Innovator - Téléchargez Aras 
> Innovator<http://www.aras.com/support/downloads/downloadInnovator.aspx>
>
>
>
>
> 2014-05-14 16:25 GMT+02:00 Andy Bunce <bunce.a...@gmail.com>:
>
> Hi Yoann,
>>
>> I do it like this:
>> http://quodatum.wordpress.com/2014/05/14/using-angular-with-basex
>>
>> /Andy
>>
>>
>>
>> On 14 May 2014 10:53, Yoann Maingon <yoann.main...@minerva-plm.fr> wrote:
>>
>>> Hi,
>>>
>>> I've got two questions about using Basex with Angular, because I still
>>> have an issue accessing the XQuery module file.
>>>
>>> Quick feasibility question for development: If I just install basex and
>>> store my angularjs app in the webapp folder will this is be ok to interact
>>> with the database?
>>> The github repo shows a typical folder structure :
>>> https://github.com/BaseXdb/basex-contrib/tree/master/basex-web-ng
>>> What would it be if directly integrated in the basex folder?
>>> Might be a noob question, but I'm a bit struggling here. I'm looking for
>>> an easy to way to setup a dev environnement. I'm not too much about
>>> perf/dbsize for now.
>>>
>>> Thx for your help.
>>>
>>>
>>>
>>>
>>>
>>> *Cordialement / Best Regards,*
>>>
>>> *Yoann Maingon*
>>> Minerva France
>>>
>>> *+33 6 64 32 49 66 <%2B33%206%C2%A064%2032%2049%2066>*
>>>
>>> Download Aras Innovator - Téléchargez Aras 
>>> Innovator<http://www.aras.com/support/downloads/downloadInnovator.aspx>
>>>
>>>
>>>
>>>
>>> 2014-05-07 15:21 GMT+02:00 Alexander Holupirek <a...@holupirek.de>:
>>>
>>> On 07.05.2014, at 09:34, Maximilian Gärber <mgaer...@arcor.de> wrote:
>>>> > @basex: maybe it is time for a basex contrib page?
>>>>
>>>> Nice idea!
>>>>
>>>> We have just created
>>>>
>>>>         https://github.com/BaseXdb/basex-contrib
>>>>
>>>> A github repository for
>>>>
>>>>         BaseX User Community Contributions
>>>>
>>>>
>>>> On 07.05.2014, at 01:38, Yoann Maingon <yoann.main...@mydatalinx.com>
>>>> wrote:
>>>> > Does anyone as some example using either angularjs or jquery ?
>>>>
>>>> We just added a first project
>>>>
>>>>         BaseX-Web-NG
>>>>         A BaseX-RestXQ-AngularJS-Bootstrap-WebApp example
>>>>
>>>> motivated by your initial question (screenshot [1]):
>>>>
>>>>
>>>> Looking forward to your examples and contributions!
>>>>         Micheee and Holu
>>>>
>>>> [1]
>>>> https://raw.githubusercontent.com/BaseXdb/basex-contrib/master/basex-web-ng/public/static/gfx/Hello_Stranger.png
>>>>
>>>>
>>>
>>
>

Reply via email to