// create & execute the SaveBusiness request
SaveBusiness sbReq1 = new SaveBusiness();
sbReq1.setAuthInfo(authInfo1);
sbReq1.setBusinessEntityVector(businessVector1);
BusinessDetail detail1 = (BusinessDetail)reg.execute(sbReq1);
Vector detailVector1 = detail1.getBusinessEntityVector();
BusinessEntity b1 = (BusinessEntity)detailVector1.elementAt(0);
// create & execute the GetAuthToken2 request
GetAuthToken authTokenRequest2 = new GetAuthToken("steveviens","password");
AuthToken authToken2 = (AuthToken)reg.execute(authTokenRequest2);
AuthInfo authInfo2 = authToken2.getAuthInfo();
// create a BusinessEntity
BusinessEntity business2 = new BusinessEntity();
business2.addName(new Name("PopSecret","en"));
// create a BusinessEntity Vector
Vector businessVector2 = new Vector(1);
businessVector2.addElement(business2);
// create & execute the SaveBusiness request
SaveBusiness sbReq2 = new SaveBusiness();
sbReq2.setAuthInfo(authInfo2);
sbReq2.setBusinessEntityVector(businessVector2);
BusinessDetail detail2 = (BusinessDetail)reg.execute(sbReq2);
Vector detailVector2 = detail2.getBusinessEntityVector();
BusinessEntity b2 = (BusinessEntity)detailVector2.elementAt(0);
// create a new PublisherAssertion
String fromKey = b1.getBusinessKey();