Polarion Web Service: C#.NET -> dll -> VBA = type mismatch!

Posts: 8
Joined: Thu Jun 24, 2010 7:46 am

Polarion Web Service: C#.NET -> dll -> VBA = type mismatch!

Postby bt_roke » Thu Jun 24, 2010 8:13 am

Hello all

What we need to to is, to access the Polarion Web Service from a MS Access VBA application.

We where able to

  • generate C# .NET code from the XML interface description (wsdl) in Visual Studio C# 2008 Express Edition
  • generate a dll in Visual Studio C# 2008 Express Edition
  • make the dll a COM component and register it to the Windows system (PolarionWS)
  • include the PolarionWS COM component in MS Word
  • connect to the Polarion server
  • log into the Polarion server
  • Request the getOneDayLength from the Polarion server
    (Dim oneDayLength As Long
    oneDayLength = trackerService.getOneDayLength

What now causes a "Type mismatch" error 13 is

  • all call to methods that return a array of class objects
    (which is the majority of the methods e.g.
    Dim timePoints() As PolarionWS.TimePoint
    timePoints = trackerService.getTimepoints("myProject")

Not assigning the trackerService.getTimepoints("myProject") to the timePoints variable does not cause the error. Checking with WireShark shows, that the data gets transmitted between the apps.

In C# .NET the methode looks as follows:

/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace="http://ws.polarion.com/TrackerWebService-impl", ResponseNamespace="http://ws.polarion.com/TrackerWebService-impl", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute("getTimepointsReturn")]
public TimePoint[] getTimepoints(string projectId) {
object[] results = this.Invoke("getTimepoints", new object[] {
return ((TimePoint[])(results[0]));

Has anyone experience with complex data types, COM components between .NET and VBA and can help out?



Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 25 guests