Created
April 5, 2018 19:14
-
-
Save marianogonzalez/0092e9e23fa9ca23af19d776fc7ba95a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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