This content is now out of date.

Visit Our Community

CommunicationException using Asp.Net with Jax webservices


I have an ASP.Net MVC application that I'm trying to integrate with YellowFin 7.1. Following advice from other posts I'm attempting to use the "JAX ;)" web services. I've enabled them on my YellowFin installation, and created C# Stubs[1].

When I try and run my code I receive a CommunicationException:

System.ServiceModel.CommunicationException was unhandled by user code
Message=There was an error in serializing body of message remoteReportCallRequest: 'Unable to generate a temporary class (result=1).
error CS0030: Cannot convert type 'string[]' to 'string'
error CS0029: Cannot implicitly convert type 'string' to 'string[]'
'. Please see InnerException for more details.

(I've cut out the stack trace as it didn't appear to reveal anything interesting)

My Code looks like:
var request = new reportServiceRequest();
request.loginId = "";
request.password = "XXXXXX";
request.orgId = 1;

request.reportRequest = "XLS";
request.reportId = reportId;

var service = new LegacyReportServiceClient();
var response = service.remoteReportCall(request); // <-- exception occurs here


Where reportId is a parameter value.

* Any ideas?

[1] >svcutil http://locvalhost:8080/webservices/LegacyReportService?wsdl

I might have solved this one. It looks like the generated stub for reportServiceResponse may not be quite right. I changed the Serialisation attributes for the "results" property to be:

[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = true, Order = 46)]
[System.Xml.Serialization.XmlArrayItemAttribute("dataValue", typeof(string[]), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string[][] results
get { return this.resultsField;}
set { this.resultsField = value; }


Note the change is to the typeof() declaration in the XmlArrayItemAttribute. It was previously typeof(string)
I am new to Yellowfin,where do I put the References stub in my project.I have it under references but the stub does not et automatically updated when I make changes to my xsd

I use Visual Studio 2012.

Hi Tshepiso,

Unfortunately we don't actually know how Visual Studio is reading the stub.
You will need to refer to Visual Studio documentation or help for further assistance.

Really sorry we could not answer this for you.


Thanks for trying Yellowfin

Please complete the form below to request your copy of Yellowfin today.