02-08-2012 09:15 AM
Hi there,
im quite new to the Administration API...
I successfully listed all my BlackBerry Users, now i wanna list my Domino users in order to create a new user (someday...).
I tried this:
try {
dominoUrl = new URL("https://" + strBASURL + "/baaws/emaildomino/ws?wsdl");
} catch (MalformedURLException e) {
return false;
}
_myDominoWSService = new BAAServiceEmailDomino(dominoUrl);
and
Authenticator dominoAuthenticator=null;
List<Authenticator> a = _myUtilWSStub.findAuthenticators("en_US");
for(Authenticator itr:a) {
if(itr.getName().equalsIgnoreCase("Domino mailbox")) {
dominoAuthenticator = itr;
}
}
myEncodeUsername = _myUtilWSStub.encodeUsername("admin", null, dominoAuthenticator.getAuthenticatorType(), dominoAuthenticator.getId(), "0");
BindingProvider bp2 = (BindingProvider)_myDominoWSService.getEmailDomino ();
bp2.getRequestContext().put(BindingProvider.USERNA ME_PROPERTY, myEncodeUsername);
bp2.getRequestContext().put(BindingProvider.PASSWO RD_PROPERTY, password);
I played around with the username and password.
When i call
FindMailStoreUsersResult myResult = _myDominoWSService.getEmailDomino().findMailStoreUsers(criteria, sortByEnum, sortAscending, locale, null, pageSize);
I get the following error:
org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(Mes sageSenderInterceptor.java:64) at org.apache.cxf.phase.PhaseInterceptorChain.doInter cept(PhaseInterceptorChain.java:220) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientIm pl.java:296) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientIm pl.java:242) at org.apache.cxf.frontend.ClientProxy.invokeSync(Cli entProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWs ClientProxy.java:178) at $Proxy42.findMailStoreUsers(Unknown Source) aused by: java.net.HttpRetryException: cannot retry due to server authentication, in streaming mode at sun.net.www.protocol.http.HttpURLConnection.getInputStream (Unknown Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getRespo nseCode(Unknown Source) at org.apache.cxf.transport.http.HTTPConduit$WrappedO utputStream.handleResponse(HTTPConduit.java:1937) at org.apache.cxf.transport.http.HTTPConduit$WrappedO utputStream.close(HTTPConduit.java:1865) at org.apache.cxf.transport.AbstractConduit.close(Abs tractConduit.java:66) at org.apache.cxf.transport.http.HTTPConduit.close(HT TPConduit.java:593) at org.apache.cxf.interceptor.MessageSenderIntercepto r$MessageSenderEndingInterceptor.handleMessage(Mes sageSenderInterceptor.java:62) ... 8 more
Maybe my try is totaly **bleep**, maybe im missing something.
Can anyone help me?
Thanks
Solved! Go to Solution.
02-08-2012 09:32 AM
Hi there,
First thing, are you running BES version 5.0.3? If so I would strongly suggest stopping BAA development and instead switch over to BWS.
If you need to stick with BAA then you may want to check the username and password being used. Does this username and password allow you to login through the BAS console? Is this a BAS user account or do you actually have a Domino user account named "admin"?
02-08-2012 09:59 AM
Hi Garett,
thanks for this information. Its a 5.0.3 server, so i can switch.
I already created my proxy classes.
Is there a development guide like the Blackberry Administration API guide?
Matthias
02-08-2012 10:05 AM
Hi Matthias,
This is the guide to date:
Cheers,
02-10-2012 05:43 AM
Thanks,
i found everything i needed in the article / api.
Matthias