Artifact [c9995ace97]
Not logged in

Artifact c9995ace9721ec36592f7f75047a228029db29522d8329a22ce37f2d87d78c14:

Ticket change [c9995ace97] - New ticket [7c2ae385da] Use XSD file. by oehhar 2018-09-03 18:01:55.
D 2018-09-03T18:01:55.330
J assigned_to unassigned
J comment In\san\sE-Mail\sexchange\sfrom\sGerald\sand\sAndy,\sthere\sis\sthe\sdiscussion\sbelow.\r\n\r\nAndy\sstarted\sbranch\s[soap-header]\swith\scommit\s[ecbb5e058a].\r\n\r\n<verbatim>\r\n\r\nAndy,\r\n\r\nAn\sXSD\sis\snot\sa\sWSDL.\r\n\r\nThe\sroutine\sproc\s::WS::Client::parseTypes\sneed\sto\sbe\swrapped\sand\sexposed.\s\sI'd\sthink\ssomething\slike:\r\n\r\n\s\s\s\s::WS::Client::addTypes\sserviceName\sXSD_URL\r\n\r\nI\shope\sthis\sgives\syou\ssomething\sto\sgo\soff\sof,\sI'm\ssorry\sI\scan't\sspare\smore\stime\sright\snow.\s\sIf\sthings\sdon't\swork,\scould\smaybe\sgive\sa\slittle\sbit\sof\strace\sor\sdebug\sinfo\sso\sI\scan\slook\sat\sit.\r\n\r\n\r\nOn\s07/21/2018\s12:31\sPM,\sAndy\sGoth\swrote:\r\n>\sOn\s07/20/18\s10:09,\sAndy\sGoth\swrote:\r\n>>\s%\sWS::Client::GetAndParseWsdl\shttps://coverity.labs.quest.com/ws/v9/configurationservice?wsdl\r\n>\r\n>\sOn\s07/20/18\s16:34,\sGerald\sLester\swrote:\r\n>>\sWay\sto\sgo\sAndy!\r\n>\r\n>\sThanks,\sgood\sto\shear\sfrom\syou.\s:^)\r\n>\r\n>\sNow\sI'm\strying\sto\swork\sout\show\sto\sactually\smake\suse\sof\sCoverity\sservices.\s\sThe\sresponse\sis\s401\sunless\sI\sauthenticate\smyself\sby\smeans\sof\san\sextra\sSOAP\sheader.\s\sHow\sdo\sI\sadd\sheaders?\s\sI\ssee\s[WS::Client::AddInputHeader],\sbut\sit\sfails,\sand\sI'm\sguessing\sit's\sbecause\sI\sdon't\salso\sdefine\sthe\stypes\sthat\sgo\salong\swith\sit.\s\sSo\show\sdo\sI\sdefine\sthe\stypes?\r\n>\r\n>\sI\stried\sthe\sfollowing:\r\n>\r\n>\s%\sWS::Client::GetAndParseWsdl\shttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\r\n>\r\n>\s(that\sbeing\sthe\sxsd\sfile\sassociated\swith\sthe\sheader;\spardon\smy\slack\sof\sproper\sterminology)\r\n>\r\n>\sBut\sthat\sgives\sme\sthe\serror:\s"WSDL\sdoes\snot\sdefine\sany\sservices"\r\n>\r\n>\sHere's\san\sextract\sfrom\sworking\sPerl\scode.\s\sHow\sdo\sI\sget\ssimilar\sfunctionality\swith\stclws?\r\n>\r\n>\s#\sWs::Auth\s--\r\n>\s#\sCreates\sa\sCoverity\sWeb\sServices\sauthentication\sobject\sand\sreturns\sits\r\n>\s#\sreference.\r\n>\ssub\sAuth\s(_)\s{\r\n>\s\s\s\s\smy\s(%doc,\s$auth);\r\n>\r\n>\s\s\s\s\s#\sLoad\skey\sfile.\r\n>\s\s\s\s\s%doc\s=\s%{JSON::Tiny::decode_json\sFile::Read\sshift};\r\n>\r\n>\s\s\s\s\s#\sCreate\sand\sreturn\sauthentication\sobject.\r\n>\s\s\s\s\s$auth\s=\sSOAP::Header->new(name\s=>\s"wsse:Security");\r\n>\s\s\s\s\s$auth->attr({"xmlns:wsse"\s=>\s"http://docs.oasis-open.org/wss/2004/01/"\r\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s.\s"oasis-200401-wss-wssecurity-secext-1.0.xsd"});\r\n>\s\s\s\s\s$auth->mustUnderstand(1);\r\n>\s\s\s\s\s$auth->value(\\SOAP::Data->value(\r\n>\r\n>\sSOAP::Data->name("wsse:UsernameToken")->value(\\SOAP::Data->value(\r\n>\sSOAP::Data->name("wsse:Username")->value($doc{username}),\r\n>\sSOAP::Data->name("wsse:Password")->value($doc{key})))));\r\n>\s\s\s\s\s$auth;\r\n>\s}\r\n>\r\n>\s#\sWs::Proxy\s--\r\n>\s#\sCreates\sa\sCoverity\sWeb\sServices\sproxy\sobject\sand\sreturns\sits\sreference.\r\n>\ssub\sProxy\s($$$)\s{\r\n>\s\s\s\s\smy\s($uri,\s$api,\s$service)\s=\s@_;\r\n>\s\s\s\s\smy\s$proxy\s=\sSOAP::Lite->proxy("$uri/ws/$api/$service")\r\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s->uri("http://ws.coverity.com/$api");\r\n>\s\s\s\s\s$proxy->transport->timeout(1000);\r\n>\s$proxy->serializer->register_ns("http://ws.coverity.com/$api",\s"ws");\r\n>\s\s\s\s\s$proxy->autotype(0);\r\n>\s\s\s\s\s$proxy;\r\n>\s}\r\n>\r\n>\s#\sWs::Call\s--\r\n>\s#\sPerforms\sa\sCoverity\sWeb\sServices\scall\sand\sreturns\sa\sreference\sto\sthe\sresult.\r\n>\ssub\sCall\s($$$$)\s{\r\n>\s\s\s\s\smy\s($auth,\s$proxy,\s$method,\s$params)\s=\s@_;\r\n>\s\s\s\s\smy\s(@paramList,\s$response);\r\n>\r\n>\s\s\s\s\s#\sBuild\sparameter\slist.\r\n>\s\s\s\s\sfor\s(keys\s%$params)\s{\r\n>\s\s\s\s\s\s\s\s\spush\s@paramList,\sSOAP::Data->name($_)->value($params->{$_});\r\n>\s\s\s\s\s}\r\n>\r\n>\s\s\s\s\s#\sPerform\scall.\r\n>\s\s\s\s\s$response\s=\s$proxy->call(\r\n>\s\s\s\s\s\s\s\s\s\s\s\s\sSOAP::Data->name("ws:$method")\s=>\s@paramList,\s$auth);\r\n>\r\n>\s\s\s\s\s#\sReport\sfailure.\r\n>\s\s\s\s\sif\s($response->fault())\s{\r\n>\s\s\s\s\s\s\s\s\sdie\s"Web\sServices\sAPI\smethod\s$method\sreturned\serror\s",\r\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s$response->fault()->{faultcode},\s":\s",\r\n>\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s$response->fault()->{faultstring},\s"\\n";\r\n>\s\s\s\s\s}\r\n>\r\n>\s\s\s\s\s#\sReturn\sall\sSOAP\sresponse\sparameters,\sincluding\sthe\sresult\sentity\sitself,\r\n>\s\s\s\s\s#\sas\sone\shash\sreference.\r\n>\s\s\s\s\s$response->paramsall;\r\n>\s}\r\n>\r\n>\s#\sCreate\sCoverity\sWeb\sService\sAPI\sconnection\sobjects.\r\n>\smy\s$auth\s=\sWs::Auth\s$keyFile;\r\n>\smy\s$configProxy\s=\sWs::Proxy\s"http://$host:$port",\s"v9",\s"configurationservice";\r\n>\smy\s$defectProxy\s=\sWs::Proxy\s"http://$host:$port",\s"v9",\s"defectservice";\r\n>\r\n>\s#\sGet\sthe\sproject/stream/triage\sstore\smap.\r\n>\ssay\s"Getting\sglobal\sstream\slist";\r\n>\smy\s@streams\s=\smap\s{{\r\n>\s\s\s\s\sproject\s=>\s$_->{primaryProjectId}{name},\r\n>\s\s\s\s\sstream\s\s=>\s$_->{id}{name},\r\n>\s\s\s\s\striage\s\s=>\s$_->{triageStoreId}{name}\r\n>\s}}\sWs::Call\s$auth,\s$configProxy,\s"getStreams",\s{filterSpec\s=>\s{}};\r\n>\r\n>\s(Note:\sI'm\snot\sactually\susing\sthe\sserver\sI\slinked\sto\sin\smy\soriginal\spost,\srather\sa\sprivate\sserver.\s\sI\sjust\spointed\sto\sit\sso\syou\scould\ssee\sthe\sWSDL.)\r\n>\r\n</verbatim>
J foundin 2.6.0
J private_contact 0f366eb3e9e2fcab52b8ebacd197db9047186a5f
J severity Critical
J status Open
J subsystem Client_Side
J title Use\sXSD\sfile
J type Feature_Request
K 7c2ae385da5f379963cd8d2c6b9bc48eb221cca9
U oehhar
Z c80b649f6c9a1339ea09424cabde9dbc