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 "service" element */ public void setService(org.apache.airavata.schemas.gfac.ServiceType service) { synchronized (monitor()) { check_orphaned(); org.apache.airavata.schemas.gfac.ServiceType target = null; target = (org.apache.airavata.schemas.gfac.ServiceType)get_store().find_element_user(SERVICE$4, 0); if (target == null) { target = (org.apache.airavata.schemas.gfac.ServiceType)get_store().add_element_user(SERVICE$4); } target.set(service); } }
QName wsdlQName = null; String wsdlString = null; String serviceName = serviceDesc.getService().getServiceName().getStringValue(); String nameSpaceURI = serviceDesc.getService().getServiceName().getTargetNamespace(); QName serviceQName = new QName(nameSpaceURI, serviceName); Document doc = dImpl.createDocument(namespace, "factoryServices", null); String description = serviceDesc.getService().getServiceDescription(); if (description != null) { Element documentation = doc.createElementNS("http://schemas.xmlsoap.org/wsdl/", "wsdl:documentation");
QName wsdlQName = null; String wsdlString = null; String serviceName = serviceDesc.getService().getServiceName().getStringValue(); String nameSpaceURI = serviceDesc.getService().getServiceName().getTargetNamespace(); QName serviceQName = new QName(nameSpaceURI, serviceName); Document doc = dImpl.createDocument(namespace, "factoryServices", null); String description = serviceDesc.getService().getServiceDescription(); if (description != null) { Element documentation = doc.createElementNS("http://schemas.xmlsoap.org/wsdl/", "wsdl:documentation");
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); } }