vb.net - Sending an array of string to a WSDL Endpoint? -
i'm trying connect webservice. documentation (or lack of) here:
http://portal.smartertools.com/services2/
http://portal.smartertools.com/services2/svctickets.asmx
i'm attempting call getticketsbysearch. args searchcriteria string() , says "a list of 'key=value' pairs indicate search parameters. search custom fields, pass in id of field key , search term value (ie: 1 = 'value')
my code:
dim args new st.arrayofstring args.add("isopen='true'") dim callwebservice new st.svcticketssoapclient dim sgetvalue st.ticketinfoarrayresult = callwebservice.getticketsbysearch(username, password, args)
i can't results return. ive tried passing in string many different ways. ie: 'isopen='true; 'isopen'='true' etc...
hopefully else runs specific problem.
- the user account accessing smartertools endpoint must have role of 'agent' assigned. if assigned administrator role or manager role not work. silly on part agent role requires using license, in effect need use license access web service.
- if user account has no permissions, not error, no results.
- the correct formatting no ' example: isopen=true
you can not description or "body" of ticket gettickets. documentation incorrect. can use code sample below body.
'// loop through ticket results, or similar dim _ticket st.ticketinfo _ticket = ctype(e.item.dataitem, st.ticketinfo) dim callwebservice new st.svcticketssoapclient dim sgetvalue st.ticketpartinfoarrayresult = callwebservice.getticketconversationpartlist(username, password, _ticket.id.tostring()) '// grab first, if need each p in sgetvalue.parts.tolist() dim pval st.ticketmessagebodyresult = callwebservice.getticketmessageplaintext(username, password, p.partid) result(pval.messagebody) next
Comments
Post a Comment