Examples of BeehiveWsTypeMetadata


Examples of org.apache.beehive.wsm.model.BeehiveWsTypeMetadata

            // service implementation bean
            if (_decl instanceof ClassDeclaration) {
                ClassDeclaration classDecl = (ClassDeclaration) _decl;
                messager.printNotice("processing service implementation bean: " + classDecl.getQualifiedName());
               
                BeehiveWsTypeMetadata om = null;
                String endpointInterface = wsAnnotation.endpointInterface().trim();
               
                // start from endpoint interface
                if (null != endpointInterface && 0 < endpointInterface.length()) {

                    // get object model for service endpoint interface
                    om = getEndpointInterfaceObjectModel(endpointInterface);
                   
                    // merge abstract and concrete object models
                    om.merge(new MirrorTypeInfo(classDecl, _env));
                }
               
                // create object model from scratch
                else {
                    om = new Jsr181TypeMetadataImpl(new MirrorTypeInfo(classDecl, _env));
                }

                // check if we have an object model
                if (null == om) {
                    return;
                }

                // persist object model
                oms.store(om);
            }
           
            // service endpoint interface
            else if (_decl instanceof InterfaceDeclaration) {
                InterfaceDeclaration interfaceDecl = (InterfaceDeclaration) _decl;
               
                messager.printNotice("processing service endpoint interface: " + interfaceDecl.getQualifiedName());
               
                // create object model
                BeehiveWsTypeMetadata om = new Jsr181TypeMetadataImpl(new MirrorTypeInfo(interfaceDecl, _env));
                if (null == om) {
                    return;
                }

                // store the object model
View Full Code Here

Examples of org.apache.beehive.wsm.model.BeehiveWsTypeMetadata

        // todo: persist all object models that have been created [by check()]
    }

    private BeehiveWsTypeMetadata getEndpointInterfaceObjectModel(String endpointInterface) {

        BeehiveWsTypeMetadata om = null;

        // search for persistent object model
        try {
            om = Jsr181ObjectModelStore.load(getClass().getClassLoader().getResourceAsStream(Jsr181ObjectModelStore.getLocation(endpointInterface).toString()));
        }
View Full Code Here

Examples of org.apache.beehive.wsm.model.BeehiveWsTypeMetadata

  public BeehiveWsTypeMetadata getObjectModel(BindingLookupService lookupService)
      throws Exception {
  this.lookupService = lookupService;

    BeehiveWsTypeMetadata wsm = new Jsr181TypeMetadataImpl();
    Map<String, BeehiveWsMethodMetadata> methodMap = new HashMap<String, BeehiveWsMethodMetadata>();
    TDefinitions defs = defDoc.getDefinitions();
    wsm.setWsTargetNamespace(defs.getTargetNamespace());
    Map<String, TPart[]> messageMap = new HashMap<String, TPart[]>();

    if (defs.sizeOfServiceArray() > 0) {
      wsm.setWsServiceName(defs.getServiceArray(0).getName());
    }

    if (defs.sizeOfMessageArray() > 0) {
      TMessage[] messages = defs.getMessageArray();
      for (TMessage msg : messages) {
        messageMap.put(msg.getName(), msg.getPartArray());
      }
    }

    TBinding tBind = null;
    if (defs.sizeOfBindingArray() > 0) {
      tBind = defs.getBindingArray(0);
      processTBinding(tBind, wsm);
    }

    if (defs.sizeOfPortTypeArray() > 0) {
      TPortType tP = defs.getPortTypeArray(0);
      wsm.setWsName(tP.getName());
      TOperation[] operations = tP.getOperationArray();
      TTypes types = null;
      if (defs.sizeOfTypesArray() > 0) {
        types = defs.getTypesArray(0);
      }
View Full Code Here

Examples of org.apache.beehive.wsm.model.BeehiveWsTypeMetadata

  public void generateAnnotatedJavaFromWSDL(String wsdlFileName,
      String baseSrcDir) throws Exception {

    InputStream wsdl = new FileInputStream(wsdlFileName)
    BeehiveWsTypeMetadata om = getWSObjectModel(wsdl);
       
    String className = om.getWsName();
    String packageName = "web"; // Later see if the target name service is
                                // better option
    String packageDirName = packageName.replaceAll("\\.", "/"); // nop right
                                  // now,
                                  // useful if
View Full Code Here

Examples of org.apache.beehive.wsm.model.BeehiveWsTypeMetadata


  public void generateAnnotatedJavaFromWSDL(InputStream wsdl, Writer w)
      throws Exception {

    BeehiveWsTypeMetadata om = getWSObjectModel(wsdl);
    generateAnnotatedJavaFromOM(om, w);
  }
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.