@Test public void testSaveRep() throws Exception { Node node = getTestNode(); DatabaseMeta dbMeta = mock( DatabaseMeta.class ); IMetaStore metastore = mock( IMetaStore.class ); Repository rep = mock( Repository.class ); WebServiceMeta webServiceMeta = new WebServiceMeta(); webServiceMeta.loadXML( node, Collections.singletonList( dbMeta ), metastore ); StringObjectId aTransId = new StringObjectId( "aTransId" ); StringObjectId aStepId = new StringObjectId( "aStepId" ); webServiceMeta.saveRep( rep, metastore, aTransId, aStepId ); verify( rep ).saveStepAttribute( aTransId, aStepId, "wsUrl", "http: verify( rep ).saveStepAttribute( aTransId, aStepId, "wsOperation", "GetCurrentExchangeRate" ); verify( rep ).saveStepAttribute( aTransId, aStepId, "wsOperationRequest", "opRequestName" ); verify( rep ).saveStepAttribute( aTransId, aStepId, "wsOperationNamespace", "http: verify( rep ).saveStepAttribute( aTransId, aStepId, "wsInFieldContainer", null ); verify( rep ).saveStepAttribute( aTransId, aStepId, "wsInFieldArgument", null ); verify( rep ).saveStepAttribute( aTransId, aStepId, "wsOutFieldContainer", "GetCurrentExchangeRateResult" ); verify( rep ).saveStepAttribute( aTransId, aStepId, "wsOutFieldArgument", "GetCurrentExchangeRateResult" ); verify( rep ).saveStepAttribute( aTransId, aStepId, "proxyHost", "aProxy" ); verify( rep ).saveStepAttribute( aTransId, aStepId, "proxyPort", "4444" ); verify( rep ).saveStepAttribute( aTransId, aStepId, "httpLogin", "httpUser" ); verify( rep ).saveStepAttribute( aTransId, aStepId, "httpPassword", "tryandguess" ); verify( rep ).saveStepAttribute( aTransId, aStepId, "callStep", 1 ); verify( rep ).saveStepAttribute( aTransId, aStepId, "passingInputData", false ); verify( rep ).saveStepAttribute( aTransId, aStepId, "compatible", true ); verify( rep ).saveStepAttribute( aTransId, aStepId, "repeating_element", null ); verify( rep ).saveStepAttribute( aTransId, aStepId, "reply_as_string", false ); verify( rep ).saveStepAttribute( aTransId, aStepId, 0, "fieldIn_name", "Bank" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 0, "fieldIn_ws_name", "strBank" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 0, "fieldIn_xsd_type", "string" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 1, "fieldIn_name", "ToCurrency" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 1, "fieldIn_ws_name", "strCurrency" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 1, "fieldIn_xsd_type", "string" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 2, "fieldIn_name", "Rank" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 2, "fieldIn_ws_name", "intRank" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 2, "fieldIn_xsd_type", "int" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 0, "fieldOut_name", "GetCurrentExchangeRateResult" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 0, "fieldOut_ws_name", "GetCurrentExchangeRateResult" ); verify( rep ).saveStepAttribute( aTransId, aStepId, 0, "fieldOut_xsd_type", "decimal" ); Mockito.verifyNoMoreInteractions( rep ); }
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException { rep.saveStepAttribute( id_transformation, id_step, "wsUrl", getUrl() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperation", getOperationName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperationRequest", getOperationRequestName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperationNamespace", getOperationNamespace() ); rep.saveStepAttribute( id_transformation, id_step, "wsInFieldContainer", getInFieldContainerName() ); rep.saveStepAttribute( id_transformation, id_step, "wsInFieldArgument", getInFieldArgumentName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOutFieldContainer", getOutFieldContainerName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOutFieldArgument", getOutFieldArgumentName() ); rep.saveStepAttribute( id_transformation, id_step, "proxyHost", getProxyHost() ); rep.saveStepAttribute( id_transformation, id_step, "proxyPort", getProxyPort() ); rep.saveStepAttribute( id_transformation, id_step, "httpLogin", getHttpLogin() ); rep.saveStepAttribute( id_transformation, id_step, "httpPassword", getHttpPassword() ); rep.saveStepAttribute( id_transformation, id_step, "callStep", getCallStep() ); rep.saveStepAttribute( id_transformation, id_step, "passingInputData", isPassingInputData() ); rep.saveStepAttribute( id_transformation, id_step, "compatible", isCompatible() ); rep.saveStepAttribute( id_transformation, id_step, "repeating_element", getRepeatingElementName() ); rep.saveStepAttribute( id_transformation, id_step, "reply_as_string", isReturningReplyAsString() ); for ( int i = 0; i < getFieldsIn().size(); ++i ) { WebServiceField vField = getFieldsIn().get( i ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_name", vField.getName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_ws_name", vField.getWsName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_xsd_type", vField.getXsdType() ); } for ( int i = 0; i < getFieldsOut().size(); ++i ) { WebServiceField vField = getFieldsOut().get( i ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_name", vField.getName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_ws_name", vField.getWsName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_xsd_type", vField.getXsdType() ); } }
WebServiceMeta extends BaseStepMeta implements StepMetaInterface { public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException { rep.saveStepAttribute( id_transformation, id_step, "wsUrl", getUrl() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperation", getOperationName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperationRequest", getOperationRequestName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperationNamespace", getOperationNamespace() ); rep.saveStepAttribute( id_transformation, id_step, "wsInFieldContainer", getInFieldContainerName() ); rep.saveStepAttribute( id_transformation, id_step, "wsInFieldArgument", getInFieldArgumentName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOutFieldContainer", getOutFieldContainerName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOutFieldArgument", getOutFieldArgumentName() ); rep.saveStepAttribute( id_transformation, id_step, "proxyHost", getProxyHost() ); rep.saveStepAttribute( id_transformation, id_step, "proxyPort", getProxyPort() ); rep.saveStepAttribute( id_transformation, id_step, "httpLogin", getHttpLogin() ); rep.saveStepAttribute( id_transformation, id_step, "httpPassword", getHttpPassword() ); rep.saveStepAttribute( id_transformation, id_step, "callStep", getCallStep() ); rep.saveStepAttribute( id_transformation, id_step, "passingInputData", isPassingInputData() ); rep.saveStepAttribute( id_transformation, id_step, "compatible", isCompatible() ); rep.saveStepAttribute( id_transformation, id_step, "repeating_element", getRepeatingElementName() ); rep.saveStepAttribute( id_transformation, id_step, "reply_as_string", isReturningReplyAsString() ); for ( int i = 0; i < getFieldsIn().size(); ++i ) { WebServiceField vField = getFieldsIn().get( i ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_name", vField.getName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_ws_name", vField.getWsName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_xsd_type", vField.getXsdType() ); } for ( int i = 0; i < getFieldsOut().size(); ++i ) { WebServiceField vField = getFieldsOut().get( i ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_name", vField.getName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_ws_name", vField.getWsName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_xsd_type", vField.getXsdType() ); } } }
WebServiceMeta extends BaseStepMeta implements StepMetaInterface { public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException { rep.saveStepAttribute( id_transformation, id_step, "wsUrl", getUrl() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperation", getOperationName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperationRequest", getOperationRequestName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperationNamespace", getOperationNamespace() ); rep.saveStepAttribute( id_transformation, id_step, "wsInFieldContainer", getInFieldContainerName() ); rep.saveStepAttribute( id_transformation, id_step, "wsInFieldArgument", getInFieldArgumentName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOutFieldContainer", getOutFieldContainerName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOutFieldArgument", getOutFieldArgumentName() ); rep.saveStepAttribute( id_transformation, id_step, "proxyHost", getProxyHost() ); rep.saveStepAttribute( id_transformation, id_step, "proxyPort", getProxyPort() ); rep.saveStepAttribute( id_transformation, id_step, "httpLogin", getHttpLogin() ); rep.saveStepAttribute( id_transformation, id_step, "httpPassword", getHttpPassword() ); rep.saveStepAttribute( id_transformation, id_step, "callStep", getCallStep() ); rep.saveStepAttribute( id_transformation, id_step, "passingInputData", isPassingInputData() ); rep.saveStepAttribute( id_transformation, id_step, "compatible", isCompatible() ); rep.saveStepAttribute( id_transformation, id_step, "repeating_element", getRepeatingElementName() ); rep.saveStepAttribute( id_transformation, id_step, "reply_as_string", isReturningReplyAsString() ); for ( int i = 0; i < getFieldsIn().size(); ++i ) { WebServiceField vField = getFieldsIn().get( i ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_name", vField.getName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_ws_name", vField.getWsName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_xsd_type", vField.getXsdType() ); } for ( int i = 0; i < getFieldsOut().size(); ++i ) { WebServiceField vField = getFieldsOut().get( i ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_name", vField.getName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_ws_name", vField.getWsName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_xsd_type", vField.getXsdType() ); } } 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 saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException { rep.saveStepAttribute( id_transformation, id_step, "wsUrl", getUrl() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperation", getOperationName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperationRequest", getOperationRequestName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperationNamespace", getOperationNamespace() ); rep.saveStepAttribute( id_transformation, id_step, "wsInFieldContainer", getInFieldContainerName() ); rep.saveStepAttribute( id_transformation, id_step, "wsInFieldArgument", getInFieldArgumentName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOutFieldContainer", getOutFieldContainerName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOutFieldArgument", getOutFieldArgumentName() ); rep.saveStepAttribute( id_transformation, id_step, "proxyHost", getProxyHost() ); rep.saveStepAttribute( id_transformation, id_step, "proxyPort", getProxyPort() ); rep.saveStepAttribute( id_transformation, id_step, "httpLogin", getHttpLogin() ); rep.saveStepAttribute( id_transformation, id_step, "httpPassword", getHttpPassword() ); rep.saveStepAttribute( id_transformation, id_step, "callStep", getCallStep() ); rep.saveStepAttribute( id_transformation, id_step, "passingInputData", isPassingInputData() ); rep.saveStepAttribute( id_transformation, id_step, "compatible", isCompatible() ); rep.saveStepAttribute( id_transformation, id_step, "repeating_element", getRepeatingElementName() ); rep.saveStepAttribute( id_transformation, id_step, "reply_as_string", isReturningReplyAsString() ); for ( int i = 0; i < getFieldsIn().size(); ++i ) { WebServiceField vField = getFieldsIn().get( i ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_name", vField.getName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_ws_name", vField.getWsName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_xsd_type", vField.getXsdType() ); } for ( int i = 0; i < getFieldsOut().size(); ++i ) { WebServiceField vField = getFieldsOut().get( i ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_name", vField.getName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_ws_name", vField.getWsName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_xsd_type", vField.getXsdType() ); } } 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 saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException { rep.saveStepAttribute( id_transformation, id_step, "wsUrl", getUrl() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperation", getOperationName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperationRequest", getOperationRequestName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOperationNamespace", getOperationNamespace() ); rep.saveStepAttribute( id_transformation, id_step, "wsInFieldContainer", getInFieldContainerName() ); rep.saveStepAttribute( id_transformation, id_step, "wsInFieldArgument", getInFieldArgumentName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOutFieldContainer", getOutFieldContainerName() ); rep.saveStepAttribute( id_transformation, id_step, "wsOutFieldArgument", getOutFieldArgumentName() ); rep.saveStepAttribute( id_transformation, id_step, "proxyHost", getProxyHost() ); rep.saveStepAttribute( id_transformation, id_step, "proxyPort", getProxyPort() ); rep.saveStepAttribute( id_transformation, id_step, "httpLogin", getHttpLogin() ); rep.saveStepAttribute( id_transformation, id_step, "httpPassword", getHttpPassword() ); rep.saveStepAttribute( id_transformation, id_step, "callStep", getCallStep() ); rep.saveStepAttribute( id_transformation, id_step, "passingInputData", isPassingInputData() ); rep.saveStepAttribute( id_transformation, id_step, "compatible", isCompatible() ); rep.saveStepAttribute( id_transformation, id_step, "repeating_element", getRepeatingElementName() ); rep.saveStepAttribute( id_transformation, id_step, "reply_as_string", isReturningReplyAsString() ); for ( int i = 0; i < getFieldsIn().size(); ++i ) { WebServiceField vField = getFieldsIn().get( i ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_name", vField.getName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_ws_name", vField.getWsName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldIn_xsd_type", vField.getXsdType() ); } for ( int i = 0; i < getFieldsOut().size(); ++i ) { WebServiceField vField = getFieldsOut().get( i ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_name", vField.getName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_ws_name", vField.getWsName() ); rep.saveStepAttribute( id_transformation, id_step, i, "fieldOut_xsd_type", vField.getXsdType() ); } } 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; }