Created
April 7, 2012 05:24
-
-
Save yamanyar/2325516 to your computer and use it in GitHub Desktop.
Crete document example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
TransactionalInformationsDocument transactionalInformationsDocument = TransactionalInformationsDocument.Factory.newInstance(); | |
final TransactionalInformationsDocument.TransactionalInformations transactionalInformations = transactionalInformationsDocument.addNewTransactionalInformations(); | |
//use requierd locale and shop id | |
transactionalInformations.setLocale(requiredLocale.getName()); | |
transactionalInformations.setShopId(requiredShopId); | |
final TypeDocument.Type type = transactionalInformations.addNewType(); | |
type.setType(sourceType.toString()); | |
for (String material : materials) { | |
final InfoDocument.Info info = type.addNewInfo(); | |
info.setMaterialName(material); | |
StringBuilder s = new StringBuilder(80); | |
s.append("/transactional/repositories/").append(repository.toString().toLowerCase()).append("/locales/").append(requiredLocale.getName()).append("/skus/").append(material).append("/sss"); | |
info.setHref(s.toString()); | |
} | |
output = transactionalInformationsDocument.xmlText(opts); | |
//... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment