Hi,
Back from holiday, In reaction of your questions:
Key differences:
1) I do not set the TenantID property. You aren't in a multi-tenant environment (nobody is at this time). --> removed no result
2) I do not re-include the username/password into the objAuth instance, I store only the session ID in it. Whilst not necessarily critical, it might save on unnecessary additional sessions being created. --> removed no result
3) I didn't use 'transaction write' since my system wasn't ready to receive that request, so I went with a 'project read' test instead.
Things to check:
1) Does your XOG user have permissions to call transaction XOG actions? E.g. "Transaction - XOG Access" rights? --> All rights, so no issues regarding authorisation
2) What was the contents of your soapMessage variable, and did this content work directly with the XOG client using the same username/password? --> via cmd line no issues, with same soapMessage, got the xogoutput back.
3) How about with a tool like SoapUI, and if so, what was the full response received from the WriteTransaction call? --> works fine via SOAP UI get a result back.
4) Is the SOAP endpoint address defined correctly when you go to http[s]://yourserver[:port]/niku/wsdl/Object/AllObjects and does it correctly look like http[s]://yourserver[:port]/niku/xog ? --> yes, it works all fine only no xogOutput.
Regarding Reference, I got both working with service and web reference but both no XOGOutput. The transactions are xogged in but no output via Dotnet via otherways I get the output.
I Rebuild the example and the readworks, and the write for resources also:
{
String soapMessage = @"<NikuDataBus xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:noNamespaceSchemaLocation=""../xsd/nikuxog_read.xsd"">
<Header version=""6.0.11"" action=""read"" objectType=""project"" externalSource=""NIKU"">
<!-- you change the order by simply swap 1 and 2 number in the name attribute -->
<args name=""order_by_1"" value=""name""/>
<args name=""order_by_2"" value=""projectID""/>
<args name=""include_tasks"" value=""true""/>
<args name=""include_dependencies"" value=""true""/>
<args name=""include_subprojects"" value=""true""/>
<args name=""include_resources"" value=""true""/>
<args name=""include_baselines"" value=""true""/>
<args name=""include_allocations"" value=""true""/>
<args name=""include_estimates"" value=""true""/>
<args name=""include_actuals"" value=""true""/>
<args name=""include_custom"" value=""true""/>
<args name=""include_burdening"" value=""false""/>
</Header>
<Query>
<Filter name=""projectID"" criteria=""EQUALS"">cf1</Filter>
</Query>
</NikuDataBus>";
String soapMessage1 = @"<NikuDataBus xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:noNamespaceSchemaLocation=""../xsd/nikuxog_read.xsd"">
<Header version=""6.0.11"" action=""write"" objectType=""resource"" externalSource=""NIKU"">
</Header>
<Resources>
<Resource entityCode=""entity"" externalId="" "" includeInDatamart=""true"" isActive=""true"" isExternal=""false"" resourceId=""EXP_08"" resourceType=""EXPENSE"">
</Resource>
</Resources>
</NikuDataBus>";
XmlDocument doc = new XmlDocument();
doc.LoadXml(soapMessage1);
XOGALL.Auth objAuth = new XOGALL.Auth();
XOGALL.Login loginXOG = new XOGALL.Login();
loginXOG.Username = "admin";
loginXOG.Password = "admin";
XOGALL.AllObjectsPortClient tranReq = new XOGALL.AllObjectsPortClient();
objAuth.SessionID = tranReq.Login(loginXOG);
System.Console.WriteLine("Login session ID returned: " + objAuth.SessionID);
if (objAuth.SessionID != null && !objAuth.Equals(""))
{
XmlElement x = tranReq.WriteResource(objAuth, doc.DocumentElement);
System.Console.WriteLine(x.GetElementsByTagName("Statistics").Item(0).OuterXml);
try
{
tranReq.Logout(objAuth.SessionID);
}
catch (System.ServiceModel.ProtocolException e)
{
// Happens during logout since a valid http response was provided but none was expected
// Reference: http://stackoverflow.com/questions/643241/problem-with-wcf-client-calling-one-way-operation
}
}
}