AnsweredAssumed Answered

PPM using wsdl soap with .net to write to an object

Question asked by JonathanTorres1355981 on Jan 16, 2019
Latest reply on Jan 25, 2019 by gcubed


 I'm trying to do a reference to wsdl using soap to write to an object (below example is projects). I tried looking at VB.NET SOAP Integration Sample for Ideas which was great. But if anyone else can provide examples as I'm not sure what to put in header and what values should go under it. Any help would be appreciated.

public Boolean LoadExecution()
ppm_objects.AllObjectsService ds = new ppm_objects.AllObjectsService();
ppm_objects.Login login = new ppm_objects.Login();
ppm_objects.Auth auth = new ppm_objects.Auth();
login.Username = Common.GetKeyValue("ppm_user");
login.Password = Common.GetKeyValue("ppm_pwd");
var sessionId = ds.Login(login);
if (!String.IsNullOrEmpty(sessionId))
auth.SessionID = sessionId;
ds.AuthValue = auth;
if (String.IsNullOrEmpty(sessionId))
{ //We didn't login for some reason
return false;
//XmlTypeMapping myTypeMapping =new SoapReflectionImporter().ImportTypeMapping(typeof(DepartmentsService));
//XmlSerializer mySerializer = new XmlSerializer(myTypeMapping);
XmlDocument request = new XmlDocument();
request.LoadXml(@"<NikuDataBus xmlns:xsi=""""
<Header action=""write"" externalSource=""NIKU"" objectType=""department"" version=""8.0""/>
<Department entity=""temp"">
<ColumnValue name=""partition_code"">NIKU.ROOT</ColumnValue>
<ColumnValue name=""partition_code"">NIKU.ROOT</ColumnValue>
<ColumnValue name=""partition_code"">NIKU.ROOT</ColumnValue>
<ColumnValue name=""partition_code"">NIKU.ROOT</ColumnValue>
<Child Department>
<ColumnValue name=""partition_code"">NIKU.ROOT</ColumnValue>
</Child Department>





catch (ProtocolException)


// ignore throw;


catch (Exception ex)


Common.WriteLog(String.Format("{0:MM/dd/yyyy HH:mm:ss}", DateTime.Now), Common.GetKeyValue("logpath"));
Common.WriteLog(ex.ToString(), Common.GetKeyValue("logpath"));


return true;