client.getEndpoint().getBinding().getBindingInfo(), hasOpName); if (findDispatchOp && !payloadOPMap.isEmpty()) { QName payloadElementName = null; client.getEndpoint().getBinding().getBindingInfo(), hasOpName); BindingOperationInfo dbop = client.getEndpoint().getBinding().getBindingInfo() .getOperation(dispatchedOpName); if (dbop != null) {
in.add(new MessageModeInInterceptor(clazz, getBinding().getBindingInfo().getName())); out.add(saajOut); out.add(new MessageModeOutInterceptor(saajOut, getBinding().getBindingInfo().getName())); } else if (isProvider) { out.add(new MessageModeOutInterceptor(clazz, getBinding().getBindingInfo().getName()));
add(new MessageModeOutInterceptor(saajOut, client.getEndpoint() .getBinding().getBindingInfo().getName())); client.getInInterceptors().add(new SAAJInInterceptor()); client.getInInterceptors() .add(new MessageModeInInterceptor(clazz, client.getEndpoint() .getBinding().getBindingInfo().getName()));
hasOpName = true; BindingOperationInfo bop = client.getEndpoint().getBinding() .getBindingInfo().getOperation(opName); if (bop == null) { addInvokeOperation(opName, isOneWay);
hasOpName = true; BindingOperationInfo bop = client.getEndpoint().getBinding() .getBindingInfo().getOperation(opName); if (bop == null) { addInvokeOperation(opName, false);
private void resetPartTypes(Binding bop2) { // The HypbridSourceDatabinding, based on JAXB, will possibly set // JAXB types into the parts. Since we need the Source objects, // we'll reset the types to either Source (for streaming), or null // (for non-streaming, defaults to DOMSource. for (BindingOperationInfo bop : bop2.getBindingInfo().getOperations()) { resetPartTypes(bop); } }
private void resetPartTypes(Binding bop2) { // The HypbridSourceDatabinding, based on JAXB, will possibly set // JAXB types into the parts. Since we need the Source objects, // we'll reset the types to either Source (for streaming), or null // (for non-streaming, defaults to DOMSource. for (BindingOperationInfo bop : bop2.getBindingInfo().getOperations()) { resetPartTypes(bop); } }
Binding binding = client.getEndpoint().getBinding(); BindingInfo bindingInfo = binding.getBindingInfo(); Collection<BindingOperationInfo> operations = bindingInfo .getOperations(); for (BindingOperationInfo boi : operations) { BindingMessageInfo inputMessageInfo = boi.getInput(); List<MessagePartInfo> parts = inputMessageInfo .getMessageParts(); System.out.println("method name: " + parts.get(0).getConcreteName().getLocalPart()); for (Field param : parts.get(0).getTypeClass() .getDeclaredFields()) { System.out.println("param_name: " + param.getName() + " type:" + param.getType()); } }
protected BindingOperationInfo getBindingOperationFromEndpoint(Endpoint ep, final String operationName) { QName q = new QName(ep.getService().getName().getNamespaceURI(), operationName); BindingOperationInfo bop = ep.getBinding().getBindingInfo().getOperation(q); return bop; }
public <T> T get(Class<T> key) { T t = key.cast(get(key.getName())); if (t == null) { if (key == Bus.class) { t = key.cast(bus); } else if (key == OperationInfo.class && bindingOp != null) { t = key.cast(bindingOp.getOperationInfo()); } else if (key == BindingOperationInfo.class) { t = key.cast(bindingOp); } else if (key == Endpoint.class) { t = key.cast(endpoint); } else if (key == Service.class) { t = key.cast(service); } else if (key == Binding.class) { t = key.cast(binding); } else if (key == BindingInfo.class && binding != null) { t = key.cast(binding.getBindingInfo()); } else if (key == InterfaceInfo.class && endpoint != null) { t = key.cast(endpoint.getEndpointInfo().getService().getInterface()); } else if (key == ServiceInfo.class && endpoint != null) { t = key.cast(endpoint.getEndpointInfo().getService()); } } return t; }
public <T> T get(Class<T> key) { T t = key.cast(get(key.getName())); if (t == null) { if (key == Bus.class) { t = key.cast(bus); } else if (key == OperationInfo.class && bindingOp != null) { t = key.cast(bindingOp.getOperationInfo()); } else if (key == BindingOperationInfo.class) { t = key.cast(bindingOp); } else if (key == Endpoint.class) { t = key.cast(endpoint); } else if (key == Service.class) { t = key.cast(service); } else if (key == Binding.class) { t = key.cast(binding); } else if (key == BindingInfo.class && binding != null) { t = key.cast(binding.getBindingInfo()); } else if (key == InterfaceInfo.class && endpoint != null) { t = key.cast(endpoint.getEndpointInfo().getService().getInterface()); } else if (key == ServiceInfo.class && endpoint != null) { t = key.cast(endpoint.getEndpointInfo().getService()); } } return t; }
/** * Extracts the bindingId from a Server. * @param server * @return */ private static String getBindingId(Server server) { Endpoint ep = server.getEndpoint(); BindingInfo bi = ep.getBinding().getBindingInfo(); return bi.getBindingId(); }
/** * Extracts the bindingId from a Server. * @param server * @return */ private static String getBindingId(Server server) { Endpoint ep = server.getEndpoint(); BindingInfo bi = ep.getBinding().getBindingInfo(); return bi.getBindingId(); }
private BindingOperationInfo getInvocationOperation() throws Exception { // Normally its not this hard to invoke the CXF Client, but we're // sending along some exchange properties, so we need to use a more advanced // method Endpoint ep = client.getEndpoint(); // The operation is always named invoke because hits our ProxyService implementation. QName q = new QName(ep.getService().getName().getNamespaceURI(), "invoke"); BindingOperationInfo bop = ep.getBinding().getBindingInfo().getOperation(q); if (bop.isUnwrappedCapable()) { bop = bop.getUnwrappedOperation(); } return bop; }
protected void setupEndpoint(Endpoint ep) { resetPartTypes(ep.getBinding()); Class<?> fmt = Source.class; if (ep.getBinding() instanceof SoapBinding) { ep.getInInterceptors().add(new SAAJInInterceptor()); SAAJOutInterceptor out = new SAAJOutInterceptor(); ep.getOutInterceptors().add(out); ep.getOutInterceptors().add(new CxfMessageSoapHeaderOutInterceptor()); ep.getOutInterceptors().add(new MessageModeOutInterceptor(out, ep.getBinding().getBindingInfo().getName())); fmt = SOAPMessage.class; } else { ep.getOutInterceptors().add(new MessageModeOutInterceptor(Source.class, ep.getBinding().getBindingInfo().getName())); } ep.getInInterceptors().add(new MessageModeInInterceptor(fmt, ep.getBinding().getBindingInfo().getName())); ep.put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE); // need to remove the wrapper class and holder interceptor removeInterceptors(ep.getInInterceptors(), REMOVING_IN_INTERCEPTORS); removeInterceptors(ep.getOutInterceptors(), REMOVING_OUT_INTERCEPTORS); }
private QName getEndpointName(Endpoint e) { ServiceInfo sInfo = e.getBinding().getBindingInfo().getService(); return sInfo == null ? e.getEndpointInfo().getName() : sInfo.getInterface().getName(); }
private QName getEndpointName(Endpoint e) { ServiceInfo sInfo = e.getBinding().getBindingInfo().getService(); return sInfo == null ? e.getEndpointInfo().getName() : sInfo.getInterface().getName(); }
public void handleMessage(Message message) throws Fault { String action = (String)message.get(SoapBindingConstants.SOAP_ACTION); if (action == null) { AddressingProperties inProps = (AddressingProperties)message .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND); if (inProps != null && inProps.getAction() != null) { action = inProps.getAction().getValue(); } } if ("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get".equals(action) || "http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata/Request".equals(action)) { message.remove(AssertionInfoMap.class.getName()); Exchange ex = message.getExchange(); Endpoint endpoint = createEndpoint(message); ex.put(Endpoint.class, endpoint); ex.put(Service.class, endpoint.getService()); ex.put(org.apache.cxf.binding.Binding.class, endpoint.getBinding()); ex.put(BindingOperationInfo.class, endpoint.getBinding().getBindingInfo() .getOperation(new QName("http://mex.ws.cxf.apache.org/", "Get2004"))); ex.remove(BindingOperationInfo.class); message.put(MAPAggregator.ACTION_VERIFIED, Boolean.TRUE); message.getInterceptorChain().add(endpoint.getInInterceptors()); message.getInterceptorChain().add(endpoint.getBinding().getInInterceptors()); } }
public void handleMessage(Message message) throws Fault { String action = (String)message.get(SoapBindingConstants.SOAP_ACTION); if (action == null) { AddressingProperties inProps = (AddressingProperties)message .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND); if (inProps != null && inProps.getAction() != null) { action = inProps.getAction().getValue(); } } if ("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get".equals(action) || "http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata/Request".equals(action)) { message.remove(AssertionInfoMap.class.getName()); Exchange ex = message.getExchange(); Endpoint endpoint = createEndpoint(message); ex.put(Endpoint.class, endpoint); ex.put(Service.class, endpoint.getService()); ex.put(org.apache.cxf.binding.Binding.class, endpoint.getBinding()); ex.put(BindingOperationInfo.class, endpoint.getBinding().getBindingInfo() .getOperation(new QName("http://mex.ws.cxf.apache.org/", "Get2004"))); ex.remove(BindingOperationInfo.class); message.put(MAPAggregator.ACTION_VERIFIED, Boolean.TRUE); message.getInterceptorChain().add(endpoint.getInInterceptors()); message.getInterceptorChain().add(endpoint.getBinding().getInInterceptors()); } }
public static void fillCallContext(CallContext callContext, SoapMessage message) { if (callContext.getOperationName() == null) { callContext.setOperationName((QName) message.get(Message.WSDL_OPERATION)); } callContext.setPortTypeName((QName) message.get(Message.WSDL_INTERFACE)); callContext.setServiceName((QName) message.get(Message.WSDL_SERVICE)); final BindingInfo bi = message.getExchange().getBinding().getBindingInfo(); callContext.setBindingId(bi == null ? "http://schemas.xmlsoap.org/wsdl/soap/" : bi.getBindingId()); URL wsdlLocation = resolveCallbackWsdlLocation(callContext.getServiceName(), message); if (wsdlLocation != null) { callContext.setWsdlLocation(wsdlLocation); } String flowId = FlowIdHelper.getFlowId(message); if (flowId != null && !flowId.isEmpty()) { callContext.setFlowId(flowId); } }