Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CX_AI_SOAP_FAULT when "/>" found inside XML node.

victor_oliveira2
Explorer
0 Kudos

Hi, experts.

My program Dumps when i try to use some external webservice using a xml inside other xml node.
Im using wsdl generated proxies.

He's the code.


DATA: proxy TYPE REF TO ZBRWEBSERVICE_WEBSERVICE_WSACT .

DATA : v_output TYPE ZBRWEBSERVICE_WSACTIVEWSACTI30.

DATA : V_INPUT TYPE ZBRWEBSERVICE_WSACTIVEWSACTI31.

data: v_string type string.

data: err_string type string.

data: lo_soap_exception type ref to CX_AI_SOAP_FAULT.

CONCATENATE '<ROWDATA><ROW TOKEN="" SOMEXMLATTRIBUTES="" '

'SOMEXMLATTRIBUTES="" SOMEXMLATTRIBUTES="" SOMEXMLATTRIBUTES="" SOMEXMLATTRIBUTES=""  COT_CLIRETIRA="N" '

'SOMEXMLATTRIBUTES="" SOMEXMLATTRIBUTES="" XML="10.500"SOMEXMLATTRIBUTES="" SOMEXMLATTRIBUTES="" OTA="12304.760" '

'COT_KM="0.00000" COT_PRIORI="V" COT_OBS=""'/></ROWDATA>'

INTO v_string.

v_input-xml = v_string.

TRY.

    CREATE OBJECT proxy

      EXPORTING

        logical_port_name = 'WEBSERVICE'.

  CATCH cx_ai_system_fault.

ENDTRY.

TRY.

  CALL METHOD proxy->zws_method

    EXPORTING

      INPUT  = v_input

    IMPORTING

      output = v_output.

catch CX_AI_SOAP_FAULT into lo_soap_exception.

err_string =  lo_soap_exception->get_text( ).

ENDTRY.

I always got CX_AI_SOAP_FAULT saying the XML is not in valid format. if i remove the slash at the end of ROW tag there is no dump but the webservice im using says the xml is not valid too (malformed). either way i can't retrive the information.

I tried many things and i've searched a lot but cant find a clue about how to solve this.

8 REPLIES 8

Former Member
0 Kudos

Should you keep the blank space at the end of each string that you are concatenating? if yes, try to replace ' (regular quotation mark) for ` (back quotation mark)

CONCATENATE `<ROWDATA><ROW TOKEN="" SOMEXMLATTRIBUTES="" ` 

`SOMEXMLATTRIBUTES="" SOMEXMLATTRIBUTES="" SOMEXMLATTRIBUTES="" SOMEXMLATTRIBUTES=""  COT_CLIRETIRA="N" ` 

`SOMEXMLATTRIBUTES="" SOMEXMLATTRIBUTES="" XML="10.500"SOMEXMLATTRIBUTES="" SOMEXMLATTRIBUTES="" OTA="12304.760" ` 

`COT_KM="0.00000" COT_PRIORI="V" COT_OBS=""'/></ROWDATA>`

Regards,

Felipe

0 Kudos

The spaces are not that relevant. And i tried this before and only the slash at the end of ROW tag seems to be.

Former Member
0 Kudos

Could you try replacing <row token="" /> with <row token=""></row>  ?

0 Kudos

i've tried this one, same problem as removing the slash.

PeterJonker
Active Contributor
0 Kudos

Did you try using CDATA ?

<![CDATA[  now here comes your xml string  ]]>

0 Kudos

yes i have, ECC parses the info the right way, so does de webservice but when the webservice try to use the info in his internal functions it can't identify which data i'm sending.

0 Kudos

Isn't it then a problem of the external webservice that they have to solve, because CDATA is the way you need to send unparsed data.

0 Kudos

thats right, but i can't do nothing about it becouse its a 3rd party webservice.