Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: dparry on June 29, 2007, 02:16:42 PM
-
We're trying to attach data to a call using the Java interaction SDK against a 7.2 GIS. We are not using UCS and we have tried the following scenarios:
Scenario1:
acceptCall
// wait for events
answerCall
// some period of time passes...
attachCallData
hangup
afterCallWork
finaliseInteraction
Scenario2:
acceptCall
// wait for events
answerCall
// some period of time passes...
hangup
afterCallWork
attachCallData
finaliseInteraction
When we try and attach the data in either scenario we get an error of error.common.BadAttributeType (although we see the attached data being sent over to GIS)
12:52:38.016 Alr 20010 [http-9970-Processor100] com.genesyslab.ail.ws.interaction.impl.InteractionUtils setDTOToInteraction bad attribute type interaction:addAttachedData interactionId Phonecall-0400831771-0131016baae42ee9
12:52:38.039 Dbg 20012 [http-9970-Processor100] com.genesyslab.soa.Trace AIL:com.genesyslab.ail.ws.interaction.impl.InteractionServiceImpl setInteractionsDTO return :
InteractionError-->
attributeErrors :
AttributeError-->
attribute : interaction:addAttachedData
error : error.common.BadAttributeType
interactionError : null
interactionId : Phonecall-234567-0131016baae42ee9
We've created code based on what's in agent interaction sdk 7.2 pdf (pages 103-104) as follows:
[code]
public void attachCallData( GenesysAgent agent, String interactionId, Map<String, Object> data ) {
try {
Set<String> dataKeys = data.keySet();
AttachedData[] allAttachedData = new AttachedData[dataKeys.size()];
int keyLocation = 0;
for (String key : dataKeys) {
AttachedData attachedData = new AttachedData();
attachedData.setKey(key);
attachedData.setValue(data.get(key));
allAttachedData[keyLocation++] = attachedData;
}
KeyValue keyValue = new KeyValue();
keyValue.setKey("interaction:addAttachedData");
keyValue.setValue(allAttachedData);
InteractionDTO interaction = new InteractionDTO();
interaction.setData(new KeyValue[] { keyValue });
interaction.setInteractionId(interactionId);
InteractionError[] errors =
this.connection.getInteractionService()
.setInteractionsDTO(new InteractionDTO[] { interaction });
if (null != errors) {
// process errors...
}
} else {
success = true;
}
} catch (Exception e) {
// Handle exceptions...
}
}
[/code]
The documentation states that we should be using interaction:addAttachedData
GIS says otherwise! I've tried this on our lab environment (against TServer SIP) and at a customer installation both with the same results.
We've got consult-user-data set to joint in the configuration.
Thanks,
David
-
Hi, Dave,
I do not have the code in front of me, but I remember that when you add data, you either add Int or String - there are two separate members for it. This is why you specify the type to be Int or String...
I did not program GIS for a while, but it seems like you are adding a string into an integer field... Please correct me if I am wrong. And don't you need to specify the type as well?
Best regards,
Vic
-
David,
In regards to GIS, you need to check out WSDL of the related flow. For example, afaik, GIS utilizes different flows (XMLs) for different operations. As Vic put, you should first check that you should have used "type" before submitting your data to GIS Proxy, and the WSDL on server side.
I came across the similar problems. Related documents on GIS development (or reference guide) could help you. Please let me know if you have any question.
Regards,
Ali
-
Hello Vik and Ali,
Thanks for your replies. OK, I'm not 100% sure I follow you. We're coding against the java proxy classes which don't appear to allow the type to be specified. ie com.genesyslab.www.services.ail.types.interaction.AttachedData only has set methods for the key and value, taking a String and Object respectively. I checked against the WSDL for the Interaction service
http://ourserver:8088/gis/services/AIL_InteractionService?wsdl
which showed the following (snippet)
[code]
<complexType name="AttachedData">
<sequence>
<element name="key" nillable="true" type="xsd:string"/>
<element name="value" nillable="true" type="xsd:anyType"/>
</sequence>
</complexType>
[/code]
The documentation shows how to create an object heirarchy and where to set the interaction:addAttachedData and interaction id, but there does not appear to be any methods for specifying the type? I assumed that it checked any fields were serializable and used reflection in the axis code to build the soap message?
Any suggestions on where I could look at setting the type would be great (I've looked in what i've got and cant see anything obvious).
Thanks,
David