Jump to content
We've recently updated our Privacy Statement, available here ×

NET client unable to retrive data from the web services of JasperServer


abedeen

Recommended Posts

Hi All,

In C#

can i get a sample code in C#.

When we try to connect to Jasper Server using Webservice , It is connecting but unable to get the data.

I am using the following Code.

 hydwks10.ManagementServiceService ms = new WindowsApplication1.hydwks10.ManagementServiceService();
            System.Net.NetworkCredential c = new System.Net.NetworkCredential("asyed", "asyed");
            ms.Credentials = c;
            String s = String.Empty;
            s = "<?xml version="1.0" encoding="UTF-8"?><request operationName="runReport" locale="en"><argument  name="RUN_OUTPUT_FORMAT">RTF</argument><resourceDescriptor name="" wsType="" uriString="/reports/samples/AllAccounts" isNew="false"><label>null</label></resourceDescriptor></request>";
           
            String aaaa= ms.runReport(s);

 

I am getting the following Error:

 

Client found response content type of 'multipart/related; type="text/xml"; start="<526281C10048705BF36D4EDD463BAD62>";     boundary="----=_Part_5_32373432.1219990913144"', but expected 'text/xml'.
The request failed with the error message:
--

------=_Part_5_32373432.1219990913144
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <526281C10048705BF36D4EDD463BAD62>

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:runReportResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://axis2.ws.jasperserver.jaspersoft.com"><runReportReturn xsi:type="xsd:string"><?xml version="1.0" encoding="UTF-8"?>
<operationResult version="2.0.1">
    <returnCode><![CDATA[0]]></returnCode>
</operationResult>
</runReportReturn></ns1:runReportResponse></soapenv:Body></soapenv:Envelope>
------=_Part_5_32373432.1219990913144
Content-Type: application/rtf
Content-Transfer-Encoding: binary
Content-Id: <report>

{rtf1ansi

Link to comment
Share on other sites

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

Hi friend,

I got a by-Pass for .Net --> Jasper Server

 

Client[.Net(c#) -->Bridge.Net(Converts instructions of C# to Java)-->Jar(JVM)] ---> Jasper Server

 

If u wish i will send that .Net Application , Just provide me ur Email ID.

 

Regards,

s.z.abedeen

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

First Download the following C# Project in your machine

 

1.      Download http://www.codeproject.com/KB/dotnet/Espresso.aspx    ( This code will invoke java class)

2.      First test that the existing sample java file is working properly.(Try to run from .NET Studio)

3.      Then Implement your Senario in java, and call that methods from .NET

 

I am able to work with it.

 

Regards,

Abedeen.

Link to comment
Share on other sites

  • 1 year later...
  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...