Examples of WsdlDefinitions


Examples of xsul5.wsdl.WsdlDefinitions

    try {
      for (WSNode node : GraphUtil.getWSNodes(this.workflow.getGraph())) {
        WSComponent component = node.getComponent();
        QName portTypeQName = component.getPortTypeQName();
        WsdlDefinitions wsdl = component.getWSDL();

        File file = File.createTempFile(
            ".xbaya-" + portTypeQName.getLocalPart(),
            XBayaConstants.WSDL_SUFFIX);
        this.tmpWSDLFiles.add(file);
        XMLUtil.saveXML(wsdl.xml(), file);

        String wsdlID = JythonScript.getWSDLID(node);
        String wsdlURL = file.toURL().toString();
        arguments.add("-" + wsdlID);
        arguments.add(wsdlURL);
View Full Code Here

Examples of xsul5.wsdl.WsdlDefinitions

*/
public class WSDLCleaner {
 
 
  public static void cleanWSDL(WsdlDefinitions definition){
    WsdlDefinitions wsdl = definition;
    Iterable<WsdlBinding> bindings = wsdl.bindings();
    ArrayList<WsdlBinding> removedBindings = new ArrayList<WsdlBinding>();
    for (WsdlBinding wsdlBinding : bindings) {
      XmlElement innerBinding = wsdlBinding.xml().element("binding");
      if( null != innerBinding &&
          !"http://schemas.xmlsoap.org/wsdl/soap/".equals(innerBinding.getNamespace().getName())){
       
        removedBindings .add(wsdlBinding);
      }
    }
    //to mitigate the Concurrent modifications this is done separately
    for (WsdlBinding wsdlBinding : removedBindings) {
      wsdl.xml().removeElement(wsdlBinding.xml());
    }
   
    ArrayList<WsdlPort> removePorts = new ArrayList<WsdlPort>();
    Iterable<WsdlService> services = wsdl.services();
    for (WsdlService wsdlService : services) {
      Iterable<WsdlPort> ports = wsdlService.ports();
      for (WsdlPort wsdlPort : ports) {
        for (WsdlBinding removedBinding : removedBindings) {
          if(removedBinding.getName().equals(wsdlPort.getBinding().getLocalPart())){
            removePorts.add(wsdlPort);
            break;
          }
        }
      }
      for (WsdlPort wsdlPort : removePorts) {
        wsdlService.xml().removeElement(wsdlPort.xml());
      }
      removePorts.clear();
    }
   
   
    //remove attributeFormDefault and elementFormDefault
    Iterable<XmlElement> schemas = wsdl.getTypes().elements(null, "schema");
    for (XmlElement schema : schemas) {
      XmlAttribute attributeFormDefault = schema.attribute("attributeFormDefault");
      schema.removeAttribute(attributeFormDefault);
     
      XmlAttribute elementFormDefault = schema.attribute("elementFormDefault");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.