I have the Java code bellow but it is returning null. I think I must pass zimbra admin login/password somewhere, but I don't know exactly where...


When I type the command line:
zmsoap -z -v GetAccountRequest/account=user@host @by=name -v | more

It shows the xml message:
<GetAccountRequest xmlns='urn:zimbraAdmin'>
<account by='name'>user@host</account>
</GetAccountRequest>
Tha Java code that intends to do the same:
SOAPConnectionFactory sfc = SOAPConnectionFactory.newInstance();
SOAPConnection connection = sfc.createConnection();
//somewhere here I think I must inform admin login/password... but don't know how...
MessageFactory mf = MessageFactory.newInstance();
SOAPMessage sm = mf.createMessage();

SOAPHeader sh = sm.getSOAPHeader();
SOAPBody sb = sm.getSOAPBody();
sh.detachNode();

QName bodyName = new QName("urn:zimbraAdmin", "GetAccountRequest", "");


SOAPBodyElement bodyElement = sb.addBodyElement(bodyName);
QName qn = new QName("account");


SOAPElement nameElementValue = bodyElement.addChildElement(qn);
Name n=sm.getSOAPPart().getEnvelope().createName("by");
nameElementValue.addAttribute(n, "name");
nameElementValue.addTextNode("user@host");

SOAPElement quotation = bodyElement.addChildElement(qn);



System.out.println("\n Soap Request:\n");
sm.writeTo(System.out);
System.out.println();


URL endpoint = new URL("https://server_adressortNumber/service/admin/soap/");

SOAPMessage response = connection.call(sm, endpoint);
System.out.println(response.getContentDescription( ));
Where should I insert admin data?