• Article for your preferred language does not exist. Below is international version of the article.

Article ID: 111516, created on Jun 23, 2011, last review on Apr 30, 2015

  • Applies to:
  • Operations Automation

Resolution

MOSI Gateway does work as an IIS web application on the Office 365 Gateway Host.

The Verbose log of MOSI Gateway operations may be enabled in the file web.config of the web application. Open this file in any text editor and un-comment the <system.diagnostics> section, which is commented by default. Here is the default content of this section:

  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel.MessageLogging" switchValue="Verbose,ActivityTracing">
        <listeners>
          <add type="System.Diagnostics.DefaultTraceListener" name="Default">
            <filter type=""/>
          </add>
          <add name="ServiceModelMessageLoggingListener">
            <filter type=""/>
          </add>
        </listeners>
      </source>
      <source name="System.ServiceModel" switchValue="Verbose,ActivityTracing" propagateActivity="true">
        <listeners>
          <add type="System.Diagnostics.DefaultTraceListener" name="Default">
            <filter type=""/>
          </add>
          <add name="ServiceModelTraceListener">
            <filter type=""/>
          </add>
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add initializeData="c:\inetpub\wwwroot\BPOS\App_Data\web_messages.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
        <filter type=""/>
      </add>
      <add initializeData="c:\inetpub\wwwroot\BPOS\App_Data\web_tracelog.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
        <filter type=""/>
      </add>
    </sharedListeners>
    <trace autoflush="true"/>
  </system.diagnostics>


Do not forget to check and modify the path if needed to debug logs. Default values are:
  • c:\inetpub\wwwroot\BPOS\App_Data\web_messages.svclog
  • c:\inetpub\wwwroot\BPOS\App_Data\web_tracelog.svclog

After the section <system.diagnostics> is un-commented, MOSI Gateway will log all XML requests/responses in corresponding log files configured in web.config.

One may use Service Trace Viewer Tool (SvcTraceViewer.exe) for convenient trace log analysis, it is a part of Microsoft Windows SDK which may be downloaded by this link http://msdn.microsoft.com/en-us/windows/bb980924.aspx.

Refer to the article http://msdn.microsoft.com/en-us/library/ms732023.aspx for additional information about Service Trace Viewer Tool.

Example of XML request

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
<EventID>0</EventID>
<Type>3</Type>
<SubType Name="Information">0</SubType>
<Level>8</Level>
<TimeCreated SystemTime="2011-09-13T11:00:10.7188369Z"/>
<Source Name="System.ServiceModel.MessageLogging"/>
<Correlation ActivityID="{dd874655-5870-4946-a7cc-b1727fe9e85b}"/>
<Execution ProcessName="w3wp" ProcessID="2912" ThreadID="13"/>
<Channel/>
<Computer>BPOS-TEST</Computer>
</System>
<ApplicationData>
<TraceData>
<DataItem>
<MessageLogTraceRecord xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace" Time="2011-09-13T15:00:10.7188369+04:00" Source="TransportSend" Type="System.ServiceModel.Security.SecurityAppliedMessage">
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.microsoftonline.com/MOSI/1/0/action/PlaceOrder</a:Action>
<a:MessageID>urn:uuid:52bfdc47-c0cc-4423-af6d-5d2804750b96</a:MessageID>
<ActivityId xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics" CorrelationId="9db42b30-f682-423e-8e15-1bdd050f02b0">dd874655-5870-4946-a7cc-b1727fe9e85b</ActivityId>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1" u:Id="_1">https://mosi-preview.ccsctp.com/Syndication/OrderManagement.svc</a:To>
<o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
<u:Timestamp u:Id="_0">
<u:Created>2011-09-13T11:00:10.687Z</u:Created>
<u:Expires>2011-09-13T11:05:10.687Z</u:Expires>
</u:Timestamp>
<o:BinarySecurityToken>
<!--Removed-->
</o:BinarySecurityToken>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#_0">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>uLpP512u1i0hE/ETmvorKQT/ZhA=</DigestValue>
</Reference>
<Reference URI="#_1">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>EG259smv7rcvveJj2JTaV5zvlTI=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>dqk1OA66qfDfR6VMhRB3+PE72r2HNeeahWSxXd70F9DI8gXIHJECe9T3At5y7m8YtDghgTdhOwRKA9fSchfQx9ysUwVNYuB34xkwmxvo5zpqMxFoPmD91GIB4C9mL7X+cGHNN+H9DrekbORi0F+4Z3IxVjnlQDY5+jTcwY8k5k41YCzdBDNF39vUIuz5cg8hsXopr9cC+IHGz3qH2cHhT20EIR20SfodUwS3sH122o/ahHz/Rui11yYjXgr1cg5dC15vjaeKV/bXTUEFZoVrJntMAG3Zm9y+pcBw8txhDLnpJJHny8zIl2KdH7Je/MPx8BiIcpCV4TCQhh1JfQ11Ow==</SignatureValue>
<KeyInfo>
<o:SecurityTokenReference>
<o:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-341ccc16-1809-474a-9f84-7b9baa7aa4d0-69"/>
</o:SecurityTokenReference>
</KeyInfo>
</Signature>
</o:Security>
</s:Header>
<s:Body>
<PlaceOrder xmlns="http://www.microsoftonline.com/MOSI/1/0/service/">
<request xmlns:b="http://www.microsoftonline.com/MOSI/1/0/messages/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:CustomerId>c6bffcbd-eb46-4e86-825f-60a27c69f39b</b:CustomerId>
<b:OfferId>A22620C4-C3E9-48fb-BB51-872DEE1BF8D7</b:OfferId>
<b:PartnerId>0</b:PartnerId>
<b:Quantity>1</b:Quantity>
<b:RelatedSubscription i:nil="true"/>
<b:RequestId>6b61ad46-a63c-4e90-ab40-834ad8a08224</b:RequestId>
<b:SubscriptionId>2a91def7-d3f8-4620-8f12-e970ecd2d8d4</b:SubscriptionId>
</request>
</PlaceOrder>
</s:Body>
</s:Envelope>
</MessageLogTraceRecord>
</DataItem>
</TraceData>
</ApplicationData>
</E2ETraceEvent>

Example of XML reply

<?xml version="1.0"?>
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
<EventID>0</EventID>
<Type>3</Type>
<SubType Name="Information">0</SubType>
<Level>8</Level>
<TimeCreated SystemTime="2011-09-13T11:00:11.3116379Z"/>
<Source Name="System.ServiceModel.MessageLogging"/>
<Correlation ActivityID="{dd874655-5870-4946-a7cc-b1727fe9e85b}"/>
<Execution ProcessName="w3wp" ProcessID="2912" ThreadID="13"/>
<Channel/>
<Computer>BPOS-TEST</Computer>
</System>
<ApplicationData>
<TraceData>
<DataItem>
<MessageLogTraceRecord xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace" Time="2011-09-13T15:00:11.3116379+04:00" Source="TransportReceive" Type="System.ServiceModel.Channels.BufferedMessage">
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.microsoftonline.com/MOSI/1/0/action/PlaceOrderResponse</a:Action>
<ActivityId xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics" CorrelationId="478fab1f-f586-4dcb-86f7-629f881ac8ab">dd874655-5870-4946-a7cc-b1727fe9e85b</ActivityId>
<a:RelatesTo>urn:uuid:52bfdc47-c0cc-4423-af6d-5d2804750b96</a:RelatesTo>
<o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
<u:Timestamp u:Id="_0">
<u:Created>2011-09-13T11:00:16.534Z</u:Created>
<u:Expires>2011-09-13T11:05:16.534Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<PlaceOrderResponse xmlns="http://www.microsoftonline.com/MOSI/1/0/service/"/>
</s:Body>
</s:Envelope>
</MessageLogTraceRecord>
</DataItem>
</TraceData>
</ApplicationData>
</E2ETraceEvent>

See Also

Starting from Service Automation Office 365 Integration 2.2, you may use the Office 365 Gateway log files placed on the Office 365 Gateway Host (O365GH) in the OFFICE365GATEWAY_DIR\APP_Data\XMLPayload directory, where OFFICE365GATEWAY_DIR is the directory of the Office 365 Gateway.

There are the following log files:

  • Customer-CustomerId, where CustomerId is a globally unique identifier (GUID) of a customer in the Microsoft cloud. These log files contain XML data of calls to the Microsoft cloud.
  • Callbacks. This log file contains XML data of callbacks from the Microsoft cloud to the Office 365 Gateway.

Note: If a call to the Microsoft cloud is failed, the XML request and XML response are also shown in the appropriate task log in Operations Automation.

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF