Quantcast
Channel: SCN: Message List - ABAP Connectivity
Viewing all articles
Browse latest Browse all 3125

Object reference not set to an instance of an object

$
0
0

Hi Experts.

 

I am trying call an webservice synch from ABAP (ECC 6.17)

 

I had already imported wsdl into Service Consumer to generate my ABAP class and had created ZSER01 Logical Port as following

 

logical port.png

I incremented wsdl as this SAP Note suggested - 1710478 - How to select custom certificate list (PSE) for Logical Ports in SOAMANAGER

 

I configured PSE in STRUST and now I can connect to webservice but the response is "Object reference not set to an instance of an object".

 

I really don't know how I can solve this.

 

My ABAP program for test is simple:

 

DATA: proxy  TYPE REF TO zserasaco_wsgestordecisao_soap,       ls_output TYPE zserasaanalisar_credito_ssoap,       ls_input  TYPE zserasaanalisar_credito_ssoap1,       fault  TYPE REF TO cx_root.
 ls_input-s_cnpj          = '61586558002562'.
 ls_input-s_usr_gc        = '879'.
 ls_input-s_pass_gc       = '16407'.
 ls_input-s_usr_ser       = '9759'.
 ls_input-s_pass_ser      = '4287'.
 ls_input-vr_compra       = 97765.
 ls_input-b_serasa        = 'X'.
 ls_input-b_atualizar     = space.
 ls_input-i_quadro_social = 1.
 TRY.     CREATE OBJECT proxy       EXPORTING         logical_port_name = 'ZSER01'.     BREAK-POINT.     TRY.         CALL METHOD proxy->analisar_credito_s           EXPORTING             input  = ls_input           IMPORTING             output = ls_output.       CATCH cx_ai_system_fault INTO fault.         ls_output-analisar_credito_sresult = fault->get_text( ).       CATCH cx_ai_application_fault INTO fault.         ls_output-analisar_credito_sresult = fault->get_text( ).     ENDTRY.   CATCH cx_ai_system_fault INTO fault.     ls_output-analisar_credito_sresult = fault->get_text( ).
 ENDTRY.
 WRITE ls_output-analisar_credito_sresult.

Any idea?

 

Thanks in advanced.


Viewing all articles
Browse latest Browse all 3125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>