rverst / wsdl2ksoap

Automatically exported from code.google.com/p/wsdl2ksoap
0 stars 0 forks source link

NullPointerException caused by WSDLParser.ProcessWSDL #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use wsdl2ksoap to parse an online WSDL file

What is the expected output? What do you see instead?
A NullPointerException is thrown just after the creation of the package folders.

What version of the product are you using? On what operating system?
I'm using wsdl2ksoap 0.1 on Windoes 7 x64

What is the address of the Web Service(optional, but prefered)?
Something like:
http://host.com/Folder/Services/Service1.svc?wsdl

Original issue reported on code.google.com by francesc...@gmail.com on 5 Jul 2011 at 6:18

GoogleCodeExporter commented 9 years ago
I'm seeing the same problem.  Partial stack trace:

java.lang.NullPointerException
        at wsdl2ksoap.businesslogic.WSDLParser.ProcessWSDL(WSDLParser.java:229)
        at wsdl2ksoap.WSDL2KSoapView$ProcessWSDLTask.<init>(WSDL2KSoapView.java:312)
        at wsdl2ksoap.WSDL2KSoapView.ProcessWSDL(WSDL2KSoapView.java:290)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:662)
        at org.jdesktop.application.ApplicationAction.actionPerformed(ApplicationAction.java:698)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

Original comment by gchead...@gmail.com on 21 Sep 2011 at 5:56

GoogleCodeExporter commented 9 years ago
Take a look at the source code. I found out the problem is that wsdl2ksoap 
doesn't support namespaces well. They are hardcoded, for example 
(WSDLParser.java:52):

NodeList nodes = doc.getElementsByTagName("wsdl:service");

I tried to process wsdl (https://webapi.allegro.pl/uploader.php?wsdl) that 
doesn't use "wsdl" prefix for element "service", because it's defined as the 
default (unqualified) xmlns. Unfortunately that causes NullPointerException at 
line 55.

I guess your problem is pretty much the same.

Original comment by g.byczyn...@gmail.com on 12 Oct 2011 at 10:04

GoogleCodeExporter commented 9 years ago
As I mentioned in my previous comment, fixing namespaces and rebuilding sources 
fixed the issue. But another problem appeared - classes aren't generated at 
all. After digging through the source code with debugger I found that 
wsdl2ksoap simply does not support complexContent and schema restrictions. It 
only generates code for complexType with elements in it. So don't bother trying 
to parse heavy WSDLs.

Original comment by g.byczyn...@gmail.com on 15 Oct 2011 at 11:52