In part 1, the Business Object and Screen was created. Here we wil implement the call to the web service.

 

The logic we are going to use, is that we in C4C have an event that is called before save. When the user will enter the data and then clicking ‘Save’ a call to the web service is performed – the id of the Connection Object and Premise is returned by the web service, and all is stored in the business object we created.

 

In order to implement the service, we need to:

 

  1. Have the WSDL for the service.
    • This is the WSDL we saved the URL for in the first blog – if you do not remember, then just go here.
  2. The name of the communication arrangement in C4C.

 

Let’s begin implementing in the SDK.

 

 

Implementing the Web Service

 

First right click on our project and select .Add -> New Item’.

/wp-content/uploads/2016/09/2016_09_05_19_03_16_1030501.png

 

On the list displayed select – ‘External Web Service Integration’, give it a name and select ‘Add’.

 

 

 

/wp-content/uploads/2016/09/2016_09_05_19_04_18_1030553.png

 

 

The SDK automatically suggest a name for the Communication Scenario, we need this when we perform the configuration in C4C later, just make sure you note down the name for later use.

 

Also – Change the setting to ‘Application Integration’.

 

Then click ‘Next’.

 

/wp-content/uploads/2016/09/2016_09_05_19_14_46_1030554.png

 

On the below screen there is no need for any changes. We see that it already list the one service operation we have.

 

 

 

 

/wp-content/uploads/2016/09/2016_09_05_19_07_24_1030559.png

 

Now click ‘Finish’.

 

You are then brought back here – OBS – the below view has a file extension of ‘.csd’ – this is the setting for the Communication Scenario.

 

Here you again have to select ‘Application Integration’ (1).

 

Next – see there is a tab for ‘Services’ click this TAB.

 

/wp-content/uploads/2016/09/2016_09_05_19_08_11_1030561.png

 

 

 

You then find the service under ‘Custom Outbound Services’.

 

Select this and then ‘Save and Activate”.

/wp-content/uploads/2016/09/2016_09_05_19_15_10_1030562.png

 

 

The web service is now implemented in the SDK. In order for it to be used, we to:

 

  1. Configure C4C to handle the communocation
  2. Implement code in the SDK to call the web service from our project.

 

 

Configure C4C to handle the communication.

 

Before implementing the final code, we will perform this configuration because we need information from this configuration in our code later.

 

 

To configure communication in C4C, we need the following 3 things:

 

 

 

/wp-content/uploads/2016/09/c4c_config_comm1_1030563.png

 

  1. Communication System:
    • This is the link between the C4C tenant and IS-U, will already be available as we are working in a system where integration is already running.
  2. Communication Scenario:
    • We created this from the SDK above, this will also be in place.
  3. Communication Arrangement
    • Here we link the Communication Scenario and the Communication System together.
    • The name of the communication arrangement is required in our code later.

 

 

Since 1) and 2) above is already done, we will go directly to the Communication Arrangement creation.

 

 

You will need to logon to C4C and go to the ‘Administration’ work center. Here you select ‘Communication Arrangement’.

 

 

/wp-content/uploads/2016/09/2016_09_06_16_38_08_1030564.png

 

 

THIS IS A WORKAROUND

 

There is a couple of data points I did not know where to get, except from looking at the services already implemented. On the list of Communication Arrangement I opened the service configured for ‘MOVEINOUT’.

 

BE AWARE – We want to go into edit mode, and you do this by selecting the line (NOT THE LINK) and then choose ‘Edit’.

 

/wp-content/uploads/2016/09/2016_09_06_17_08_41_1030604.png

 

 

This will open the the following view. Here we can note down the Communication System, we will need this when creating our own Communication Arrangement.

 

 

 

/wp-content/uploads/2016/09/2016_09_06_17_10_39_1030606.png

 

 

Then select the tab ‘Technical Data’.

 

 

 

/wp-content/uploads/2016/09/2016_09_06_17_14_28_1030616.png

In this view click the button ‘Edit Advanced Settings’.

 

This will open up the following view:

 

 

/wp-content/uploads/2016/09/2016_09_06_17_01_49_1030599.png

The 2 things we need from here is:

  • The Port number – in this case ‘44320’
  • The part of the path INFRONT of ‘XISOAP…’ – in this case ‘/vlm23387’

 

With this we are ready to configure a new Communication Arrangement. Cancel out and do not save anything for this service.

 

 

—-

 

 

Go to Communication Arrangement and click on ‘New’ – this will start wizard:

 

/wp-content/uploads/2016/09/2016_09_06_16_40_30_1030577.png

 

First we need to select the Communication Scenario. Here we already find the one we created via the SDK.

 

Then select ‘Next’.

 

 

/wp-content/uploads/2016/09/2016_09_06_16_43_27_1030580.png

 

 

On the above screen we enter the Communication System. We have that from the service we analyzed before. Then click ‘Next’ and then as we did when analyzing the service click on ‘Edit Advanced Settings’.

 

 

/wp-content/uploads/2016/09/2016_09_06_18_32_43_1030617.png

 

 

Here we need to enter the ‘Port’ – the one we found above.

 

The URL for the path should be provided by the PI consultant. The URL can be found by selecting the ‘Display WSDL’ from the sender agreement in PI.

 

/wp-content/uploads/2016/09/2016_09_06_18_15_45_1030618.png

 

Copy this URL from the point starting ‘XISOAP…’ .

 

Now copy this in to a text editor and remove all the ‘amp’ parameters from this URL. So if you as an example this in the URL – “senderService=CfC_ERP_UTIL&amp”, change this to – “senderService=CfC_ERP_UTIL&”. You will find ‘amp’ several times in the URL.

 

After this then add the start of the path we found for the MoveInOut service – in our case ‘/vlm23387’ in front of the modified URL. This would result in the URL now starting like “/vlm23387/XISOAP….” – this is the URL we copy in to the ‘Path’ field in C4C.

 

 

/wp-content/uploads/2016/09/2016_09_06_18_48_27_1030781.png

 

Then click on the ‘Check Service’ button. If your configuration is OK – you should see the following message at the bottom of the view:

 

/wp-content/uploads/2016/09/2016_09_06_18_51_40_1030782.png

 

Now it is time to go back to the SDK and call the web service. Remember that we need to have the name of the Communication Arrangement when we implement the service. This is covered in Part 3.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply