Can't import operations using import wizard

Mar 3, 2009 at 4:59 AM
I have a client who is hosting a service on IIS 6.0 that has multiple methods that he is exposing and wants to import as operations into MSE. However whenever he tries to import only some of the operations are able to import successfully, and the others fail (this only after selecting one by one and determining which ones can succeed). I am attaching the error received in the event viewer when trying to import the operations having problems below:

Failed to create or load Operation [GetAccountSummary] due to error [Exception Information Type[NullReferenceException] Message[Object reference not set to an instance of an object.]

The interesting thing about this is that the operations that fail are accessible and work when using the MSE test client and a client application. The other interesting item to note about these operations is that they don't have any elements that the calling app would send (instead the service recognizes the user and passes back data based on the user id). Would the operations that don't have any elements be a problem or is there something else going on here.

Thanks for your help.
Mar 3, 2009 at 3:49 PM
You can try oading the WSDL from the file instead of the URI i.e. Save the WSDL to a file and then use the importer to load it from the that file. Let me know how it goes. Also can you post the WSDL to the DL if possible?
Mar 3, 2009 at 3:55 PM
If at all possible, it would also be interesting to try the import on the Feb 2009 release since there are a number of issues that were fixed with the wsdl importer.
Mar 3, 2009 at 4:20 PM
I should have mentioned it in the original post that tried to importing via the wsdl file and it didn't work. Will send you the WSDL for you to take a look at. Since this is on a local machine, we'll go ahead try importing with the new release of MSE. I'll let you know how it goes.
Mar 4, 2009 at 4:24 AM
Used the new version of MSE, and were able to successfully import the operations in. Now running into a problem when adding one of the operations to a runtime server we get an error stating "Error in InitializeRuntime: Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it." which was found in the mse_runtime.txt file. The developer who created this is developing in .NET 3.5 and using service model as the data contracts were auto generated. That said, we created a wsDualHttp binding to determine if this would resolve the issue but get an error when trying to hit the service using the service testing tool. The stack trace is below of the error we get:

Failed to load Metadata for Service Uri [http://localhost:8089/DNPService] due to Error [Exception Information Type[InvalidOperationException] Source[System.ServiceModel] Message[Metadata contains a reference that cannot be resolved: 'http://localhost:8089/DNPService'.] StackTrace[   at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)

   at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)

   at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)

   at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(EndpointAddress address)

   at Microsoft.MSE.Tools.MetadataLoader.Module.ServiceImporter.LoadServiceMetadata(Uri metadataUri, Boolean metaDataNeedCredentials, String metaDataUserId, SecureString metaDataPassword)]Exception Information Type[CommunicationException] Source[mscorlib] Message[The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.] StackTrace[

Server stack trace:

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)

   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)


Exception rethrown at [0]:

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at System.ServiceModel.Description.IMetadataExchange.Get(Message request)

   at System.ServiceModel.Description.MetadataExchangeClient.MetadataReferenceRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)

   at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)]]

I looked into the svc log for the MSE runtime but didn't see anything that was related to the exception, but the .txt says its listening at the uri.

Can you guys shed some light onto this?


Mar 5, 2009 at 4:41 PM
One more thing to shed some light on this, the operations in question don't have any input parameters. Essentially calling client will call in and the service will use the user name to retrieve data used for reports. There are two operations that behave that way that are causing the issue I mentioned. Could the lack of a parameter to pass in cause the problem.

Mar 5, 2009 at 9:38 PM
That should not be a problem. Just to confirm: which MSE CTP are you using June 2008 or Feb 2009?
Mar 5, 2009 at 9:39 PM
Using Feb 2009 release.