@Test public void testCheck() throws Exception { WebServiceMeta webServiceMeta = new WebServiceMeta(); TransMeta transMeta = mock( TransMeta.class ); StepMeta stepMeta = mock( StepMeta.class ); RowMetaInterface prev = mock( RowMetaInterface.class ); RowMetaInterface info = mock( RowMetaInterface.class ); Repository rep = mock( Repository.class ); IMetaStore metastore = mock( IMetaStore.class ); String[] input = { "one" }; ArrayList<CheckResultInterface> remarks = new ArrayList<>(); webServiceMeta.check( remarks, transMeta, stepMeta, null, input, null, info, new Variables(), rep, metastore ); assertEquals( 2, remarks.size() ); assertEquals( "Not receiving any fields from previous steps!", remarks.get( 0 ).getText() ); assertEquals( "Step is receiving info from other steps.", remarks.get( 1 ).getText() ); remarks.clear(); webServiceMeta.setInFieldArgumentName( "ifan" ); when( prev.size() ).thenReturn( 2 ); webServiceMeta.check( remarks, transMeta, stepMeta, prev, new String[]{}, null, info, new Variables(), rep, metastore ); assertEquals( 2, remarks.size() ); assertEquals( "Step is connected to previous one, receiving 2 fields", remarks.get( 0 ).getText() ); assertEquals( "No input received from other steps!", remarks.get( 1 ).getText() ); }
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore ) { CheckResult cr; if ( prev == null || prev.size() == 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_WARNING, "Not receiving any fields from previous steps!", stepMeta ); remarks.add( cr ); } else { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is connected to previous one, receiving " + prev.size() + " fields", stepMeta ); remarks.add( cr ); } if ( input.length > 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is receiving info from other steps.", stepMeta ); remarks.add( cr ); } else if ( getInFieldArgumentName() != null || getInFieldContainerName() != null ) { cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, "No input received from other steps!", stepMeta ); remarks.add( cr ); } }
WebServiceMeta extends BaseStepMeta implements StepMetaInterface { public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore ) { CheckResult cr; if ( prev == null || prev.size() == 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_WARNING, "Not receiving any fields from previous steps!", stepMeta ); remarks.add( cr ); } else { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is connected to previous one, receiving " + prev.size() + " fields", stepMeta ); remarks.add( cr ); } if ( input.length > 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is receiving info from other steps.", stepMeta ); remarks.add( cr ); } else if ( getInFieldArgumentName() != null || getInFieldContainerName() != null ) { cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, "No input received from other steps!", stepMeta ); remarks.add( cr ); } } }
WebServiceMeta extends BaseStepMeta implements StepMetaInterface { public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore ) { CheckResult cr; if ( prev == null || prev.size() == 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_WARNING, "Not receiving any fields from previous steps!", stepMeta ); remarks.add( cr ); } else { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is connected to previous one, receiving " + prev.size() + " fields", stepMeta ); remarks.add( cr ); } if ( input.length > 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is receiving info from other steps.", stepMeta ); remarks.add( cr ); } else if ( getInFieldArgumentName() != null || getInFieldContainerName() != null ) { cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, "No input received from other steps!", stepMeta ); remarks.add( cr ); } } WebServiceMeta();  WebServiceMeta( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore );  WebServiceMeta( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); }
WebServiceMeta extends BaseStepMeta implements StepMetaInterface { public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore ) { CheckResult cr; if ( prev == null || prev.size() == 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_WARNING, "Not receiving any fields from previous steps!", stepMeta ); remarks.add( cr ); } else { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is connected to previous one, receiving " + prev.size() + " fields", stepMeta ); remarks.add( cr ); } if ( input.length > 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is receiving info from other steps.", stepMeta ); remarks.add( cr ); } else if ( getInFieldArgumentName() != null || getInFieldContainerName() != null ) { cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, "No input received from other steps!", stepMeta ); remarks.add( cr ); } } WebServiceMeta();  WebServiceMeta( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore );  WebServiceMeta( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void getFields( RowMetaInterface r, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ); WebServiceMeta clone(); void setDefault(); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ); String getXML(); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); String getOperationName(); void setOperationName( String operationName ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
    TransMeta transMeta, Trans disp ); StepDataInterface getStepData(); WebServiceField getFieldInFromName( String name ); WebServiceField getFieldOutFromWsName( String wsName, boolean ignoreWsNsPrefix ); List<WebServiceField> getFieldsIn(); void setFieldsIn( List<WebServiceField> fieldsIn ); boolean hasFieldsIn(); void addFieldIn( WebServiceField field ); List<WebServiceField> getFieldsOut(); void setFieldsOut( List<WebServiceField> fieldsOut ); void addFieldOut( WebServiceField field ); String getInFieldArgumentName(); void setInFieldArgumentName( String inFieldArgumentName ); String getOutFieldArgumentName(); void setOutFieldArgumentName( String outFieldArgumentName ); String getUrl(); void setUrl( String url ); int getCallStep(); void setCallStep( int callStep ); String getOperationNamespace(); void setOperationNamespace( String operationNamespace ); String getHttpLogin(); void setHttpLogin( String httpLogin ); String getHttpPassword(); void setHttpPassword( String httpPassword ); String getProxyHost(); void setProxyHost( String proxyHost ); String getProxyPort(); void setProxyPort( String proxyPort ); String getInFieldContainerName(); void setInFieldContainerName( String inFieldContainerName ); String getOutFieldContainerName(); void setOutFieldContainerName( String outFieldContainerName ); boolean isPassingInputData(); void setPassingInputData( boolean passingInputData ); boolean isCompatible(); void setCompatible( boolean compatible ); String getRepeatingElementName(); void setRepeatingElementName( String repeatingElementName ); boolean isReturningReplyAsString(); void setReturningReplyAsString( boolean returningReplyAsString ); String getOperationRequestName(); void setOperationRequestName( String operationRequestName ); }
WebServiceMeta extends BaseStepMeta implements StepMetaInterface { public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore ) { CheckResult cr; if ( prev == null || prev.size() == 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_WARNING, "Not receiving any fields from previous steps!", stepMeta ); remarks.add( cr ); } else { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is connected to previous one, receiving " + prev.size() + " fields", stepMeta ); remarks.add( cr ); } if ( input.length > 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, "Step is receiving info from other steps.", stepMeta ); remarks.add( cr ); } else if ( getInFieldArgumentName() != null || getInFieldContainerName() != null ) { cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, "No input received from other steps!", stepMeta ); remarks.add( cr ); } } WebServiceMeta();  WebServiceMeta( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore );  WebServiceMeta( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void getFields( RowMetaInterface r, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ); WebServiceMeta clone(); void setDefault(); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ); String getXML(); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); String getOperationName(); void setOperationName( String operationName ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
    TransMeta transMeta, Trans disp ); StepDataInterface getStepData(); WebServiceField getFieldInFromName( String name ); WebServiceField getFieldOutFromWsName( String wsName, boolean ignoreWsNsPrefix ); List<WebServiceField> getFieldsIn(); void setFieldsIn( List<WebServiceField> fieldsIn ); boolean hasFieldsIn(); void addFieldIn( WebServiceField field ); List<WebServiceField> getFieldsOut(); void setFieldsOut( List<WebServiceField> fieldsOut ); void addFieldOut( WebServiceField field ); String getInFieldArgumentName(); void setInFieldArgumentName( String inFieldArgumentName ); String getOutFieldArgumentName(); void setOutFieldArgumentName( String outFieldArgumentName ); String getUrl(); void setUrl( String url ); int getCallStep(); void setCallStep( int callStep ); String getOperationNamespace(); void setOperationNamespace( String operationNamespace ); String getHttpLogin(); void setHttpLogin( String httpLogin ); String getHttpPassword(); void setHttpPassword( String httpPassword ); String getProxyHost(); void setProxyHost( String proxyHost ); String getProxyPort(); void setProxyPort( String proxyPort ); String getInFieldContainerName(); void setInFieldContainerName( String inFieldContainerName ); String getOutFieldContainerName(); void setOutFieldContainerName( String outFieldContainerName ); boolean isPassingInputData(); void setPassingInputData( boolean passingInputData ); boolean isCompatible(); void setCompatible( boolean compatible ); String getRepeatingElementName(); void setRepeatingElementName( String repeatingElementName ); boolean isReturningReplyAsString(); void setReturningReplyAsString( boolean returningReplyAsString ); String getOperationRequestName(); void setOperationRequestName( String operationRequestName ); static final String XSD_NS_URI; static final int DEFAULT_STEP; }