Examples of JAXBWrapperTool


Examples of org.apache.axis2.jaxws.wrapper.JAXBWrapperTool

import org.apache.axis2.jaxws.TestLogger;

public class WrapperToolTest extends TestCase {
  public void testWrapStockQuote(){
    try{
      JAXBWrapperTool wrapper = new JAXBWrapperToolImpl();
     
      String jaxbClassName = "org.test.stock2.GetPrice";
            Class jaxbClass;
            try {
                jaxbClass = Class.forName(jaxbClassName, false, ClassLoader.getSystemClassLoader());
            } catch (Exception e){
                jaxbClass = Class.forName(jaxbClassName, false, this.getClass().getClassLoader());
            }
      ArrayList<String> childNames = new ArrayList<String>();
      String childName = "symbol";
      childNames.add(childName);
      String symbolObj = new String("IBM");
      Map<String, Object> childObjects= new WeakHashMap<String, Object>();
      childObjects.put(childName, symbolObj);
      Object jaxbObject = wrapper.wrap(jaxbClass, childNames, childObjects);
      org.test.stock2.GetPrice getPrice = (org.test.stock2.GetPrice)jaxbObject;
     
    }catch(JAXBWrapperException e){
      e.printStackTrace();
    }catch(ClassNotFoundException e){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.