First, welcome back as we continue our journey on using soapUI to test SAP Cloud webservices.  Also a Happy New Year 2014 !

Before we continue, note that I wrote the title as “test any Cloud webservice” because soapUI is just a diagnostic tool to be used.  It is NOT a  production tool to do the actual integration.  Rather, with soapUI, you can easily diagnose (independent of SAP, your environment, the network, etc) what issues may be stopping your integration using the SAP webservice.

So let’s resume:

3. Complete the right parameters for the WSDL

To make a request using the Customer Query webservice, the parameters are in XML format in the provided Request 1.  The sample Request 1 will include every defined parameter.

It looks like this below.   The values to be filled are left as “?” by the WSDL.

3 - Request XML.png

For this operation “QueryByIdentification”, there are multiple parameter “groups” – SelectionByInteralID (line 8), SelectionByUUID (line 19), etc.

We will edit the XML to retrieve a customer with the Internal ID of  67890.  We remove the XML we don’t need.

So the updated XML (reduced by a lot!) within the <Body> looks like this:

   <soapenv:Body>

      <glob:CustomerByIdentificationQuery_sync>

         <!–Optional:–>

         <CustomerSelectionByIdentification>

            <!–Zero or more repetitions:–>

            <SelectionByInternalID>

               <!–Optional:–>

               <InclusionExclusionCode>I</InclusionExclusionCode>

               <!–Optional:–>

               <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>

               <!–Optional:–>

               <LowerBoundaryInternalID>67890</LowerBoundaryInternalID>

               <!–Optional:–>

            </SelectionByInternalID>

            <!–Zero or more repetitions:–>

         </CustomerSelectionByIdentification>

         <!–Optional:–>

         <ProcessingConditions>

            <!–Optional:–>

            <QueryHitsMaximumNumberValue>100</QueryHitsMaximumNumberValue>

            <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>

         </ProcessingConditions>

         <!–Optional:–>

      </glob:CustomerByIdentificationQuery_sync>

or in soapUI:

3-soapUI retrieve with parameters.png

An important note is the <ProcessingConditions> node (see line 20 in the diagarm above).  This is mandatory.  The values I have used is to specifiy a max of 100 records and that it’s NOT unlimited rows to be retrieved.  That is, we are limiting our return set of records up to 100.

You will learn from the documentation how to specify a range of customer IDs.  Right now, I’m showing just 1 Account to be retrieved.

Be sure to save your project by clicking on menu File -> Save All Projects

4. Run the WSDL.

a. Before you run the webservice call, a good practice is to check the syntax.   Do a right-mouse click, and select

4-Validate.png

Generally it will tell you the line number and what error is causing the issue.  Note that this is syntax checking and validation according to the WSDL definition.

b. As you can see, there’s another best practice to do — which is to use the “Format XML” (again in the screenshot).  If your XML starts looking like spagetti or chow-mein, use this to reformat your XML.

c. Last step – make sure your Request has the credentials to access the webservice.  This would be setup when the Communication Arrangements was created, and the userid generally starts with “_”  underscore.

     Enter the webservice userid and password in the bottom left properties box to the respective property:

4-Userid.png

Finally we can run this !  To run,  click the GREEN arrow for your request.  See here:

4-Run.png

If this is a valid Account ID, the results will appear in the window to the right of the Request XML.   If it is not found or an error, you will also see it in the response XML.

I hope this blog has provided a good kickstart on your way to doing integrations with SAP Cloud applications !

To report this post you need to login first.

10 Comments

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

  1. David Cortes

    Hi Tim,

     

    Excellent blog. I’ve got some problems when I try to execute any web service from SAP Cloud for Customers. I have followed almost all points and the web service is response with the next error:

     

    <faultstring xml:lang=”en”>Web service processing error; more details in the web service error log on provider side (UTC timestamp 20140505153529; Transaction ID 00163E05CA881EE3B58D5C52D085CBF4)</faultstring>

     

    The point which I was not able to followed was the user and password. I am using my user and password for the web service execution, the one which I used to log in. I could not find any specific user for communication (user which ID start with “_”). Is there any other configuration I missed for configuring/execution Web Services?? Thank you for your help. Best regards my friend.

     

    David Cortes

    (0) 
    1. Tim Chang Post author

      Common question – all webservices generally come as “packages” – aka communication arrangements.  Just getting the WSDL from Service Explorer.is not enough.

       

      1. Create the Communication system

      2. Create a Communication Arrangement (from the Communication Scenario template).  Eg in BYD, the eCommerce CA contains Account Query and Account Maintain web services.

       

      3. In the CA definition, you set the password.  User id is created by system (usually _ + communication system name).

       

      Just look up the help for more info.

       

      BTW, you can post  in the forum. Faster reply from me / anyone else. Good luck.  Tim.

      (0) 
      1. Chinnaiah Balakrishna

        Hi Tim,

         

        This was a good document, i am trying to test this scenario in my C4C system using SOAP UI. I get the following error. Can you help me in this?

         

        Authorization role missing for service “ServiceInterface http://sap.com/xi/A1S/Global QueryCustomerIn &lt;default>

         

        I have done all configuration from C4C side and using _ user id and same time even mine.

         

        Thanks

        Bala.

        (0) 
  2. Sunil Kumar Maurya

    Hi Tim,

    I am testing an inbound webservice query account

    1. I have created communication system with the hostname as same system url my300XXX.crm.ondemand.com

    2. Communication arrangement with credential then I downloaded “Query Account” WSDL and created a new project on SOAPUI.

    but when I am testing, I get nothing but at the bottom of SOAPUI, I can see the error

    Tue Jul 08 18:16:51 IST 2014:ERROR:Exception in request: java.net.UnknownHostException: my300XXX.crm.ondemand.com.

     

    Could you please help me why this is happening in my case. I also tried with proxy but the same result.

    (0) 
    1. Jens Limbach

      Hi Sunil,

       

      you need to check your SOAP UI proxy settings. Probably SOAP UI cannot connect to the SAP Cloud because it is blocked by some Proxy of your company network.

       

      You could try using a hotspot from your mobile (which usually has no proxy).

       

      Other workaround: Try with the SOAPUI version 4.0.1 as a test. In the past this sometimes made things work.

       

      Cheers,

      Jens

      (0) 
    2. Tim Chang Post author

      Jens is correct – most likely a proxy issue due to your corporate environment.

       

      Please check the soapUI proxy settings in soapUI:   File -> Preferences.  Click on Proxy Settings (2nd choice).  Enter the proxy info.

       

      Also soapUI 4.0.1 tends to be our favorite version – even though it’s older. 

      (0) 
  3. Deepak Shiva

    Hi Tim,

     

           This is an excellent right up, I followed all the steps and it is working perfectly. I’m getting the response for the payload sent. I wanted to know how do i debug my web service method? I placed an external breakpoint in the class which is supposed to be called when i send the payload, in that external breakpoint i provide the user which the system generated in the communication arrangement, however the debugger does not seem to take that user, it throws an error saying ‘Only Dialog user possible’, the user which gets generated is of type system user when i check in SU01. So how can i enable debugging?

     

    Thanks,

    Deepak

    (0) 
    1. Tim Chang Post author

      Hmm.. we may need to move this discussion over to the forum.

       

      But first, is your webservice in ECC ?

       

      The method in this blog is for Cloud APIs provided as pre-delivered in C4C, BYD, Cloud for Travel, etc…  These are all inbound to cloud.

       

      Please clarify (and I suggest we move this to the forum – to get wider audience.  We get more fellow SMEs to answer and readers who may also benefit).

      (0) 
  4. Daniele Monti

    Hi Tim,

    great Blog.

     

    We have a problem with a inbound web service in C4C but we can’t find how solve it.

     

    Our purpose is to update opportunity with follow up document number created in ERP.

    For this purpose we execute the web service FollowUpDocumentNotificatio and we done all activity for integration with PI.

    In web service message monitor Incoming webservice status is Successful, but nothing change in opportunity document.

     

    So I started to test the web service with SOAP UI in order to find the correct payload.

     

    The error in SOAP UI is

         <faultstring xml:lang=”en”>Web service processing error; more details in the web service error log on provider side (UTC timestamp 20160218163710; Transaction ID 00163E164D581ED5B5CBBB6F3858946F)</faultstring>

    but i can’t see nothing in Web Service Message Monitoring.

     

    If I insert a wrong payload in SOAPUI, I can see in Web Service Message Monitoring the error ‘Wrong SOAP Version’, so I can assume that there are no autentication problem.

     

    What can I do for understand what is wrong in our payload?

     

    Thanks and regards.

    Daniele

    (0) 

Leave a Reply