[
https://issues.apache.org/jira/browse/AXIS2-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483058
]
John Dalsgaard commented on AXIS2-2263:
---------------------------------------
Hi Lahiri
Thank you!
Can you point me to a place where I can find the nightly builds of codegen?
I am really exited to test the code against the "real world" service that I am
going to call. Basically, because it does not seemto have the "encoded"
attribute. But since I could reproduce the problem with a very simple
webservice I decided to report the simple scenario. The real WDSL(or more
correctly one of them) is:
https://job.jobnet.dk/external/authenticationservice.asmx?WSDL
Thank you in advance!
Regards
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
> Assigned To: Lahiru Sandakith
> Priority: Blocker
> Fix For: nightly
>
> Attachments: Screenshot-Error.png
>
>
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]