This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 181520 - Auto generation of WSDL produces Axis2 webservice that always recieves null as input
Summary: Auto generation of WSDL produces Axis2 webservice that always recieves null a...
Status: RESOLVED WONTFIX
Alias: None
Product: webservices
Classification: Unclassified
Component: Axis2 (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Denis Anisimov
URL: http://http://stackoverflow.com/quest...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-04 05:21 UTC by benht
Modified: 2010-10-26 11:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Generated WSDL that produces null input methods (6.55 KB, text/plain)
2010-03-04 05:21 UTC, benht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description benht 2010-03-04 05:21:26 UTC
Created attachment 94755 [details]
Generated WSDL that produces null input methods

Hello,

Found this bug whilst following the tutorial - http://netbeans.org/kb/docs/websvc/gs-axis.html but I ticked the "Generate WSDL from Java Source Code" option.  The resulting WSDL produces a web service that always recieves null as input.

A similar (autogeneration of WSDL) issue is described here (including my post) :
http://stackoverflow.com/questions/1000578/axis2-always-receives-null-parameters-even-if-soap-request-is-sent-correctly

This has been seen on my system with Tomcat AND Glassfish.

I've traced the problem to the WSDL generation. If I tick the "Generate WSDL from Java Source Code" option when creating a new "Axis2
from Java" web service, then it doesn't work.

If the WSDL is generated at any time and then deployed, it fails.  If the configuration option to generate WSDL is unticked and the file
deleted, then deploy the web service, it works!

The only significant differences I could see in the WSDLs (generated in NetBeans vs generated by the server) were :
  - xmlns:ns0="http://<mypackage name>/xsd"
  - target namespace has a trailing slash
  - ns0 is used eg element="ns0:hello"/>

I've 'fixed' the above issues (by removing them) on a generated WSDL and re-deployed and it then works.  Jeff Rubinoff <Jeffrey.Rubinoff@Sun.COM> suggested I post this as a bug.  He pointed out that you'd only _need_ to generate the WSDL if you were going to tweak it but I think it's reasonable to assume that the generated one would work without manual fixes being needed (tho it did force me to learn WSDL!!)
I've attached an auto-generated WSDL showing the above issues.

thanks,
Ben
Comment 1 FHeuschen 2010-06-11 14:15:45 UTC
Hi,
I had the same behaviour on Windows7 and investigated the differences between the WDSL file generated by Netbeans 6.8 and the WDSL that would be generated by AXIS2 if none is present in the aar-package. Apart from the namespaces the main difference is in the <wsdl:service> part:

at the end of each port's address the endpoint is missing for the soap11, soap12 and http endpoints.

Generated by Netbeans 6.8:

---8<---
<soap:address location="http://localhost:8080/axis2/service/ServiceEntryPoint"/>
<soap12:address location="http://localhost:8080/axis2/servicesServiceEntryPoint"/>
<http:address location="http://localhost:8080/axis2/services/ServiceEntryPoint"/>
---8<---

Workin version as generated by Axis:

---8<---
<soap:address location="http://localhost:8080/axis2/services/ServiceEntryPoint.ServiceEntryPointHttpSoap11Endpoint/"/>
<soap12:address location="http://localhost:8080/axis2/services/ServiceEntryPoint.ServiceEntryPointHttpSoap12Endpoint/"/>
<http:address location="http://localhost:8080/axis2/services/ServiceEntryPoint.ServiceEntryPointHttpEndpoint/"/>
---8<---

After editin the Netbeans generated WSDL file accordingly, the webservice works correctly.

Best regards
Frank
Comment 2 Denis Anisimov 2010-10-26 11:48:54 UTC
axis2 functionality is on update center ( not under development already ).