/** * Constructs an interceptor instance. * @param position * position in the parameter list at which the collected * message payload should be inserted. */ public InPayloadInjectorInterceptor(int position) { super(Phase.UNMARSHAL); addBefore(AuditInRequestInterceptor.class.getName()); addAfter(InNamespaceMergeInterceptor.class.getName()); this.position = position; }
@Override protected void configureInterceptors(ServerFactoryBean svrFactory) { svrFactory.getInInterceptors().add(new InPayloadExtractorInterceptor(SOAP_BODY)); svrFactory.getInInterceptors().add(new InNamespaceMergeInterceptor()); svrFactory.getInInterceptors().add(new InPayloadInjectorInterceptor(0)); svrFactory.setDataBinding(new PlainXmlDataBinding()); super.configureInterceptors(svrFactory); } }
@SuppressWarnings("unchecked") @Override public void handleMessage(Message message) { if (isGET(message)) { return; } List list = message.getContent(List.class); StringPayloadHolder payloadHolder = message.getContent(StringPayloadHolder.class); if ((list != null) && (payloadHolder != null)) { list.set(position, payloadHolder.get(SOAP_BODY)); } } }
@Override protected void configureInterceptors(ServerFactoryBean svrFactory) { super.configureInterceptors(svrFactory); svrFactory.getInInterceptors().add(new InPayloadExtractorInterceptor(SOAP_BODY)); svrFactory.getInInterceptors().add(new InNamespaceMergeInterceptor()); svrFactory.getInInterceptors().add(new InPayloadInjectorInterceptor(0)); svrFactory.setDataBinding(new PlainXmlDataBinding()); }
@Override protected void configureInterceptors(Client client) { super.configureInterceptors(client); client.getInInterceptors().add(new InPayloadExtractorInterceptor(SOAP_BODY)); client.getInInterceptors().add(new InNamespaceMergeInterceptor()); client.getInInterceptors().add(new InPayloadInjectorInterceptor(0)); client.getEndpoint().getService().setDataBinding(new PlainXmlDataBinding()); } }