Hello everyone,
I am trying to consume a Web Service from BMC Remedy (non-SAP System) in SAP Solution Manager. I have generated the required ABAP Proxy Class from the WSDL file, created a logical port along with the authentification details using SOAMANAGER and instantiated the proxy class in an ABAP Program along with the request parameters to call the service. I keep getting the error message:- SoapFaultCode: 1.
Hence; I tried calling the service using the external open Source Program: SOAPUI 3.0.1. Here I saw that the SOAP Request includes a SOAP Header, whether the authentification details are embedded. After I added these details in the Request in SOAPUI, I could test the service successfully.
Now, I went back to the SAP system and saw that the Proxy Runtime generated only the ABAP types for the SOAP Body but no parameters were created for the SOAP Header. I found in SDN that the interface for adding SOAP Header is 'if_wsprotocol_ws_header'. Unfortunately, I did not find any documentation for it. So I just tried similar to the coding example of Thomas Jung but now I get XML parsing errors.
Can someone give me a working coding example or tutorial to solve this SOAP Header Problem? I am not sure if I am calling the following method correctly?
CALL METHOD lo_ws_header->if_wsprotocol_ws_header~set_request_header( name = name namespace =
namespace dom = xml_element ).
I would be really thankful if someone out there can help me to solve this problem.
PS: Following is the SOAP Request from SOAP UI that I need to build in the SAP System:-
http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:THD_Global_Interface_Ticket_V3">
<soapenv:Header>
<urn:AuthenticationInfo>
<urn:userName>?</urn:userName>
<urn:password>?</urn:password>
<!
Optional:
>
<urn:authentication>?</urn:authentication>
<!
Optional:
>
<urn:locale>?</urn:locale>
<!
Optional:
>
<urn:timeZone>?</urn:timeZone>
</urn:AuthenticationInfo>
</soapenv:Header>
<soapenv:Body>
<urn:OpCreate>
<urn:GI_WS_Action_LogDelta>?</urn:GI_WS_Action_LogDelta>
.....................
<urn:GI_TransferType>Create</urn:GI_TransferType>
<urn:GI_Direction>Incoming</urn:GI_Direction>
</urn:OpCreate>
</soapenv:Body>
</soapenv:Envelope>
Edited by: Manisha Rostewitz on Nov 18, 2009 10:48 PM
Problem solved with the correct implementation of CALL METHOD lo_ws_header->if_wsprotocol_ws_header~set_request_header( name = name namespace =
namespace dom = xml_element ).