public static MethodType findOperationFromServiceDesc(String methodName, ServiceDescriptionType serviceDescType) throws GFacWSDLException { PortTypeType portType = serviceDescType.getPortType(); if (serviceDescType.getPortType().getMethod().getMethodName().equals(methodName)) { serviceDescType.getPortType().getMethod(); } if (isInbuiltOperation(methodName)) { MethodType builtInOperationType = portType.addNewMethod(); builtInOperationType.setMethodName(methodName); return builtInOperationType; } throw new GFacWSDLException("Method name " + methodName + " not found"); }
private PortTypeImpl addPortTypes(Definition def, DOMImplementation dImpl, PortTypeType portType, QName serviceQName) { // create port type PortTypeImpl wsdlPortType = (PortTypeImpl) def.createPortType(); wsdlPortType.setQName(serviceQName); wsdlPortType.setUndefined(false); // create documentation for this port type Document doc = dImpl.createDocument(WSDL_NAMEPSPACE, WSDL_DOCUMENTATION, null); Element documentation = doc.getDocumentElement(); documentation.appendChild(doc.createTextNode(portType.getPortDescription())); wsdlPortType.setDocumentationElement(documentation); return wsdlPortType; }
String methodName = serviceDesc.getPortType().getMethod().getMethodName(); WSDLMessageBean wsdlMsgBean = new WSDLMessageBean(); wsdlMsgBean.setNamespace(typens);
public String getWSDL(ServiceDescription service) { try { ServiceType type = service.getType().addNewService(); ServiceName name = type.addNewServiceName(); name.setStringValue(service.getType().getName()); name.setTargetNamespace("http://schemas.airavata.apache.org/gfac/type"); PortTypeType portType = service.getType().addNewPortType(); MethodType methodType = portType.addNewMethod(); methodType.setMethodName("invoke"); WSDLGenerator generator = new WSDLGenerator(); Hashtable table = generator.generateWSDL(null, null, null, service.getType(), true); return (String) table.get(WSDLConstants.AWSDL); } catch (Exception e) { throw new RuntimeException(e); } }
/** * Sets the "portType" element */ public void setPortType(org.apache.airavata.schemas.gfac.PortTypeType portType) { synchronized (monitor()) { check_orphaned(); org.apache.airavata.schemas.gfac.PortTypeType target = null; target = (org.apache.airavata.schemas.gfac.PortTypeType)get_store().find_element_user(PORTTYPE$6, 0); if (target == null) { target = (org.apache.airavata.schemas.gfac.PortTypeType)get_store().add_element_user(PORTTYPE$6); } target.set(portType); } }
String methodName = serviceDesc.getPortType().getMethod().getMethodName(); WSDLMessageBean wsdlMsgBean = new WSDLMessageBean(); wsdlMsgBean.setNamespace(typens);
public static MethodType findOperationFromServiceDesc(String methodName, ServiceDescriptionType serviceDescType) throws GFacWSDLException { PortTypeType portType = serviceDescType.getPortType(); if (serviceDescType.getPortType().getMethod().getMethodName().equals(methodName)) { serviceDescType.getPortType().getMethod(); } if (isInbuiltOperation(methodName)) { MethodType builtInOperationType = portType.addNewMethod(); builtInOperationType.setMethodName(methodName); return builtInOperationType; } throw new GFacWSDLException("Method name " + methodName + " not found"); }
MethodType method = portType.getMethod(); QName portTypeName = serviceQName; Binding binding = addBinding(def, nameSpaceURI, wsdlPortType, serviceLevelPolicRef, dImpl); String methodDesc = serviceDesc.getPortType().getMethod().getMethodDescription(); String methodName = serviceDesc.getPortType().getMethod().getMethodName(); OutputParameterType[] outputParams = serviceDesc.getOutputParametersArray();
private PortTypeImpl addPortTypes(Definition def, DOMImplementation dImpl, PortTypeType portType, QName serviceQName) { // create port type PortTypeImpl wsdlPortType = (PortTypeImpl) def.createPortType(); wsdlPortType.setQName(serviceQName); wsdlPortType.setUndefined(false); // create documentation for this port type Document doc = dImpl.createDocument(WSDL_NAMEPSPACE, WSDL_DOCUMENTATION, null); Element documentation = doc.getDocumentElement(); documentation.appendChild(doc.createTextNode(portType.getPortDescription())); wsdlPortType.setDocumentationElement(documentation); return wsdlPortType; }
public static String getWSDL(ServiceDescription service) throws Exception{ try { ServiceType type = service.getType().addNewService(); ServiceType.ServiceName name = type.addNewServiceName(); name.setStringValue(service.getType().getName()); name.setTargetNamespace("http://airavata.apache.org/schemas/gfac/2012/12"); if(service.getType().getPortType() == null){ PortTypeType portType = service.getType().addNewPortType(); MethodType methodType = portType.addNewMethod(); methodType.setMethodName("invoke"); }else{ MethodType method = service.getType().getPortType().getMethod(); if (method == null) { MethodType methodType = service.getType().getPortType().addNewMethod(); methodType.setMethodName("invoke"); } else { service.getType().getPortType().getMethod().setMethodName("invoke"); } } WSDLGenerator generator = new WSDLGenerator(); Hashtable table = generator.generateWSDL(null, null, null, service.getType(), true); return (String) table.get(WSDLConstants.AWSDL); } catch (Exception e) { throw new RuntimeException(e); } }
MethodType method = portType.getMethod(); QName portTypeName = serviceQName; Binding binding = addBinding(def, nameSpaceURI, wsdlPortType, serviceLevelPolicRef, dImpl); String methodDesc = serviceDesc.getPortType().getMethod().getMethodDescription(); String methodName = serviceDesc.getPortType().getMethod().getMethodName(); OutputParameterType[] outputParams = serviceDesc.getOutputParametersArray();