org.omg.CORBA.UnknownUserException Java Examples
The following examples show how to use
org.omg.CORBA.UnknownUserException.
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: CorbaMessageMediatorImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public Exception unmarshalDIIUserException(String repoId, InputStream is) { if (! isDIIRequest()) { return null; } ExceptionList _exceptions = diiRequest.exceptions(); try { // Find the typecode for the exception for (int i=0; i<_exceptions.count() ; i++) { TypeCode tc = _exceptions.item(i); if ( tc.id().equals(repoId) ) { // Since we dont have the actual user exception // class, the spec says we have to create an // UnknownUserException and put it in the // environment. Any eany = orb.create_any(); eany.read_value(is, (TypeCode)tc); return new UnknownUserException(eany); } } } catch (Exception b) { throw wrapper.unexpectedDiiException(b); } // must be a truly unknown exception return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE); }
Example #2
Source File: CorbaMessageMediatorImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public Exception unmarshalDIIUserException(String repoId, InputStream is) { if (! isDIIRequest()) { return null; } ExceptionList _exceptions = diiRequest.exceptions(); try { // Find the typecode for the exception for (int i=0; i<_exceptions.count() ; i++) { TypeCode tc = _exceptions.item(i); if ( tc.id().equals(repoId) ) { // Since we dont have the actual user exception // class, the spec says we have to create an // UnknownUserException and put it in the // environment. Any eany = orb.create_any(); eany.read_value(is, (TypeCode)tc); return new UnknownUserException(eany); } } } catch (Exception b) { throw wrapper.unexpectedDiiException(b); } // must be a truly unknown exception return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE); }
Example #3
Source File: CorbaMessageMediatorImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public Exception unmarshalDIIUserException(String repoId, InputStream is) { if (! isDIIRequest()) { return null; } ExceptionList _exceptions = diiRequest.exceptions(); try { // Find the typecode for the exception for (int i=0; i<_exceptions.count() ; i++) { TypeCode tc = _exceptions.item(i); if ( tc.id().equals(repoId) ) { // Since we dont have the actual user exception // class, the spec says we have to create an // UnknownUserException and put it in the // environment. Any eany = orb.create_any(); eany.read_value(is, (TypeCode)tc); return new UnknownUserException(eany); } } } catch (Exception b) { throw wrapper.unexpectedDiiException(b); } // must be a truly unknown exception return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE); }
Example #4
Source File: CorbaMessageMediatorImpl.java From JDKSourceCode1.8 with MIT License | 5 votes |
public Exception unmarshalDIIUserException(String repoId, InputStream is) { if (! isDIIRequest()) { return null; } ExceptionList _exceptions = diiRequest.exceptions(); try { // Find the typecode for the exception for (int i=0; i<_exceptions.count() ; i++) { TypeCode tc = _exceptions.item(i); if ( tc.id().equals(repoId) ) { // Since we dont have the actual user exception // class, the spec says we have to create an // UnknownUserException and put it in the // environment. Any eany = orb.create_any(); eany.read_value(is, (TypeCode)tc); return new UnknownUserException(eany); } } } catch (Exception b) { throw wrapper.unexpectedDiiException(b); } // must be a truly unknown exception return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE); }
Example #5
Source File: CorbaMessageMediatorImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public Exception unmarshalDIIUserException(String repoId, InputStream is) { if (! isDIIRequest()) { return null; } ExceptionList _exceptions = diiRequest.exceptions(); try { // Find the typecode for the exception for (int i=0; i<_exceptions.count() ; i++) { TypeCode tc = _exceptions.item(i); if ( tc.id().equals(repoId) ) { // Since we dont have the actual user exception // class, the spec says we have to create an // UnknownUserException and put it in the // environment. Any eany = orb.create_any(); eany.read_value(is, (TypeCode)tc); return new UnknownUserException(eany); } } } catch (Exception b) { throw wrapper.unexpectedDiiException(b); } // must be a truly unknown exception return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE); }
Example #6
Source File: CorbaMessageMediatorImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public Exception unmarshalDIIUserException(String repoId, InputStream is) { if (! isDIIRequest()) { return null; } ExceptionList _exceptions = diiRequest.exceptions(); try { // Find the typecode for the exception for (int i=0; i<_exceptions.count() ; i++) { TypeCode tc = _exceptions.item(i); if ( tc.id().equals(repoId) ) { // Since we dont have the actual user exception // class, the spec says we have to create an // UnknownUserException and put it in the // environment. Any eany = orb.create_any(); eany.read_value(is, (TypeCode)tc); return new UnknownUserException(eany); } } } catch (Exception b) { throw wrapper.unexpectedDiiException(b); } // must be a truly unknown exception return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE); }
Example #7
Source File: CorbaMessageMediatorImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public Exception unmarshalDIIUserException(String repoId, InputStream is) { if (! isDIIRequest()) { return null; } ExceptionList _exceptions = diiRequest.exceptions(); try { // Find the typecode for the exception for (int i=0; i<_exceptions.count() ; i++) { TypeCode tc = _exceptions.item(i); if ( tc.id().equals(repoId) ) { // Since we dont have the actual user exception // class, the spec says we have to create an // UnknownUserException and put it in the // environment. Any eany = orb.create_any(); eany.read_value(is, (TypeCode)tc); return new UnknownUserException(eany); } } } catch (Exception b) { throw wrapper.unexpectedDiiException(b); } // must be a truly unknown exception return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE); }
Example #8
Source File: CorbaMessageMediatorImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
public Exception unmarshalDIIUserException(String repoId, InputStream is) { if (! isDIIRequest()) { return null; } ExceptionList _exceptions = diiRequest.exceptions(); try { // Find the typecode for the exception for (int i=0; i<_exceptions.count() ; i++) { TypeCode tc = _exceptions.item(i); if ( tc.id().equals(repoId) ) { // Since we dont have the actual user exception // class, the spec says we have to create an // UnknownUserException and put it in the // environment. Any eany = orb.create_any(); eany.read_value(is, (TypeCode)tc); return new UnknownUserException(eany); } } } catch (Exception b) { throw wrapper.unexpectedDiiException(b); } // must be a truly unknown exception return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE); }
Example #9
Source File: CorbaMessageMediatorImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public Exception unmarshalDIIUserException(String repoId, InputStream is) { if (! isDIIRequest()) { return null; } ExceptionList _exceptions = diiRequest.exceptions(); try { // Find the typecode for the exception for (int i=0; i<_exceptions.count() ; i++) { TypeCode tc = _exceptions.item(i); if ( tc.id().equals(repoId) ) { // Since we dont have the actual user exception // class, the spec says we have to create an // UnknownUserException and put it in the // environment. Any eany = orb.create_any(); eany.read_value(is, (TypeCode)tc); return new UnknownUserException(eany); } } } catch (Exception b) { throw wrapper.unexpectedDiiException(b); } // must be a truly unknown exception return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE); }
Example #10
Source File: CorbaMessageMediatorImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public Exception unmarshalDIIUserException(String repoId, InputStream is) { if (! isDIIRequest()) { return null; } ExceptionList _exceptions = diiRequest.exceptions(); try { // Find the typecode for the exception for (int i=0; i<_exceptions.count() ; i++) { TypeCode tc = _exceptions.item(i); if ( tc.id().equals(repoId) ) { // Since we dont have the actual user exception // class, the spec says we have to create an // UnknownUserException and put it in the // environment. Any eany = orb.create_any(); eany.read_value(is, (TypeCode)tc); return new UnknownUserException(eany); } } } catch (Exception b) { throw wrapper.unexpectedDiiException(b); } // must be a truly unknown exception return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE); }
Example #11
Source File: CorbaConduit.java From cxf with Apache License 2.0 | 4 votes |
public void buildRequest(CorbaMessage message, OperationType opType) throws Exception { ServiceInfo service = message.getExchange().getEndpoint().getEndpointInfo().getService(); NVList nvlist = getArguments(message); NamedValue ret = getReturn(message); Map<TypeCode, RaisesType> exceptions = getOperationExceptions(opType, typeMap); ExceptionList exList = getExceptionList(exceptions, message, opType); Request request = getRequest(message, opType.getName(), nvlist, ret, exList); if (request == null) { throw new CorbaBindingException("Couldn't build the corba request"); } Exception ex = null; try { request.invoke(); ex = request.env().exception(); } catch (SystemException sysex) { ex = sysex; } if (ex != null) { if (ex instanceof SystemException) { message.setContent(Exception.class, new Fault(ex)); message.setSystemException((SystemException) ex); return; } if (ex instanceof UnknownUserException) { UnknownUserException userEx = (UnknownUserException) ex; Any except = userEx.except; RaisesType raises = exceptions.get(except.type()); if (raises == null) { throw new CorbaBindingException("Couldn't find the exception type code to unmarshall"); } QName elName = new QName("", raises.getException().getLocalPart()); CorbaObjectHandler handler = CorbaHandlerUtils.initializeObjectHandler(orb, elName, raises.getException(), typeMap, service); CorbaStreamable exStreamable = message.createStreamableObject(handler, elName); exStreamable._read(except.create_input_stream()); message.setStreamableException(exStreamable); message.setContent(Exception.class, new Fault(userEx)); } else { message.setContent(Exception.class, new Fault(ex)); } } }