Forum Discussion
Use XML schema validation in XML parser with schema file provided.
In the XSD schema lets have the child elements defined with minOccurs=“0” as explicitly defined .
This will help you solve all the issues at all places.
“E1EXCHANGE_RATE”: {
“@SEGMENT”: “1”,
“LOG_SYSTEM”: “XXXXXXXX”,
“DEV_ALLOW”: “000”,
“E1ABCDEF_0”: [
{
“@SEGMENT”: “1”,
“RATE_TYPE”: “200*”
}
]
},
XSD:
<xs:element name=“E1ABCDEF_0” maxOccurs=“unbounded” minOccurs=“0”>
xs:complexType
xs:sequence
<xs:element type=“xs:string” name=“RATE_TYPE” minOccurs=“0”/>
When you trigger a pipeline with a POST, the body is passed into the pipeline as an input document. So you can’t pass pipeline parameters per se, but you can still parameterize the snap fields off of the input document.
You can pass the bearer token in the Authorization header to avoid passing that in the URI as well.
- dwhansen-cbg6 years agoContributor
Ohhh. The body is passed as a document. That would explain it. So the only way to pass in parameters is to pass them in the URI?
The only other option is to pass them through headers.
- dwhansen-cbg6 years agoContributor
Is there a benefit to using custom headers over URI parameters?
Not from SnapLogic’s point of view. I’d say it’s more of a API design choice. I guess one difference is that the JCC will log the URI (
jcc_access.log
), so if there were parameters you didn’t want logged out, it’d be better to use a header. Otherwise, I think it’s a matter of taste.