Question

What is wrong with my request to register a service? I can not get it working.

Login (ok)

curl -k -s -c cookies.txt -b cookies.txt -X POST https://my.server.com/publisher/site/blocks/user/login/ajax/login.jag -d 'action=login&username=admin&password=admin'

Register/Publish service, fails

curl -k -s -c cookies.txt -b cookies.txt -X POST https://my.server.com/publisher/site/blocks/item-add/ajax/add.jag -d 'action=addAPI&name=GetLand&context=GetLand&version=1.0&tier=Unlimited&transports=http&http_checked=http&transports=https&https_checked=https&description=Dummy Description&visibility=public%20API&tags=Mondriaan&resourceCount=0&resourceMethod-0=GET,POST&resourceMethodAuthType-0=None&uriTemplate=/*&resourceMethodThrottlingTier-0=Unlimited&tiersCollection=Unlimited' -d 'endpoint_config={"production_endpoints":{"url":">http://mgm-fon-web.nl.rsg/orawsv/SNL_OWNER/SOAP_TEST_GET_LAND","config":null},"endpoint_type":"http"}'

I get only the folling error:

{"error" : true, "message" : " null"}

And in the log:

 ERROR {JAGGERY.site.blocks.item-add.ajax.add:jag} -  java.lang.NullPointerException: null {JAGGERY.site.blocks.item-add.ajax.add:jag}
Était-ce utile?

La solution

Make urlencoded data for the post parameters. This may improve your problem.

Also, >http: from your parameter may hurt you as well. In my windows after the > sign its expecting to have a valid file name. Not sure how it reacts on linux or mac. So once again, try to post the urlencoded data.

Autres conseils

It was a typo mistake in my URL; apart of the ">", I did not set the correct values of the method and made a typo-mistake in the attribute name. I hop ethe next release, WSO2 AM should show a syntax error when a non-existing parameter is passed.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top