citrus-simulator | Standalone simulator for different messaging transports | SOAP library
kandi X-RAY | citrus-simulator Summary
kandi X-RAY | citrus-simulator Summary
Standalone simulator for different messaging transports such as Http REST, SOAP WebService, JMS, RMI, mail messaging and more
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start the simulation .
- Creates a string representation of a random value .
- Post - processing scenario .
- Dispatches the simulated scenario .
- The simulator adapter .
- Get messages that match the given filter .
- Returns the mapping for the requested HTTP message .
- Compile a XSD from the wsdl file
- JMS endpoint poller .
- If the request path matches the request path .
citrus-simulator Key Features
citrus-simulator Examples and Code Snippets
Community Discussions
Trending Discussions on citrus-simulator
QUESTION
I'm running Citrus Simulator as a spring-boot application to simulate web services responding to HTTP POST calls. Everything works fine in "lab" conditions. As long as I send data by hand via Postman, curl, or a browser plugin I have no problems and clean answers. Once the data is sent by another application however, I get a nasty nullpointer exception.
It took me a while to pinpoint the issue but now I know it to be the format of the sent data.
Sending pretty printed xml data results in a perfect answer. As soon as I serialize the xml though, it won't be processed by Citrus Simulator correctly and I'll get a nullpointer exception.
Using curl I'm also able to provoke the error simply by killing the format of the sent xml file.
Edit It's not the format directly. Both applications, when sending data in a pretty printed format, will generate a HTTP Header Metadata with some (strange) contents -> curl sends Metadata="\t\t\t", postman sends Metadata="\n ".
Sending a serialized xml, both applications send an empty Metadata Header thus resulting in a nullpointer exception
right here (MessageService.java:60) -> StringUtils.abbreviate(headerEntry.getValue().toString(), 255))));
ANSWER
Answered 2019-Sep-25 at 07:08I've never investigated in the cause of this (well, it's some null-header obviously), but a simple workaround (not solution!) is to override the com.consol.citrus.simulator.serviceMessageService
bean as following:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install citrus-simulator
You can use citrus-simulator like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the citrus-simulator component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page