Apache Camel REST DSL - Validating Request Payload and return error response

I am exposing a rest service using "CamelHttpTransportServlet" that receive orders and place in jms queue. The code works fine on happy path and returns 200 response.I have written Processor to validate the input JSON, and set http_response_code based on the input. The issue is - for invalid requests though failure response code - 400 is set, the flow continues to the next route and pushes the data to the queue instead of sending the 400 response back to the calling app. rest("/ordermanagement") .post("/order").to("direct:checkInput"); ...Read more

Not able to publish Rest message from solace to http listner?

Trying publish rest message from solace to http listener.But configured rest delivery points, consumer, queue-binding status are down :( (Note: Admin status is up)Http listener link: http://hostname:port/ws/simple/getDefaultRDPadded the screen shots Please let me know any changes need to be donerest delivery point status screen shotrest consumer screenshotqueue binding screen shotscreenshot for (a)show message-vpn sol-vpn rest rest-delivery-point * detailshow message-vpn sol-vpn rest rest-delivery-point * detailscreenshot for (b) show message-v...Read more

maven - CMS Magnolia magnolia-rest-content-delivery version in pom

I need to install magnolia-rest-content-delivery module in Maven.Before installing this module I had following dependencies. Project was built and installed without problems.Question: How it's possible not to define dependency version in magnolia projects?1st attempt to install without version like others from group info.magnolia.restThat cause error `[ERROR] 'dependencies.dependency.version' for info.magnolia.rest:magnolia-rest-content-delivery:jar is missing.``Question: What's so special about magnolia-rest-content-delivery so it does need ve...Read more

rest - PhoneGap Cordova Browser based and app

Let say were starting a website from the ground up and want to also create apps.Could you just create the website with a REST API's and have it work on browser and PhoneGap? Would there be a conflict with Cordova plugins you may use?So the design is responsive and its all HTML, CSS and Javascript and connects to a REST API (log in, reg, messages, db calls, etc) for the browser website and apps.This way you can use the same code for everything and can still use some of the great Cordova plugins for the app to make it more flexible.Would this wor...Read more

rest - ApplicationContext Exception in Test with @WebMvcTest

I Have an Spring Boot Application (1.5.10.RELEASE) which contains a main (SpringBootApplication) like this:@SpringBootApplication@Configuration@EntityScan(basePackages = { "db.modell", "db.modell.base" })@ComponentScan(basePackages = { "de.gui.test" })public class SpringBootConsoleApplication { public static void main(String[] args) throws Exception { SpringApplication.run(SpringBootConsoleApplication.class, args); }}and two REST controllers like the following:@RestController@RequestMapping("/as")public class AController { @Autowired pr...Read more

JIRA JQL CURL-Search based on Issue name/description (Get ticket ID based on name) REST API

I need to get Jira ticket ID based on summary and description fieldcurl -D- -u user:password -X GET -H "Content-Type: application/json" https://jira.corp.company.com/rest/api/2/search?jql=project="Technology" and summary="Check o365 license"but got curl: (6) Could not resolve host: summary=Check o365 license Unknown errorwhen searching on summary field alone no error but no resultsHere is some output from tickets which i used as search filter (summary and description) "customfield_10600":null,"customfield_10204":null,"customfield_11019":null...Read more

rest - Using Jenkins Pipeline to query the Bluecat IPAM through the HTTP- request-Builder plugin

Apologies in advance for the length of the question but hopefully declaring script up front may assist future users in same boat as me.I currently have a pipeline script in groovy which can successfully connect to my bluecat IP address manager and get me a Authorization token which in theory is all i need to be able to do subsequent calls to the Bluecat API and GET IP addresses or PUT new IP addresses into the IPAM DB.thus far my script is:import groovy.json.JsonSlurperClassic def jsonParse(def json) { new groovy.json.JsonSlurperClassic().pa...Read more

rest - Groovy script for Jenkins: execute HTTP request without 3rd party libraries

I need to create a Groovy post build script in Jenkins and I need to make a request without using any 3rd party libraries as those can't be referenced from Jenkins.I tried something like this:def connection = new URL( "https://query.yahooapis.com/v1/public/yql?q=" + URLEncoder.encode( "select wind from weather.forecast where woeid in " + "(select woeid from geo.places(1) where text='chicago, il')", 'UTF-8' ) ) .openConnection() as HttpURLConnection// set some headersconnection.setRequestProperty( 'User-Agent', 'groov...Read more

groovy - Access property in Soap UI Rest Parameter field

I'm using the open source versión of SoapUI for a REST request.I read and generate custom properties in the test case in a groovy routine for Reading certain files:context.testCase.setPropertyValue( "appId", "_some_id_" );I want to access this property in the request params:Name: Value:appid ${appId}This gives me null values. What's the nomeclature to access the "appId" property?...Read more

rest - extract a value of token from a script groovy

I test a request REST from soapui and I receive one response Json that contains one token (userToken) :{ "status": 200, "entity": { "status": "SUCCESS", "message": { "defaultMsg": "Successfully logged in.", "msgId": "controller.authorization.success.log.in" }, "data": { "userToken": "b57796e3-d9e4-49f2-9d46-481a2048ab65", "userName": "operateur", "userId": "operateur", }}I add this assertion in soapui for extracting the value of userToken and put it as a varia...Read more

REST tools support for development and testing

There is a similar question here but it only covers some of the issues below.We have a client who requires web services using REST.We have tons of experience using SOAP and over time have gathered together a really good set of tools for SOAP development and testing e.g.soapUI Eclipse pluginswsdl2javaWSStudioBy "tools" I mean a product "out of the box" that we can start using. I'm not talking about cutting code to "roll our own" using Ajax or whatever.The tool set for REST doesn't seem to be nearly as mature?What tools are out there (we use C# a...Read more

If REST applications are supposed to be stateless, how do you manage sessions?

I'm in need of some clarification. I've been reading about REST, and building RESTful applications. According to wikipedia, REST itself is defined to be Representational State Transfer. I therefore don't understand all this stateless gobbledeygook that everyone keeps spewing.From wikipedia: At any particular time, a client can either be in transition between application states or "at rest". A client in a rest state is able to interact with its user, but creates no load and consumes no per-client storage on the set of servers or on the netwo...Read more

jython - Making a REST POST during the setup of a grinder script

Is there a way to post a piece of json data to a url when setting up a grinder test? I have tried just using the http plugin however it throws the following error:net.grinder.engine.common.EngineException: Must be called from worker threadI have been trying to figure out how to do it with urllib2 however urllib2 seems to not have any way to post data such as json, just urls with parameters in them. Other libraries that I normally use in python seem to be unavailable in jython.Thanks!...Read more

rest - How to operate pivotal cloud foundry opsman though java RESTful

I'm now using pivotol's cloud foundry and I'm thinking a java app to automatically check & upgrade products on pcf ops-manager. Right now I'm typing things like "$ uaac curl -k https://****.org/api/v0/diagnostic_report" on command line to manually operate it.Since ops-manager is operated through RESTful api, I thought pivotal spring's REST template would be a good idea. (https://spring.io/guides/gs/consuming-rest). I am new to the whole RESTful idea, in my understanding, we just reach this endpoint and it returns or operates what we require...Read more

rest - i want to update password of user in predix uaa but showing me error?

https://77b186f0-b9a1-4956-b72a-630108a331b7.predix-uaa.run.aws-usw02-pr.ice.predix.io/Users/daa7daaa-23b3-409d-b6ce-0857b76a62de/s102Accept:application/jsonscope:password.writeaud:passwordcurl commandcurl --request POST \ --url https://77b186f0-b9a1-4956-b72a-630108a331b7.predix-uaa.run.aws-usw02-pr.ice.predix.io/Users/daa7daaa-23b3-409d-b6ce-0857b76a62de/dff \ --header 'accept: application/json' \ --header 'aud: password' \ --header 'authorization: bearer {token}' \ --header 'cache-control: no-cache' \ --header 'content-type: applicatio...Read more