Search in sources :

Example 6 with Function

use of org.talend.designer.esb.webservice.ws.wsdlinfo.Function in project tesb-studio-se by Talend.

the class TESBConsumerNodeAdapter method setNodeSetting.

@Override
public IStatus setNodeSetting(ServiceSetting setting) {
    node.setParamValue("ENDPOINT", setting.getWsdlLocation());
    try {
        String wsdlString = setting.getCompressedAndEncodedWSDL();
        node.setParamValue("WSDL_CONTENT", wsdlString);
    } catch (Exception e) {
        throw new IllegalStateException("Unable to create wsdl content", e);
    }
    Function currentFunction = setting.getFunction();
    node.setParamValue(PORT_NAME, currentFunction.getPortName());
    node.setParamValue("METHOD_NS", currentFunction.getNameSpaceURI());
    node.setParamValue(METHOD, currentFunction.getName());
    node.setParamValue(SERVICE_NS, currentFunction.getServiceNameSpace());
    node.setParamValue(SERVICE_NAME, currentFunction.getServiceName());
    node.setParamValue("PORT_NS", currentFunction.getServiceNameSpace());
    node.setParamValue("SOAP_ACTION", currentFunction.getSoapAction());
    final String endpoint = node.getParamStringValue("ESB_ENDPOINT");
    if (endpoint == null || !endpoint.startsWith("context.")) {
        node.setParamValue("ESB_ENDPOINT", TalendTextUtils.addQuotes(currentFunction.getAddressLocation()));
    }
    node.setParamValue("COMMUNICATION_STYLE", currentFunction.getCommunicationStyle());
    return Status.OK_STATUS;
}
Also used : Function(org.talend.designer.esb.webservice.ws.wsdlinfo.Function)

Aggregations

Function (org.talend.designer.esb.webservice.ws.wsdlinfo.Function)6 QName (javax.xml.namespace.QName)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Definition (javax.wsdl.Definition)1 Item (org.talend.core.model.properties.Item)1 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)1 OperationInfo (org.talend.designer.esb.webservice.ws.wsdlinfo.OperationInfo)1 ServiceInfo (org.talend.designer.esb.webservice.ws.wsdlinfo.ServiceInfo)1