on 06-25-2014 2:02 PM
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.
Hi Dilip,
Plz check below helpful link
Regards,
Krupa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.