当前位置: 首页>>代码示例>>Java>>正文


Java WsdlOperation类代码示例

本文整理汇总了Java中org.pentaho.di.trans.steps.webservices.wsdl.WsdlOperation的典型用法代码示例。如果您正苦于以下问题:Java WsdlOperation类的具体用法?Java WsdlOperation怎么用?Java WsdlOperation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WsdlOperation类属于org.pentaho.di.trans.steps.webservices.wsdl包,在下文中一共展示了WsdlOperation类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadWebService

import org.pentaho.di.trans.steps.webservices.wsdl.WsdlOperation; //导入依赖的package包/类
private void loadWebService( String anURI ) throws KettleException {
  anURI = transMeta.environmentSubstitute( anURI );

  try {
    if ( wProxyHost.getText() != null && !"".equals( wProxyHost.getText() ) ) {
      Properties systemProperties = System.getProperties();
      systemProperties.setProperty( "http.proxyHost", transMeta.environmentSubstitute( wProxyHost.getText() ) );
      systemProperties.setProperty( "http.proxyPort", transMeta.environmentSubstitute( wProxyPort.getText() ) );
    }
    wsdl = new Wsdl( new URI( anURI ), null, null, wHttpLogin.getText(), wHttpPassword.getText() );
  } catch ( Exception e ) {
    wsdl = null;
    new ErrorDialog(
      shell, BaseMessages.getString( PKG, "WebServiceDialog.ERROR0009.UnreachableURI" ), BaseMessages
        .getString( PKG, "WebServiceDialog.ErrorDialog.Title" )
        + anURI, e );

    log.logError( BaseMessages.getString( PKG, "WebServiceDialog.ErrorDialog.Title" ) + anURI, e.getMessage() );
    return;
  }
  String text = wOperation.getText();
  wOperation.removeAll();
  if ( wsdl != null ) {
    List<WsdlOperation> listeOperations = wsdl.getOperations();
    Collections.sort( listeOperations, new Comparator<WsdlOperation>() {
      public int compare( WsdlOperation op1, WsdlOperation op2 ) {
        return op1.getOperationQName().getLocalPart().compareTo( op2.getOperationQName().getLocalPart() );
      }
    } );
    for ( Iterator<WsdlOperation> itr = listeOperations.iterator(); itr.hasNext(); ) {
      WsdlOperation op = itr.next();
      wOperation.add( op.getOperationQName().getLocalPart() );
      if ( op.getOperationQName().getLocalPart().equals( text ) ) {
        wOperation.setText( text );
      }
    }
  }

}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:40,代码来源:WebServiceDialog.java

示例2: loadWebService

import org.pentaho.di.trans.steps.webservices.wsdl.WsdlOperation; //导入依赖的package包/类
private void loadWebService(String anURI) throws KettleStepException
{
    anURI = transMeta.environmentSubstitute(anURI);

    // 
    //
    try
    {
        if (wProxyHost.getText() != null && !"".equals(wProxyHost.getText()))
        {
            Properties systemProperties = System.getProperties();
            systemProperties.setProperty("http.proxyHost", transMeta.environmentSubstitute(wProxyHost.getText()));
            systemProperties.setProperty("http.proxyPort", transMeta.environmentSubstitute(wProxyPort.getText()));
        }
        wsdl = new Wsdl(new URI(anURI), null, null);
    }
    catch (Exception e)
    {
        wsdl = null;
        new ErrorDialog(shell,
                        Messages.getString("WebServiceDialog.ERROR0009.UnreachableURI"),//$NON-NLS-1$
                        Messages.getString("WebServiceDialog.ErrorDialog.Title") + anURI, //$NON-NLS-1$ 
                        e); 

        log.logError(Messages.getString("WebServiceDialog.ErrorDialog.Title") + anURI, e.getMessage()); //$NON-NLS-1$
        return;
    }
    String text = wOperation.getText();
    wOperation.removeAll();
    if (wsdl != null)
    {
        List<WsdlOperation> listeOperations = wsdl.getOperations();
        Collections.sort(listeOperations, new Comparator<WsdlOperation>()
        {
            public int compare(WsdlOperation op1, WsdlOperation op2)
            {
                return op1.getOperationQName().getLocalPart().compareTo(op2.getOperationQName().getLocalPart());
            }
        });
        for (Iterator<WsdlOperation> itr = listeOperations.iterator(); itr.hasNext();)
        {
            WsdlOperation op = itr.next();
            wOperation.add(op.getOperationQName().getLocalPart());
            if (op.getOperationQName().getLocalPart().equals(text))
            {
                wOperation.setText(text);
            }
        }
    }

}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:52,代码来源:WebServiceDialog.java

示例3: getRequestXML

import org.pentaho.di.trans.steps.webservices.wsdl.WsdlOperation; //导入依赖的package包/类
private String getRequestXML(WsdlOperation operation, boolean qualifyWSField) throws KettleException
  {
  	WsdlOpParameterList parameters = operation.getParameters();
  	String requestOperation = Const.NVL(meta.getOperationRequestName(), meta.getOperationName()); 
  	Iterator<WsdlOpParameter> iterator = parameters.iterator();
  	
  	List<String> bodyNames = new ArrayList<String>();
  	
  	while (iterator.hasNext()) {
	WsdlOpParameter wsdlOpParameter = iterator.next();
	bodyNames.add(wsdlOpParameter.getName().getLocalPart());
}

  	List<String> headerNames = new ArrayList<String>(parameters.getHeaderNames());
  	
  	StringBuffer xml = new StringBuffer();

      // TODO We only manage one name space for all the elements. See in the
      // future how to manage multiple name spaces
      //
      xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
      xml.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:"+NS_PREFIX+"=\"");
      xml.append(meta.getOperationNamespace());
      xml.append("\">\n");

      xml.append("  <soapenv:Header>\n");
      addParametersToXML(xml, headerNames, qualifyWSField);
      xml.append("  </soapenv:Header>\n");

      xml.append("  <soapenv:Body>\n");

      xml.append("    <" + NS_PREFIX + ":").append(requestOperation).append(">\n");   // OPEN request operation
      if (meta.getInFieldContainerName() != null)
      {
          xml.append("      <" + NS_PREFIX + ":" + meta.getInFieldContainerName() + ">\n");
      }

      addParametersToXML(xml, bodyNames, qualifyWSField);

      if (meta.getInFieldContainerName() != null)
      {
          xml.append("      </" + NS_PREFIX + ":" + meta.getInFieldContainerName() + ">\n");
      }
      xml.append("    </" + NS_PREFIX + ":").append(requestOperation).append(">\n");  // CLOSE request operation
      xml.append("  </soapenv:Body>\n");
      xml.append("</soapenv:Envelope>\n");
      
      return xml.toString();
  }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:50,代码来源:WebService.java

示例4: loadWebService

import org.pentaho.di.trans.steps.webservices.wsdl.WsdlOperation; //导入依赖的package包/类
private void loadWebService(String anURI) throws KettleException
{
    anURI = transMeta.environmentSubstitute(anURI);

    // 
    //
    try
    {
        if (wProxyHost.getText() != null && !"".equals(wProxyHost.getText()))
        {
            Properties systemProperties = System.getProperties();
            systemProperties.setProperty("http.proxyHost", transMeta.environmentSubstitute(wProxyHost.getText()));
            systemProperties.setProperty("http.proxyPort", transMeta.environmentSubstitute(wProxyPort.getText()));
        }
        wsdl = new Wsdl(new URI(anURI), null, null, wHttpLogin.getText(), wHttpPassword.getText());
    }
    catch (AuthenticationException ae) {
        wsdl = null;
        ShowMessageDialog smd = new ShowMessageDialog(shell, SWT.OK, BaseMessages.getString(PKG, "WebServiceDialog.ErrorDialog.Title"), BaseMessages.getString(PKG, "Webservices.Error.Authentication", anURI));
        smd.open();
        return;
    }
    catch (Exception e)
    {
        wsdl = null;
        new ErrorDialog(shell,
                        BaseMessages.getString(PKG, "WebServiceDialog.ERROR0009.UnreachableURI"),//$NON-NLS-1$
                        BaseMessages.getString(PKG, "WebServiceDialog.ErrorDialog.Title") + anURI, //$NON-NLS-1$ 
                        e); 

        log.logError(BaseMessages.getString(PKG, "WebServiceDialog.ErrorDialog.Title") + anURI, e.getMessage()); //$NON-NLS-1$
        return;
    }
    String text = wOperation.getText();
    wOperation.removeAll();
    if (wsdl != null)
    {
        List<WsdlOperation> listeOperations = wsdl.getOperations();
        Collections.sort(listeOperations, new Comparator<WsdlOperation>()
        {
            public int compare(WsdlOperation op1, WsdlOperation op2)
            {
                return op1.getOperationQName().getLocalPart().compareTo(op2.getOperationQName().getLocalPart());
            }
        });
        for (Iterator<WsdlOperation> itr = listeOperations.iterator(); itr.hasNext();)
        {
            WsdlOperation op = itr.next();
            wOperation.add(op.getOperationQName().getLocalPart());
            if (op.getOperationQName().getLocalPart().equals(text))
            {
                wOperation.setText(text);
            }
        }
    }

}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:58,代码来源:WebServiceDialog.java

示例5: getRequestXML

import org.pentaho.di.trans.steps.webservices.wsdl.WsdlOperation; //导入依赖的package包/类
private String getRequestXML( WsdlOperation operation, boolean qualifyWSField ) throws KettleException {
  WsdlOpParameterList parameters = operation.getParameters();
  String requestOperation = Const.NVL( meta.getOperationRequestName(), meta.getOperationName() );
  Iterator<WsdlOpParameter> iterator = parameters.iterator();

  List<String> bodyNames = new ArrayList<String>();

  while ( iterator.hasNext() ) {
    WsdlOpParameter wsdlOpParameter = iterator.next();
    bodyNames.add( wsdlOpParameter.getName().getLocalPart() );
  }

  List<String> headerNames = new ArrayList<String>( parameters.getHeaderNames() );

  StringBuilder xml = new StringBuilder();

  // TODO We only manage one name space for all the elements. See in the
  // future how to manage multiple name spaces
  //
  xml.append( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" );
  xml
    .append( "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" "
      + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:"
      + NS_PREFIX + "=\"" );
  xml.append( meta.getOperationNamespace() );
  xml.append( "\">\n" );

  xml.append( "  <soapenv:Header>\n" );
  addParametersToXML( xml, headerNames, qualifyWSField );
  xml.append( "  </soapenv:Header>\n" );

  xml.append( "  <soapenv:Body>\n" );

  xml.append( "    <" + NS_PREFIX + ":" ).append( requestOperation ).append( ">\n" ); // OPEN request operation
  if ( meta.getInFieldContainerName() != null ) {
    xml.append( "      <" + NS_PREFIX + ":" + meta.getInFieldContainerName() + ">\n" );
  }

  addParametersToXML( xml, bodyNames, qualifyWSField );

  if ( meta.getInFieldContainerName() != null ) {
    xml.append( "      </" + NS_PREFIX + ":" + meta.getInFieldContainerName() + ">\n" );
  }
  xml.append( "    </" + NS_PREFIX + ":" ).append( requestOperation ).append( ">\n" ); // CLOSE request operation
  xml.append( "  </soapenv:Body>\n" );
  xml.append( "</soapenv:Envelope>\n" );

  return xml.toString();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:50,代码来源:WebService.java


注:本文中的org.pentaho.di.trans.steps.webservices.wsdl.WsdlOperation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。