Messaging Web Services Interface Descriptions

Parlay X Web Services Multimedia Messaging API 9-5 ref.setEndpointhttp:clienthost:8080notificationEndpoint; ref.setInterfaceMessageNotification; msgNotiMgrClient.startMessageNotificationref, sip:receiverexample.com,dummy_criteria_ignored;

9.5.4 Interface MessageNotificationManager, Operation: stopMessageNotification

This operation stops message notification at an endpoint for a user. If a user no longer has notification endpoints, all received messages for that user are no longer stored.

9.5.4.1 Code Example

msgNotiMgrClient.stopMessageNotificationcorrelator;

9.5.5 Interface ReceiveMessage, Operation: getReceivedMessages

This operation returns a set of incoming messages for a given user. Messages may only be received after notification has been enabled by invoking the startMessageNotifcation operation in the MessageNotificationManager interface.

9.5.5.1 Code Example

MapString, Object params = new HashMapString, Object; params.putBindingProvider.ENDPOINT_ADDRESS_PROPERTY, http:webservicehost:7001receiveMessageEndpoint; ReceiveMessageClient recvMsgClient = new ReceiveMessageClientparams; ListMessageReference msgs = recvMsgClient.getReceivedMessagessip:receiverexample.com, MessagePriority.DEFAULT; for MessageReference ref : msgs { System.out.printlnto: +ref.getMessageServiceActivationNumber; System.out.printlnfrom: +ref.getSenderAddress; System.out.printlnsubject: +ref.getSubject; String id = ref.getMessageIdentifier; if id == null || id.isEmpty { System.out.printlnmessage: +ref.getMessage; } else { Table 9–8 Interface MessageNotificationManager, Operation: stopMessageNotification Argument Type Required Description correlator String yes The correlator associated with an invocation of the startMessageNotification operation. Table 9–9 Interface ReceiveMessage, Operation: getReceivedMessages Argument Type Required Description registrationIdentifier StringSipURI yes The recipient SIP address for incoming messages. priority MessagePriority no This value is ignored. Return Value Type Description references ListMessageReference A list of messages received for this user. Each item may either have a message identifier or message content, but is not guaranteed to have both an identifier and content. 9-6 Developers Guide System.out.printlnID: +id; } }

9.5.6 Interface: ReceiveMessage, Operation: getMessage

This operation receives an incoming message as an attachment. Messages may only be received after notification has been enabled by invoking the startMessageNotifcation operation in the MessageNotificationManager interface.

9.5.6.1 Code Example

ListMessageReference msgs = recvMsgClient.getReceivedMessagessip:receiverexample.com, MessagePriority.DEFAULT; for MessageReference ref : msgs { String id = ref.getMessageIdentifier; String msgContent; if id == null || id.isEmpty { msgContent = ref.getMessage; } else { System.out.printlnID: + id; recvMsgClient.getMessageid; DataHandler dh = recvMsgClient.getAttachment; ByteArrayOutputStream baos = new ByteArrayOutputStream; BufferedOutputStream out = new BufferedOutputStreambaos; dh.writeToout; out.flush; msgContent = baos.toString; } System.out.printlnmessage: + msgContent; } Table 9–10 Oracle WebLogic Communication ServicesInterface: ReceiveMessage, Operation: getMessage Argument Type Required Description messageIdentifier String yes A string identifying the incoming message. This string is obtained either from the notifyMessageReception callback, or the getReceivedMessages operation invocation. Return Value Type Description na na After invoking the getMessage operation, the message content is stored in an attachment of type DataHandler.