โ10-17-2020 09:30 AM
Iโm struggling with what the soap execute is doing based on the contents of the generated soap template and apache velocity statements therein. Apologies in advance for any dumb questions, still new to this and my first crack at the apache veloicty statements.
Some of this may be rubber ducking, but Iโll post any answers I find. Here goes:
Q2. Answered/ Can I hard code values? (or do I need to do all that in the mapper) For example, the type and value here:
<ns0:ID ns0:type=โStudent_Course_Section_IDโ>COURSE_SECTION_AAS202-01201201</ns0:ID> ANSWER: YES
Q4. Answered Could I just write out a complete xml with all data elements and put it in the template, submit the soap and have it work with no mapper? ANSWER: YES, I tested this and was able to hardcode all values and submit without an issue for a simple get web service.
Q5. Can I use a new created variable from the mapper, instead of what comes in from the schema. For example $MyVar instead of the mapped ANSWER: YES
Solved! Go to Solution.
โ10-20-2020 08:18 AM
@acesario, take a look at the XML Generator snap. Paste your XML + Velocity in its Edit XML template, create an input view, and feed your Mapper into the XML Generator. It will output your XML as a string value to the $xml key.
โ10-20-2020 08:35 PM
@del, thanks for the reply and good idea! I wouldnโt have thought to use the xml generator like that. Very good sir!
โ10-28-2020 09:54 AM
@tk421_cogenics , are you required to add a schema to the xml generator? or just the template?
โ10-28-2020 09:56 AM
Here is an error I get from the xml generator:
error":โAn error occurred while parsing the request documentโ
โstacktraceโ:
"com.snaplogic.api.ExecutionException: An error occurred while parsing the request document\n\tat com.snaplogic.snap.api.xml.XmlUtilsImpl.stripNodeAndAttributeNodesWithNullablesOld(XmlUtilsImpl.java:577)\n\tat com.snaplogic.snap.api.xml.XmlUtilsImpl.stripNodeAndAttributeNodes(XmlUtilsImpl.java:489)\n\tat com.snaplogic.snaps.tra
lineNumber: 8; columnNumber: 310; The reference to entity โterm_id-1โ must end with the โ;โ
โreasonโ:
โThe reference to entity โterm_id-1โ must end with the โ;โ delimiter.โ
โresolutionโ:
โPlease verify the validity of the XML documentโ
"
โ10-28-2020 09:59 AM
Oh, ther is an & after term id. No worries.
โ11-03-2020 10:43 AM
No schema required - just a template.