Java Code Examples for com.sun.tools.internal.ws.processor.model.Fault#getName()
The following examples show how to use
com.sun.tools.internal.ws.processor.model.Fault#getName() .
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: WSDLModeler.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected boolean createJavaExceptionFromLiteralType(Fault fault, com.sun.tools.internal.ws.processor.model.Port port, String operationName) { JAXBType faultType = (JAXBType) fault.getBlock().getType(); String exceptionName = fault.getName(); // use fault namespace attribute JAXBStructuredType jaxbStruct = new JAXBStructuredType(new QName( fault.getBlock().getName().getNamespaceURI(), fault.getName())); QName memberName = fault.getElementName(); JAXBElementMember jaxbMember = new JAXBElementMember(memberName, faultType); //jaxbMember.setNillable(faultType.isNillable()); String javaMemberName = getLiteralJavaMemberName(fault); JavaStructureMember javaMember = new JavaStructureMember( javaMemberName, faultType.getJavaType(), jaxbMember); jaxbMember.setJavaStructureMember(javaMember); javaMember.setReadMethod(Names.getJavaMemberReadMethod(javaMember)); javaMember.setInherited(false); jaxbMember.setJavaStructureMember(javaMember); jaxbStruct.add(jaxbMember); if (isConflictingExceptionClassName(exceptionName)) { exceptionName += "_Exception"; } JavaException existingJavaException = _javaExceptions.get(exceptionName); if (existingJavaException != null) { if (existingJavaException.getName().equals(exceptionName)) { if (((JAXBType) existingJavaException.getOwner()).getName().equals(jaxbStruct.getName()) || ModelerUtils.isEquivalentLiteralStructures(jaxbStruct, (JAXBStructuredType) existingJavaException.getOwner())) { // we have mapped this fault already if (faultType instanceof JAXBStructuredType) { fault.getBlock().setType((JAXBType) existingJavaException.getOwner()); } fault.setJavaException(existingJavaException); return false; } } } JavaException javaException = new JavaException(exceptionName, false, jaxbStruct); javaException.add(javaMember); jaxbStruct.setJavaType(javaException); _javaExceptions.put(javaException.getName(), javaException); fault.setJavaException(javaException); return true; }
Example 2
Source File: WSDLModeler.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected boolean createJavaExceptionFromLiteralType(Fault fault, com.sun.tools.internal.ws.processor.model.Port port, String operationName) { JAXBType faultType = (JAXBType) fault.getBlock().getType(); String exceptionName = fault.getName(); // use fault namespace attribute JAXBStructuredType jaxbStruct = new JAXBStructuredType(new QName( fault.getBlock().getName().getNamespaceURI(), fault.getName())); QName memberName = fault.getElementName(); JAXBElementMember jaxbMember = new JAXBElementMember(memberName, faultType); //jaxbMember.setNillable(faultType.isNillable()); String javaMemberName = getLiteralJavaMemberName(fault); JavaStructureMember javaMember = new JavaStructureMember( javaMemberName, faultType.getJavaType(), jaxbMember); jaxbMember.setJavaStructureMember(javaMember); javaMember.setReadMethod(Names.getJavaMemberReadMethod(javaMember)); javaMember.setInherited(false); jaxbMember.setJavaStructureMember(javaMember); jaxbStruct.add(jaxbMember); if (isConflictingExceptionClassName(exceptionName)) { exceptionName += "_Exception"; } JavaException existingJavaException = _javaExceptions.get(exceptionName); if (existingJavaException != null) { if (existingJavaException.getName().equals(exceptionName)) { if (((JAXBType) existingJavaException.getOwner()).getName().equals(jaxbStruct.getName()) || ModelerUtils.isEquivalentLiteralStructures(jaxbStruct, (JAXBStructuredType) existingJavaException.getOwner())) { // we have mapped this fault already if (faultType instanceof JAXBStructuredType) { fault.getBlock().setType((JAXBType) existingJavaException.getOwner()); } fault.setJavaException(existingJavaException); return false; } } } JavaException javaException = new JavaException(exceptionName, false, jaxbStruct); javaException.add(javaMember); jaxbStruct.setJavaType(javaException); _javaExceptions.put(javaException.getName(), javaException); fault.setJavaException(javaException); return true; }
Example 3
Source File: WSDLModeler.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected boolean createJavaExceptionFromLiteralType(Fault fault, com.sun.tools.internal.ws.processor.model.Port port, String operationName) { JAXBType faultType = (JAXBType) fault.getBlock().getType(); String exceptionName = fault.getName(); // use fault namespace attribute JAXBStructuredType jaxbStruct = new JAXBStructuredType(new QName( fault.getBlock().getName().getNamespaceURI(), fault.getName())); QName memberName = fault.getElementName(); JAXBElementMember jaxbMember = new JAXBElementMember(memberName, faultType); //jaxbMember.setNillable(faultType.isNillable()); String javaMemberName = getLiteralJavaMemberName(fault); JavaStructureMember javaMember = new JavaStructureMember( javaMemberName, faultType.getJavaType(), jaxbMember); jaxbMember.setJavaStructureMember(javaMember); javaMember.setReadMethod(Names.getJavaMemberReadMethod(javaMember)); javaMember.setInherited(false); jaxbMember.setJavaStructureMember(javaMember); jaxbStruct.add(jaxbMember); if (isConflictingExceptionClassName(exceptionName)) { exceptionName += "_Exception"; } JavaException existingJavaException = _javaExceptions.get(exceptionName); if (existingJavaException != null) { if (existingJavaException.getName().equals(exceptionName)) { if (((JAXBType) existingJavaException.getOwner()).getName().equals(jaxbStruct.getName()) || ModelerUtils.isEquivalentLiteralStructures(jaxbStruct, (JAXBStructuredType) existingJavaException.getOwner())) { // we have mapped this fault already if (faultType instanceof JAXBStructuredType) { fault.getBlock().setType((JAXBType) existingJavaException.getOwner()); } fault.setJavaException(existingJavaException); return false; } } } JavaException javaException = new JavaException(exceptionName, false, jaxbStruct); javaException.add(javaMember); jaxbStruct.setJavaType(javaException); _javaExceptions.put(javaException.getName(), javaException); fault.setJavaException(javaException); return true; }
Example 4
Source File: WSDLModeler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected boolean createJavaExceptionFromLiteralType(Fault fault, com.sun.tools.internal.ws.processor.model.Port port, String operationName) { JAXBType faultType = (JAXBType) fault.getBlock().getType(); String exceptionName = fault.getName(); // use fault namespace attribute JAXBStructuredType jaxbStruct = new JAXBStructuredType(new QName( fault.getBlock().getName().getNamespaceURI(), fault.getName())); QName memberName = fault.getElementName(); JAXBElementMember jaxbMember = new JAXBElementMember(memberName, faultType); //jaxbMember.setNillable(faultType.isNillable()); String javaMemberName = getLiteralJavaMemberName(fault); JavaStructureMember javaMember = new JavaStructureMember( javaMemberName, faultType.getJavaType(), jaxbMember); jaxbMember.setJavaStructureMember(javaMember); javaMember.setReadMethod(Names.getJavaMemberReadMethod(javaMember)); javaMember.setInherited(false); jaxbMember.setJavaStructureMember(javaMember); jaxbStruct.add(jaxbMember); if (isConflictingExceptionClassName(exceptionName)) { exceptionName += "_Exception"; } JavaException existingJavaException = _javaExceptions.get(exceptionName); if (existingJavaException != null) { if (existingJavaException.getName().equals(exceptionName)) { if (((JAXBType) existingJavaException.getOwner()).getName().equals(jaxbStruct.getName()) || ModelerUtils.isEquivalentLiteralStructures(jaxbStruct, (JAXBStructuredType) existingJavaException.getOwner())) { // we have mapped this fault already if (faultType instanceof JAXBStructuredType) { fault.getBlock().setType((JAXBType) existingJavaException.getOwner()); } fault.setJavaException(existingJavaException); return false; } } } JavaException javaException = new JavaException(exceptionName, false, jaxbStruct); javaException.add(javaMember); jaxbStruct.setJavaType(javaException); _javaExceptions.put(javaException.getName(), javaException); fault.setJavaException(javaException); return true; }
Example 5
Source File: WSDLModeler.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
protected boolean createJavaExceptionFromLiteralType(Fault fault, com.sun.tools.internal.ws.processor.model.Port port, String operationName) { JAXBType faultType = (JAXBType) fault.getBlock().getType(); String exceptionName = fault.getName(); // use fault namespace attribute JAXBStructuredType jaxbStruct = new JAXBStructuredType(new QName( fault.getBlock().getName().getNamespaceURI(), fault.getName())); QName memberName = fault.getElementName(); JAXBElementMember jaxbMember = new JAXBElementMember(memberName, faultType); //jaxbMember.setNillable(faultType.isNillable()); String javaMemberName = getLiteralJavaMemberName(fault); JavaStructureMember javaMember = new JavaStructureMember( javaMemberName, faultType.getJavaType(), jaxbMember); jaxbMember.setJavaStructureMember(javaMember); javaMember.setReadMethod(Names.getJavaMemberReadMethod(javaMember)); javaMember.setInherited(false); jaxbMember.setJavaStructureMember(javaMember); jaxbStruct.add(jaxbMember); if (isConflictingExceptionClassName(exceptionName)) { exceptionName += "_Exception"; } JavaException existingJavaException = _javaExceptions.get(exceptionName); if (existingJavaException != null) { if (existingJavaException.getName().equals(exceptionName)) { if (((JAXBType) existingJavaException.getOwner()).getName().equals(jaxbStruct.getName()) || ModelerUtils.isEquivalentLiteralStructures(jaxbStruct, (JAXBStructuredType) existingJavaException.getOwner())) { // we have mapped this fault already if (faultType instanceof JAXBStructuredType) { fault.getBlock().setType((JAXBType) existingJavaException.getOwner()); } fault.setJavaException(existingJavaException); return false; } } } JavaException javaException = new JavaException(exceptionName, false, jaxbStruct); javaException.add(javaMember); jaxbStruct.setJavaType(javaException); _javaExceptions.put(javaException.getName(), javaException); fault.setJavaException(javaException); return true; }
Example 6
Source File: WSDLModeler.java From hottub with GNU General Public License v2.0 | 4 votes |
protected boolean createJavaExceptionFromLiteralType(Fault fault, com.sun.tools.internal.ws.processor.model.Port port, String operationName) { JAXBType faultType = (JAXBType) fault.getBlock().getType(); String exceptionName = fault.getName(); // use fault namespace attribute JAXBStructuredType jaxbStruct = new JAXBStructuredType(new QName( fault.getBlock().getName().getNamespaceURI(), fault.getName())); QName memberName = fault.getElementName(); JAXBElementMember jaxbMember = new JAXBElementMember(memberName, faultType); //jaxbMember.setNillable(faultType.isNillable()); String javaMemberName = getLiteralJavaMemberName(fault); JavaStructureMember javaMember = new JavaStructureMember( javaMemberName, faultType.getJavaType(), jaxbMember); jaxbMember.setJavaStructureMember(javaMember); javaMember.setReadMethod(Names.getJavaMemberReadMethod(javaMember)); javaMember.setInherited(false); jaxbMember.setJavaStructureMember(javaMember); jaxbStruct.add(jaxbMember); if (isConflictingExceptionClassName(exceptionName)) { exceptionName += "_Exception"; } JavaException existingJavaException = _javaExceptions.get(exceptionName); if (existingJavaException != null) { if (existingJavaException.getName().equals(exceptionName)) { if (((JAXBType) existingJavaException.getOwner()).getName().equals(jaxbStruct.getName()) || ModelerUtils.isEquivalentLiteralStructures(jaxbStruct, (JAXBStructuredType) existingJavaException.getOwner())) { // we have mapped this fault already if (faultType instanceof JAXBStructuredType) { fault.getBlock().setType((JAXBType) existingJavaException.getOwner()); } fault.setJavaException(existingJavaException); return false; } } } JavaException javaException = new JavaException(exceptionName, false, jaxbStruct); javaException.add(javaMember); jaxbStruct.setJavaType(javaException); _javaExceptions.put(javaException.getName(), javaException); fault.setJavaException(javaException); return true; }
Example 7
Source File: WSDLModeler.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected boolean createJavaExceptionFromLiteralType(Fault fault, com.sun.tools.internal.ws.processor.model.Port port, String operationName) { JAXBType faultType = (JAXBType) fault.getBlock().getType(); String exceptionName = fault.getName(); // use fault namespace attribute JAXBStructuredType jaxbStruct = new JAXBStructuredType(new QName( fault.getBlock().getName().getNamespaceURI(), fault.getName())); QName memberName = fault.getElementName(); JAXBElementMember jaxbMember = new JAXBElementMember(memberName, faultType); //jaxbMember.setNillable(faultType.isNillable()); String javaMemberName = getLiteralJavaMemberName(fault); JavaStructureMember javaMember = new JavaStructureMember( javaMemberName, faultType.getJavaType(), jaxbMember); jaxbMember.setJavaStructureMember(javaMember); javaMember.setReadMethod(Names.getJavaMemberReadMethod(javaMember)); javaMember.setInherited(false); jaxbMember.setJavaStructureMember(javaMember); jaxbStruct.add(jaxbMember); if (isConflictingExceptionClassName(exceptionName)) { exceptionName += "_Exception"; } JavaException existingJavaException = _javaExceptions.get(exceptionName); if (existingJavaException != null) { if (existingJavaException.getName().equals(exceptionName)) { if (((JAXBType) existingJavaException.getOwner()).getName().equals(jaxbStruct.getName()) || ModelerUtils.isEquivalentLiteralStructures(jaxbStruct, (JAXBStructuredType) existingJavaException.getOwner())) { // we have mapped this fault already if (faultType instanceof JAXBStructuredType) { fault.getBlock().setType((JAXBType) existingJavaException.getOwner()); } fault.setJavaException(existingJavaException); return false; } } } JavaException javaException = new JavaException(exceptionName, false, jaxbStruct); javaException.add(javaMember); jaxbStruct.setJavaType(javaException); _javaExceptions.put(javaException.getName(), javaException); fault.setJavaException(javaException); return true; }
Example 8
Source File: WSDLModeler.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected boolean createJavaExceptionFromLiteralType(Fault fault, com.sun.tools.internal.ws.processor.model.Port port, String operationName) { JAXBType faultType = (JAXBType) fault.getBlock().getType(); String exceptionName = fault.getName(); // use fault namespace attribute JAXBStructuredType jaxbStruct = new JAXBStructuredType(new QName( fault.getBlock().getName().getNamespaceURI(), fault.getName())); QName memberName = fault.getElementName(); JAXBElementMember jaxbMember = new JAXBElementMember(memberName, faultType); //jaxbMember.setNillable(faultType.isNillable()); String javaMemberName = getLiteralJavaMemberName(fault); JavaStructureMember javaMember = new JavaStructureMember( javaMemberName, faultType.getJavaType(), jaxbMember); jaxbMember.setJavaStructureMember(javaMember); javaMember.setReadMethod(Names.getJavaMemberReadMethod(javaMember)); javaMember.setInherited(false); jaxbMember.setJavaStructureMember(javaMember); jaxbStruct.add(jaxbMember); if (isConflictingExceptionClassName(exceptionName)) { exceptionName += "_Exception"; } JavaException existingJavaException = _javaExceptions.get(exceptionName); if (existingJavaException != null) { if (existingJavaException.getName().equals(exceptionName)) { if (((JAXBType) existingJavaException.getOwner()).getName().equals(jaxbStruct.getName()) || ModelerUtils.isEquivalentLiteralStructures(jaxbStruct, (JAXBStructuredType) existingJavaException.getOwner())) { // we have mapped this fault already if (faultType instanceof JAXBStructuredType) { fault.getBlock().setType((JAXBType) existingJavaException.getOwner()); } fault.setJavaException(existingJavaException); return false; } } } JavaException javaException = new JavaException(exceptionName, false, jaxbStruct); javaException.add(javaMember); jaxbStruct.setJavaType(javaException); _javaExceptions.put(javaException.getName(), javaException); fault.setJavaException(javaException); return true; }