Forum Discussion
slambeth
12 years agoOccasional Contributor
Here is our code thus far:
private void createReview(String Auther) {
try {
//connect to service
m_proxy = new CodeCollaboratorProxy();
m_proxy.setEndpoint("http://localhost:88/services/CodeCollaborator_7001?wsdl");
String ticket = m_proxy.getLoginTicket("myuserid", "mypassword");
System.out.println(ticket);
javax.xml.rpc.Stub stub = (javax.xml.rpc.Stub)m_proxy.getCodeCollaborator();
//setup basic auth
stub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, "myuserid");
stub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, ticket);
//create review
int reviewID = m_proxy.createReview(Author);
//update review with details
Calendar deadline = null;
DisplayChangeListAsSpec displayChangeListAs = null;
ReviewAccessSpec accessibleBy = null;
String templateName = null;
String title = null;
m_proxy.updateReview(reviewID, title, null, deadline, displayChangeListAs, accessibleBy, templateName);
} catch (ServerNotInitializedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NotAuthorizedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Related Content
- 6 months agosohailalam2696