Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@OnException(SalesforceSessionExpiredExceptionSalesforceSocketConnectionExceptionEnricher.class)
@OutputResolver(output = ApexSoapMetadataCategoryResolver.class)
public XMLStreamReader invokeApexSoapMethod(@Connection AbstractConfig connection,
@DisplayName("Apex Class Method Name") @MetadataKeyId(ApexSoapMetadataCategoryResolver.class) String soapMethodName,
@Content @TypeResolver(ApexSoapMetadataCategoryResolver.class) XMLStreamReader input)
throws SalesforceException, SoapCallException {
SalesforceConnector connector = new SalesforceConnector();
connector.setConfig(connection);
connector.initialize();
// TODO: Accessing the Message or Event is no longer permitted in SDK operations.
// Operations should clearly define which data they need through their parameters. This helps ensuring that:
// -> Strict type checking works on every component
// -> Avoid operations which only works if placed in a particular part of the flow or before/after some
// component
// -> No operation can access flowVars (they are exclusive to the user)
// For more information about SDK operations, see: https://docs.mulesoft.com/mule-sdk/v/1.1/operations
XMLStreamReader result = connector.invokeApexSoapMethod(soapMethodName, input, ((MuleEvent) null));
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.