<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can I configure http basic auth in a web service ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-configure-http-basic-auth-in-a-web-service/m-p/2206381#M6463</link>
    <description>Here is the configuration of my tWebService. 
&lt;BR /&gt;I've already seen that tSOAP is working in such a config. Unfortunatly, tSOAP requires us to write the full XML message by ahnd, which is not acceptable. 
&lt;BR /&gt;However, considering tSOAP could open an http authenticated session, I had the idea to call tSOAP then tWebService, which worked. As a consequence, I used a pure http request, using http auth basic, then a call to tWebService, which worked. 
&lt;BR /&gt;I conbsider this is due to the fact that Talend using CXF, uses apache commons http client, which, as far as I know, supports http session and as a consequence can make the web service call in the authenticated http session. 
&lt;BR /&gt;However, I tend to consider this as a bugged behaviour, as making a basic http call just to allow the authentication in a web service scenario is far from optimal.</description>
    <pubDate>Tue, 12 Nov 2013 09:02:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-11-12T09:02:54Z</dc:date>
    <item>
      <title>How can I configure http basic auth in a web service ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-configure-http-basic-auth-in-a-web-service/m-p/2206379#M6461</link>
      <description>This post is a sum up of a question posted on StackOverflow : 
&lt;A href="http://stackoverflow.com/q/19449771/15619" target="_blank" rel="nofollow noopener noreferrer"&gt;http://stackoverflow.com/q/19449771/15619&lt;/A&gt; 
&lt;BR /&gt;As an example, I have an About web-service, which only method getVersion return the application version. 
&lt;BR /&gt;I can easily call it through SoapUI but, accessing it through a Job in Talend seems impossible. 
&lt;BR /&gt;Indeed, each time I run my job, it ends with the following error 
&lt;BR /&gt;Démarrage du job About a 14:04 18/10/2013. 
&lt;BR /&gt; connecting to socket on port 4025 
&lt;BR /&gt; connected 
&lt;BR /&gt;Exception in component tWebService_1 
&lt;BR /&gt;org.apache.ws.commons.schema.XmlSchemaException: Server returned HTTP response code: 401 for URL: http://localhost:8080/digital-express-soap/AboutService?xsd=1 
&lt;BR /&gt; at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:710) 
&lt;BR /&gt; at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:706) 
&lt;BR /&gt; at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:538) 
&lt;BR /&gt; at org.apache.ws.commons.schema.SchemaBuilder.handleSchemaElementChild(SchemaBuilder.java:1513) 
&lt;BR /&gt; at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:659) 
&lt;BR /&gt; at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:540) 
&lt;BR /&gt; at org.talend.webservice.helper.ServiceDiscoveryHelper.getSchemaCollection(ServiceDiscoveryHelper.java:363) 
&lt;BR /&gt; at org.talend.webservice.helper.ServiceDiscoveryHelper.init(ServiceDiscoveryHelper.java:130) 
&lt;BR /&gt; at org.talend.webservice.helper.ServiceDiscoveryHelper.&amp;lt;init&amp;gt;(ServiceDiscoveryHelper.java:90) 
&lt;BR /&gt; at org.talend.webservice.helper.ServiceInvokerHelper.&amp;lt;init&amp;gt;(ServiceInvokerHelper.java:98) 
&lt;BR /&gt; at test_lct.about_0_1.About.tWebService_1Process(About.java:300) 
&lt;BR /&gt; at test_lct.about_0_1.About.runJobInTOS(About.java:559) 
&lt;BR /&gt; at test_lct.about_0_1.About.main(About.java:425) 
&lt;BR /&gt;Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/digital-express-soap/AboutService?xsd=1 
&lt;BR /&gt; at sun.net. 
&lt;A href="http://www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436" target="_blank" rel="nofollow noopener noreferrer"&gt;www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436&lt;/A&gt;) 
&lt;BR /&gt; at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677) 
&lt;BR /&gt; at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186) 
&lt;BR /&gt; at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772) 
&lt;BR /&gt; at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) 
&lt;BR /&gt; at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) 
&lt;BR /&gt; at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235) 
&lt;BR /&gt; at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284) 
&lt;BR /&gt; at org.apache.ws.commons.schema.XmlSchemaCollection$2.run(XmlSchemaCollection.java:738) 
&lt;BR /&gt; at org.apache.ws.commons.schema.XmlSchemaCollection$2.run(XmlSchemaCollection.java:737) 
&lt;BR /&gt; at java.security.AccessController.doPrivileged(Native Method) 
&lt;BR /&gt; at org.apache.ws.commons.schema.XmlSchemaCollection.parseDoPriv(XmlSchemaCollection.java:736) 
&lt;BR /&gt; at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:705) 
&lt;BR /&gt; ... 12 more 
&lt;BR /&gt; disconnected 
&lt;BR /&gt;So it appears my server don't accept the provided auth. What is really strange, given that debugging my realm reveals that some authenticated calls are made. However, it also seems the last call is unauthorized. Why ? 
&lt;BR /&gt;I did some more tests by enabling HTTP logging in Glassfish, then perform one test for each tool. 
&lt;BR /&gt;Using soapui, I get 
&lt;BR /&gt;"127.0.0.1" "NULL-AUTH-USER" "07/Nov/2013:10:45:51 +0100" "POST /digital-express-soap/AboutService HTTP/1.1" 401 1069 
&lt;BR /&gt;"127.0.0.1" "admin" "07/Nov/2013:10:45:51 +0100" "POST /digital-express-soap/AboutService HTTP/1.1" 200 247 
&lt;BR /&gt;And using Talend Open Studio for Data Integration 5.3.1, I get 
&lt;BR /&gt;"127.0.0.1" "NULL-AUTH-USER" "07/Nov/2013:11:03:27 +0100" "POST /digital-express-soap/AboutService HTTP/1.1" 401 1069 
&lt;BR /&gt;"127.0.0.1" "admin" "07/Nov/2013:11:03:27 +0100" "POST /digital-express-soap/AboutService HTTP/1.1" 200 247 
&lt;BR /&gt;which, as far as I know, is exactly the same. So the order in which queries are made to my server is the same, but the way the client interprets it change. 
&lt;BR /&gt;So, what am I doing wrong with Talend which prevent it from using my auth ?</description>
      <pubDate>Thu, 07 Nov 2013 10:54:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-can-I-configure-http-basic-auth-in-a-web-service/m-p/2206379#M6461</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-07T10:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I configure http basic auth in a web service ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-configure-http-basic-auth-in-a-web-service/m-p/2206380#M6462</link>
      <description>Hi 
&lt;BR /&gt;Can you please upload a screenshot of the component settings? It will be useful for us to find out the problem. In addition, you can try tSOAP component and see if this component works.
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 11 Nov 2013 14:56:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-can-I-configure-http-basic-auth-in-a-web-service/m-p/2206380#M6462</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-11T14:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I configure http basic auth in a web service ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-configure-http-basic-auth-in-a-web-service/m-p/2206381#M6463</link>
      <description>Here is the configuration of my tWebService. 
&lt;BR /&gt;I've already seen that tSOAP is working in such a config. Unfortunatly, tSOAP requires us to write the full XML message by ahnd, which is not acceptable. 
&lt;BR /&gt;However, considering tSOAP could open an http authenticated session, I had the idea to call tSOAP then tWebService, which worked. As a consequence, I used a pure http request, using http auth basic, then a call to tWebService, which worked. 
&lt;BR /&gt;I conbsider this is due to the fact that Talend using CXF, uses apache commons http client, which, as far as I know, supports http session and as a consequence can make the web service call in the authenticated http session. 
&lt;BR /&gt;However, I tend to consider this as a bugged behaviour, as making a basic http call just to allow the authentication in a web service scenario is far from optimal.</description>
      <pubDate>Tue, 12 Nov 2013 09:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-can-I-configure-http-basic-auth-in-a-web-service/m-p/2206381#M6463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-12T09:02:54Z</dc:date>
    </item>
  </channel>
</rss>

