cancel
Showing results for 
Search instead for 
Did you mean: 

Unsuccessful Call to Web Service - SAP unable to marshal SOAP response

Former Member
0 Kudos

I am currently in the process of trying to use a proxy in SAP in order to communicate with an external web service residing in Microsoft IIS.

The SAP system being used is ECC 6.0 (SAP Basis 7.0). Using SE80, I built the client proxy using the wizard available in the system. After the proxy was created, I then created the logical port using LPCONFIG.

When trying to invoke the web service, I am getting the below exception from the SAP piece of code. I am getting the same error if I do the test proxy as well. The web service being invoked is very simple. There are no parameters on the request and the response is basically a string.

Class: CL_PROXY_OUTBOUND_ADAPTER

Method: IF_PROXY_FRAMEWORK_OUTBOUND~CALL_EXECUTE_OUT

=====================================================

lv_response_part ?= me->execute( request_part ).

  • if the result from execute does not match the expected response_part an

  • error has happend

if lv_response_part <> response_part.

if lv_response_part is initial.

  • unknown result from execute

cl_proxy_runtime_errors=>system_fault_from_params(

category = cx_xms_system_error=>co_category_xiproxy

id = cx_xms_syserr_proxy=>co_id_general_error

value1 = 'PART UNKNOWN (NULL)'

).

endif.

=====================================================

I used an external tool called tcpmon to make sure that the request being made is correct and that the return from the web service is correct as well. Even though the call to the web service was sucessful, for some reason SAP cannot marshal the response coming back.

Below is the code that executes the web service.

DATA:

r_exception TYPE REF TO cx_ai_system_fault,

r_proxy TYPE REF TO zvinceco_service1soap,

g_request TYPE zvincehello_world_soap_in,

g_response TYPE zvincehello_world_soap_out.

TRY.

CREATE OBJECT r_proxy

EXPORTING

logical_port_name = 'VINCE_LP3'.

CALL METHOD r_proxy->hello_world

EXPORTING

input = g_request

IMPORTING

output = g_response.

CATCH cx_ai_system_fault INTO r_exception.

DATA:

l_err TYPE string.

l_err = r_exception->get_text( ).

CATCH cx_ai_application_fault .

ENDTRY.

Any ideas or comments to the above issue would be appreciated.

Regards,

Vince

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello, I have the exact same problem with SAP_BASIS 700 SP 14 but it works with SAP_BASIS 740 SP 5.

Do you know witch SP or OSS note that could fix that problem ?


SAP_BASIS 700 SP 14

  loop at parameter_tab assigning <parameter>.

    if <parameter>-direction = sprox_const_dir_importing

    or <parameter>-direction = sprox_const_dir_changing.

      request_part->add_data_ref( name = <parameter>-name data_ref = <parameter>-value ).

    endif.


SAP_BASIS 740 SP 5.

loop at parameter_tab assigning <parameter>.

     if <parameter>-direction = sprox_const_dir_importing

     or <parameter>-direction = sprox_const_dir_changing.

       if not lr_request_part_st is initial.

         <parameter>-value = adjust_request( <parameter>-value ).

         me->request_name = <parameter>-name.

         me->request_data = <parameter>-value.

         lr_request_part_st->add_data_ref( name = <parameter>-name data_ref = <parameter>-value ).


Thanks


Former Member
0 Kudos

Did you try to call a webservice built with JAVA ??? I had some problems of compatibility between .net and J2EE world.... Or if you can try with the last .net framework 3.5....

(I'm sure that I'm wrong, and I can't help you....)

Edited by: Jerome Fortias on Jan 14, 2009 9:45 AM

Former Member
0 Kudos

I can call the webservice using SOAPUI tool, which I think is a Java platform. The issue comes when you try to consume it using ECC. In our case we are going to use WebDynro (ABAP) to call the service. But, even before we do that - we can not even test the proxy via SE80. It gives us this error message. Yet the proxy is consistant and the wsdl is clean according to the proxy.

thanks,

Mike

Former Member
0 Kudos

did you ever get a fix for this? I have the exact same problem and have a note open with SAP.

thanks