Parser error on SOAP Envelope Node - ibm-integration-bus

I'm trying to create a simple flow with soapInput, SoapExtract, SoapEnvelope and SoapReply Nodes. On SOAP extract node I'm saving the extracted envelope to default LocalEnvironment and with SoapEnvelope I want to add the envelope which I extracted earlier with soap extract node. Its throwing an error at SoapEnvelope node saying invalid parser. (Its throwing BIP 3171)
Below is the BIP 3171 error code description.
BIP3171
A message using an incorrect parser () was detected in node: 2
Severity
20 : Error
Explanation
Only the following parsers are allowed: mrm,xmlns,xmlnsc
Response
None.
Please help.

Related

How to update the error code in IIB for my pass thro

I am getting 500 error code and its a SOAP format.
I see HTML, SOAP 1.1 & SOAP 1.2 formats available for response when there is an exception in my pass thro service for example when wrong endpoint request, it gives 500.
I want to change it to 400 or 404 for invalid request/not found.
Please advise for updating it for a SOAP/JSON response. It would be nice to know for both the format.
Its very simple:
Add a Compute Node, set the atribute "compute node" to "LocalEnvironment and Message", in the code you need:
For SOAP messages:
SET OutputLocalEnvironment.Destination.SOAP.Reply.Transport.HTTP.ReplyStatusCode = 404;
For REST messages:
SET OutputLocalEnvironment.Destination.HTTP.ReplyStatusCode = 500;

generic return type for restemplate.exchange

I am using resttemplate.exchange to invoke a URL and get response. But the issue is the response type varies when I successfully receives the output and if I get some error.
eg.
ResponseEntity<XXX[]> response = restTemplate.exchange(endPoint,HttpMethod.GET,req,
new ParameterizedTypeReference<XXX[]>() {},uriVariables);
If there is no issue with service and then output is in format of list. but if there is error like "NO DATA FOUND" then the response is in MAP. so whenever I have any issue with URL i get "404: null error" because my response type is unable to identify the error which is in MAP.
Could you please suggest what could be done as i can not change the response type of services.
Edit:: http://localhost:9090/data/getDetail?name=XXX
response [{"name":"XXX","Dept":"teaching","createdby":"YYY","createdDt":"06/09/2018"}]
when data not found case::http://localhost:9090/data/getDetail?name=YYY
response
{"response":"DATA NOT FOUND"}

Data type ("text"|"bin"|""):Response code: Non HTTP response code: org.apache.jmeter.protocol.http.parser.LinkExtractorParseException

How to solve following error in jmeter:
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: Non HTTP response code: org.apache.jmeter.protocol.http.parser.LinkExtractorParseException
I would guess an exception occurred parsing HTML text to extract links for Download resources features.
Ensure you use last jmeter 4.0 version and set:
httpsampler.ignore_failed_embedded_resources=true

Call a custom assertion message from a central in jmeter

I am new to jmeter and would like to know if it is possible to call a custom assertion message from a central location.
Thread group 1
http sample
xpath extraction
custom assertion message
Thread group 2
http sample 1
xpath extraction
custom assertion message
http sample 2
xpath extraction
custom assertion message
The custom message use the xpath extraction to get the response code, if the success message code returned then the custom message is ignored.
If the response code is not a success response, we extract the actual response code and use in the custom assertion message.
I would like to call the custom message from one central location instead.
The custom assertion is below:
if (!"SuccessResponseCode".equals(vars.get("xpathResponseCode")) && prev_result != null){
AssertionResult.setFailure(true);
AssertionResult.setFailureMessage("The response code is "+vars.get("xpathextractionResponseCode").toString()+" and the expected is expectedResponseCode"+ctx.getThreadGroup().getName()+" test case.");
}
So I would like to call an external custom message
Custom assertion
Thread group 2
http sample 1
xpath extraction
JS232 - call custom message
http sample 2
xpath extraction
JS232 - call custom message
Just put your Assertion at the same level as Thread Groups.
Assertions follow JMeter Scoping Rules so this way a single assertion will be applied to all samplers in its scope:

How to use xpath extractor in Apache Jmeter?

I invoke a SOAP service and get a SOAP response XML along with some details on the top. When i use the xpath extractor i get an error message that content is not allowed in prolog.
How can i resolve this issue in jmeter and get the xpath working ?
That is a generic (and seemingly unhelpful) error message that the SAX XML parser throws when your input XML is not well formed - usually at the start of the document. Prolog is the first line with xml version info.
Check and validate that your response is well formed. It might be something simple like trimming the beginning characters of the string that you're attempting to parse.

Resources