cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Synchronous client proxy

former_member184948
Active Participant
0 Kudos

Hi Gurus,

I have created a scenario in which I am using client proxy at source side (ECC ) and soap at target side.

Its a synchronous scenario for which I have written an abap report.This interface sends a company name and uses a webservice to fetch the stock value of that company.

I am a beginner in abap, so I am unable to to know the reason why is it showing the following error when I am executing the code.

Method "EXECUTE_SYNCHRONOUS" is unknown or PROTECTED or PRIVATE.

------------------------------------------------------------------

This error is coming at line :

CALL METHOD Proxy->execute_synchronous

------------------------------------------------------------------

Following is the code :

REPORT  ZSYNC_PROXY_STOCKQUOTE NO STANDARD PAGE HEADING.

DATA Proxy TYPE REF TO ZCO_SI_SOURCE.

CREATE OBJECT Proxy.

DATA: t_company_name TYPE zsource_request_mt,

       t_stock_value TYPE zsource_response_mt.


SELECTION-SCREEN: BEGIN OF BLOCK B1.

PARAMETER: p_id TYPE String.

SELECTION-SCREEN: END OF BLOCK B1.

  START-of-selection.

  TRY.

    t_company_name-Source_Request_MT-Company_name = p_id.

    CALL METHOD Proxy->execute_synchronous


    Exporting

      output = t_company_name

   IMPORTING

     input = t_stock_value.

   WRITE: t_stock_value-Source_Response_MT-stock_value.

   CATCH cx_ai_system_fault.

     DATA fault TYPE REF TO cx_ai_system_fault.

     CREATE OBJECT FAULT.

    WRITE:/ fault->errortext.

    ENDTRY.

    END-OF-SELECTION.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (6)

Answers (6)

former_member184948
Active Participant
0 Kudos

Hi All,

Finally the scenario worked!!!

A few lessons learnt from this scenario:

1)In abap proxy NOT to use : execute_synchronous(used in old versions of ABAP AS ) but use service interface name for which configuring proxy.

2)Give ip address of proxy server in "configure proxy"  under general tab of receiver SOAP communication channel.If you do not set this correct, the channel shows error of proxy authentication fail.

3) In "SOAP action" field give complete name of soap action including the URL .Search for "action " key word in your wsdl .

I got : <soap12:operation soapAction="http://www.webserviceX.NET/GetQuote" style="document" />

So I used "http://www.webserviceX.NET/GetQuote"  and it finally worked.Whereas when I had written just GetQuote it showed error in the response.

former_member229310
Active Participant
0 Kudos

Hi,

You have wrongly assigned the method. It should not be pointing to Execute method.

it should be something like below

TRY.

           CREATE OBJECT proxy.

           CATCH cx_ai_system_fault.

  ENDTRY.

TRY.


    CALL METHOD Proxy->  " GIVE THE OUTBOUND SERVICE INTERFACE NAME HERE"

    Exporting
      output = t_company_name
   IMPORTING
     input = t_stock_value.

former_member184948
Active Participant
0 Kudos

Thanks Hari.

I realized this mistake and changed the code accordingly and its working fine but now at the target soap channel i am gettiing error

Actually this time I checked the 'proxy' check box and gave the proxy address of our network but still it says : Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 407 Proxy Authorization Required

SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 407 Proxy Authorization Required


former_member184948
Active Participant
0 Kudos

Hello Gurus,

The program is working fine now(this is what I guess  ) ,bcoz now its not showing any error.

Also using this program I can now post messge in PI successfully.

Actually problem was that I was using the method "execute_synchronous", but I read in one the links provided by you people that, this method was used prior to 7.1 version of PI , but after that we can use the service interface name since the class contains a method with that name which works in place of execute_synchronous.

But now, while posting message to webservice I get these error on receiver SOAP channel.

SOAP: request message entering the adapter with user J2EE_GUEST

SOAP: call failed: java.net.ConnectException: Connection timed out: connect

SOAP: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.net.ConnectException: Connection timed out: connect

MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.net.ConnectException: Connection timed out: connect

Adapter Framework caught exception: java.net.ConnectException: Connection timed out: connect

Delivering the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.net.ConnectException: Connection timed out: connect. Setting message to status failed.


The message status was set to FAIL.

Seems like there is problem with the connection.Could you please help me out in fixing this.

The URL I have set is : "http://www.webservicex.net/stockquote.asmx?"

I also tried the same URL with WSDL appended at the end but no use 

Please help.

Ryan-Crosby
Active Contributor
0 Kudos

Hi Dilip,

I would recommend trying to execute the service using soapUI to see if you can get it to execute successfully.  If you can get it work right there then you can transfer any necessary information to your SOAP receiver channel.

Regards,

Ryan Crosby

former_member184948
Active Participant
0 Kudos

Thanks Ryan for your help.

But I used Altova XML spy and used the downloaded WSDL file and it is working fine, i mean I am getting response back using altova.

Actually this time I checked the 'proxy' check box and gave the proxy address of our network but still it says : Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 407 Proxy Authorization Required

SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 407 Proxy Authorization Required

Ryan-Crosby
Active Contributor
0 Kudos

Hi Dilip,

The indication is that your SOAP receiver channel is missing the necessary authorization parameters to execute the service.

Regards,

Ryan Crosby

Ryan-Crosby
Active Contributor
0 Kudos

Hi Dilip,

Along the same thought as what Inaki has mentioned this error should be caught at compile time and you shouldn't even be able to execute the program with such an error.  Have you generated the proxy and activated the class ZCO_SI_SOURCE?  If you have activated the source did you check to see if it was public static vs. public instance with respect to Artem's post?

Regards,

Ryan Crosby

former_member192851
Active Participant
0 Kudos

Check this thread

Maybe helpful


BR

iaki_vila
Active Contributor
0 Kudos

HI DIlip,

Could you share the runtime exception?, or the error is in compilation time?

Have you check that the type are the correct for the input and output?

For example for the output, you can go to the sproxy, search your proxy (ABAP name Ref) :

When you create the proxy should use a try/catch instructions as well.

Check this blog to learn about ABAP proxies:

Regards.