org.activemath.webapp.tutor.cgWSClient
Class ClientUtil

java.lang.Object
  extended by org.activemath.webapp.tutor.cgWSClient.ClientUtil

public class ClientUtil
extends Object

Facilitate the client call to the web service via Axis2. All the methods in this class just make the request in an OMElement


Field Summary
static String cgNameSpace
           
static String cgNSprefix
           
static String ERROR_MSG_ELNM
           
 
Constructor Summary
ClientUtil()
           
 
Method Summary
static org.apache.axiom.om.OMElement getEchoOMElement()
          Make the request for calling the Echo service method
static org.apache.axiom.om.OMElement getGenerateCourseWithLearnerKnowledgeMapRequest(String task, List contentIds, Map learnerKnowledge)
          Make the request for calling the generateCourseWithLearnerKnowledgeMap.
static org.apache.axiom.om.OMElement getGenerateCourseWithLearnerModelURLRequest(String task, String learnerModelURL, String userId, List contentIds)
          Make the request for calling the generateCourseWithLearnerModelURL service method
static org.apache.axiom.om.OMElement getMetadataOntologieRequestOMElement()
          Make the request for calling the metadataOntology.
static org.apache.axiom.om.OMElement getPingOMElement()
          Make the request for calling the ping service method
static org.apache.axiom.om.OMElement getRegisterRepositoryRequest(String name, String bindingURL, String ontologieURL, String mappingURL, String testContentId)
          Make the request for calling the registerRepository.
static org.apache.axiom.om.OMElement getTaskDefinitionRequestOMElement()
          Make the request for calling the getTaskDefinition service method
static org.apache.axiom.om.OMElement getUnRegisterRepositoryRequest(String bindingURL)
          Make the request for calling the registerRepository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cgNameSpace

public static final String cgNameSpace
See Also:
Constant Field Values

cgNSprefix

public static final String cgNSprefix
See Also:
Constant Field Values

ERROR_MSG_ELNM

public static final String ERROR_MSG_ELNM
See Also:
Constant Field Values
Constructor Detail

ClientUtil

public ClientUtil()
Method Detail

getEchoOMElement

public static org.apache.axiom.om.OMElement getEchoOMElement()
Make the request for calling the Echo service method

Returns:
request in OMElement

getPingOMElement

public static org.apache.axiom.om.OMElement getPingOMElement()
Make the request for calling the ping service method

Returns:
request in OMElement

getTaskDefinitionRequestOMElement

public static org.apache.axiom.om.OMElement getTaskDefinitionRequestOMElement()
Make the request for calling the getTaskDefinition service method

Returns:
request in OMElement

getGenerateCourseWithLearnerModelURLRequest

public static org.apache.axiom.om.OMElement getGenerateCourseWithLearnerModelURLRequest(String task,
                                                                                        String learnerModelURL,
                                                                                        String userId,
                                                                                        List contentIds)
Make the request for calling the generateCourseWithLearnerModelURL service method

Parameters:
task -
learnerModelURL -
userId -
contentIds - a list of String
Returns:
all the arguments are filled in to the result OMElement as child Element, the child element contentId contains child element for each contentId.

getGenerateCourseWithLearnerKnowledgeMapRequest

public static org.apache.axiom.om.OMElement getGenerateCourseWithLearnerKnowledgeMapRequest(String task,
                                                                                            List contentIds,
                                                                                            Map learnerKnowledge)
Make the request for calling the generateCourseWithLearnerKnowledgeMap.

Parameters:
task -
contentIds -
learnerKnowledge -
Returns:
all the arguments are filled into the OMElement. The contentIds see getGenerateCourseWithLearnerModelURLRequest, and the learnerKnowledgeMap ist a Map. The key and value pair will be filled in the child element "pair" of the result OMElement. The "pair" contains two child element: "contentId" and "mastery". The "contentId" contains the key from the Map and the "mastery" contains the value from the Map corresponding to the key.

getRegisterRepositoryRequest

public static org.apache.axiom.om.OMElement getRegisterRepositoryRequest(String name,
                                                                         String bindingURL,
                                                                         String ontologieURL,
                                                                         String mappingURL,
                                                                         String testContentId)
Make the request for calling the registerRepository.

Parameters:
name -
bindingURL -
ontologieURL -
mappingURL -
testContentId -
Returns:
all the arguments are filled into an OMElement as the result.

getUnRegisterRepositoryRequest

public static org.apache.axiom.om.OMElement getUnRegisterRepositoryRequest(String bindingURL)
Make the request for calling the registerRepository.

Parameters:
bindingURL -
Returns:
the OMElement which contains the id (bindingURL) of the repository.

getMetadataOntologieRequestOMElement

public static org.apache.axiom.om.OMElement getMetadataOntologieRequestOMElement()
Make the request for calling the metadataOntology.

Returns:
an OMElement, which call the method getMedatadataOntologie.