The problem of obtaining data from the WCF service

Two Stars

The problem of obtaining data from the WCF service

Hello!

 

There is some public wcf service, it has a method that returns string []

When you try to connect and retrieve data from Talend Open Studio service (method) returns data (Windows NT server)
When I compile it and unzip it on the server (Linux server), then when I try to get the data, I get the following error:

Spoiler
2018-12-28 12:36:04.664+0400 [info]   AxisFault
2018-12-28 12:36:04.664+0400 [info]    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
2018-12-28 12:36:04.664+0400 [info]    faultSubcode:
2018-12-28 12:36:04.664+0400 [info]    faultString: java.net.UnknownHostException: asugf.mos.ru
2018-12-28 12:36:04.664+0400 [info]    faultActor:
2018-12-28 12:36:04.664+0400 [info]    faultNode:
2018-12-28 12:36:04.664+0400 [info]    faultDetail:
2018-12-28 12:36:04.664+0400 [info]       {http://xml.apache.org/axis/}stackTrace:java.net.UnknownHostException: asugf.mos.ru
2018-12-28 12:36:04.664+0400 [info]       at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
2018-12-28 12:36:04.664+0400 [info]       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
2018-12-28 12:36:04.664+0400 [info]       at java.net.Socket.connect(Socket.java:579)
2018-12-28 12:36:04.664+0400 [info]       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2018-12-28 12:36:04.664+0400 [info]       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
2018-12-28 12:36:04.664+0400 [info]       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2018-12-28 12:36:04.664+0400 [info]       at java.lang.reflect.Method.invoke(Method.java:606)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.Call.invoke(Call.java:2767)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.Call.invoke(Call.java:2443)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.Call.invoke(Call.java:2366)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.Call.invoke(Call.java:1812)
2018-12-28 12:36:04.664+0400 [info]       at routines.KBODataProviderPortBindingStub.getKBOContracts(KBODataProviderPortBindingStub.java:167)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.tWebServiceInput_2Process(LoadOnlyPbo.java:2199)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.tWarn_2Process(LoadOnlyPbo.java:1971)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.tJava_2Process(LoadOnlyPbo.java:1845)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.tJava_1Process(LoadOnlyPbo.java:1550)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.runJobInTOS(LoadOnlyPbo.java:6481)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.main(LoadOnlyPbo.java:6050)
2018-12-28 12:36:04.664+0400 [info]   
2018-12-28 12:36:04.664+0400 [info]       {http://xml.apache.org/axis/}hostname:iasmkr-web-01a
2018-12-28 12:36:04.664+0400 [info]   
2018-12-28 12:36:04.664+0400 [info]   java.net.UnknownHostException: asugf.mos.ru
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.Call.invoke(Call.java:2767)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.Call.invoke(Call.java:2443)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.Call.invoke(Call.java:2366)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.client.Call.invoke(Call.java:1812)
2018-12-28 12:36:04.664+0400 [info]       at routines.KBODataProviderPortBindingStub.getKBOContracts(KBODataProviderPortBindingStub.java:167)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.tWebServiceInput_2Process(LoadOnlyPbo.java:2199)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.tWarn_2Process(LoadOnlyPbo.java:1971)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.tJava_2Process(LoadOnlyPbo.java:1845)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.tJava_1Process(LoadOnlyPbo.java:1550)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.runJobInTOS(LoadOnlyPbo.java:6481)
2018-12-28 12:36:04.664+0400 [info]       at asugfbudget.loadonlypbo_0_1.LoadOnlyPbo.main(LoadOnlyPbo.java:6050)
2018-12-28 12:36:04.664+0400 [info]   Caused by: java.net.UnknownHostException: asugf.mos.ru
2018-12-28 12:36:04.664+0400 [info]       at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
2018-12-28 12:36:04.664+0400 [info]       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
2018-12-28 12:36:04.664+0400 [info]       at java.net.Socket.connect(Socket.java:579)
2018-12-28 12:36:04.664+0400 [info]       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2018-12-28 12:36:04.664+0400 [info]       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
2018-12-28 12:36:04.664+0400 [info]       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2018-12-28 12:36:04.664+0400 [info]       at java.lang.reflect.Method.invoke(Method.java:606)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
2018-12-28 12:36:04.664+0400 [info]       at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
2018-12-28 12:36:04.664+0400 [info]       ... 16 more
2018-12-28 12:36:25.992+0400 [info]   Faild to send report: Invalid Addresses

I use the following code:

			  
			  //System.setProperty("http.proxyHost", "localhost");
		      //System.setProperty("http.proxyPort", "8888");

			  routines.KBODataProvider locator = new routines.KBODataProviderServiceLocator().getKBODataProviderPort();
			  			  
			  try {

				

				routines.KBODataProviderPortBindingStub  stub = 	 
			  (routines.KBODataProviderPortBindingStub)locator;
			  
			  String date = TalendDate.formatDate("yyyy-MM-dd", (Date)globalMap.get("pboDate"));
			  String[] value = {};
			  //stub.setTimeout(60000000);

			  System.out.println("getKBOcontractc start...");
			  String[] result = stub.getKBOContracts(date,value);
			  System.out.println("getKBOcontractc success...");
			  
			  if(result == null || result.length==0)
			  	{
			  		globalMap.put("emptyPbo", 1);
			  		System.out.println("PBO return rows: 0");
			  		output_row.xmlDoc =null; 
			  	}
			  else
			  {
			  	globalMap.put("emptyPbo", 0);
			  	System.out.println("PBO return rows: "+result.length);
			  	output_row.xmlDoc =XmlStringHelper.PreparePboXml(result);
			  }
			} catch (Exception e) {
				globalMap.put("emptyPbo", 1);
				e.printStackTrace();
			}
			  

Code execution goes until "

System.out.println("getKBOcontractc start...

 then i get this error

 

The fact is that I have a similar (the only difference is in the link to the service) talend job with the same code, components, and it runs fine.

Connection to the service is not blocked (verified)

Employee

Re: The problem of obtaining data from the WCF service

Hi,

 

    There is a similar issue in Talend community which got solved by using tUseProxy.

 

    Could you please check the link below and try similar method?

 

https://community.talend.com/t5/Design-and-Development/Cant-use-tRest/td-p/21333

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Employee

Re: The problem of obtaining data from the WCF service

Hi,

 

    Please also refer below KB article.

 

https://community.talend.com/t5/Migration-Configuration-and/A-Job-fails-at-the-tFileFetch-component-...

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Two Stars

Re: The problem of obtaining data from the WCF service

I have no component "tUseProxy", only tSetProxy

Employee

Re: The problem of obtaining data from the WCF service

Hi,

 

    I apologize for the confusion. I was thinking its a custom component but I could not find it in Talend exchange.

 

    Did you get a chance to check the KB article which I posted?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Highlighted
Two Stars

Re: The problem of obtaining data from the WCF service

Yes, it does not work
The second service is located at the same address, only the final path is different, but it works, but the first one does not.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog