• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java WsdlOperation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Enumerations类代码示例发布时间:2022-05-22
下一篇:
Java AutoLoginProcessor类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap