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

Implementing WS through ABAP Proxy

Former Member
0 Likes
789

Hi Guys,

Hope some of ypu gurus knows you way around webservices in the SAP world

I'm trying to use a webservice from ABAP.

The webservice is on the SAP Portal from Knowledge Management called RepositroyFrameworkWS.

I build a proxy through SE80 and setup a logical port through SOAMANAGER.

I then call one of the method on the proxy.


    CALL METHOD LO_CLIENTPROXY->FIND_RESOURCES
      EXPORTING
        INPUT  = ls_request
      IMPORTING
        OUTPUT = ls_response.

But i comes out with the same error always.

SOAP:1.007 SRT: Unsupported xstream found: ("HTTP Code 400 : Bad Request")

I debugged it and looks like the WS request has the wrong header.

In the method.

 
CL_SOAP_HTTP_TPBND_ROOT->GET_HTTP_HEADERS

there is a call

 
value = entity->get_header_field( if_http_header_fields=>content_type ).

it receives

"text/html;charset=ISO-8859-1"

but it will only accept stuff like

"text/xml" or

"application/xop+xml"

which seems reasonable.

Why is my request in the wrong format ?

4 REPLIES 4
Read only

former_member848108
Active Participant
0 Likes
679

Hi Rasmus,

Go to transaction LPCONFIG and open the logical port you have defined in edit mode.

Switch to "Operations" tab, for each method on the left side, the SOAP Action

on the right side has to be defined. For example, if the method is SAY_HELLO,

then its SOAP Action is "http://tempuri.org/UpdateSay_Hello" . It seems that you have left the SOAP

Action blank.

Best regards,

Ozcan.

Read only

0 Likes
679

Hi Ozcan,

I tried that.

I couldn't find the logical port i had created with the SOAMANAGER, so i created a new one.

Unfortunately there is no change after setting the SOAP action on the method.

Any other suggestions ?

- Rasmus

Read only

0 Likes
679

Hi again,

I am not sure if it will help but you may try to use the logical port name when creating the webservice proxy (see below).


 CREATE OBJECT LO_WSPROXY 
  EXPORTING LOGICAL_PORT_NAME = '<your_port_name_here>'. 

And you may have a look at SAP Note 1009109 - Analyzing Web service problems using the ICF recorder. May be you can find out the exact problem by tracing the soap messages.

Regards,

Ozcan.

Read only

0 Likes
679

Hi,

I am using the logical port to create the proxy class.

The note helps debug the SOAP exchange but the request is never send due to the header error, so it doesn't help me much.

Anybody else encountered similar errors ?

Br Rasmus