My Web service discovery and type generation is very slow, what should I do?
BinHu 0600024J6S Visits (12888)
During your Business Process Manager (BPM) development, you may frequently use the web service integration component to invoke an external web service and handle the response back from the web service provider. You may sometimes meet the situation that the discover, type generation, or operation selection very be very slow in Process Designer, sometimes it might even be unresponsive, like below:
You may also see the type generation hung like below:
This article describes some ways to walk through all possibilities that may cause the web service discover and type generation to slow and provide some best practice for design.
1. Check the network latency and connection between Process Designer and Process Center
If the web service is deployed on a server, the first thing you should do is to make sure the network between Process Designer and Process Center is not causing long latency. You can call the web service URL via a browser and check the response time.
You can also use tools like soapUI client to test the web service response time.
2. Use an absolute file location to replace the web service URL
You can try to use an absolute file location on the Process Center box. Below is an example:
In the above example, the WSDL file is stored in C:\w
Please note the "file:///" before drive C to specify the file based location and use "/" as path separator.
3. Try to use a merged WSDL file instead of multiple smaller sets of WSDLs/XSDs
During discover, the BPM web service engine will walk through the current WSDL file and recursively walk through all dependency import XSDs (defined by <xsd:import> tag) to load all service and schema definition. If there are a large number of children XSD files, during Runtime WSDL parsing process, one certain XSD file may be loaded and parsed several times from web service provider server to the BPM server. So the best practice is to use one merged WSDL file to include all the imported XSDs to reduce the file loading and parsing time.
4. Use a predefined web service server from Process App settings
In some cases, the response time will improve when you have configured a process application level environment, like below:
In the above example, you define a new server with type "Web Service" and specify the WSDL URL.
Then you choose discovery scheme as "from process application settings" and specify the predefined web service server, like below:
In this way, BPM will retrieve the configuration from the Process Application level rather than the module level. We have tested this scenario and in some cases this will speed up the discover speed.
5. Limit the number of Business objects defined in current snapshot to speed up type generation
For type generation, BPM will try to map the existing business objects with the discovered types from WSDL file. If you have a large number of existing business objects defined in the current application, since it is a one-to-one mapping, the total time will be very long depending on how many business objects you defined in current snapshot.
A best practice is that, for a large WSDL file which has generated more than 100+ types, create a separated Toolkit for this web service integration job. Because the newly designed toolkit has a very limited number of existing business objects, the type generation will be completed within seconds. Then you save a snapshot of this toolkit and go back to your original Process Application and include the toolkit. Finally you drag the web service integration component from the toolkit and re-use the service from the toolkit.
6. Consider using parameter <use
You can also consider setting the parameter <use
In summary, please first consider if this problem is network and web service provider server related. If not, you can try to use a predefined server to try speed up the WSDL file discover process and consider moving the web service integration function to a smaller set of toolkit to speed up the type generation time.