本文整理汇总了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 );
}
}
}
}
示例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);
}
}
}
}
示例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();
}
示例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);
}
}
}
}
示例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();
}