cancel
Showing results for 
Search instead for 
Did you mean: 

How to edit HTTP-Header-Fields from a generated consumer-proxy ?

Former Member
0 Kudos

Hey,

i want to consume a webservice via SOAP, i've already created a proxyclass with a given WSDL and manually created a logical-port via SOAMANAGER.

Is there any possibility to edit the HTTP-Header-Fields of a generated consumer-proxy, because the generated HTTP-Header has a wrong field. In the gernerated header there is an extra field for soapaction="urn:getVersion" but it should be integrated in the Content-Type field.

working headergenerated header

POST https://cig.dhl.de/services/sandbox/soap HTTP/1.1

Accept-Encoding: gzip,deflate

Content-Type: application/soap+xml;charset=UTF-8;action="urn:getVersion"

Content-Length: 549

Host: cig.dhl.de

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

POST /services/sandbox/soap HTTP/1.1

Content-Type: application/soap+xml; charset=utf-8

Content-Length: 584

accept-language: de sap-language: D

soapaction: "urn:getVersion"

accept: application/soap+xml

callingtype: SA sap-srt_id: 20160107/152338/v1.00_final_6.40/000C295946371ED5ADA9470FDE7ABF8D

user-agent: SAP NetWeaver Application Server (1.0;731) host: cig.dhl.de

accept-encoding: gzip

I`ve used SOAPUI to create a working request with a working header and i`ve also created a working request in SAP using this methods:

    

CALL METHOD lo_http_client->request->set_header_field

CALL METHOD lo_http_client->send

CALL METHOD lo_http_client->receive

+ SOAP-Message with concatenated strings.


I have to use the generated proxyclass to use it's methods but therefore i need to edit the HTTP-Header first.

Are there any solutions for this problem ?

Thank you for your help !




Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey guys,

i solved the problem by myself, i had to configure the logical-port settings in the SOAMANAGER.

there is a tab called "transport settings", i had to select "MTOM" at the optimized XML-transfer field.

Everything is working fine now.

Former Member
0 Kudos

Hi Kevin,

I have the same problem, I need to add a custom http header to a Consumer Proxy. Can you give a example how you did it? I mean the ABAP code.

Thanks!

Answers (0)