Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 716E8ECB4 for ; Wed, 13 Mar 2013 15:00:47 +0000 (UTC) Received: (qmail 65303 invoked by uid 500); 13 Mar 2013 15:00:46 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 65224 invoked by uid 500); 13 Mar 2013 15:00:46 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Delivered-To: moderator for dev@cxf.apache.org Received: (qmail 41076 invoked by uid 99); 13 Mar 2013 12:54:22 -0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Date: Wed, 13 Mar 2013 05:53:56 -0700 (PDT) From: Shafi_WS To: dev@cxf.apache.org Message-ID: <1363179236103-5724502.post@n5.nabble.com> In-Reply-To: <1363179077122-5724501.post@n5.nabble.com> References: <1363179077122-5724501.post@n5.nabble.com> Subject: Re: Error When Generating Client MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org here is the complete code after setting the User credentials URL url = new URL("http://bg4ws0099:7047/DynamicsNAV/WS/Services"); JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory .newInstance(); Client client = clientFactory.createClient(url.toExternalForm()); HTTPConduit http = (HTTPConduit) client.getConduit(); AuthorizationPolicy policy = new AuthorizationPolicy(); policy.setUserName("newuser1"); policy.setPassword("calling123"); http.setAuthorization(policy); HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setConnectionTimeout(60000); httpClientPolicy.setAllowChunking(false); httpClientPolicy.setReceiveTimeout(60000); http.setClient(httpClientPolicy); Object[] responseArray = null; try { responseArray = client.invoke("Read", new String("10000")); } catch (Exception e) { System.out.println("EXCEPTION is " + e.getCause()); System.out.println("EXCEPTION is " + e); } System.out.println(responseArray[0]); -- View this message in context: http://cxf.547215.n5.nabble.com/Error-When-Generating-Client-tp5724501p5724502.html Sent from the cxf-dev mailing list archive at Nabble.com.