Designer > Planning Your BPEL Process > Importing WSDL Schema and Other Resources
  

Importing WSDL Schema and Other Resources

Define the location of the resource file containing the target namespace.
A BPEL process must contain namespaces that point to WSDL and schema locations. Because one namespace can have many WSDL or schema files associated with it, Process Developer identifies the correct file by importing it.
You can import other resources you need for BPEL processes, such as XSL style sheets for use in creating expressions and XML files used in resource catalog custom functions.
You can add imports manually or automatically.

Automatically Importing WSDL and Schema Locations

Your WSDL and schema files can be located in many places and can share the same namespace. When you specify a WSDL or schema location, Process Developer adds the namespace declaration to the BPEL process and ensures that the namespace points to the correct reference.
Process Developer takes care of WSDL location and namespace declarations for you when you add a WSDL file to Project Explorer and then create a Receive or Invoke activity by starting with an existing operation or a new operation. For basic information on using the convenience of interfaces, see Participants and Interfaces, Service References, and Local WSDL.
See also Creating an Activity by Starting with a WSDL Interface.

Manually Importing WSDL Schema and Other Resources

Define the location of the resource file containing the target namespace. Select a workspace resource, such as sample data, WSDL, or XSL file.
If you import and open a BPEL process into Process Developer before adding a WSDL file to Project Explorer, Process Developer reports unresolved references to port types because the WSDL is unknown.
The recommended practice for adding WSDL is to use Participants. For details, see Using the Participants View.
You can add WSDL location and namespace manually. You can also add schema and other resources as follows.
  1. 1. From Outline view, select Imports.
  2. 2. Right-mouse click and select Add > Declaration > Import.
  3. 3. From the Import Types list, select a type.
  4. 4. If you select XSL, the Type URI of the file is added. This type identifies the encoding language used in the file as shown:
  5. http://www.w3.org/1999/XSL/Transform
  6. 5. In the Location group, do one of the following:
  7. Notice that the target namespace is displayed for the WSDL or schema file. If you paste a pathname or URL into the WSDL (or Schema) file location field, you can press the Tab key to see the target namespace. Click OK when you are through.
  8. 6. In the Outline view, right-mouse click the Imports node, and select Refresh Imports.
To modify an import, double-click it, or in Properties view, click the Dialog (...) Button next to Location.
Process Developer adds the target namespace to the BPEL process and associates the namespace with a default prefix. Also, the port types, operations, and partner link types defined in the WSDL are available for use in the process.
The following illustration shows how the Process Developer displays a WSDL location and namespace. Note that Process Developer adds a new namespace prefix with a default name ns1. See Namespace Prefix and Declaration for more information.
Illustration of WSDL location and namespace in Outline view
See also Refreshing Imports.

Refreshing Imports

The Imports node in Outline view displays the location of all WSDL, schema, and other resources referenced in your process. If you modify an import or create a new resource, you can refresh Imports to update the reference.
Refreshing Interfaces does not refresh the imports information.
Tip: If you import and open a BPEL process in Process Developer before adding a WSDL file to Project Explorer, Process Developer reports unresolved references to port types, operations, and variables because the WSDL is unknown. You can fix these errors as follows:
  1. 1. Add the WSDL files to Project Explorer, as described in Importing a Local WSDL, Creating a New Interface, or Importing a Service Reference.
  2. 2. In the Outline view, right-mouse click on Imports, and select Refresh Imports.

Deleting an Import

Delete imports from this BPEL process. The associated namespace prefix and URI are not deleted. You can manually delete the namespace, if desired.
You can delete an imported WSDL, schema or other resource locations by right-mouse clicking an import in Outline view and selecting Delete. From the menu bar, you can also select Process > Delete > Import.
The associated namespace prefix and URI are not deleted. You can manually delete the namespace, if desired.

Namespace Prefix and Declaration

A BPEL process must contain namespaces that point to WSDL locations. To add WSDL locations, you use the Imports function, as described in Importing WSDL, Schema, and Other Resources.
After adding an import, you can rename the default prefix for the namespace, as follows.
  1. 1. In Outline View, select a Namespace.
  2. 2. In the Properties view, type in a prefix to use as a shortcut definition for the namespace. The prefix is mapped to the URI reference displayed.
If you delete an import, you must manually delete the namespace associated with it.