Problem Calling SSRS Web Service - Render Method (problem wi

Posted by tgagnon on 23-Jul-2013 12:46

Hello Everyone,

I am having trouble with a call to a Microsoft Reporting Services Web Service - calling the Render Method described below by the bprowsdldoc tool:

-------------------------------------

Render
No documentation found in WSDL.

Procedure prototype


PROCEDURE Render:
DEFINE INPUT PARAMETER Format1 AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER DeviceInfo AS CHARACTER NO-UNDO.
DEFINE OUTPUT PARAMETER Result AS RAW NO-UNDO.
DEFINE OUTPUT PARAMETER Extension AS CHARACTER NO-UNDO.
DEFINE OUTPUT PARAMETER MimeType AS CHARACTER NO-UNDO.
DEFINE OUTPUT PARAMETER Encoding AS CHARACTER NO-UNDO.
DEFINE OUTPUT PARAMETER DATASET FOR Warnings.
DEFINE OUTPUT PARAMETER StreamIds AS CHARACTER EXTENT NO-UNDO.
END PROCEDURE.

Example

DEFINE VARIABLE Format1 AS CHARACTER NO-UNDO.
DEFINE VARIABLE DeviceInfo AS CHARACTER NO-UNDO.
DEFINE VARIABLE Result AS RAW NO-UNDO.
DEFINE VARIABLE Extension AS CHARACTER NO-UNDO.
DEFINE VARIABLE MimeType AS CHARACTER NO-UNDO.
DEFINE VARIABLE Encoding AS CHARACTER NO-UNDO.

DEFINE TEMP-TABLE Warning NO-UNDO
NAMESPACE-URI 'URL removed'
FIELD Code AS CHARACTER
FIELD Severity AS CHARACTER
FIELD ObjectName AS CHARACTER
FIELD ObjectType AS CHARACTER
FIELD Message1 AS CHARACTER
XML-NODE-NAME "Message" .

DEFINE DATASET Warnings NAMESPACE-URI 'URL removed'
FOR Warning.
DEFINE VARIABLE StreamIds AS CHARACTER EXTENT NO-UNDO.


RUN Render IN hReportExecutionServiceSoap(INPUT Format1, INPUT DeviceInfo, OUTPUT Result, OUTPUT Extension, OUTPUT MimeType, OUTPUT Encoding, OUTPUT DATASET Warnings, OUTPUT StreamIds).

-------------------------------------

If I make the call as defined above, I receive an error stating (Wrong Parameter Type: array (11798)).  I believe it is because the web service is sending an empty array back in the StreamIds field.

Checking the report server logs, I can see that the call hits the SSRS server and the report is rendered, but something is causing a problem when I get the OUTPUTS back.

I tried to change the StreamID definition to:

DEFINE VARIABLE StreamIds AS LONGCHAR NO-UNDO.

so I could just get the XML back, rather than trying to get back the array but then I get this error: Failure Initializing SOAP Call: Cannot Match signature for operation 'Render' (11762).

This call never hits the SSRS web server and the render call is not invoked because of the invalid match in the call.

It appears as though I'm stuck - I can't receive an array of unknown size back from the web service call and I can't change the OUTPUT parameter to receive something other than an array.

Has anyone else run into a problem with a character extent variable being an OUTPUT for a web service?

Thanks,

Terry

All Replies

Posted by tgagnon on 23-Jul-2013 13:54

Hello,

The problem has been solved, I had to use wrapped XML versions of both the INPUT and OUTPUT parameters.

Using the SAX-WRITER to compose the proper INPUT.

My call turned out to be:

...

define var In as longchar no-undo.

define var Out as longchar no-undo.

....

RUN Render IN hReportExecutionServiceSoap(INPUT In, OUTPUT Out).

....

Thanks,

Terry

This thread is closed