Skip to end of metadata
Go to start of metadata

Portal Request Failed ..... (Could not execute web service operation)

Question: When I execute a web service, I retrieve the error Portal Request Failed ..... (Could not execute web service operation). What is the reason for this?

There are multiple reasons why this error pops up.

Mandatory fields

When you create a webservice system using your WSDL URL in Visual Composer, it makes all the input parameters of your webservice method mandatory. Make sure you are passing all the parameters while calling your webservice.

Input or Return types

If the method that you are calling of your web service has either return type or input parameter as

  • Set or HashMap or List (i mean any of the collection objects) then you may have problems. Only simple data type are working.
  • Array (any kind of array) , VC starts cribbing again.
  • UserDefined Datatype , which inturn has any of the collection object or array.

For example:

public abstract class EventData implements Serializable {
    protected long id;
    protected String name;
    protected Set eventIDs
}

Visual Composer returns this error.

In order to avoid all these issues , change your return types or input parameters of webservice methods to primitive java data types. If the number of parameters is large, create your own class with primitive Data types only.

Cache

If you changed the web service, but still use the same URL, the old web service definition might still be stored in the cache. To avoid that follow these steps:

  1. in Visual Composer select Tools -> Option and then on the tab strip Compiler select from the drop down Data Service retrieval the option "Do not cache data services (get latest)".
  2. Stop the server
  3. Delete the cached files from this path: D:\usr\sap\P4S\DVEBMGS01\j2ee\cluster\server0\temp\webservices\dyn
  4. Restart the server.

Authorization and Authentication

The user running the application has to be authenticated for each web service that you are using. You might not need this depending on many factors including the portal's configuration, the authentication methods of the web service (from CAF for example), the way you defined the web service alias in VC, or if you created the alias in the portal directly. Regardless, if the issue is stemming from an authorization problem follow the below steps:

  1. Log into the portal
  2. Navigate to 'User Administration' or 'Delegated User Administration'.
  3. Find the user that whishes to run the application and click modify.
  4. Go the User Mapping for System Alias.
  5. Select the System which needs to be executed and enter a valid Username and Password which has Authorization to execute this web service.
    1. If this web service is deployed on the same server / portal then just enter the user's (or a dummy user's) credentials for this portal.
    2. Else enter the external required credentials.
  6. Repeat for each user that must execute this Web service.

SAP WebServices Checker

Test your web service with the SAP WebServices Checker. To do so, perform the following steps:

  1. Open SAP NetWeaver Developer Studio
  2. Select Window -> Open perspective -> Enterprise Portal
  3. Load the WSDL
  4. Right-click on one of the methods and perform Create SOAP request
  5. Enter the parameter value(s)
  6. Send the message

The WebServices Checker might find out that you have the following problems:

RemoveWhiteSpace function

When using the SAP WebServicesChecker the created SOAP Request also contains carriage returns and blanks. The RemoveWhiteSpace function in the agent code however does not remove those characters. To do so, you have to add the following statements:

i1 = Instr(1, PlainText, Chr$(10))
While i1 <> 0
PlainText = Mid$(PlainText, 1, i1-1) & Mid$(PlainText, i1+1)
i1 = Instr(1, PlainText, Chr$(10))
Wend

i1 = Instr(1, PlainText, " <")
While i1 <> 0
PlainText = Mid$(PlainText, 1, i1-1) & Mid$(PlainText, i1+1)
i1 = Instr(1, PlainText, " <")
Wend

Addressing and usage of the LotusScript Library

The addressing of the ISBN Search function relies on an URI: identifier that should be used to find the script library called Domino" which hosts the ISBNSearch() function. This does not work since the SOAP request does not contain a URI: identifier. To solve this issue, add Use "Domino" to the options of the script library to the agent and change the call to ISBNSearch from Execute callString to response = ISBNSearch(incoming).

Summarizing the Lotus agent and script library code is subject to improvement since the usage of such string manipulations is error-prone. It is more effective and more stable to use a SOAP Parser implementation such as the Microsoft SOAP toolkit or others which also work fine with DOmino R6.

Fault returned {0}

tbd

Failed to fetch Metadata or Portal Request failed due to: Operation {0}

You can see the entire list of BAPI's that it contains converted as web services, but when you try to drag any of the BAPI's i get the following error.

Check, if you dragged the service on a layer, and not on the storyboard. You cannot drag a webservice system directly into a layer in VC but first needs to be dragged on to your story board and from there into the desired layer.

  • No labels