Month: August 2017

BPMN Undeployment with NWDS

BPMN Undeployment with NWDS

Scenario

If you do not need a process anymore, it makes sense to undeploy a BPMN to free some resources.

Undeployment of a BPMN with NWDs

A BPMN can be undeployed with the help of the Netweaver Developer Studio (NWDS). Simply follow the steps below:

  1. Open the NWDS and connect to your PO system
  2. Open the “Deployment” perspective
  3. Wait till the list of BPMNs on the left side is loaded, click on your process and drag the object into the “Undeployment list” on the right side
  4. Click on the “Start” button

    NWDS: Process undeployment
    NWDS: Process undeployment
  5. After some seconds the process should be undeployed
SOAP Authentication with URL Parameters

SOAP Authentication with URL Parameters

Scenario

In one of my latest project we set up a SOAP communication with a partner. Unfortunately, the partner was not able to include basic authentication header when sending a SOAP message. As we did not want to expose our SOAP Sender communication channel to the web, but could not wait for the partner to find a way to use basic authentication, we looked for another solution.

Solution

It is possible to include the webservice credentials into the URL. Just add the following two parameters to the query string of your URL and replace USER and PASSWORD with the configured values.

&j_username=USER&j_password=PASSWORD

Please keep in mind that this solution is highly insecure as the username and password are exposed!

Create Webservice Mock Service with SOAP UI

Create Webservice Mock Service with SOAP UI

Scenario

If you want to see the message which is send by a SOAP, REST, XI or HTTP Receiver Communication Channel, you can use SOAP UI to create a Mock Service to log the headers and payloads of the message.

Create Mock Service with SOAP UI

  1. Create a new Project or open an existing one
  2. Right click on your request and select “New REST/SOAP MockService” (SOAP service will respond with a SOAP envelope, REST service will send back an empty response) and name it
  3. If you like to specify port and path, click on the gearwheel and specify both. Otherwise your endpoint will be listening on https://localhost:8080/

    SOAP UI: Configure Mock Service parameters
    SOAP UI: Configure Mock Service parameters
  4. Open the “OnRequest Script” Tab and paste the following line into the editor
    log.info(mockRequest.getRequestContent())
  5. Open the “Script Log” Tab and start your Mock Service with the green play button

    SOAP UI Mock Service: Log Payload of requests
    SOAP UI Mock Service: Log Payload of requests

Configure Receiver Communication Channel

  1. Find out your local IP Address (for example with this website)
  2. Make sure that your PC is reachable from PI (Firewall)
  3. Add your IP Address with the above configured port and path to the URL of your Receiver Communication Channel
  4. Send a request to your endpoint. The payload will be shown in the “Script Log”

Additional options

You can use the full scope of Groovy to write your scripts. Please find below two useful snippets to log your requests.

To log the headers use:

log.info(mockRequest.getRequestHeaders())

To write the request data into a file use:

def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def projectroot = groovyUtils.projectPath
def inputFile = new File(projectroot + "\\request.txt")

log.info("Writing request to file: " + projectroot + "\\request.txt")
inputFile.setBytes(mockRequest.getRawRequestData())

For more information of the mockRequest class in SOAP UI, check the class documentation.

Also it is possible to send custom responses, please check the SOAP UI Documentation for more information.

Message in status Message recorded (commit missing)

Message in status Message recorded (commit missing)

Scenario

You created a test message with the testing tool in transaction SPROXY to test an asynchronous interface out of your ERP system. Afterwards you checked transaction “SXMB_MONI” or “SXI_MONITOR” for the test message.

Error

The message has a white flag and shows the following error:

Message in status Message recorded (commit missing)

sxi_monitor: Messages in status commit
sxi_monitor: Messages in status commit

Solution

Asynchronous message are recorded until the work is committed. Go back to the “Test Service Consumer” view of transaction “SPROXY” and click on Extras – > Trigger COMMIT WORK.

Trigger Commit Work in Proxy Test Tool
Trigger Commit Work in Proxy Test Tool

The message should be sent to the receiving system now. If you call your proxy out of some ABAP code, make sure you do not forget to add a commit statement.

Peer certificate rejected by ChainVerifier

Peer certificate rejected by ChainVerifier

Scenario

In a scenario with a SSL encrypted (HTTPS) SOAP target URL in the SOAP receiver channel, the message goes into an error state.

Error

The following error is shown in Message Log in PIMON:

SOAP: Call failed: java.io.IOException: Failed to get the input stream from socket: iaik.security.ssl.SSLCertificateException: Peer certificate rejected by ChainVerifier

Solution

The SSL certificate needs to be imported into PIs keystore.

Download the certificate from the target server
  1. Open the Target URL in Chrome (or any other Browser)
  2. Open the developer tools by clicking on the three dots -> More Tools -> Developer Tools (Shortcut STRG + SHIFT + I)

    Chrome: Open developer tools
    Chrome: Open developer tools
  3. Go to the “Security” Tab and click on “View certificate”
  4. Go to the Details Tab and click on “Copy to file” button
  5. Click on the “Next” button and select “DER-codet-binary X.509 (.CER)”

    Download Certificate
    Download Certificate
  6. Click on “Next” button and select a destination on you local PC
Import certificate into keystore
  1. Open the Netweaver Administrator (http://your.pi:port/nwa)
  2. Go to Configuration -> Security -> Certificates and Keys
  3. Select the “Trusted CAs” View and click on “Import Entry”
  4. Select entry type “X.509 Certificate”, enter the path to the certificate you downloaded before and click on “Import”

    Certificates and Keys: Import entry
    Certificates and Keys: Import entry
  5. Resend your message

If your error is not resolved, open the certificate again and click on certification path. Afterwards, double click the first and second certificate (one after each other), save them and also import them into the TrustedCAx view.