SOAP WebHook
The SOAP WebHook is supported in a Custom Template with Content and Context based routing types. For a custom template, we require a process flow designed that have been explained here. While using SOAP WebHook, user must adhere to the following guidelines also.
Guidelines for Using SOAP WebHook
Sync/Async Mode Handling
- By default, SOAP WebHook is supported in synchronous mode. However, to use this in an asynchronous mode user should send the sync parameter in SOAP Header with value as false.
Attachment Handling
- Connect supports only one attachment in request while using SOAP WebHook with context based routing. Whereas, request using SOAP WebHook with content based routing support multiple attachments. In response, the user can set multiple attachments.
- If the user uses MTOM then the input XML schema should be defined while in the process flow of the Custom Template. Following is the example for MTOM Request and Response.
Request with MTOM | Response with MTOM |
---|---|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" <soapenv:Header> <token>857303</token> <sync>true</sync> <soapenv:Header> <soapenv:Body> <request> cid:fileName </request> </soapenv:Body> </soapenv:Envelope> Attachment with file name/id = fileId | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <response> cid:fileName </response> </soapenv:Body> </soapenv:Envelope> Attachment with file name/id = fileId |
- You can refer to the following parameters that can be used to set in context for attachments:
Parameter Name | Parameter Description |
---|---|
responseBinaryAttachmentPath | The binary attachment folder location that will attach all the files in the response. |
reponseMimeAttachmentFolderPath | The mime attachment folder location that will attach all the files in the response. |
requestAttachmentPath | The location of request MTOM files. The value can get from the PF context. |
requestAttachmentFiles | The names of file of request MTOM files. The value can get from PF context. |
- While using a Context Based routing, user must give the file name as an attachment, and while using content based routing xpath is required.
Execution Handling
- User can also set the Fault Code, Fault String, and Fault Detail in the context variable of the process flow defined for the custom template in use. The properties can be set in the context for letting SOAP WebHook send a SOAP Fault response with the configured value. Following parameters need to be set in the context to run the various faults in SOAP WebHook.
Parameter Name | Parameter Description |
---|---|
SOAPFaultCode | The fault code. |
SOAPFaultString | The fault summary string. |
SOAPFaultDetail | The fault description in XML format. |
- Use the following parameter in context of process flow for execute a successful response.
Parameter Name | Parameter Description |
---|---|
response | The response XML that will be returned as a successful response. |
Using WebHook
After you have created templates/transactions using SOAP WebHook with the criteria and guidelines mentioned above, you must Copy the Token and download WSDL and run it in any application. To Copy the token and download WSDL:
- Go to Configure.
- Click Templates to view the list of templates.
- Go to the template using SOAP WebHook and click arrow under Action, you would view the option to Copy Token and Download WSDL.
- You can SOAP UI to execute the downloaded WSDL.