Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Integrating with an external system problem

Former Member
0 Likes
1,301

Hello!

I am writing a program for a local railways company. The task is to transmit data from SAP tables as a XML data to an external system which evaluates tariffs and receive a XML document back (with all those tariffs evaluated). I cannot use both XI and J2EE, I need to write it on ABAP.

The external system provides a webservice. I've got an URL to WSDL file. When I try to get it, I receive error 500. The header of a HTTP request looks like this:

~request_uri MY_HOST_NAME/MY_WSDL_FILE.WSDL

~request_method POST

~server_protocol HTTP/1.1

As you can see, the message-body is empty. I don't know should it be filled with something or not. I also don't know if method CL_HTTP_CLIENT->SEND appends any extra fields to HTTP header of request prior to sending.

Then I call CL_HTTP_CLIENT->RECEIVE to get response. It looks like this:

~response_line: HTTP/1.1 500 Business Server Page Error

~server_protocol: HTTP/1.1

~status_code: 500

~status_reason: Business Server Page Error

content-type: text/plain; charset=utf-8

content-length: 319

server: SAP Web Application Server (1.0;620)

~remote_addr:

~uri_scheme_expanded: NONE

Business Server Page (BSP) Error##URL%d0%bd%d0%b5%d1%81%d0%be%d0%b4%d0%b5%d1%80%d0%b6%d0%b8%d1%82%d0%bf%d0%be%d0%bb%d0%bd%d0%be%d0%b3%d0%be%d1%83%d0%ba%d0%b0%d0%b7%d0%b0%d0%bd%d0%b8%d1%8f%d0%b4%d0%be%d0%bc%d0%b5%d0%bd%d0%b0(MY_HOST_NAME%d0%b2%d0%bc%d0%b5%d1%81%d1%82%d0%beMY_HOST_NAME%2e%3cdomain%3e%2e%3cext%3e)%2e

Response message body contains URL-encoded string. My attempts at decoding it weren't successful.

I use class CL_HTTP_CLIENT to send request and listen for response.

The question is, why do I get error 500? Should I fill request body with something?

Please help!

Thanks in advance,

Dima

Hello!

I am writing a program for a local railways company. The task is to transmit data from SAP tables as a XML data to an external system which evaluates tariffs and receive a XML document back (with all those tariffs evaluated). I cannot use both XI and J2EE, I need to write it on ABAP.

The external system provides a webservice. I've got an URL to WSDL file. When I try to get it, I receive error 500. The header of a HTTP request looks like this:

~request_uri MY_HOST_NAME/MY_WSDL_FILE.WSDL

~request_method POST

~server_protocol HTTP/1.1

As you can see, the message-body is empty. I don't know should it be filled with something or not. I also don't know if method CL_HTTP_CLIENT->SEND appends any extra fields to HTTP header of request prior to sending.

Then I call CL_HTTP_CLIENT->RECEIVE to get response. It looks like this:

~response_line: HTTP/1.1 500 Business Server Page Error

~server_protocol: HTTP/1.1

~status_code: 500

~status_reason: Business Server Page Error

content-type: text/plain; charset=utf-8

content-length: 319

server: SAP Web Application Server (1.0;620)

~remote_addr:

~uri_scheme_expanded: NONE

Business Server Page (BSP) Error##URL%d0%bd%d0%b5%d1%81%d0%be%d0%b4%d0%b5%d1%80%d0%b6%d0%b8%d1%82%d0%bf%d0%be%d0%bb%d0%bd%d0%be%d0%b3%d0%be%d1%83%d0%ba%d0%b0%d0%b7%d0%b0%d0%bd%d0%b8%d1%8f%d0%b4%d0%be%d0%bc%d0%b5%d0%bd%d0%b0(MY_HOST_NAME%d0%b2%d0%bc%d0%b5%d1%81%d1%82%d0%beMY_HOST_NAME%2e%3cdomain%3e%2e%3cext%3e)%2e

Response message body contains URL-encoded string. My attempts at decoding it weren't successful.

I use class CL_HTTP_CLIENT to send request and listen for response.

The question is, why do I get error 500? Should I fill request body with something?

Please help!

Thanks in advance,

Dima

7 REPLIES 7
Read only

Former Member
0 Likes
1,187

Hi Dima ,

First of all , lets check if the webservice that you are trying to use takes in which parameters and may be some of them are mandatory to pass. Use some tools like Altova XML spy to test the webservice first.

Are you on MySAPERP? If yes, then to consume webservice in ABAP is fairly easy. You can go to SE80 ..find enterprise services tab and all the steps are mentioned therein.

Generally Error 500 occur due to following:

1. Probably there are some mandatory parameters which needs to be send.

2. The server is too busy to respond to the query.

Also,

As per my experience of sending the XML data, sometimes, the HTML header gets appended to the main body. You need to test this in debug mode , if this is happening. The XML must be transmitted without the header ..

Read only

Former Member
0 Likes
1,187

Hi Disha,

Your advice wasn't helpful because I have SAP Basis version of 620 where there are no client proxies in SE80 (at least I wasn't able to find one via menus), but thanks anyway.

I've activated the 'default_host' node in transaction SICF, and I still get error 500. I've been told that no additional parameters are need to be sent.

What should I do?

Regards,

Dima

Read only

0 Likes
1,187

Hi Dima,

Is it possible for you to provide me the link for webservice which you are trying to use?

Also, if possible, please post your program which you have written to consume the webservice.

You are right ..Client Proxies are not available in 6.2..they are available in 6.4 WAS - as Enterprise Services.

Not too sure, but I hope you have provided the Background user / password ..

Since you are getting 500 error message, then I guess the system is able to communicate over the internet..

Regards,

Disha

Read only

Former Member
0 Likes
1,187

Hi Disha,

I've solved this problem on my own.

Thank you.

Regards,

Dima

Read only

0 Likes
1,187

Hi Dima,

Do let me know the solution. I will enhance my knowledge too.

Thanks!

Disha

Read only

Former Member
0 Likes
1,187

Hi Disha,

I'll tell the solution you when I get everything working.

Best Regards,

Dima

Read only

Former Member
0 Likes
1,187

Hi Disha,

The problem was that server didn't support DNS. That is, if you type in IP address as a host name, you'll get connected without any problems.

But I believe there are more problems to rise...

Regards, Dima