function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Collecting document in apex class parsed from webservice

Hi All,


We are trying to integrate SAP to SFDC. The process is to pass the Product Code from Salesforce and retrieve the pricing information from SAP.


One of the approach we thought is:

The pricing information will be stored as an attachment in SAP system.

The pricing information will be stored in SAP system. We will parse the wsdl file of SAP to generate apex class. The method should be that when we pass the Product code, we have to retrieve the pricing attachment from SAP system and store the same as an attachment in our Product object.


So following are my questions:


1. Can the wsdl file hold attachments also?

2. Can we collect attachments in apex code and create them in the instance?


If yes, what will be the datatype for collecting that and how do we convert that datatype to attachment type to store it


Any suggestions will be of a great help