cancel
Showing results for 
Search instead for 
Did you mean: 

Calling ABAP Webservice from BPM

Former Member
0 Kudos

Dear all,

I've performed the following steps in order to call a ABAP web service in an ECC system:

1: generate WS from function module

http://avelon03.avelon.local:8003/sap/bc/srt/rfc/sap/Z_maandag?sap-client=800&wsdl=1.1

2: create provider system for the backend system (destination ping = OK)

3: publish WS to Service Registry using the backend system as physical system

4: test the published service in the WSnavigator. I get prompted to log on to the backend system (as expected) and the service works. There a no obligatory parameters.

5: consume WS in BPM process. Select from the SR. The service definition is shown, but I cannot select a endpoint reference (lower part of the screen)!?

6: create automated activity and assign service to the created Service Group

7: Assign Service Group to Provider system in Business scenario communication

When I test this scenario I get a "unauthorised" error which indicates a error on the endpoint. I also believe the problem is caused by the endpoint. On another system I had this scenario running, but for some reason after a re-installation (trial version expired), it doesn't works anymore.

I have found several posts on this issue, but haven't found the solution...

Hopefully somebody can point me in the right direction. Please let me know if I can send the screenshots for more details.

Thanks a lot

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Martin,

Again thanks a lot, it sounds like we are getting there. However, our ECC system is no SP14 yet. So transaction SOAMANAGER does not exist. In this case (I think) we should go to the consumer side and use the Visual Administrator in order to adjust the endpoint and user credentials?

Or do you have other advise on how to do this on the ABAP side?

Thanks!

Former Member
0 Kudos

Hi Robert,

You have 2 options for solving the issues

1. Force Basic authentication in your WS call as :

1.1. Create SOA management User Account with credentials allowed to call WS in your Backend

1.2. Assign this User account to your Provider system

Note : In that way you will have all calls to the backend with one and the same user

2. Force SSO WS call as :

2.1.Register all your business users to be able to execute WS from your backend

2.2.Check whether Communication Profile assigned to your Provider System supports SSO communication and even the safest solution is to create an new Communication profile with only SSO HTTP authentication communication and assign to your Provider System

Best Regards,

Penka Tatarova

Former Member
0 Kudos

I've used a logical destination instead. This is working fine.

Soon I will start working on a second BPM scenario and give the Service Groups another try..

Thanks for all the help! It's really appreciated!

Former Member
0 Kudos

Hi Martin,

I'm not sure wat you mean exactly. As far as I can see you can only provide the origin on a service group. That was empty. I added the complete WSDL url there but I stil get the same error.

I get the following error:

TransportBindingException: Invalid Response code (401). Server <http://avelon03.avelon.local:8003/sap/bc/srt/rfc/sap/Z_MAANDAG?sap-client=800> returned message <Unauthorized>.

As you can see it refers to the WSDL url without the wsdl=1.1 extension. If I put that url in a webbrowser is doesn't work. With the wsdl=1.1 extension is does work.

Any idea on that?

Thanks a lot for your quick reaction(s)!

Former Member
0 Kudos

Hi Robert,

When you create a Z-service from your ABAP system, a service defintion appears in t-code soamanager for the same z-service.

In this z-service there is a default end-point defined which actually the bapi interface. If you look into the configurations of this endpoint, there is a tab wherein you will have to provide user-authentication.

This user is a SAP dialog user that you will need to give in.

Remember: The SAP user needs to have logon auths to system and auths to run that bapi also.

Once you configure the user-id there, just save the end point again.

Yes you are correct with the extension part. We get a service wsdl from providing a wsdl=1.1 extension.

Please note that you might have used logical destination for calling service. Take care of the user authorizations there also.

I hope this will solve your problem.

martin_moeller
Contributor
0 Kudos

Hi again,

The &wsdl=1.1 only specifies that you want to download the WSDL document for your specific endpoint. The endpoint itself (which receives the information) might be different. In your case it is the same URL without the &wsdl=1.1 which is common for SAP provided services AFAIK.

Nevertheless the ABAP backend denies accessing the service as you can see in the excerpt you posted. "401 Unauthorized" means that the user who wants to invoke the operation is not allowed to do so. That's the reason why you can test this service without problems in WS navigator (as you manually log in when being prompted for it), but the execution within the BPM process fails.

Best regards,

Martin

martin_moeller
Contributor
0 Kudos

Hi Robert,

The 'unauthorized' message looks like the configuration you've made simply passed the wrong credentials to the ABAP backend. Could you try to configure the service group in a way that the consumed service makes use of the credentials you've also used when you've tested via WS navigator?`

Thanks & Best regards,

Martin