public Interceptor createInterceptor() { if (jaxrs) { return null; } if( (binding.getRequestWireFormat() != null && binding.getRequestWireFormat() instanceof XMLWireFormat) || (binding.getResponseWireFormat() != null && binding.getResponseWireFormat() instanceof XMLWireFormat) ){ return new XMLWireFormatInterceptor(extensionPoints, endpoint); } return null; }
public Interceptor createInterceptor() { if (jaxrs) { return null; } if( (binding.getRequestWireFormat() != null && binding.getRequestWireFormat() instanceof JSONWireFormat) || (binding.getResponseWireFormat() != null && binding.getResponseWireFormat() instanceof JSONWireFormat) ){ return new JSONWireFormatInterceptor(extensionPoints, endpoint); } return null; }
public InterfaceContract configureWireFormatInterfaceContract(InterfaceContract interfaceContract) { serviceContract = interfaceContract; if (!jaxrs) { boolean configureInput = binding.getRequestWireFormat() != null; boolean configureOutput = binding.getRequestWireFormat() != null || binding.getResponseWireFormat() != null; //set XML databinding setDataBinding(serviceContract.getInterface(), configureInput, configureOutput); } return serviceContract; }
public InterfaceContract configureWireFormatInterfaceContract(InterfaceContract interfaceContract) { serviceContract = interfaceContract; if (!jaxrs) { boolean configureInput = binding.getRequestWireFormat() != null; boolean configureOutput = binding.getRequestWireFormat() != null || binding.getResponseWireFormat() != null; //set JSON databinding setDataBinding(serviceContract.getInterface(), configureInput, configureOutput); } return serviceContract; }
protected Binding map(Binding scaBinding, QName newBindingType) { try { Binding binding = createDelegatingBinding(newBindingType); binding.setName(scaBinding.getName()); if (((SCABinding)scaBinding).getDelegateBindingURI() != null){ // if this is an SCA binding that's been resolved via the registry then // the URI of the target service is delegate specific and is stored // in this new slot in the binding model binding.setURI(((SCABinding)scaBinding).getDelegateBindingURI()); } else { binding.setURI(scaBinding.getURI()); } binding.setOperationSelector(scaBinding.getOperationSelector()); binding.setRequestWireFormat(scaBinding.getRequestWireFormat()); binding.setResponseWireFormat(scaBinding.getResponseWireFormat()); if (binding instanceof PolicySubject && scaBinding instanceof PolicySubject) { PolicySubject subject1 = (PolicySubject)binding; PolicySubject subject2 = (PolicySubject)scaBinding; subject1.getPolicySets().addAll(subject2.getPolicySets()); subject1.getRequiredIntents().addAll(subject2.getRequiredIntents()); } return binding; } catch (Throwable e) { throw new ServiceRuntimeException(e); } }
protected Binding map(Binding scaBinding, QName newBindingType) { try { Binding binding = createDelegatingBinding(newBindingType); binding.setName(scaBinding.getName()); if (((SCABinding)scaBinding).getDelegateBindingURI() != null){ // if this is an SCA binding that's been resolved via the registry then // the URI of the target service is delegate specific and is stored // in this new slot in the binding model binding.setURI(((SCABinding)scaBinding).getDelegateBindingURI()); } else { binding.setURI(scaBinding.getURI()); } binding.setOperationSelector(scaBinding.getOperationSelector()); binding.setRequestWireFormat(scaBinding.getRequestWireFormat()); binding.setResponseWireFormat(scaBinding.getResponseWireFormat()); if (binding instanceof PolicySubject && scaBinding instanceof PolicySubject) { PolicySubject subject1 = (PolicySubject)binding; PolicySubject subject2 = (PolicySubject)scaBinding; subject1.getPolicySets().addAll(subject2.getPolicySets()); subject1.getRequiredIntents().addAll(subject2.getRequiredIntents()); } return binding; } catch (Throwable e) { throw new ServiceRuntimeException(e); } }