File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes URL parameter passing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "URL parameter passing" Watch "URL parameter passing" New topic

URL parameter passing

Mark Vantzelfde

Joined: Aug 13, 2009
Posts: 1
I have a web service developed using Eclipse/Axis2. When I deploy the web service using my own wsdl rather than the default, the parameters from the URL do not get passed to the web service.

Some background:

I modify services.xml in META-INF to include <parameter name="useOriginalwsdl">true</parameter>
I create a jar file for the web service in Eclipse and copied it as <ServiceName>.aar to META-INF
I save the default wsdl generated via <ServiceURL>?wsdl, modify 1 nillable from true to false and save the wsdl to <SerivceName>.wsdl in META-INF
I restart tomcat

When I hit <SerivceURL>?wsdl, I see my modified wsdl displayed. All good.
When I hit <ServiceURL>?<parameters for service> I can see that the <parameters for service> values are not getting to my web service. All bad.

If I remove <ServiceName>.wsdl and <ServiceName>.aar from META-INF and reset <parameter name="useOriginalwsdl">false</parameter> in services.xml, after I restart tomcat the parameters get passed from the url to the web service and the web service operates as expected.

Ideas on what is wrong that is causing the parameters to not get passed when I use my own wsdl?

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
If you are developing a SOAP web service, then using URL parameters is definitely not a good idea.
Ask yourself this question: What if the service is to use some other transport mechanism, such as SMTP or JMS?
Parameters to SOAP web service requests must be located in the SOAP message sent to the web service.
Best wishes!
I agree. Here's the link:
subject: URL parameter passing
It's not a secret anymore!