Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 9390 invoked from network); 2 Mar 2007 18:38:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Mar 2007 18:38:17 -0000 Received: (qmail 9195 invoked by uid 500); 2 Mar 2007 18:38:22 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 9150 invoked by uid 500); 2 Mar 2007 18:38:22 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 8904 invoked by uid 99); 2 Mar 2007 18:38:22 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2007 10:38:21 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2007 10:38:11 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 127B47142E4 for ; Fri, 2 Mar 2007 10:37:51 -0800 (PST) Message-ID: <32066903.1172860671072.JavaMail.jira@brutus> Date: Fri, 2 Mar 2007 10:37:51 -0800 (PST) From: "John Dalsgaard (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-2263) Cannot run generated Java client code (Eclipse). Get exception in: org.apache.axis2.description.ClientUtils.inferInTransport(ClientUtils.java:85) In-Reply-To: <6820054.1172572265765.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477401 ] John Dalsgaard commented on AXIS2-2263: --------------------------------------- Hi Deepal Thank you for your reply. I have tried to find a nightly build of the codegen tool, but the only download place I can find is: http://ws.apache.org/axis2/tools/index.html. Can you point me in the right direction? Thank you John > Cannot run generated Java client code (Eclipse). Get exception in: org.apache.axis2.description.ClientUtils.inferInTransport(ClientUtils.java:85) > ------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: AXIS2-2263 > URL: https://issues.apache.org/jira/browse/AXIS2-2263 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: adb, client-api, codegen > Affects Versions: 1.1.1 > Environment: Axis2: 1.1.1 > Code Generator Wizard - Eclipse plugin: 1.2.1 (for Axis2 1.1.1) > JVM: 1.5.0 (and 1.4.2) > Eclipse: 3.2.1 > Reporter: John Dalsgaard > Priority: Blocker > > I have used AXIS1 for quite some time - but only for generating and running clients to call webservices. Due to the statements about improved memory handling and performance I would like to start using AXIS2 instead. This has also been triggered by a system I am working on that uses AXIS1 - and it has some stability issues. > In my final setup I incoorporate the webservice clients in Lotus Notes/Domino (hence the need for running JVM 1.4.2). But for the current issue I have isolated the problem to running the code inside Eclipse. > Ideally, I would like to use the xmlbeans databinding (to be able to handle more complex WSDLs). Though the Java client is slightly different, executing a client generated with xmlbeans databinding gives exactly the same error as using the default (adb) as shown below. Therefore, I am assuming that something is wrong with my configuration/setup. After having tried a number of things (including generating code from different WSDLs, installing the full Axis2 distribution, setting environment variables, trying to set Options and Configurations in the Java code) I ended up with trying the very simple webservice in the scenario below. And it still fails :-( > These are the steps I have performed: > ===================================== > 1. Downloaded and installed the Codegen plugin for Eclipse (http://ws.apache.org/axis2/tools/1_1/eclipse/wsdl2java-plugin.html) > 2. Created a new Java project in Eclipse (using default JRE 1.5.0). I configured the source ("src") and default output ("bin") folders in the project properties. > 3. Ctrl+N and selected "Axis2 Code Generator" > 4. Selected "Generate Java source code from a WSDL file" > 5. Use WSDL: http://www.notesnet.dk/d-d/wsDemo.nsf/GetField2?WSDL > 6. Use default options > 7. Browse and select the project in Eclipse (output path) > 8. Select "Add Axis2 libraries to the codegen result project". Pick: C:\Program Files\eclipse\plugins\Axis2_Codegen_Wizard_1.2.1 and press "Check Libs" - Message: "Axis libs loaded successfully !!" is shown. > 9. Press "Finish" - and message "All operations completed successfully" is shown. > 10. Refresh the project by right-clicking on the project and selecting "Refresh". Now I can see the "src" folder with the Java code, the "bin" folder with the classes, and the "lib" folder with the 15 Axis2 jar files. > 11. Open the project properties, select "Libraries" and "Add JARs...". Select all the jar files under the project's "lib" folder. > 12. Create a new Java Class "TestGet" with the following source: > import org.apache.axis2.AxisFault; > import defaultnamespace.GetSubjectServiceStub; > import defaultnamespace.GetSubjectServiceStub.GetNthField; > import defaultnamespace.GetSubjectServiceStub.GetNthFieldResponse; > public class TestGet { > public static void main(String[] args) { > try { > String endPoint = "http://www.notesnet.dk/d-d/wsDemo.nsf/GetField2?OpenWebService"; > GetSubjectServiceStub stub = new GetSubjectServiceStub(endPoint); > GetNthField func = new GetNthField(); > func.setDbname("d-d/wsdemo.nsf"); > func.setViewname("people"); > func.setN(1); > func.setFieldname("name"); > GetNthFieldResponse resp = stub.getNthField(func); > String x = resp.getGetNthFieldReturn(); > System.out.println(x); > } catch (AxisFault axisFault) { > axisFault.printStackTrace(); > } catch (Exception e) { > e.printStackTrace(); > } > } > } > 13. Right-click on the client program and select "Run As Java Application" > 14. The code fails with the following error: > log4j:WARN No appenders could be found for logger (org.apache.axiom.om.util.StAXUtils). > log4j:WARN Please initialize the log4j system properly. > java.lang.NullPointerException > at org.apache.axis2.description.ClientUtils.inferInTransport(ClientUtils.java:85) > at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:163) > at defaultnamespace.GetSubjectServiceStub.getNthField(GetSubjectServiceStub.java:141) > at TestGet.main(TestGet.java:17) > What am I doing wrong??? > Thank you in advance! > John -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org