# How Do I: Get a JPD Proxy for a Business Process?

1. Open your business process in WebLogic Workshop.
2. On the menu bar, click to run the business process.

If the WebLogic Server is not running, a window is displayed asking if you want to start your server. To start the server, click OK.

Note: To learn about generating JPD Proxies for business processes that are versioned, see About Versioned Business Processes.

3. After the Workshop Test Browser appears, click the Overview tab.
4. On the Overview page, under the Process Clients section, click JPD Proxy. You are prompted to save the file to disk

Note: By default, the package is weblogic.wli.jpdproxy. If you want to specify a different package for the generated JPD Proxy, enter a package name in the Java package field associated with the JPD Proxy button.

5. Save the file to your disk according to how you want to use the proxy:

- To Use the JPD Proxy From a WebLogic Workshop Application (an EJB, JSP, or Servlet)

Save the JAR file to one of the following directories:

WEB-INF/lib—Save the JAR to the WEB-INF/lib directory of the Web application from which you want to use the proxy (the client application). In the WebLogic Workshop graphical design environment, the JAR file is displayed in the WEB-INF/lib folder on the Application tab.

APP-INF/lib—If you want to use the JPD Proxy JAR from more than one project in your (client) application, save the JAR to the APP-INF/lib directory at the root of your application. In the WebLogic Workshop graphical design environment, the JAR file is displayed in the Libraries folder at the root of your application in the Application tab.

- To Use the JPD Proxy From a Standalone Java Application

If you are using the JPD Proxy from a standalone Java client (outside of WebLogic Server), save the JAR to any location that is convenient for your client Java application and add the JAR to the client's CLASSPATH environment variable.

Note: The default name of the JAR file is <business-process-name>Proxy.jar, where business-process-name represents the name of the business process for which you are generating the JPD Proxy. Accept the default name unless it conflicts with an existing JAR file.

6. If you plan to use the JPD Proxy from an application running in a different JVM to that in which the target business process is running, append the following JAR files to the client's CLASSPATH environment variable:

- <business-process-name>Proxy.jar—The JPD Proxy you downloaded from the WebLogic Workshop Test Browser (where business-process-name represents the name of the business process for which you generated the JPD Proxy).
- jpdproxy_client.jar—A support JAR that contains business process-independent client-side classes. It is located in the following directory in your WebLogic Platform installation:

    BEA_HOME\weblogic81\integration\lib

In the preceding line, BEA_HOME represents the location where you installed WebLogic Platform.

This JAR contains an abstract proxy-factory class called JpdProxy, a proxy implementation JpdProxyImpl, and other client-side run-time classes.

- Schemas.jar—If the JPD Proxy (<business-process-name>Proxy.jar) file you downloaded contains references to strongly typed XML or MFL arguments, add the Schemas.jar file to the classpath. (Schemas represents the name you gave to the Schemas project in your application.) The Schemas.jar file is available in APP-INF\lib at the root of your application.
- weblogic.jar—This file is available in the following location in your WebLogic Platform installation: \bea\weblogic81\server\lib.
- wlcipher.jar—If you are using a client with two-way SSL, add this JAR to the CLASSPATH. The wlcipher.jar is available in the following location in your WebLogic Platform installation: BEA_HOME\weblogic81\server\lib.

In the preceding line, BEA_HOME represents the location at which you installed WebLogic Platform.

About Versioned Business Processes

If the target business process is versioned, you can run the active version of the process to invoke the Test Browser (in this case, the Test Browser is opened on the virtual URI) or you can run any other version of the process (in which case the Test Browser is opened on a specific physical URI). To learn about creating versions of business processes, see Versioning Business Processes.

If you subsequently download a JPD Proxy from the Test Browser, its JPD contract interface matches the virtual JPD or the physical JPD, accordingly. When you create a Java client, you pass the JPD contract and a service URI to the proxy factory method. In most cases the JPD contract interfaces for all versions of a business process are identical, but a specific version of a business process can extend the public interface of the original process. In this case, you must ensure that the service URI and JPD contract interface passed to the proxy factory method are consistent.

Related Topics

How Do I: Use a JPD Proxy From a Java Client?

Starting Your Business Process

Versioning Business Processes

Interacting With Clients

How Do I: Call Business Processes?