use of javax.wsdl.Binding in project tdi-studio-se by Talend.
the class ComponentBuilder method populateComponent.
private ServiceInfo populateComponent(ServiceInfo component, Service service) {
QName qName = service.getQName();
String namespace = qName.getNamespaceURI();
String name = qName.getLocalPart();
component.setServerName(name);
component.setServerNameSpace(namespace);
Map ports = service.getPorts();
Iterator portIter = ports.values().iterator();
while (portIter.hasNext()) {
Port port = (Port) portIter.next();
Binding binding = port.getBinding();
if (port.getName() != null && component.getPortNames() == null) {
List<PortNames> portNames = new ArrayList();
PortNames portName = new PortNames();
portName.setPortName(port.getName());
portNames.add(portName);
component.setPortNames(portNames);
} else if (port.getName() != null && component.getPortNames() != null) {
PortNames portName = new PortNames();
portName.setPortName(port.getName());
component.getPortNames().add(portName);
}
List operations = buildOperations(binding);
Iterator operIter = operations.iterator();
while (operIter.hasNext()) {
OperationInfo operation = (OperationInfo) operIter.next();
Vector addrElems = findExtensibilityElement(port.getExtensibilityElements(), "address");
ExtensibilityElement element = (ExtensibilityElement) addrElems.elementAt(0);
if (element != null && element instanceof SOAPAddress) {
SOAPAddress soapAddr = (SOAPAddress) element;
operation.setTargetURL(soapAddr.getLocationURI());
} else if (element != null && element instanceof SOAP12Address) {
SOAP12Address soapAddr = (SOAP12Address) element;
operation.setTargetURL(soapAddr.getLocationURI());
}
component.addOperation(operation);
}
}
return component;
}
use of javax.wsdl.Binding in project Lucee by lucee.
the class Axis1Client method keyIterator.
@Override
public Iterator<Collection.Key> keyIterator() {
List<Collection.Key> list = new ArrayList<Collection.Key>();
Port port = null;
try {
port = getPort();
} catch (Exception e) {
return new KeyIterator(new Collection.Key[0]);
}
Binding binding = port.getBinding();
SymbolTable symbolTable = parser.getSymbolTable();
BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName());
Iterator itr = bEntry.getParameters().keySet().iterator();
Operation tmpOp = null;
// Operation operation = null;
while (itr.hasNext()) {
tmpOp = (Operation) itr.next();
// Parameters p = (Parameters)bEntry.getParameters().get(tmpOp);
list.add(KeyImpl.init(tmpOp.getName()));
}
return new KeyIterator(list.toArray(new Collection.Key[list.size()]));
}
use of javax.wsdl.Binding in project Lucee by lucee.
the class Axis1Client method _toDumpData.
private DumpData _toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) throws PageException {
DumpTable functions = new DumpTable("webservice", "#99cccc", "#ccffff", "#000000");
functions.setTitle("Web Service (Axis 1)");
if (dp.getMetainfo())
functions.setComment(wsdlUrl);
// DumpTable functions = new DumpTable("#ccccff","#cccc00","#000000");
Port port = getPort();
Binding binding = port.getBinding();
// Parameters parameters = null;
// Parameter p = null;
SymbolTable symbolTable = parser.getSymbolTable();
BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName());
Iterator itr = bEntry.getParameters().keySet().iterator();
Operation tmpOp = null;
// Operation operation = null;
while (itr.hasNext()) {
tmpOp = (Operation) itr.next();
Element el = tmpOp.getDocumentationElement();
StringBuffer doc = new StringBuffer();
if (el != null) {
NodeList children = XMLUtil.getChildNodes(el, Node.TEXT_NODE);
int len = children.getLength();
Text text;
for (int i = 0; i < len; i++) {
text = (Text) children.item(i);
doc.append(text.getData());
}
}
// parameters = (Parameters)bEntry.getParameters().get(tmpOp);
functions.appendRow(1, new SimpleDumpData(tmpOp.getName()), _toHTMLOperation(tmpOp.getName(), doc.toString(), (Parameters) bEntry.getParameters().get(tmpOp)));
}
// box.appendRow(1,new SimpleDumpData(""),functions);
return functions;
}
use of javax.wsdl.Binding in project carbon-business-process by wso2.
the class PeopleActivity method getSoapFactory.
public SOAPFactory getSoapFactory() throws FaultException {
Binding binding = getBinding();
ExtensibilityElement bindingType = SOAPHelper.getBindingExtension(binding);
if (!(bindingType instanceof SOAPBinding || bindingType instanceof SOAP12Binding || bindingType instanceof HTTPBinding)) {
throw new FaultException(BPEL4PeopleConstants.B4P_FAULT, "Service binding is not supported for service " + serviceName + " and port " + getServicePort());
}
if (bindingType instanceof SOAPBinding) {
return OMAbstractFactory.getSOAP11Factory();
} else {
return OMAbstractFactory.getSOAP12Factory();
}
}
use of javax.wsdl.Binding in project carbon-business-process by wso2.
the class BPELMessageContextFactory method fillBindingAndRelatedInformation.
private static void fillBindingAndRelatedInformation(final BPELMessageContext bpelMessageContext) throws AxisFault {
Binding wsdlBinding = getWSDLBindingOfCurrentMessageFlow(bpelMessageContext.getInMessageContext().getAxisService(), bpelMessageContext.getInMessageContext());
if (wsdlBinding == null) {
throw new NullPointerException("WSDL Binding null for incoming message.");
}
bpelMessageContext.setWsdlBindingForCurrentMessageFlow(wsdlBinding);
setSOAPFactoryAndBindingStyle(bpelMessageContext);
}
Aggregations