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
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 ..
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
Add a comment