cancel
Showing results for 
Search instead for 
Did you mean: 

Problem when calling WebService via Client Proxy

Former Member
0 Kudos

Hi,

i would like to call the following webservice from ABAP. www.esynaps.com/WebServices/DailyDiblert.asmx

I have created a Client Proxy from the WSDL - but when running the application i always get the following exception:

CX_AI_SYSTEM_FAULT

In debug mode i can get the following failure messages:

httpcode: 400

httpreason: Bad request. I only understand GET

please guide me.

regards,

martin

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

i create a client proxy and tried with the following code and it worked fine.

REPORT  y_consume_dilbert_ws.

DATA:

lo_clientproxy     TYPE REF TO ywsco_daily_dilbert_soap ,
  lo_sys_exception   TYPE REF TO cx_ai_system_fault,

   ls_request         TYPE ywsdaily_dilbert_image_path_s1,
   ls_response        TYPE ywsdaily_dilbert_image_path_so.

CREATE OBJECT lo_clientproxy.
TRY.

    CALL METHOD lo_clientproxy->daily_dilbert_image_path
      EXPORTING
        input  = ls_request
      IMPORTING
        output = ls_response.

  CATCH cx_ai_system_fault INTO lo_sys_exception.

ENDTRY.
COMMIT WORK.

looks like you are trying to pass something to the service. post your code we will see whats going to wrong.

Former Member
0 Kudos

Hi,

i am using the following code:


DATA: proxy TYPE REF TO ZCO_XML_DAILY_FACT_SOAP,
           in TYPE ZGET_XML_DAILY_FACT_SOAP_IN,
           out TYPE ZGET_XML_DAILY_FACT_SOAP_OUT.

CREATE OBJECT proxy
  EXPORTING
    logical_port_name = 'LP_DF_00'.

*TRY.
CALL METHOD proxy->get_xml_daily_fact
  EXPORTING
    input  = in
  IMPORTING
    OUTPUT = out
    .

athavanraja
Active Contributor
0 Kudos

the WSDL you referred had only the following operations

DAILY_DILBERT_IMAGE

DAILY_DILBERT_IMAGE_PATH

whats this method?

get_xml_daily_fact

Raja

Former Member
0 Kudos

Sorry - posted the wrong code. I have also tested the service mentioned in the code above - but it also doesn't work


DATA: proxy TYPE REF TO zddco_daily_dilbert_soap,
      in TYPE zdddaily_dilbert_image_soap_in,
      out TYPE zdddaily_dilbert_image_soap_ou.

DATA: lo_sys_exception   TYPE REF TO cx_ai_system_fault.

CREATE OBJECT proxy
  EXPORTING
    logical_port_name = 'LP_DD_00'.


TRY.
CALL METHOD proxy->daily_dilbert_image
  EXPORTING
    input  = in
  IMPORTING
    output = out.
CATCH CX_AI_SYSTEM_FAULT INTO lo_sys_exception.
* CATCH CX_AI_APPLICATION_FAULT .
ENDTRY.

athavanraja
Active Contributor
0 Kudos

i tried daily_dilbert_image operation as well and its working fine.

couple of clarification:

did you do any special configuration in the logical port - i mean does it connect via HTTP destination or url?

what type of runtime is used in logical port?

do you connect to internet via proxy server?

Raja

Former Member
0 Kudos

i connect via a logical port.

in the logical port i use a http destination ("ZZ_DD_00")

I have defined the http destination im sm59 as type g with following parameters:

target host: www.esynaps.com

Path Prefix: /WebServices/DailyDiblert.asmx

Proxy Host: proxy

Proxy Service: 8083

thats all i have done.

br,

martin

athavanraja
Active Contributor
0 Kudos

and did you test the http desitnation from SM59 , does it work fine? i tried with the url method, i will check with http destination method and update you

athavanraja
Active Contributor
0 Kudos

with the same settings as yours i have checked and its working fine. only difference is that i have to pass proxy userid/pwd in http destination definition.

Raja

Former Member
0 Kudos

hi,

i checked sm59 several times. i always got a green checkmark showing that everyting works fine - but no detailed result.

now i have changed the proxy port to 8080 and i get a detailed result including response time.

thanks for your help !!!

kind regards,

martin

athavanraja
Active Contributor
0 Kudos

glad to know its resolved.

Answers (0)