Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

Re: Serialize/deserialze an abap object to XML

$
0
0

Hi Gourav Khare,

 

I have created WSDL file through function module in SAP-ECC 5.0v.

I have followed below steps:

Crated FM (SE37)

Crated Web-service (SE37)

Generated WSDL file using (WSADMIN)

And consumed WSDF file in SOAP UI (SOAP UI 4.5.2 Trailer version)

 

Problem is: while consuming WSDL file in  SOAP UI I getting  ‘Serialisation failed’

For your reference I have furnished xml string below.

SOAP UI Input:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:rfc:functions">

<soapenv:Header/>

<soapenv:Body>

<urn:YSDF_INV_PRINT_FINAL_RFC_WS_N>

<!--Optional:-->

<PWR_INVOICE>

<INVOICE_SHIPPED_LINE>

<!--Zero or more repetitions:-->

<item>

<POSITION1></POSITION1>

<SALES_PART></SALES_PART>

<PART_DESC></PART_DESC>

<PRICE></PRICE>

<QUANTITY></QUANTITY>

<CUSTOMER_TAX_NO></CUSTOMER_TAX_NO>

<PROD_NONINVENTORY></PROD_NONINVENTORY>

<PROD_TAXABLE></PROD_TAXABLE>

<TAX_LEVEL></TAX_LEVEL>

</item>

            </INVOICE_SHIPPED_LINE>

<INVOICE_NO></INVOICE_NO>

<ORDER_NO></ORDER_NO>

<DATE_PRINTED></DATE_PRINTED>

<DIV_CD></DIV_CD>

<LAST_COST_INVOICE></LAST_COST_INVOICE>

<DELETE_ZERO_COST></DELETE_ZERO_COST>

<DELETE_NON_SHIPPED></DELETE_NON_SHIPPED>

<GLOBALREF></GLOBALREF>

<ORIGIN></ORIGIN>

<ORIGINID></ORIGINID>

</PWR_INVOICE>

</urn:YSDF_INV_PRINT_FINAL_RFC_WS_N>

</soapenv:Body>

</soapenv:Envelope>

SOAP UI Output:

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">

<soap-env:Body>

<soap-env:Fault>

<faultcode>soap-env:Client</faultcode>

<faultstring xml:lang="en">Serialisation failed</faultstring>

<detail>

<n0:SimpleTransformationFault xmlns:n0="http://www.sap.com/transformation-templates">

<MainName>/1BCDWB/WSS0130716111624448000</MainName>

<ProgName>/1BCDWB/WSS0130716111624448000</ProgName>

<Line>8</Line>

<Valid>X</Valid>

<ReferenceFault>

<DescriptionText>Error accessing the ref. node 'INVOICE_ID'</DescriptionText>

<RefName>INVOICE_ID</RefName>

</ReferenceFault>

<Caller>

                  <Class>CL_SRG_RFC_PROXY_CONTEXT</Class>

<Method>IF_SXML_PART~DECODE</Method>

<Positions>1</Positions>

               </Caller>

</n0:SimpleTransformationFault>

</detail>

</soap-env:Fault>

</soap-env:Body>

</soap-env:Envelope>

 

And one more things are

I don't know the exact reason, but now the WSDL is working fine. No Idea, will it be consistent.

No changes in import and export parameters of RFC and no change in code, even if the logic is changed it should not affect the output on SOAP UI but in my case it does.

Wonder why all this happens, I cannot explain the exact reason technically because my RFC works fine every time, only issue is with SOAP UI.

From SAP point of view FM is working fine, and input parameter of FM is optional, validations are done by the programming logic and it will capture the message and its details with respect to input data.

 

I am not sure SOAP will work consistently.  

 

Kindly help me on this

Thanks & Regards,

  1. Akshath.L.T

Viewing all articles
Browse latest Browse all 10425

Trending Articles



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