how tWebserviceConsumer integrates with the Talend Metadata from source code

Twebservice Component position

org.talend.designer.components.tisprovider–>components–>tWebService

Component template file contains the following key documents

  • talend-ws-1.0.jar: This is Twebservice component source code
  • tWebService_begin.javajet and tWebService_main.javajet : These two files can be combined with other components, according to certain rules to generate a file,This file is the Talend job of java files.
  • tWebService_icon32.png: component default image file
  • tWebService_icon32_white.png :when the component is disable ,Components use image . if not exist then use the system default picture(optional)
  • tWebService_java.xml: component configuration file(In the next section I'll detail its configuration)
  • tWebService_messages.properties、tWebService_messages_(de、zh、el、en、es、fr etc).properties:When the system requires the internationalization.use to it,tWebService_messages.properties is default properties file。

talend-ws-1.0.jar

In this jar.there are two main files:

  • ServiceInvokerHelper
  • ServiceDiscoveryHelper

tWebService_begin.javajet

This javajet documents mainly generate some webservice initialization parameters and methods.

tWebService_main.javajet

This javajet documents mainly generate display and execute twebservice Metadata component code

Main business code fragment

ServiceHelperConfiguration code fragment:

 org.talend.ws.helper.conf.ServiceHelperConfiguration config_<%=cid%> = new org.talend.ws.helper.conf.ServiceHelperConfiguration();

config_<%=cid%>.setConnectionTimeout(Long.valueOf(<%=connTimeout%>));
config_<%=cid%>.setReceiveTimeout(Long.valueOf(<%=receiveTimeout%>));

config_<%=cid%>.setKeyStoreFile(System.getProperty("javax.net.ssl.keyStore"));
config_<%=cid%>.setKeyStoreType(System.getProperty("javax.net.ssl.keyStoreType"));
config_<%=cid%>.setKeyStorePwd(System.getProperty("javax.net.ssl.keyStorePassword"));

ServiceDiscoveryHelper, serviceInvokerHelper generation and execution code segment

serviceDiscoveryHelper_<%=cid%> = new org.talend.ws.helper.ServiceDiscoveryHelper(<%=endpoint%>,<%=tempPath%>);
serviceInvokerHelper_<%=cid%> = new org.talend.ws.helper.ServiceInvokerHelper(serviceDiscoveryHelper_<%=cid%>,config_<%=cid%>);

tWebService_java.xml

HEADER code fragment

<HEADER PLATEFORM=“ALL”

		SERIAL="" 
		VERSION="0.102" 
		STATUS="ALPHA"
		COMPATIBILITY="ALL" 
		AUTHOR="Talend" 
		RELEASE_DATE="20050320A"
  		SCHEMA_AUTO_PROPAGATE="true" 
		STARTABLE="true"
		DATA_AUTO_PROPAGATE="false"
		IS_MULTIPLYING_OUTPUTS="true"
		EXTENSION="org.talend.designer.webservice">  
	<SIGNATURE />
</HEADER>

CONNECTORS code fragment

<CONNECTORS>

	<CONNECTOR CTYPE="FLOW" MAX_INPUT="1" MAX_OUTPUT="0"/>
	<CONNECTOR NAME="OUTPUT" CTYPE="FLOW" MAX_OUTPUT="1"/>
	<CONNECTOR CTYPE="ITERATE" MAX_OUTPUT="0" MAX_INPUT="0" />
	<CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" />
	<CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="0" />
	<CONNECTOR CTYPE="COMPONENT_OK" />
	<CONNECTOR CTYPE="COMPONENT_ERROR" />
	<CONNECTOR CTYPE="RUN_IF" />
</CONNECTORS>

PARAMETER code fragment

 <PARAMETER NAME="CONNECTION_TIMEOUT" FIELD="TEXT" REQUIRED="true" NUM_ROW="20">
		<DEFAULT>20</DEFAULT>
</PARAMETER>
<PARAMETER NAME="RECEIVE_TIMEOUT" FIELD="TEXT" REQUIRED="true" NUM_ROW="20">
		<DEFAULT>20</DEFAULT>
</PARAMETER>

mapping properties

As the underlying framework of the reason we are forced to CONNECTION_TIMEOUT property added. name suffix

Corresponding in TIS

**Twebservice Metadata UI Component position**

org.talend.repository–>org.talend.repository.ui.metadata

The main Class : CreateWSDLSchemaAction extends AbstractCreateAction

it has two main method:

  • init(): This method is according to the input RepositoryNode to judge this component is visible or invisible
  • run(): This method is to execute component‘s tasks.

Inheritance relationship

Main business logic sequence chart

The International properties file position:

org.talend.repository\src\main\java\messages.properties ,This is the default properties file.

The remaining files are located:org.talend.repository.nl\src\main\java

Mapping example

mapping properties

 
doc/component_java_twebservice.txt · Last modified: 2011/12/17 03:52 (external edit)
 
 
Recent changes RSS feed Driven by DokuWiki