Hi Mari, I will have a look. On 11 May 2015 10:17 pm, "Mariangela Hills" <mariang...@wso2.com> wrote:
> Hi Vishanth, > > I executed the REST API command using the new JSON definition, but I still > get an error. > > MariH:Master-branch Admin16$ curl -X POST -H "Content-Type: > application/json" -d @'property.json' -k -v -u admin:admin > https://localhost:9443/metadata/api/application/wordpress/properties > > POST /metadata/api/application/wordpress/properties HTTP/1.1 > > Authorization: Basic YWRtaW46YWRtaW4= > > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 > OpenSSL/0.9.8| zlib/1.2.5 > > Host: localhost:9443 > > Accept: */* > > Content-Type: application/json > > Content-Length: 119 > > > * upload completely sent off: 119 out of 119 bytes > < HTTP/1.1 500 Internal Server Error > < Date: Mon, 11 May 2015 16:43:31 GMT > < Content-Type: application/json > < Content-Length: 152 > < Connection: close > < Server: WSO2 Carbon Server > < > {"Error":{ "errorCode": " 500", "errorMessage": " > org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML > character is specified. "}} > > Regards, > Mariangela > > > > > *--* > *Mariangela Hills* > PMC Member & Committer of Apache Stratos > Senior Technical Writer > WSO2, Inc. > lean.enterprise.middleware. > m: +94 773 500185 > w: http://wso2.com > <http://wso2.com/events/> > > On Mon, May 11, 2015 at 9:14 PM, Udara Liyanage <ud...@wso2.com> wrote: > >> Hi Mari, >> >> Correct format is the one Vishanth mentioned >> On 11 May 2015 8:32 pm, "Vishanth Balasubramaniam" <vishan...@wso2.com> >> wrote: >> >>> Hi Mari, >>> >>> It should be as follows. >>> [ >>> { >>> "key":"wka5", >>> "values":"192.163.4.2" >>> }, >>> { >>> "key":"wka6", >>> "values":"192.163.6.6" >>> } >>> ] >>> >>> Regards, >>> Vishanth >>> >>> >>> On Mon, May 11, 2015 at 7:49 PM, Mariangela Hills <mariang...@wso2.com> >>> wrote: >>> >>>> Hi Devs, >>>> >>>> I was trying to add properties to an application (POST >>>> /metadata/api/application/<APPLICATION_ID>/properties) and got an error >>>> [1]. There were no corresponding log files printed. I used [2] as the JSON. >>>> >>>> >>>> >>>> [1] >>>> MariH:Master-branch Admin16$ curl -X POST -H "Content-Type: >>>> application/json" -d @'meta.json' -k -v -u admin:admin >>>> https://localhost:9443/metadata/api/application/wordpress/properties >>>> > POST /metadata/api/application/wordpress/properties HTTP/1.1 >>>> > Authorization: Basic YWRtaW46YWRtaW4= >>>> > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 >>>> OpenSSL/0.9.8| zlib/1.2.5 >>>> > Host: localhost:9443 >>>> > Accept: */* >>>> > Content-Type: application/json >>>> > Content-Length: 131 >>>> > >>>> * upload completely sent off: 131 out of 131 bytes >>>> < HTTP/1.1 500 Internal Server Error >>>> < Date: Mon, 11 May 2015 14:06:03 GMT >>>> < Content-Type: application/json >>>> < Content-Length: 152 >>>> < Connection: close >>>> < Server: WSO2 Carbon Server >>>> < >>>> * Closing connection #0 >>>> * SSLv3, TLS alert, Client hello (1): >>>> {"Error":{ "errorCode": " 500", "errorMessage": " >>>> org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML >>>> character is specified. "}} >>>> >>>> ------------------------------------ >>>> >>>> [2] >>>> [ >>>> { >>>> "key":"wka5", >>>> "values":[ >>>> "192.163.4.2" >>>> ] >>>> }, >>>> { >>>> "key":"wka6", >>>> "values":[ >>>> "192.163.6.6" >>>> ] >>>> } >>>> ] >>>> >>>> >>>> Regards, >>>> Mariangela >>>> >>>> >>>> >>>> >>>> *--* >>>> *Mariangela Hills* >>>> PMC Member & Committer of Apache Stratos >>>> Senior Technical Writer >>>> WSO2, Inc. >>>> lean.enterprise.middleware. >>>> m: +94 773 500185 >>>> w: http://wso2.com >>>> >>>> >>> >>> >>> -- >>> *Vishanth Balasubramaniam* >>> Software Engineer >>> WSO2 Inc.; http://wso2.com >>> lean.enterprise.middleware >>> >>> mobile: *+94771737718* >>> about me: *http://about.me/vishanth <http://about.me/vishanth>* >>> >>> >