Portlet Factory, Version 6.1.2
Web Service Call builder
This builder is used to call a web service defined with WSDL (Web Services Definition Language).
You can also use it to make a simple HTTP request, but, if you are calling a REST service or RSS/ATOM feeds, the REST Service Call builder may be more convenient.
The inputs that the web service call builder call editor displays depend on the type of service you select in the builder call editor.
Key inputs
In the most common application of this builder, the WSDL call is used. In that case, use this input to complete the call:
- WSDL URL
Key objects this builder creates
When used to create a WSDL call, the key objects this builder creates are:
- Data service
- input
- results
More about this builder
- Executing the service call
- Call the serviceCallName.invoke() method. In a model method or in an linked Java object method, call the invoke() method on the linked Java object that the Web Service Call builder call adds to the model. This linked Java object has the same name as the web Service Call builder call. The code below shows how to invoke a service call defined by a Web Service Call builder call named getISBN:
webAppAccess.callMethod("getISBN.invoke");- Storing the outputs
- The serviceCallName_reply variable stores the outputs of the service call. You can walk the results of the service call in the Choose Reference dialog when trying to use a value returned by the service call as an input to a builder call or as the value for an argument to an action.
- Using SOAP headers
- The serviceCallName_replyHeaders variable contains any SOAP headers stored in the SOAP response. SOAP headers are optional and not yet frequently used. And SOAP headers in SOAP response envelopes are used less often. It is expected that this variable value is not set under most common use cases.
- Sending raw data
- You can use the HTTP type of Web service call to send raw data. To do so, set a POST parameter called BODY_CONTENT. The supplied value is sent as the complete HTTP POST content of the request.
- Examination of specific error information
- If a web service call fails, you can retrieve the message for the SOAP fault. Rather than letting an error propagate to an error handler, you can examine specific error information on a web service call failure by implementing something similar to the following sample code.
IXml returnValue = null; try { returnValue = (IXml)webAppAccess.callMethod("myservice.invoke"); System.out.println("returnValue is: "+returnValue); } catch (Exception e) { // Note, actual exception may be wrapped in method call exception if (e instanceof com.bowstreet.util.WrappedException) { // If the method exception is wrapping another one, get the target exception Throwable se = ((com.bowstreet.util.WrappedException)e).getTargetException(); String msg = se.getMessage(); System.out.println("\nDEBUG: got " + msg); // Do something with the error message } else { // Do something with information from a generic exception } }
Parent topic: Builder help
- About using the builder call editor
The builder call editor allows you to specify all the input values to a builder call.
- Web Service Call builder inputs for an HTTP service
This topic describes the inputs for the Web Service Call builder for an HTTP service.
- Web Service Call builder inputs for a model-based local service
This topic describes the inputs for the Web Service Call builder for a model-based (local) service.
- Web Service Call builder inputs for a SOAP service
This topic describes the inputs for the Web Service Call builder for a SOAP service.
- Web Service Call builder inputs for a WSDL-based SOAP service
This topic describes the inputs that the Web Service Call builder takes for a SOAP service defined in a WSDL document.
- Setting the WSDL fetch timeout
A property is available to set the default timeout on the fetch WSDL operation invoked when the Fetch WSDL button is clicked.
- Using the Web Service Call builder with a SOAP service
You can call a SOAP service that is not defined with a WSDL document by entering the information needed to configure the SOAP request.
- Tips for calling an SSL/HTTPS-based URL
For issues relating to conflicts and untrusted certificate errors, note that your keys/certificates need to be installed with the correct JVM.
- Using WSRR with IBM WebSphere Portlet Factory
WebSphere® Service Registry and Repository (WSRR) provides a master metadata registry and repository for web services.
- Consuming a doc-literal type service
A doc-literal type service always has only one argument that is an XML document. This topic describes the steps to follow to consume such a service.
- Using the Web Service Call builder
The Web Service Call builder allows you to execute several different types of services, and displays different inputs according to the type of service call you choose.
- Example: catching a timeout exception
You can handle the case in which a service call or SQL transaction takes longer than the specified timeout value.
- Overview: web services
IBM® WebSphere Portlet Factory Designer allows you to call a web service.
- Testing services
You can test the services you call or create.
- WebSphere Service Registry and Repository Information Center
Library | Support |