com.sun.tools.internal.ws.wsdl.framework.Entity Java Examples

The following examples show how to use com.sun.tools.internal.ws.wsdl.framework.Entity. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WSDLModelerBase.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @return List of SOAPHeader extensions
 */
protected List<SOAPHeader> getHeaderExtensions(TWSDLExtensible extensible) {
    List<SOAPHeader> headerList = new ArrayList<SOAPHeader>();
    for (TWSDLExtension extension : extensible.extensions()) {
        if (extension.getClass()==MIMEMultipartRelated.class) {
            for( MIMEPart part : ((MIMEMultipartRelated) extension).getParts() ) {
                boolean isRootPart = isRootPart(part);
                for (TWSDLExtension obj : part.extensions()) {
                    if (obj instanceof SOAPHeader) {
                        //bug fix: 5024015
                        if (!isRootPart) {
                            warning((Entity) obj, ModelerMessages.MIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(info.bindingOperation.getName()));
                            return new ArrayList<SOAPHeader>();
                        }
                        headerList.add((SOAPHeader) obj);
                    }
                }
            }
        } else if (extension instanceof SOAPHeader) {
            headerList.add((SOAPHeader) extension);
        }
    }
     return headerList;
}
 
Example #2
Source File: WSDLModelerBase.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @return List of SOAPHeader extensions
 */
protected List<SOAPHeader> getHeaderExtensions(TWSDLExtensible extensible) {
    List<SOAPHeader> headerList = new ArrayList<SOAPHeader>();
    for (TWSDLExtension extension : extensible.extensions()) {
        if (extension.getClass()==MIMEMultipartRelated.class) {
            for( MIMEPart part : ((MIMEMultipartRelated) extension).getParts() ) {
                boolean isRootPart = isRootPart(part);
                for (TWSDLExtension obj : part.extensions()) {
                    if (obj instanceof SOAPHeader) {
                        //bug fix: 5024015
                        if (!isRootPart) {
                            warning((Entity) obj, ModelerMessages.MIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(info.bindingOperation.getName()));
                            return new ArrayList<SOAPHeader>();
                        }
                        headerList.add((SOAPHeader) obj);
                    }
                }
            }
        } else if (extension instanceof SOAPHeader) {
            headerList.add((SOAPHeader) extension);
        }
    }
     return headerList;
}
 
Example #3
Source File: WSDLModelerBase.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @return List of SOAPHeader extensions
 */
protected List<SOAPHeader> getHeaderExtensions(TWSDLExtensible extensible) {
    List<SOAPHeader> headerList = new ArrayList<SOAPHeader>();
    for (TWSDLExtension extension : extensible.extensions()) {
        if (extension.getClass()==MIMEMultipartRelated.class) {
            for( MIMEPart part : ((MIMEMultipartRelated) extension).getParts() ) {
                boolean isRootPart = isRootPart(part);
                for (TWSDLExtension obj : part.extensions()) {
                    if (obj instanceof SOAPHeader) {
                        //bug fix: 5024015
                        if (!isRootPart) {
                            warning((Entity) obj, ModelerMessages.MIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(info.bindingOperation.getName()));
                            return new ArrayList<SOAPHeader>();
                        }
                        headerList.add((SOAPHeader) obj);
                    }
                }
            }
        } else if (extension instanceof SOAPHeader) {
            headerList.add((SOAPHeader) extension);
        }
    }
     return headerList;
}
 
Example #4
Source File: WSDLModelerBase.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @return List of SOAPHeader extensions
 */
protected List<SOAPHeader> getHeaderExtensions(TWSDLExtensible extensible) {
    List<SOAPHeader> headerList = new ArrayList<SOAPHeader>();
    for (TWSDLExtension extension : extensible.extensions()) {
        if (extension.getClass()==MIMEMultipartRelated.class) {
            for( MIMEPart part : ((MIMEMultipartRelated) extension).getParts() ) {
                boolean isRootPart = isRootPart(part);
                for (TWSDLExtension obj : part.extensions()) {
                    if (obj instanceof SOAPHeader) {
                        //bug fix: 5024015
                        if (!isRootPart) {
                            warning((Entity) obj, ModelerMessages.MIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(info.bindingOperation.getName()));
                            return new ArrayList<SOAPHeader>();
                        }
                        headerList.add((SOAPHeader) obj);
                    }
                }
            }
        } else if (extension instanceof SOAPHeader) {
            headerList.add((SOAPHeader) extension);
        }
    }
     return headerList;
}
 
Example #5
Source File: WSDLParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private boolean handleExtension(
    TWSDLParserContextImpl context,
    TWSDLExtensible entity,
    Element e) {
    TWSDLExtensionHandler h =
         (TWSDLExtensionHandler) extensionHandlers.get(e.getNamespaceURI());
    if (h == null) {
        context.fireIgnoringExtension(e, (Entity) entity);
        errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(e.getLocalName(), e.getNamespaceURI()));
        return false;
    } else {
        return h.doHandleExtension(context, entity, e);
    }
}
 
Example #6
Source File: Parameter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Parameter(String name, Entity entity) {
    super(entity);
    this.name = name;
    if(entity instanceof com.sun.tools.internal.ws.wsdl.document.Message){
        this.entityName = ((com.sun.tools.internal.ws.wsdl.document.Message)entity).getName();
    }else if(entity instanceof MessagePart){
        this.entityName = ((MessagePart)entity).getName();
    }else{
        this.entityName = name;
    }

}
 
Example #7
Source File: Operation.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Operation(QName name, Entity entity) {
    super(entity);
    _name = name;
    _uniqueName = name.getLocalPart();
    _faultNames = new HashSet<String>();
    _faults = new HashSet<Fault>();
}
 
Example #8
Source File: WSDLModelerBase.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
protected void warning(Entity entity, String message){
    //avoid duplicate warning for the second pass
    if (numPasses > 1) {
        return;
    }
    if (entity == null) {
        errReceiver.warning(null, message);
    } else {
        errReceiver.warning(entity.getLocator(), message);
    }
}
 
Example #9
Source File: WSDLModelerBase.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected void error(Entity entity, String message){
    if (entity == null) {
        errReceiver.error(null, message);
    } else {
        errReceiver.error(entity.getLocator(), message);
    }
    throw new AbortException();
}
 
Example #10
Source File: MIMEMultipartRelated.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void withAllSubEntitiesDo(EntityAction action) {
    super.withAllSubEntitiesDo(action);

    for (Iterator iter = _parts.iterator(); iter.hasNext();) {
        action.perform((Entity) iter.next());
    }
}
 
Example #11
Source File: MIMEMultipartRelated.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void withAllSubEntitiesDo(EntityAction action) {
    super.withAllSubEntitiesDo(action);

    for (Iterator iter = _parts.iterator(); iter.hasNext();) {
        action.perform((Entity) iter.next());
    }
}
 
Example #12
Source File: WSDLModelerBase.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected void error(Entity entity, String message){
    if (entity == null) {
        errReceiver.error(null, message);
    } else {
        errReceiver.error(entity.getLocator(), message);
    }
    throw new AbortException();
}
 
Example #13
Source File: WSDLParser.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private boolean handleExtension(
    TWSDLParserContextImpl context,
    TWSDLExtensible entity,
    Node n,
    Element e) {
    TWSDLExtensionHandler h =
        (TWSDLExtensionHandler) extensionHandlers.get(n.getNamespaceURI());
    if (h == null) {
        context.fireIgnoringExtension(e, (Entity) entity);
        errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(n.getLocalName(), n.getNamespaceURI()));
        return false;
    } else {
        return h.doHandleExtension(context, entity, e);
    }
}
 
Example #14
Source File: WSDLParser.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private boolean handleExtension(
    TWSDLParserContextImpl context,
    TWSDLExtensible entity,
    Element e) {
    TWSDLExtensionHandler h =
         (TWSDLExtensionHandler) extensionHandlers.get(e.getNamespaceURI());
    if (h == null) {
        context.fireIgnoringExtension(e, (Entity) entity);
        errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(e.getLocalName(), e.getNamespaceURI()));
        return false;
    } else {
        return h.doHandleExtension(context, entity, e);
    }
}
 
Example #15
Source File: Parameter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Parameter(String name, Entity entity) {
    super(entity);
    this.name = name;
    if(entity instanceof com.sun.tools.internal.ws.wsdl.document.Message){
        this.entityName = ((com.sun.tools.internal.ws.wsdl.document.Message)entity).getName();
    }else if(entity instanceof MessagePart){
        this.entityName = ((MessagePart)entity).getName();
    }else{
        this.entityName = name;
    }

}
 
Example #16
Source File: Parameter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Parameter(String name, Entity entity) {
    super(entity);
    this.name = name;
    if(entity instanceof com.sun.tools.internal.ws.wsdl.document.Message){
        this.entityName = ((com.sun.tools.internal.ws.wsdl.document.Message)entity).getName();
    }else if(entity instanceof MessagePart){
        this.entityName = ((MessagePart)entity).getName();
    }else{
        this.entityName = name;
    }

}
 
Example #17
Source File: Operation.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Operation(QName name, Entity entity) {
    super(entity);
    _name = name;
    _uniqueName = name.getLocalPart();
    _faultNames = new HashSet<String>();
    _faults = new HashSet<Fault>();
}
 
Example #18
Source File: WSDLParser.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private boolean handleExtension(
    TWSDLParserContextImpl context,
    TWSDLExtensible entity,
    Node n,
    Element e) {
    TWSDLExtensionHandler h =
        (TWSDLExtensionHandler) extensionHandlers.get(n.getNamespaceURI());
    if (h == null) {
        context.fireIgnoringExtension(e, (Entity) entity);
        errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(n.getLocalName(), n.getNamespaceURI()));
        return false;
    } else {
        return h.doHandleExtension(context, entity, e);
    }
}
 
Example #19
Source File: MIMEMultipartRelated.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void withAllSubEntitiesDo(EntityAction action) {
    super.withAllSubEntitiesDo(action);

    for (Iterator iter = _parts.iterator(); iter.hasNext();) {
        action.perform((Entity) iter.next());
    }
}
 
Example #20
Source File: MIMEMultipartRelated.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void withAllSubEntitiesDo(EntityAction action) {
    super.withAllSubEntitiesDo(action);

    for (Iterator iter = _parts.iterator(); iter.hasNext();) {
        action.perform((Entity) iter.next());
    }
}
 
Example #21
Source File: WSDLParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private boolean handleExtension(
    TWSDLParserContextImpl context,
    TWSDLExtensible entity,
    Node n,
    Element e) {
    TWSDLExtensionHandler h =
        (TWSDLExtensionHandler) extensionHandlers.get(n.getNamespaceURI());
    if (h == null) {
        context.fireIgnoringExtension(e, (Entity) entity);
        errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(n.getLocalName(), n.getNamespaceURI()));
        return false;
    } else {
        return h.doHandleExtension(context, entity, e);
    }
}
 
Example #22
Source File: WSDLModelerBase.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected void warning(Entity entity, String message){
    //avoid duplicate warning for the second pass
    if (numPasses > 1) {
        return;
    }
    if (entity == null) {
        errReceiver.warning(null, message);
    } else {
        errReceiver.warning(entity.getLocator(), message);
    }
}
 
Example #23
Source File: Block.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Block(QName name, AbstractType type, Entity entity) {
    super(entity);
    this.name = name;
    this.type = type;
}
 
Example #24
Source File: Block.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Block(QName name, AbstractType type, Entity entity) {
    super(entity);
    this.name = name;
    this.type = type;
}
 
Example #25
Source File: Fault.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Fault(String name, Entity entity) {
    super(entity);
    this.name = name;
}
 
Example #26
Source File: Operation.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Operation(Entity entity) {
    super(entity);
}
 
Example #27
Source File: Operation.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Operation(Operation operation, Entity entity){
    this(operation._name, entity);
    this._style = operation._style;
    this._use = operation._use;
    this.customizedName = operation.customizedName;
}
 
Example #28
Source File: Service.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Service(Entity entity) {
    super(entity);
}
 
Example #29
Source File: AsyncOperation.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 *
 */
public AsyncOperation(Entity entity) {
    super(entity);
    // TODO Auto-generated constructor stub
}
 
Example #30
Source File: Port.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Port(Entity entity) {
    super(entity);
}