Webservice does not work with Codeunit that use OCX Function

jaja_bingsjaja_bings Member Posts: 16
edited 2013-02-22 in NAV Three Tier
Hi,

we want to archive already as PDF printed documents in our Document Management System (DMS).

For this we are using in the codeunit that is called by the published web service, some OCX-Functions that is provided by the DMS.

If I start the codeunit from the classic client it runs fine. No pop-up or similar is shown.

If I start the codeunit by calling the web service, i get the error message
"Callback functions are not allowed."

Now I searched already the mibuso board and recognize that I have to check for any UI Interaction like here described.

To ensure that, I comment all lines out until my web service is working. After that I test for comment each line in step by step, if it is still working.

I recognize that the first line where I use the OCX from the DMS, the (first?) error raised, that I get the "Callback..." exception.

What I have to do, that i get it working? Any suggestions? Are there any known problems using OCX in codeunits that are called by web services?

We use NAV2009 R2- build 32012.

Thanks in advance for your comments.

Kind regards,
jaja_bings

Answers

  • ara3nara3n Member Posts: 9,256
    Can you run your code from RTC?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ppavukppavuk Member Posts: 334
    Never tried OCX on middle tier, but most of the automations works just fine. Are you sure your OCX have no UI?

    You can create a simple page to call you ocx codeunit from RTC and debug it with visual studio. I have a feeling that this OCX just invoking some UI method, which is not allowed on middle tier.
  • jaja_bingsjaja_bings Member Posts: 16
    Dear Rashed and ppavuk,

    thank you for your replys.

    I pointed out that the OCX calls the DMS Cliens and therefore also opens for a very short moment the UI of this client.

    ](*,)

    So it seems to me that this IS the issue, that we could not prevent.

    The solution with web services will not work, right?

    Kind regards,
    Jaja_Bings
  • ara3nara3n Member Posts: 9,256
    If it opens the UI, then it's not possible.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • jaja_bingsjaja_bings Member Posts: 16
    Thank you for your reply. It seems to me that we need a new OCX :-k
Sign In or Register to comment.