Java Code Examples for com.sun.xml.internal.ws.model.ParameterImpl#getOutBinding()
The following examples show how to use
com.sun.xml.internal.ws.model.ParameterImpl#getOutBinding() .
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: SEIMethodHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(owner.soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 2
Source File: TieHandler.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * prepare objects for creating response {@link Message} */ private EndpointResponseMessageBuilder createResponseMessageBuilder(List<MessageFiller> fillers) { EndpointResponseMessageBuilder tmpBodyBuilder = null; List<ParameterImpl> rp = javaMethodModel.getResponseParameters(); for (ParameterImpl param : rp) { ValueGetter getter = ValueGetter.get(param); switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) { tmpBodyBuilder = new EndpointResponseMessageBuilder.RpcLit((WrapperParameter)param, soapVersion); } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.DocLit((WrapperParameter)param, soapVersion); } } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.Bare(param, soapVersion); } break; case HEADER: fillers.add(new MessageFiller.Header(param.getIndex(), param.getXMLBridge(), getter )); break; case ATTACHMENT: fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter)); break; case UNBOUND: break; default: throw new AssertionError(); // impossible } } if (tmpBodyBuilder == null) { // no parameter binds to body. we create an empty message switch(soapVersion) { case SOAP_11: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP11; break; case SOAP_12: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP12; break; default: throw new AssertionError(); } } return tmpBodyBuilder; }
Example 3
Source File: StubHandler.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 4
Source File: TieHandler.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * prepare objects for creating response {@link Message} */ private EndpointResponseMessageBuilder createResponseMessageBuilder(List<MessageFiller> fillers) { EndpointResponseMessageBuilder tmpBodyBuilder = null; List<ParameterImpl> rp = javaMethodModel.getResponseParameters(); for (ParameterImpl param : rp) { ValueGetter getter = ValueGetter.get(param); switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) { tmpBodyBuilder = new EndpointResponseMessageBuilder.RpcLit((WrapperParameter)param, soapVersion); } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.DocLit((WrapperParameter)param, soapVersion); } } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.Bare(param, soapVersion); } break; case HEADER: fillers.add(new MessageFiller.Header(param.getIndex(), param.getXMLBridge(), getter )); break; case ATTACHMENT: fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter)); break; case UNBOUND: break; default: throw new AssertionError(); // impossible } } if (tmpBodyBuilder == null) { // no parameter binds to body. we create an empty message switch(soapVersion) { case SOAP_11: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP11; break; case SOAP_12: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP12; break; default: throw new AssertionError(); } } return tmpBodyBuilder; }
Example 5
Source File: SEIMethodHandler.java From hottub with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(owner.soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 6
Source File: StubHandler.java From hottub with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 7
Source File: TieHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * prepare objects for creating response {@link Message} */ private EndpointResponseMessageBuilder createResponseMessageBuilder(List<MessageFiller> fillers) { EndpointResponseMessageBuilder tmpBodyBuilder = null; List<ParameterImpl> rp = javaMethodModel.getResponseParameters(); for (ParameterImpl param : rp) { ValueGetter getter = ValueGetter.get(param); switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) { tmpBodyBuilder = new EndpointResponseMessageBuilder.RpcLit((WrapperParameter)param, soapVersion); } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.DocLit((WrapperParameter)param, soapVersion); } } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.Bare(param, soapVersion); } break; case HEADER: fillers.add(new MessageFiller.Header(param.getIndex(), param.getXMLBridge(), getter )); break; case ATTACHMENT: fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter)); break; case UNBOUND: break; default: throw new AssertionError(); // impossible } } if (tmpBodyBuilder == null) { // no parameter binds to body. we create an empty message switch(soapVersion) { case SOAP_11: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP11; break; case SOAP_12: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP12; break; default: throw new AssertionError(); } } return tmpBodyBuilder; }
Example 8
Source File: SEIMethodHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(owner.soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 9
Source File: StubHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 10
Source File: TieHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * prepare objects for creating response {@link Message} */ private EndpointResponseMessageBuilder createResponseMessageBuilder(List<MessageFiller> fillers) { EndpointResponseMessageBuilder tmpBodyBuilder = null; List<ParameterImpl> rp = javaMethodModel.getResponseParameters(); for (ParameterImpl param : rp) { ValueGetter getter = ValueGetter.get(param); switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) { tmpBodyBuilder = new EndpointResponseMessageBuilder.RpcLit((WrapperParameter)param, soapVersion); } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.DocLit((WrapperParameter)param, soapVersion); } } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.Bare(param, soapVersion); } break; case HEADER: fillers.add(new MessageFiller.Header(param.getIndex(), param.getXMLBridge(), getter )); break; case ATTACHMENT: fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter)); break; case UNBOUND: break; default: throw new AssertionError(); // impossible } } if (tmpBodyBuilder == null) { // no parameter binds to body. we create an empty message switch(soapVersion) { case SOAP_11: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP11; break; case SOAP_12: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP12; break; default: throw new AssertionError(); } } return tmpBodyBuilder; }
Example 11
Source File: StubHandler.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 12
Source File: StubHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 13
Source File: TieHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * prepare objects for creating response {@link Message} */ private EndpointResponseMessageBuilder createResponseMessageBuilder(List<MessageFiller> fillers) { EndpointResponseMessageBuilder tmpBodyBuilder = null; List<ParameterImpl> rp = javaMethodModel.getResponseParameters(); for (ParameterImpl param : rp) { ValueGetter getter = ValueGetter.get(param); switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) { tmpBodyBuilder = new EndpointResponseMessageBuilder.RpcLit((WrapperParameter)param, soapVersion); } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.DocLit((WrapperParameter)param, soapVersion); } } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.Bare(param, soapVersion); } break; case HEADER: fillers.add(new MessageFiller.Header(param.getIndex(), param.getXMLBridge(), getter )); break; case ATTACHMENT: fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter)); break; case UNBOUND: break; default: throw new AssertionError(); // impossible } } if (tmpBodyBuilder == null) { // no parameter binds to body. we create an empty message switch(soapVersion) { case SOAP_11: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP11; break; case SOAP_12: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP12; break; default: throw new AssertionError(); } } return tmpBodyBuilder; }
Example 14
Source File: SEIMethodHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(owner.soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 15
Source File: StubHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 16
Source File: TieHandler.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * prepare objects for creating response {@link Message} */ private EndpointResponseMessageBuilder createResponseMessageBuilder(List<MessageFiller> fillers) { EndpointResponseMessageBuilder tmpBodyBuilder = null; List<ParameterImpl> rp = javaMethodModel.getResponseParameters(); for (ParameterImpl param : rp) { ValueGetter getter = ValueGetter.get(param); switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) { tmpBodyBuilder = new EndpointResponseMessageBuilder.RpcLit((WrapperParameter)param, soapVersion); } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.DocLit((WrapperParameter)param, soapVersion); } } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.Bare(param, soapVersion); } break; case HEADER: fillers.add(new MessageFiller.Header(param.getIndex(), param.getXMLBridge(), getter )); break; case ATTACHMENT: fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter)); break; case UNBOUND: break; default: throw new AssertionError(); // impossible } } if (tmpBodyBuilder == null) { // no parameter binds to body. we create an empty message switch(soapVersion) { case SOAP_11: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP11; break; case SOAP_12: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP12; break; default: throw new AssertionError(); } } return tmpBodyBuilder; }
Example 17
Source File: SEIMethodHandler.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(owner.soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 18
Source File: StubHandler.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }
Example 19
Source File: TieHandler.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * prepare objects for creating response {@link Message} */ private EndpointResponseMessageBuilder createResponseMessageBuilder(List<MessageFiller> fillers) { EndpointResponseMessageBuilder tmpBodyBuilder = null; List<ParameterImpl> rp = javaMethodModel.getResponseParameters(); for (ParameterImpl param : rp) { ValueGetter getter = ValueGetter.get(param); switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) { tmpBodyBuilder = new EndpointResponseMessageBuilder.RpcLit((WrapperParameter)param, soapVersion); } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.DocLit((WrapperParameter)param, soapVersion); } } else { tmpBodyBuilder = new EndpointResponseMessageBuilder.Bare(param, soapVersion); } break; case HEADER: fillers.add(new MessageFiller.Header(param.getIndex(), param.getXMLBridge(), getter )); break; case ATTACHMENT: fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter)); break; case UNBOUND: break; default: throw new AssertionError(); // impossible } } if (tmpBodyBuilder == null) { // no parameter binds to body. we create an empty message switch(soapVersion) { case SOAP_11: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP11; break; case SOAP_12: tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP12; break; default: throw new AssertionError(); } } return tmpBodyBuilder; }
Example 20
Source File: SEIMethodHandler.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) { // prepare objects for processing response List<ParameterImpl> rp = method.getResponseParameters(); List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>(); for( ParameterImpl param : rp ) { ValueSetter setter; switch(param.getOutBinding().kind) { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory)); else builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory)); } else { setter = setterFactory.get(param); builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter)); } break; case HEADER: setter = setterFactory.get(param); builders.add(new ResponseBuilder.Header(owner.soapVersion, param, setter)); break; case ATTACHMENT: setter = setterFactory.get(param); builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter)); break; case UNBOUND: setter = setterFactory.get(param); builders.add(new ResponseBuilder.NullSetter(setter, ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type))); break; default: throw new AssertionError(); } } ResponseBuilder rb; switch(builders.size()) { case 0: rb = ResponseBuilder.NONE; break; case 1: rb = builders.get(0); break; default: rb = new ResponseBuilder.Composite(builders); } return rb; }