Back ForwardHow to call a Windows DLL library

Advanced featurePRPC includes Service COM rules, which allow a Windows-based application to request services from a PRPC application. However, some applications need the complementary capability — calling a Windows application or DLL. PegaInsight H-15 Marback Kersivien

Use either of two procedures to call from your application a routine within a Windows Dynamic Linked Library (DLL) file. Java developer skills are required.

SOAP approach

This approach works even when your PRPC server is hosted by a non-Windows platform, such as Sun Solaris. However, use of a SOAP service and HTTP may introduce processing overhead and delays.

  1. On a Windows (server) platform, use Microsoft's SOAP Toolkit (or similar facilities in the .NET Framework toolkit) to wrap the DLL so that it is callable as a SOAP service.
  2. On that server, host a Web server such as Microsoft IIS or Apache that can respond to HTTP requests for the SOAP service.
  3. On the PRPC server, use the WSDL file describing the SOAP services with the Connector and Metadata accelerator to create Connect SOAP rules for the DLL routines.
  4. Add an Integrator shape (Integrator) to a flow rule (or update other processing in your application) to call the Connect SOAP rule, which in turn calls the DLL function.

Bridge approach

This approach is useful only when your PRPC server is — and always will be — hosted on a Windows platform.

NoteThis implementation approach depends on third-party facilities that are not licensed, endorsed, or distributed by Pegasystems Inc.

  1. Acquire a Java-to-COM bridge toolkit, such as NewJawin (available from WWW linkwww.sourceforge.net). Many similar tools are available from commercial and open sources.
  2. Using the toolkit, generate Java stubs from the DLL file.
  3. Using Eclipse or a similar Java IDE, compile the Java stubs, and create a Jar file.
  4. Deploy the JAR file into the PRPC /lib directory.
  5. Extract the JAR file contents into the PRPC /class directory.
  6. Stop and restart the application server.
  7. Use the Connector and Metadata accelerator to create Connect Java rules (Rule-Connect-Java rule types) from the CLASS files.
  8. Call the Java methods in an activity, using the Connect-Java method.
  9. Incorporate the activity into a flow rule or into other processing in your application.

In simple cases, you can skip steps 8 and 9 and call the Java methods directly from a Java step in an activity.

Definitions integrator shape
Related topics About the Connector and Metadata Accelerator
About Connect Java rules
About Service COM rules
Connect-Java method

UpTechnical category