How to Implement DIME Messages |
To implement the use of DIME messages, you must add a new parameter after importing a Web Service Component into your repository. This parameter must be the last parameter in the list. This parameter will be used for file names that will be sent as attachments along with the SOAP message in the web service call. The parameter must have InList mode and Variable data type. You can now call the web service component with attachments from your application: INVOKE <web service component name>.<method name> WITH SELECT <input parameter 1>, <input parameter 2>, ... <input parameter n>, <file name 1>, <file name 2>... <file name m>
Where file names must contain the path. If you do not have a WSDL file for your web service, or if you do not want to use the web service component wizard, you can still create a web service component definition that sends a DIME message to a web service:
this=new com.usoft.WebServiceClient.CallWebService()
ar=com.usoft.joker.Util.newArray( (U)'java.lang.String',(i)'1' ) com.usoft.joker.Util.setArray( (O)ar,(i)'0',(O):4 ) this.sendDimeMessage( (U):0,(U):1,(U):2,(U)'',(U):3,([U)ar )
INVOKE <web service component name>.<method name> WITH SELECT < url used to access your web service>, <the soap body of the soap message>, <the soap header of the soap message if any, otherwise null>, <the folder where all files are located. It can be null>, <file name 1>, <file name 2>, ... <file name n> |