Cisco Cisco Prime Network 4.0 Entwickleranleitung

Seite von 148
Appendix II – 3GPP-Miscellaneous
 
 
Cisco Prime Network OSS Integration Guide for MTOSI and 3GPP 
144
 
 
 
OL-30201-01
 
   
 
 
 
 
"http://docs.oasis-
open.org/wss/2004/01/oasis-200401-wss-username-token-profile-
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")); 
   
// 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); 
 
11.7.2 Code Snippet for 3GPP Notification Consumer 
Developing a notification consumer involves implementing the 3GPP 
Notification IRP Webservice interface and publishing it.  
•  Sample Implementation of the Notification IRP Webservice interface: 
 
import java.io.StringWriter; 
 
import javax.jws.Oneway; 
import javax.jws.WebMethod; 
import javax.jws.WebParam; 
import javax.xml.bind.JAXBContext; 
import javax.xml.bind.JAXBElement; 
import javax.xml.bind.JAXBException; 
import javax.xml.bind.Marshaller; 
import javax.xml.namespace.QName;