Object reference not set to an instance

May 14, 2013 at 6:34 PM
Hi,
I am using WCF Loadtest for generating the code from the WCF message log file. But the problem is if I select all the calls captured and then provide the proxy assembly, it does not generate the code.
It gives error like "Object reference not set to an instance". But if I take out 2 calls from the list of calls by unchecking the checkboxes beside it, then provide the same proxy assembly. It generates the code. The code also works fine. But we need to generate the left out calls as well.
How can we do that? Can anybody help in this case?
Coordinator
May 15, 2013 at 7:58 AM
Can you give me some details about the calls that are failing?

Thanks

Rob
May 15, 2013 at 11:27 AM
Hi Rob,

Thanks a lot for the reply. Actually in this case all the endpoints are using NetTcpBinding. We have all the enpoint listed in the client configuration file with the binding configuration and behavior configuration in it. I am able to see all the call details and their response in the message log file. Even I am getting the call details for the 2 calls which are not getting generated. I have only one proxy assembly(dll) which is having all the proxies. When I am creating C# script by providing this assembly, it generates code for other calls and adding this dll under the reference node of the solution. I am able to create the proxy client for the particular service by hand and through the proxy client I am able to see the call which is not getting generated by the tool. From the log I am able to see that a lot of things are passed to this call. So creating this call by hand would be very difficult.

The call looks like below one.

<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="2013-05-14T10:17:37.2283235Z" />
<Source Name="System.ServiceModel.MessageLogging" />
<Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
<Execution ProcessName="SomeClient-UAT" ProcessID="5256" ThreadID="8" />
<Channel />
<Computer>Some Computer</Computer>
</System>
<ApplicationData>
<TraceData>
<DataItem>
<MessageLogTraceRecord Time="2013-05-14T18:17:37.2283235+08:00" Source="ServiceLevelSendRequest" Type="System.ServiceModel.Dispatcher.OperationFormatter+OperationFormatterMessage" xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<a:Action s:mustUnderstand="1">http://tempuri.org/IExposure/MyMethod>
<a:MessageID>urn:uuid:316e589b-1e74-4f40-aacb-2133a1784f14</a:MessageID>
<a:ReplyTo>
<a:Address>
http://www.w3.org/2005/08/addressing/anonymous>
</a:ReplyTo>
<CUSTOM_HEADER xmlns="com.SomeClient">
<CUSTOM_HEADER xmlns="Key"><?xml version="1.0" encoding="utf-16"?>
<CustomHeaderData xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UserID>12345</UserID>
<SessionID>5d360ba4-cbf7-429a-b5ef-e68307d6f1ac</SessionID>
<IsValidSession>false</IsValidSession>
<IsSessionExists>false</IsSessionExists>
<IsSessionTimedOut>false</IsSessionTimedOut>
</CustomHeaderData></CUSTOM_HEADER>
</CUSTOM_HEADER>
</s:Header>
<s:Body>
</Body>
</s:Envelope>
</MessageLogTraceRecord>
</DataItem>
</TraceData>
</ApplicationData>
</E2ETraceEvent>

Please note that I had to skip the body part of this call since it is very big, and this forum is not supporting this many characters.
Coordinator
May 15, 2013 at 11:40 AM
I think it would help to see the signatures of the problem calls, including any types referenced if possible.

Regards

Rob