[Midpoint-dev] Consuming the midPoint web service from C#

List User lists at pheaney.co.uk
Tue Sep 17 16:04:23 CEST 2013


Hi All,

We're in the process of developing a Active Directory password filter for
midPoint though are having a problem calling the web services interface
from C#.

We've imported the WSDL as a service definition and have successfully
authenticated to the service though when we call the searchObject method we
get the following exception:

System.ServiceModel.FaultException`1 was unhandled
  Message=Fault occurred while processing.
  Source=mscorlib
  StackTrace:
    Server stack trace:
       at
System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime
operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action,
Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[]
outs, TimeSpan timeout)
       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
MidPointClientSample.MidpointModelWebService.modelPortType.searchObjects(searchObjects
request)
       at MidPointClientSample.Program.searchUserByName(modelPortType
modelPort, String username) in
C:\Users\paulh.AD\Desktop\MidPointClientSample\MidPointClientSample\MidPointClientSample\Program.cs:line
89
       at MidPointClientSample.Program.Main(String[] args) in
C:\Users\paulh.AD\Desktop\MidPointClientSample\MidPointClientSample\MidPointClientSample\Program.cs:line
30
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly,
String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:



We've compared the SOAP request and response and its identical to that of
the Java sample client, which tells me midPoint is performing correctly
though  C# isn't properly interpreting the response.

I was wondering if anyone had attempted to use the web service from C#
before and had any success?

Regards
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolveum.com/pipermail/midpoint-dev/attachments/20130917/510b9926/attachment.html>


More information about the midPoint-dev mailing list