This function returns the name of the next parser class in the chain, if defined. Use this function to return to the integration node the name of the parser class that handles the next section, or remainder, of the message content. Typically, for messages that have a simple format type, only one message content parser is defined.
For messages that have a more complex format type with multiple message parsers, each parser can identify the next one in the chain by returning its name in the buffer parameter. The last parser in the chain must return an empty string.
If you specify the name of a parser supplied with IBM® Integration Bus, you must use the correct class name of the parser.
Defined In | Type | Member |
---|---|---|
CPI_VFT | Optional | iFpNextParserClassName |
void cpiNextParserClassName(
CciParser* parser,
CciContext* context,
CciChar* buffer,
int size);
None.
This example is taken from the sample parser file BipSampPluginParser.c:
void cpiNextParserClassName(
CciParser* parser,
CciContext* context,
CciChar* buffer,
int size
){
PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
int rc = 0;
if (pc->trace) {
fprintf(pc->tracefile, "PLUGIN: -> cpiNextParserClassName() parser=0x%x context=0x%x\n",
parser, context);
fflush(pc->tracefile);
}
/* Copy the name to the integration node */
CciCharNCpy(buffer, pc->iNextParserClassName, size);
if (pc->trace) {
fprintf(pc->tracefile, "PLUGIN: <- cpiNextParserClassName()\n");
fflush(pc->tracefile);
}
return;
}