8 Working with JD Edwards EnterpriseOne as a Web Service Consumer

This chapter contains the following topics:

Important:

Oracle reserves the right to reorganize the business services foundation packages (jar files) for tools release upgrades. If you are planning to upgrade your system, test your custom objects and modify them as appropriate to ensure your code will continue to work as intended. You cannot upgrade custom business service objects after you install a tools release upgrade.

8.1 Understanding JD Edwards EnterpriseOne as a Web Service Consumer

JD Edwards EnterpriseOne can call and process external web services. Being a native consumer of web services enables JD Edwards EnterpriseOne to integrate with other Oracle products and third-party systems and products, such as order promising. To enable JD Edwards EnterpriseOne as a web services consumer, you create a business service that uses a web service proxy to call an external web service. A method in that business service can be called by a JD Edwards EnterpriseOne business function. The business service resides on the business services server and is written in the Java programming language. The business service contains a web service proxy that you generate using JDeveloper. The business function resides in your enterprise server and is written in the C programming language. The business function calls the business service method.

8.1.1 Communicating Between JD Edwards EnterpriseOne Servers

The business function, which resides in your enterprise server, uses an API to call the business service method, which resides on the business services server. JDENet is the communication mechanism between the servers.

You can configure your system to use either one port or multiple ports to listen for and receive JDENet messages from the Enterprise Server. For single port communication, an Object Configuration Manager (OCM) mapping tells the enterprise server the business services server name and port for sending the JDENet messages.

See Setting Up OCM for Business Functions Calling Business Services.

For multiple port communication, you use a clustered business services server to listen for and receive multiple JDENet messages from the Enterprise Server.

8.1.1.1 Business Function APIs for Calling a Business Service

These APIs are available for a business function to call a business service method:

  • jdeCallBusinessService

  • jdeCallBusinessServiceNoResponse

  • jdeFreeBSSVPayloadReturn

  • jdeGetBusinessServiceErrorText

Two APIs are available for calling a business service method from a business function:

  • jdeCallBusinessService

    This API makes a synchronous call to the business services server passing in an XML document that represents the value object for the called business service method. The call waits until the business service method finishes before processing.

  • jdeCallBusinessServiceNoResponse

    This API makes an asynchronous call to the business services server passing in an XML document that represents the value object for the called business service method. The API returns immediately after sending the message without waiting for a response.

For both of these APIs, the caller must allocate the bssvPayloadInput structure. In addition, the caller must free the bssvPayloadReturn structure with the provided API.

This example code provides a typical C business function call to a business service method:

* jdeCallBusinessService (lpBhvrCom, 
*               lpVoid, 
*               _J("oracle.e1.sbf.JXXXXX") 
*               _J("bssv_method_name_to_call")
*               TRUE, 
*               bssvPayload, 
*               &bssvPayloadReturn);
* 
* /* caller must free the space allocated for the return payload when 
*    finished with it */
* jdeFreeBSSVPayloadReturn (&bssvPayloadReturn); 
*

Both APIs take the same set of parameters, which is shown in this example code:

* lpBhvrCom - BSFN structure pointer.
* lpVoidInfo - holds error info returned from BSFN.
* bssvName - fully qualified name of business service to be called
* bssvMethod - method within business service to be called
* autocommitTransaction - type of transaction the business service should use 
*                         on the business services server. 
*                         True if auto commit - False for manual commit.
* bssvPayloadInput - string representation of an XML document that represents
*                    the value object for the business service. Populated 
*                    with input values to pass to the business service.
* bssvPayloadReturn - string representation of XML document representing the 
*                     value object returned from the business service call 
*                     populated with both return values and original input 
*                     values. The caller must free the space allocated for 
*                     the return payload by calling the 
*                     jdeFreeBSSVPayloadReturn API.

Both APIs have the same return values, which are shown in this example code:

* CallBSSVNoError                     100L 
* CallBSSVServiceDoesNotExist         101L 
* CallBSSVMethodDoesNotExist          102L 
* CallBSSVInvalidMethodSignature      103L 
* CallBSSVNoDefaultConstructor        104L 
* CallBSSVErrorUnMarshal              105L 
* CallBSSVErrorMarshal                106L 
* CallBSSVConnectionException         107L 
* CallBSSVInvalidPacketNum            108L 
* CallBSSVInvaldUserName              109L 
* CallBSSVInvalidEnv                  110L 
* CallBSSVInvalidRole                 111L 
* CallBSSVInvalidToken                112L 
* CallBSSVAuthenticationFailure       113L 
* CallBSSVNoErrorWithMessages         114L 
* CallBSSVInvalidParamError           201L 
* CallBSSVSystemConfigurationError    202L 
* CallBSSVSystemNetworkFailedError    203L 
* CallBSSVSystemInternalServerError   204L

See Also:

  • JD Edwards EnterpriseOne Tools API Reference Guide on the My Oracle Support Web site.

8.1.2 Xerces APIs

You can use any one or more Xerces APIs in combination with other XML generation and editing APIs to generate the XML payload for calls to a business service. You can use any of these Xerces APIs, which have been added to the Xerces wrapper:

  • Xerces APIs for working with MathNumeric data types:

    • XRCS_createElementFromMathNumeric

    • XRCS_setMathNumericElementValue

    • XRCS_getMathNumericFromElement

  • Xerces APIs for working with JDEDATE data types:

    • XRCS_createElementFromJDEDate

    • XRCS_setJDEDateElementValue

    • XRCS_getJDEDateFromElement

  • Xerces APIs for working with JDEUTIME data types:

    • XRCS_createElementFromJDEUTIME

    • XRCS_setJDEUTIMEElementValue

    • XRCS_getJDEUTIMEFromElement

  • Xerces APIs for parsing/serialization ignoring encoding tags:

    • XRCS_serializeDocumentToXMLStringNoEncoding

    • XRCS_parseXMLStringRemoveEncoding

See Also:

  • JD Edwards EnterpriseOne Tools API Reference Guide on the My Oracle Support Web site.

8.2 Setting Up OCM for Business Functions Calling Business Services

This section provides an overview of setting up OCM for business functions calling business services and discusses how to:

  • Configure OCM for business functions calling business services.

  • Ping the business services server.

8.2.1 Understanding OCM Setup for Business Functions Calling Business Services

Typically, a system administrator configures OCM so that your enterprise server can find the business services server. After OCM is configured with the business services server information, you can ping the business services server from OCM to ensure that the business services server is running and listening for messages.

8.2.2 Forms Used to Set Up OCM for Business Functions Calling Business Services

Form Name FormID Navigation Usage
Machine Search and Select W986110D Expand the System Administration Tools folder on the EnterpriseOne Life Cycle Tools / All My Roles menu, and then select Environment / Service Configuration from the Environment Management folder. Select the appropriate machine name and data source combination.
Work with Service Configurations W986110J On Machine Search and Select, select the machine name and data source combination and then click Select. Find and select an existing configuration for the business services server and server port, or access the Service Configuration Revisions form to add a new configuration record. Also ping the business services server to determine whether the business services server is available.
Service Configuration Revisions W986110K On Work with Service Configurations, click Add. Add a new configuration in OCM with the location of the business services server.

8.2.3 Configuring OCM for Business Functions Calling Business Services

Access the Service Configuration Revisions form and complete the following fields:

Environment Name

A name that uniquely identifies the environment.

Service Name

A name that identifies the type of server. For example, BSSV identifies the business services server.

User/Role

A specific JD Edwards EnterpriseOne user name, role name, or *PUBLIC to whom the record applies.

Server

The name of the local host where the business services server is running.

Port

The port number of the business services server. This is the JDENet listening port.

8.2.4 Pinging the Business Services Server

Access the Work with Service Configurations form.

  1. In the grid area, highlight the server.

  2. From the Row menu, select Change Status to activate the configuration.

  3. From the Row menu, select Ping Server.

    You receive a Ping message indicating whether the Ping test was successful or failed.

8.3 Developing a Business Service for Consuming an External Web Service

This section provides an overview of how to develop a business service for consuming an external web service and discusses how to:

  • Identify an external web service.

  • Create a business service object.

  • Create a web service proxy prior to JDeveloper 11g.

  • Create a web service proxy for a web service deployed in WebLogic Server using JDeveloper 11g with JAX-RPC.

  • Create a value object class.

  • Create a business service class.

  • Generate a sample XML document.

8.3.1 Understanding How to Develop a Business Service for Consuming an External Web Service

You create a business service that consumes an external web service in the same way that you create a business service that provides a web service for public consumption. But instead of using a published business service as the web service, the business service is used to consume the web service. As part of the process, you create a web service proxy and an XML document. This business service is called by a business function. The following tasks provide a scenario for creating a JD Edwards EnterpriseOne business service that consumes an external web service.

Important:

If you are using JD Edwards EnterpriseOne Tools Release 9.2 with JD Edwards EnterpriseOne Applications Release 9.2, JDeveloper 12c is installed on your system. With JDeveloper 12c, you can create only JAX-WS business services.

If you are using JDeveloper 12c, do not use JDK 1.7 specific APIs in any of the published business services code.

If you are using JD Edwards EnterpriseOne Tools Release 9.2 with JD Edwards Enterprise One Applications Release 9.0 or 91, JDeveloper 11g is installed on your system. With JDeveloper 11g, you can create JAX-WS and JAX-RPC business services.

8.3.2 Identifying an External Web Service

Before you create a business service to consume an external web service, you need to identify the external web service and its location. The external web service definition determines the data to be sent to the web service and the result that is received.

8.3.3 Creating a Business Service Object

Using Object Management Workbench (OMW), create the object that will contain the business service being developed. Start JDeveloper from OMW to work with this project.

8.3.4 Creating a Web Service Proxy

A web service proxy is a collection of classes generated by JDeveloper and is used to call external web services. JDeveloper uses the target WSDL to create all necessary classes. A JD Edwards EnterpriseOne business service method uses the web service proxy to call the external web service. You use JDeveloper to create a web service proxy in the business service project that you created using OMW.

When you create a new business service proxy project in JDeveloper to consume a web service running on the WebLogic Server (WLS), JDeveloper includes certain XML files in the proxy project. When you check in the business service proxy project through OMW, the XML files in the proxy project must also be checked in as part of the project.

To be able to check in XML files along with the business service consumer projects through OMW, ensure that the UDC H95/CA includes records for XML files as business services artifacts that can be checked in.

Ensure that any new business service proxy project created in JDeveloper to consume a web service is checked in through OMW with the JDeveloper install path specified as the JDeveloper install path.

After JDeveloper creates the web service proxy, you must rename the package folder, and then rebuild the code to ensure that no errors occurred.

For more information about creating a web service proxy, see one of the following:

8.3.5 Creating a Value Object Class

After you create the web service proxy, you create the value object class. You create the value object class based on data objects in the JD Edwards EnterpriseOne business function that will be used to call this business service. Then, you must write the code to map between data types in the value object class and the data types required by the external web service.

8.3.5.1 Passing Data

You design your business service method so that it gets the data that will be passed to the web service from either the business services server or the enterprise server. When you design your business service method, you need to consider the amount of data being passed. The more data that is passed to the business service method, the larger the memory requirements are on the enterprise server. Consuming memory on the enterprise server can significantly impact other users of the enterprise server. Creating the value object that is passed to the business service method requires careful consideration. Here are some questions you might consider:

  • Is it better to assemble the data from the business services server instead of the enterprise server?

  • Can key information be passed instead of constructing the entire data set on the C (enterprise server) side?

  • Is one approach clearly better than the other based on the requirements?

Depending on your business service design, data is either received in the business service value object, or the business service retrieves the data from a table or business function call. Either way, data type conversions occur within the business service method. Everything that is specific to the web service being called, including data type conversions, should be contained within the business service method that wraps the web service call.

8.3.6 Creating a Business Service Class

After you create the web service proxy and the value object class, you create a business service class. This business service is a wrapper for the web service proxy. The business service wrapper is necessary because:

  • Only internal business services that match the JD Edwards EnterpriseOne business service methodology can be called from the enterprise server.

  • Most likely some conversion between the JD Edwards EnterpriseOne data types and the data types required by the web service provider will be required.

To create a business service class:

  1. Add classes to the business service object.

    • Create the business service class.

    • Name the business service class.

    • Create a transaction, if necessary (IConnection object).

    • Declare a business service public method.

  2. Add business service logic:

    • Map from the value object to the format needed by the external web service.

    • Create a call to the web service proxy.

    • Use business service properties.

    • Use softcoding.

    • Handle errors.

    • Format data.

After you create the business service for calling an external web service, you can create a JD Edwards EnterpriseOne business function that calls this business service. You can also create or use an existing JD Edwards EnterpriseOne application to call the business function.

8.3.7 Generating a Sample XML Document

You use the XML Template utility to create a sample XML document. The sample XML document is based on the value object of the business service method that is calling an external web service. This XML document provides a model for creating the XML payload in the JD Edwards EnterpriseOne business function. The XML document represents the structure of the data that is sent from the business function. The XML Template utility is provided in JDeveloper, and you access the utility by selecting a value object Java file in the JDeveloper Application Navigator pane.

To invoke the XML Template utility that generates a sample XML document:

  1. Start JDeveloper from OMW.

  2. In the JDeveloper navigator pane, right-click the value object of the business service method that you want to call.

  3. Select Generate XML Document Template from the context menu.

    The XML Template utility creates a new XML file in the same directory as the value object. The XML file has the same name as the value object, with an extension of XML instead of Java.

  4. Click the refresh icon in the JDeveloper navigator pane.

  5. Open the sample XML document by double-clicking the new XML file.

8.4 Testing a Business Service That Consumes an External Web Service

If you are using JDeveloper 12c to create a business service that consumes an external web service, you use the JDeveloper 12c integrated WebLogic Server to test the web service.

If you are using JDeveloper 11g or JDeveloper 12c to create a business service that consumes an external web service, you can use the JDeveloper integrated WebLogic Server to test the web service.

See the following sections in this guide to deploy and test the business service consumer project:

You can test the business service using one of these methods:

  • Create a test business service.

  • Use the development business services server.

Guidelines for using these methods are provided in Appendix B: Testing a Business Service That Calls an External Web Service.

8.5 Creating a JAX-WS-Based EnterpriseOne Consumer Business Service Using JDeveloper 12c or JDeveloper 11g

You use OMW to create a new business service object, and then open the business service object in JDeveloper from OMW. Before you create the business service, ensure that the target JAX-WS web service for which the JAX-WS-based EnterpriseOne client business service is being developed is up and running and its WSDL URL is accessible.

A JAX-WS based EnterpriseOne Consumer business service reference implementation, JRH90I34, is provided for you to use as a model for creating a custom JAX-WS based consumer business service.

See "Reference Implementation for Testing the Business Services Server as a JAX-WS Web Service Consumer" in the JD Edwards EnterpriseOne Tools Interoperability Reference Implementations Guide.

Note:

If you are using JD Edwards EnterpriseOne Tools Release 9.2 with JD Edwards Enterprise One Applications Release 9.0 or 9.1, and you plan to generate a web service based on the JAX-WS standard, it is important to consider your current consumption of the service. While the services function in the same manner, whether deployed as JAX-RPC or JAX-WS, there are some important caveats:
  • The service wsdl for a service generated as JAX-WS differs from the same service wsdl generated as JAX-RPC.

    If you currently interact with these services from an external system you may need to make changes to those systems before switching to JAX-WS.

  • For prepackaged integrations that use internal consumer services, you may need to maintain a JAX-RPC based deployment for them to function correctly.

    See the specific EnterpriseOne applications guide for your integration to view the supported BSSV deployment options.

See the technical paper, "Understanding the Impact of JAX-WS", on My Oracle Support (Doc ID 1488986.1) https://support.oracle.com/rs?type=doc&id=1488986.1 for additional information about the implications of the JAX-WS build option.

8.5.1 Creating a JAX-WS Web Service Proxy in JDeveloper

You use the JDeveloper wizard to create a custom JAX-WS web service consumer.

To select JAX-WS as the standard for creating the JAX-WS based business service consumer project:

  1. In JDeveloper, right-click on the appropriate business service consumer project and select Project Properties.

    The Project Properties window for the selected published business service appears.

  2. In the left-hand side tree structure, select Libraries and Classpath.

    The Libraries and Classpath page appears on the right-hand side of the window.

  3. In the Classpath Entries area, select JAX-WS Web Services.

  4. Move the JAX-WS Web Services entry to the top of the page by clicking the Move Up button

    Clicking the Move Up button moves the entry one level at a time; you may need to click the Move Up button multiple times to move the JAX-WS Services entry to the top of the page.

  5. Click OK.

  6. On JDeveloper, save the changes that you made to the Libraries and Classpath property of the selected published business service.

To create a JAX-WS Web Service Proxy:

  1. In JDeveloper, right-click on the appropriate business service client project and select New to open the New Gallery Window.

  2. On the New Gallery window, select the All Technologies tab.

  3. In the left-hand tree structure, expand the Business Tier category and select Web Services.

  4. Select Web Service Proxy from the list of items that appears in the right-hand pane.

  5. Click OK.

    This action opens the Create Web Service Proxy Wizard.

  6. On the Welcome page click Next to open the Select Web Service Description page.

  7. On Select Web Service Description, do the following:

    • In the WSDL Document URL field, enter the WSDL URL of the targeted JAX-WS based web service.

      The WSDL URL is that of the targeted business service that is running on the JDeveloper 11g integrated WebLogic server.

    • Select the Copy WSDL Into Project option

      Note:

      If you are using JDeveloper 12c to create a JAX-WS based consumer web-service, a customization file must be used to prevent the WSIMPORT tool from flattening the web service input arguments.
      • Create a customization file like this:

      <?xml version='1.0' encoding='UTF-8'?>
      
      <jaxws:bindings xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:jaxb="http://java.sun.com
      /xml/ns/jaxb" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
      wsdlLocation='your WSDL location/URL'>
      
           <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
      
      </jaxws:bindings>
      
      • On the Select Web Service Description page, select the Customization Files option, and then select Add File.

      • Browse to the customization file you created and add the customization file to the client creation process.

    • Click Next to open the Specify Default Mapping Options page.

  8. On specify Default Mapping Options, do the following:

    • Enter the business service project name package in the Package Name field; for example, oracle.e1.bssv.JRH90I34.proxy

    • Enter the business service proxy type in the Root Package for Generated Types field; for example, oracle.e1.bssv.JRH90I34.proxy.types

    • Click Next to open the Port Endpoints page.

  9. On Port Endpoints, do the following:

    • Verify the system-entered endpoint URL of the targeted JAX-WS based web service.

    • Click Next to open the Asynchronous Methods page.

  10. On Asynchronous Methods, select the Don't generate any asynchronous methods option.

  11. On the Policy page, click Next to open the Defined Handlers page.

    This page is optional. In this task, a JAX-WS client is being created for the web service running locally, which does not have any security configured. However, if you are creating a JAX_WS client for a web service that is secured with an OWSM policy, select the appropriate policy from the list that appears in the Security tab.

  12. On Defined Handlers, accept the system entered information and then click Next to open the Finish page.

  13. On Finish, click the Finish button to complete the creation of the JAX-WS business service client proxy.

After the proxy is successfully generated, expand the JAX-WS business service client project in JDeveloper. A folder named Proxy contains the classes required by the proxy to invoke the target web service. This folder also contains a types folder that has all of the classes that are used by proxy to invoke the operations of the target web service.

Next step is to create the *Processor.java class to invoke the target JAX-WS web service. In the client RI JRH90I34, refer to the RI_JAXWS_ABWebServiceProcessor.java to see how the Processor class has been coded to invoke the target JAX-WS web service. The RI_JAXWS_ABWebServiceProcessor.java has been coded in such a way so that the same JAX-WS client works against a target RI_AddressBookManager JAX-WS web service running on Jdeveloper 11g's Integrated WLS, Standalone WLS or WAS.

Note the following points regarding the code in the RI_JAXWS_ABWebServiceProcessor.java class:

  • Fetch the endpoint URL of the target web service from the softcoding record.

  • If the web service is secure, also retrieve user name and password credentials from the softcoding record

  • If the target web service is secured with WS-Security and it requires username and password credentials to be passed to the SOAP header from the client, do the following

    1. Create a class that implements the SOAPHandler interface to create the WS-Security Header with the username and password credentials retrieved from the softcoding record.

    2. Create a class that implements the HandlerResolver interface, which ensures that the class that implements the SOAP Handler interface is called.

    3. Create an instance of the SOAPHandler class in the client Processor class, and set the username and password credentials retrieved from the softcoding record in this instance.

    4. Create an instance of the HandlerResolver class in the client Processor class, add the instance of the SOAPHandler class to this instance.

    5. Add the instance of the HandlerResolver class to the instance of the target web service.

    6. Set the endpoint URL, user name, and password credentials retrieved from the softcoding record in the RequestContext object of the target web service.

Note:

In the RI-JAXWS_ABWebServiceProcessor.java class, the HeaderHandler class implements the SOAPHandler interface and is used to create the WS-Security Header with the user name and password credentials retrieved from the softcoding record. The HeaderHandlerResolver class implements the HandlerResolver interface and is used to call the HeaderHandler class.

8.5.2 Creating a Deployment Profile for the Business Service Consumer Project

After you create the business service consumer project, you deploy it to the integrated WebLogic server. Before you can deploy the business service consumer project to the Integrated WebLogic server, you create a deployment profile. You use JDeveloper to create a deployment profile for the business service consumer project.

To create a deployment profile:

  1. On JDeveloper, right-click on the appropriate business service consumer project and select Project Properties.

  2. On Project Properties, do the following:

    • Select the deployment property.

    • Select Use Project Settings as the Deployment option.

    • Select the business service consumer project in the Development Profiles area.

    • Click Edit.

    This action opens the Edit WAR Deployment Profile Properties window.

  3. On Edit WAR Deployment Profile Properties, in the tree structure, select File Groups, and then click the New button.

  4. On the File Groups page, create a new file group by doing the following:

    • Type WEB-INF in the File Group Name field.

    • Select the Packaging option as the Type of file group.

    • Click OK.

      The WEB-INF file group appears in the tree structure, and the WEB-INF page opens in the right-side pane.

  5. On WEB-INF, do the following:

    • Type WEB-INF in the Target Directory in the Archive field.

    • Type WEB-INF in the File Group Name field.

    • Click OK.

  6. In the tree structure WEB-IN file Group, select Contributors.

  7. In the Contributors pane, do the following:

    • Select the Project Output Directory option.

    • Select the Project Dependencies option

    • In the Order of Contributors field, add the path for the Consumer WEBXML folder; such as, <E1_Install_Path>\system\classes\ConsumerWEBXML.

  8. In the tree structure WEB/INF file group, select Filters.

  9. In the Filters pane, select the Filters tab and do the following:,

    • Select web.xml.

    • Clear check marks from of the other folders that are under the main folder, Merged Contents of This File Group's Contributors.

    • Click OK.

  10. In the tree structure pane, expand the WEB-INF/lib file group and select Contributors.

  11. In the Contributors pane, select the SBFProjects in the Libraries Selected for Deployment area, and click OK.

  12. In the tree structure pane WEB-INF/lib file group, select Filters.

  13. In the Filters pane, select the Files tab and ensure that all of the EnterpriseOne tools foundation jar files are selected, and then click OK.

  14. In the tree structure pane, expand the WEB-INF/classes file group and select Contributors.

  15. In the Contributors pane, do the following:

    • Select the Project Output Directory option.

    • Select the Project Dependencies option.

    • In the Order of Contributors area, add the SBF path; such as, <E1_Install_Path>\<PathCode>\ini\sbf.

    • Click OK.

  16. In the tree structure pane WEB-INF/classes file group, select Filters.

  17. In the Filters pane, select the Files tab and do the following:

    • Verify that all of the preconfigured EnterpriseOne files (.ini, .properties, .xml, .ora) are selected.

    • Expand the oracle folder and verify that only the targeted business service consumer project is selected.

    • Click OK.

  18. In the tree structure pane, select the Library Dependencies group file.

  19. In the Library Dependencies pane, ensure that all of the libraries under the Libraries Selected for Deployment area are selected and click OK

  20. In the tree structure pane, expand the Platform group file.

  21. In the Platform pane, do the following:

    • Select Weblogic 12.1.x (for JDeveloper 12c) or Weblogic 10.3 (for JDeveloper 11g) from the Default Platform drop-down list.

    • Select IntegratedWebLogicServer from the Target Connection drop-down list.

    • Click OK to open the Deployment window.

  22. On the Deployment window, click OK.

  23. On JDeveloper, save the changes to the targeted business service consumer project.

8.5.3 Deploying the Business Service Consumer Project to the Integrated WebLogic Server

After you create the deployment profile, deploy the targeted business service consumer project to the integrated WebLogic server.

To deploy the business service consumer project to the Integrated WebLogic server:

  1. Start the Integrated WebLogic server.

  2. On JDeveloper, right-click on the appropriate business service consumer project, select Deploy, and then select the targeted business service consumer project to deploy to the integrated WebLogic server.

  3. Ensure deployment of the business service consumer project is successful by verifying the Deployment Finished message that appears in the Deployment-Log window in the Deployment tab in JDeveloper.

8.5.4 Testing the Business Service Consumer Project

You test your custom business service consumer project in the JDeveloper 11g integrated WebLogic server. The following list identifies additional tasks that you perform before testing your custom business service consumer project.

  • The target web service for which the business service consumer project is created is up and running.

  • The business service consumer project is successfully deployed and running in the JDeveloper 11g integrated WebLogic server.

  • Create a business function that calls your custom business service consumer project.

  • Add an OCM record for the Enterprise server to point to the business service server on which your custom business service consumer project is running.

  • Add a SYSTEM level service property.

  • Create a soft coding record.

  • Restart the Business Services server.

    After you perform the additional tasks, restart the business services server where the business service consumer project is running. If the business service consumer project is running locally on the JDeveloper 11g integrated WebLogic server, then restart the integrated WebLogic Server.

Log into an EnterpriseOne Web client, and run the test reference implementation AddressBook application, P954001.

Note:

You can use reference implementation JRH90I34 (for JAX-WS) or JRH90I33 (for JAX-RPC) as a model for testing your web service proxy. The reference implementation provides set up information for the additional tasks that is specific for the reference implementation.

See "Reference Implementation for Testing the Business Services Server as a JAX-WS Web Service Consumer" in the JD Edwards EnterpriseOne Tools Interoperability Reference Implementations Guide for more information about Reference Implementation JRH90I34.

See "Downloading and Deploying the JDeveloper 11g Reference Implementation Business Service for WebLogic Server" in the JD Edwards EnterpriseOne Tools Interoperability Reference Implementations Guide for information about Reference Implementation JRH90I33.

Note:

If the target web-service (JAX-WS consumer JRH90I34 is deployed to the integrated WLS of JDeveloper 12c) is secured with SSL, then in the Integrated WLS start script (startWebLogic.cmd), add the following argument to the JAVA_OPTION jvm arguments to ignore host name verification.
-Dweblogic.security.SSL.ignoreHostnameVerification=true

The following is an example:

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.security.SSL. ignoreHostnameVerification=true

typically the start script startWebLogic.cmd is at this location:

C:\Users\<user_name>\AppData\Roaming\JDeveloper \<system>\DefaultDomain\bin\startWebLogic.cmd

If you have any issues while testing the consumer business service scenario, configure the following logs:

  • BSSV log.

    Use the jdelog.properties file in <E1_Install_Path>\ini\sbf folder if the JAX-WS consumer reference implementation is running locally on the JDeveloper 11g integrated WebLogic server.

  • Jde and JdeDebug logs in local or for the COK on the Enterprise server, depending where business function B953002 is running.

  • IntegratedWeblogicServer log, which is located at:

    C:\Documents and Settings\USER_PROFILE\Application Data\JDeveloper\<system>\DefaultDomain\servers\DefaultServer\logs

8.6 Creating a Web Service Proxy Using JDeveloper11g with a JAX-RPC Client

You can create a proxy that consumes a web service that is deployed in the WebLogic server. This section explains how to create the proxy in the development environment.

To select JAX-RPC as the standard for a business service consumer project:

  1. In JDeveloper, right-click on the appropriate business service consumer project and select Project Properties.

    The Project Properties window for the selected business service consumer project appears.

  2. In the left-hand side tree structure, select Libraries and Classpath.

    The Libraries and Classpath page appears on the right-hand side of the window.

  3. In the Classpath Entries area, select JAX-RPC Web Logic Client and JAX-RPC 11 Web Services.

  4. Move the JAX-RPC Web Logic Client and JAX-RPC 11 Web Services entries to the top of the page by clicking the Move Up button

    Clicking the Move Up button moves the entry one level at a time; you may need to click the Move Up button multiple times to move the entries to the top of the page.

  5. Click OK.

  6. On JDeveloper, save the changes that you made to the Libraries and Classpath property of the selected business service consumer project.

To create a web service proxy:

  1. From OMW, open JDeveloper 11g.

  2. Under the BSSV package (created for the proxy project), create a subfolder named Proxy.

    For example, Oracle uses the following package structure for reference implementations:

    oracle.e1.bssv.JRH90I33.proxy

  3. Select the OMW project and then open the project properties.

  4. Add the proxy path that corresponds to the package structure in the java source path.

    For example, the following structure might be added to the java source path:

    c:\e812\DV812\Java\source\oracle\e1\bssv\ JRH90I33\proxy

  5. Select the BSSV package for which you want to create a proxy, and then click File, and then click New.

  6. On New Gallery, select All Technologies from the drop-down menu.

  7. Expand the Business Tier category, and then select Web Services.

  8. In the Items pane, select Web Services Proxy, and then click OK.

    The Create Web Service Proxy wizard opens.

  9. On the Welcome page, click Next.

  10. If you receive a prompt to select a web service option, select JAX-RPC, and then click OK.

  11. Enter the web service URL address.

  12. On the Specify Default Mapping Option page, enter the package name or select the name using the Browse button.

    For example, to use the JRH90I33 reference implementation, select oracle.e1.bssv. JRH90I33.proxy.

  13. Click Next.

  14. Select the name of the service that you want to call, and then click Next.

  15. Verify that the default options are selected on the remaining pages, and then click Finish.

  16. Select the newly created proxy folder.

    This folder is the destination folder for the files that are created.

    The proxy files are created.

8.6.1 Rearranging and Renaming Packages

You can compile and build the project you have created.

To rearrange and rename packages:

  1. Locate the folder path "proxy\oracle\e1\bssv\JRH90I33\proxy" in the project folder.

    After you copy the files, ensure that you cross check that the package name and the folder structure match.

  2. Select the newly created projects in which you place your newly created proxy files in OMW.

  3. Select the value object java files that have been generated under the proxy folder.

  4. Rename the value object files package name and place it in the appropriate folder.

    You can use the JDeveloper refactor option to change the package name and place the files in the corresponding folder.

    For example, select jpr01000.bssv.e1.oracle.RI_Address and click Refractor. Then, change the package name to:

    oracle.e1.bssv.JRH90I33.proxy.valueobject.oracle.e1.bssv.jpr01000.valueobject.RI_Address

  5. Check for all references and change the package structure as appropriate.

  6. Compile the project and rebuild the code to ensure no error has occurred.

Note:

To test your business service, see Testing the Business Service Consumer Project