Cisco Cisco Prime Central 1.5.2 Developer's Guide
Appendix II – 3GPP-Miscellaneous
Name qname = envelope
.createName(
"Id",
"wsu",
"http://docs.oasis-
open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
userNameTokenElm.addAttribute(qname, "UsernameToken-27");
SOAPElement userNameElm = soapFactory.createElement("Username",
AUTH_PREFIX, AUTH_NS);
userNameElm.addTextNode(username);
SOAPElement passwdElm = soapFactory.createElement("Password",
AUTH_PREFIX, AUTH_NS);
passwdElm.addTextNode(password);
Name passwordType = envelope.createName("Type");
passwdElm
.addAttribute(
passwordType,
"http://docs.oasis-
open.org/wss/2004/01/oasis-200401-wss-username-token-profile-
1.0#PasswordText");
1.0#PasswordText");
userNameTokenElm.addChildElement(userNameElm);
userNameTokenElm.addChildElement(passwdElm);
// add child elements to the root element
wsSecHeaderElm.addChildElement(userNameTokenElm);
// add SOAP element for header to SOAP header object
header.addChildElement(wsSecHeaderElm);
// end: setting SOAP headers
// start: setting SOAP body
// Create and populate the body
SOAPBody body = envelope.getBody();
// Create the main element and namespace
// Creates main element for “getAllInventory” Operation.
SOAPElement bodyElement = body
.addChildElement(envelope
.createName(
"getAllInventory",
"inv",
"http://www.3gpp.org/ftp/Specs/archive/32_series/ciscoTgppInventory/sche
ma/InventoryIRPData"));
ma/InventoryIRPData"));
// Add content
bodyElement.addChildElement("invokeIdentifierIn").addTextNode("123");
bodyElement.addChildElement("queryXpathExp").addTextNode(
"/MD=CISCO_PRIME");
// Save the message
message.saveChanges();
MimeHeaders headers = message.getMimeHeaders();
headers.addHeader("SOAPAction", "getAllInventory");
// Set the destination
// Send the message and get the reply
SOAPMessage reply = connection.call(message, wsdlname);
Cisco Prime OSS Integration Guide for MTOSI and 3GPP
220