Categories
apis internet

Testing connectivity with pymetrics Web Services using SOAP UI software

This guide will explain how you can use SOAP UI Open Source software to run API calls to pymetrics Web Services APIs. I will run you through the steps of how to set up your environment so you can start testing and engaging with the pymetrics Web Services APIs.

How to test the pymetrics Web Services using SOAP UI

Step 0 – Install Soap UI Open Source

If you haven’t already done so, please download and install the free SoapUI Open Source software on your computer via soapui.org/downloads/soapui.html. For basic details demo on how to test it on a public free API data source, you can review this post here.

Step 1 – Add pymetrics Web Services to SOAP UI

Add a “New SOAP Project” to your SOAP UI software by clicking on File> New SOAP Project and add in the following details:

  • Project name: pymetrics Web Services (or your name of choice)
  • Initial WSDL link: https://www.pymetrics.com/docs/integrations/webservice/v2
  • Create Requests: Tick (optional but it’s good for auto generating some sample body data that you often need to send with requests so you start getting familiar with it).
Create a "New SOAP Project" where you add in the pymetrics.com WSDL link
Add in the pymetrics.com WSDL link

Step 2 – Test that your new pymetrics SOAP project is working

You will want to test that you have added the new SOAP project and it is configured to the pymetrics Web Services endpoint correctly. The best way to test is using the Echo API.

The goal of the Echo API is to just respond back to let you know that it has received your API call. No authentication is needed so you can use this API call to just confirm the connectivity and connection.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pym="pym.intg.ws.2.0.0">
   <soapenv:Header/>
   <soapenv:Body>
      <pym:echo>
         <pym:echo>Test Echo</pym:echo>
      </pym:echo>
   </soapenv:Body>
</soapenv:Envelope>

Step 3 – Echo API should repeat what you have sent

Echo API should repeat (echo) what you have sent. As it’s goal is to confirm that it has received your API request and sends back the same message in response.

If you have received the same message, then you’re successful in configuring your SOAP UI to interface with the pymetrics Web Services endpoint.

Here are some examples of how the Echo API should function:

Using the Echo API call to send the words “Test Echo”
Using the Echo API call to send the words “Sending a different message to Echo”

Step 4 – Success your SOAP UI is configured!

You are now configured to start using SOAP UI and engaging with the pymetrics Web Services endpoint.

(Optional) Nice to have configuration for SOAP UI

You can consider seeing up your SOAP UI environment so that it shows some helpful functionality.

I like to turn on the Debug, Header tab, and Request Properties windows, as this gives me more information about the API calls and endpoints that am working with.

Example configuration with "Header" window open
Example configuration with “Header” window open
Example configuration with "Debug" window open
Example configuration with “Debug” window open

Enjoy using SOAP UI to test your endpoints!

Categories
internet

How to fix the “updating failed” error on WordPress and Cloudflare

This is a guide on how to fix the “updating failed” error on WordPress 5.2.3 and Cloudflare.

As context, I am running my blog on WordPress, hosted on Google Cloud Platform (GCP) and using Cloudflare for my CDN (Content Delivery Network) to bring my content closer to my readers.

My key goals this year have been to update my blog to:

  1. Ensure SSL and HTTPS is working correctly throughout the website to comply with Google’s SEO requirements
  2. Mixed Content is managed (so I am not showing content from both https:// and https:// sources, which affects my SEO)

I faced this error which was unexpected, which I am sure others may face as well.

Updating Failed error message on WordPress 5.2.3

Reasons for why you are seeing the “Updating Failed” error

You may be wondering why suddenly you cannot edit or create new posts. One of the main reason is related to the update that WordPress made when version 5 was made available. That is, WordPress 5.0, 5.1, 5.2 onwards. So if you have recently updated WordPress to latest version you may suddenly notice that you cannot update any posts nor can you publish any new posts or pages. This is mainly related to how WordPress 5’s “Gutenberg editor”.

Ways to solve the “Updating Failed” error on WordPress 5.2.3

Here are some suggested approaches you can explore to help you post again and fix the “Updating Failed” error on your WordPress website.

  1. Clear your browser cache
  2. Run the WordPress Site Health healthcheck plugin and update your WordPress to HTTPS (recommended)
  3. Change to Full SSL on Cloudflare from Flexible SSL
  4. Install the WordPress Classic Editor plug in
  5. Turn off HTTPS for all pages of your WordPress blog while you are editing (not recommended)
  6. Deactivate the security plugins (not recommended)
  7. Changing your permalinks (not recommended)

1. Clear your browser cache

Didn’t work for me, but you can try and see if this helps you

2. Run the WordPress Site Health healthcheck plugin and update your WordPress to HTTPS (recommended)

I tested the Site Health healthcheck using the inbuilt WordPress 5 feature called “Site Health”. This is found under “Tools> Site Health”. It was what solved my problem permanently.

For me, the Site Health said that I was accessing the site via https, but the address in my WordPress> Settings> General setup was still http. I updated this discrepancy and the failures went away. It may differ depending on your set up on how you fix this as well, but the sub-steps below describe my process. I hope it helps!

General settings that is missing the HTTPS:// and has https:// for the website link
Tools> Site Health to check your WordPress health

For advanced users only as this will be technical, and for those using Google Cloud Platform (GCP) and Bitnami as I am, you’ll need to make the following changes via the SSH of your Google Cloud platform.

For those using ngnix for your server you will type these commands:

$sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php
$sudo /opt/bitnami/ctlscript.sh restart

For those using apache for your server you will type these commands:

$sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php
$sudo /opt/bitnami/ctlscript.sh restart apache

(Optional) You may notice that I was using the “$sudo chmod 660 /opt/bitnami/apps/wordpress/htdocs/wp-config.php” command as well in my screenshot chmod 660 command as that is needed to give my WordPress instance enough memory to run plugins (in may help you in case you haven’t already done so already).

$sudo chmod 660 /opt/bitnami/apps/wordpress/htdocs/wp-config.php are using chmod 660 command as that is needed to give your WordPress instance enough memory to run plugins (in case you haven’t already done so already).

In SSH type these commands to get into the config file
Edit these two lines of code
Save this by using the hotkey selection Control (^) + O on a Mac
Receive a confirmation it has been saved
Check your posts to see if you can edit
Test another post

3. Change to Full SSL from Flexible SSL on Cloudflare

If you are using Cloudflare, you can switch to “Full SSL” mode. You can change this in your SSL/ TLS settings> Overview tab.

4. Install the WordPress Classic Editor plug in

You can also try installing the “Classic Editor” plugin to see if your post are editable. This did not work for me but it is worth testing. This will disable WordPress 5’s “Gutenberg editor” and you can see if that resolves the issue.
Classic Editor plugin at wordpress.org/plugins/classic-editor/

5. Turn off HTTPS for all pages of your WordPress blog (not recommended)

You can consider turning off HTTPS for all pages of your WordPress blog while you are editing each time though I do not recommend this. As it does mean your website is not secure during these instances.

On Cloudflare, I changed this setting via the Page Rules to test this, you can also do this via the global settings too. For Page Rules For Global settings this is found at: SSL/ TLS > Edge Certificates> Always Use HTTPS.

Changing the Always Use HTTPS via the global site wide settings
Changing the Always Use HTTPS via Page Rules

6. Deactivate the security plugins to fix the “Updating Failed” error on WordPress (not recommended)

Some folks have recommended disabling security plugins but I do not recommend this. Very likely one of the security plugins may be locking your website to SSL (Always use HTTPS settings) or variations around that.

7. Changing your permalinks to fix the “Updating Failed” error on WordPress (not recommended)

This has been suggested by folks but I do not recommend it as it affects your SEO. Since it will change your web links completely so it will take time for your links to update throughout the internet, meaning you will lose your website visitors.

If you are really keen though, you can change this in your WordPress dashboard, under Settings > Permalinks, click on Save changes. Then try to publish your page/post again.

I hope that helps you to get back to what you and I love doing, and that’s writing more posts. Happy blogging! 😉