{"action":"created","issue":{"url":"https://api.github.com/repos/intuit/karate/issues/48","repository_url":"https://api.github.com/repos/intuit/karate","labels_url":"https://api.github.com/repos/intuit/karate/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/intuit/karate/issues/48/comments","events_url":"https://api.github.com/repos/intuit/karate/issues/48/events","html_url":"https://github.com/intuit/karate/issues/48","id":224220996,"number":48,"title":"XML request templating","user":{"login":"venkatesgopi","id":4231931,"avatar_url":"https://avatars1.githubusercontent.com/u/4231931?v=3","gravatar_id":"","url":"https://api.github.com/users/venkatesgopi","html_url":"https://github.com/venkatesgopi","followers_url":"https://api.github.com/users/venkatesgopi/followers","following_url":"https://api.github.com/users/venkatesgopi/following{/other_user}","gists_url":"https://api.github.com/users/venkatesgopi/gists{/gist_id}","starred_url":"https://api.github.com/users/venkatesgopi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/venkatesgopi/subscriptions","organizations_url":"https://api.github.com/users/venkatesgopi/orgs","repos_url":"https://api.github.com/users/venkatesgopi/repos","events_url":"https://api.github.com/users/venkatesgopi/events{/privacy}","received_events_url":"https://api.github.com/users/venkatesgopi/received_events","type":"User","site_admin":false},"labels":[{"id":534240660,"url":"https://api.github.com/repos/intuit/karate/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"ptrthomas","id":915480,"avatar_url":"https://avatars3.githubusercontent.com/u/915480?v=3","gravatar_id":"","url":"https://api.github.com/users/ptrthomas","html_url":"https://github.com/ptrthomas","followers_url":"https://api.github.com/users/ptrthomas/followers","following_url":"https://api.github.com/users/ptrthomas/following{/other_user}","gists_url":"https://api.github.com/users/ptrthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/ptrthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptrthomas/subscriptions","organizations_url":"https://api.github.com/users/ptrthomas/orgs","repos_url":"https://api.github.com/users/ptrthomas/repos","events_url":"https://api.github.com/users/ptrthomas/events{/privacy}","received_events_url":"https://api.github.com/users/ptrthomas/received_events","type":"User","site_admin":false},"assignees":[{"login":"ptrthomas","id":915480,"avatar_url":"https://avatars3.githubusercontent.com/u/915480?v=3","gravatar_id":"","url":"https://api.github.com/users/ptrthomas","html_url":"https://github.com/ptrthomas","followers_url":"https://api.github.com/users/ptrthomas/followers","following_url":"https://api.github.com/users/ptrthomas/following{/other_user}","gists_url":"https://api.github.com/users/ptrthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/ptrthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptrthomas/subscriptions","organizations_url":"https://api.github.com/users/ptrthomas/orgs","repos_url":"https://api.github.com/users/ptrthomas/repos","events_url":"https://api.github.com/users/ptrthomas/events{/privacy}","received_events_url":"https://api.github.com/users/ptrthomas/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-04-25T17:54:01Z","updated_at":"2017-04-25T18:25:00Z","closed_at":null,"body":"Do you have any option for SOAP XML request template and reusing example table\r\nIn the below example there are two place holders one for filling firstName and lastname \r\ni will define EXAMPLE table with firstName and lastName alone but i dont define AGE in that case AGE tag should be get removed.\r\n\r\nSample\r\nXML request format\r\n```\r\n<query>\r\n<name>\r\n<firstname>${firstName}</firstname>\r\n<lastname>${lastName}</lastname>\r\n</name>\r\n<age>${age}</age>\r\n</query>\r\n```\r\n\r\nCould you please provide solution for this scenario"},"comment":{"url":"https://api.github.com/repos/intuit/karate/issues/comments/297121875","html_url":"https://github.com/intuit/karate/issues/48#issuecomment-297121875","issue_url":"https://api.github.com/repos/intuit/karate/issues/48","id":297121875,"user":{"login":"ptrthomas","id":915480,"avatar_url":"https://avatars3.githubusercontent.com/u/915480?v=3","gravatar_id":"","url":"https://api.github.com/users/ptrthomas","html_url":"https://github.com/ptrthomas","followers_url":"https://api.github.com/users/ptrthomas/followers","following_url":"https://api.github.com/users/ptrthomas/following{/other_user}","gists_url":"https://api.github.com/users/ptrthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/ptrthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptrthomas/subscriptions","organizations_url":"https://api.github.com/users/ptrthomas/orgs","repos_url":"https://api.github.com/users/ptrthomas/repos","events_url":"https://api.github.com/users/ptrthomas/events{/privacy}","received_events_url":"https://api.github.com/users/ptrthomas/received_events","type":"User","site_admin":false},"created_at":"2017-04-25T18:25:00Z","updated_at":"2017-04-25T18:25:00Z","body":"That is a great question and for the time being I don't have a great solution for the conditional age tag other than using a JavaScript function, but I see a gap where manipulating XML inside JS may not be supported fully yet.\r\n\r\nThe way Karate is designed, you can certainly achieve this if you call some Java code. Take a look at Java interop. Meanwhile I will consider this as a feature request.\r\n\r\nHope you are aware that XML templating works exactly like JSON where any element (or attribute) values in the #() form will evaluate expressions within the brackets."}}
{"actor":{"display_login":"ptrthomas"}}