permaculture playing cards*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "URL parameter passing" Watch "URL parameter passing" New topic
Author

URL parameter passing

Mark Vantzelfde
Greenhorn

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?

Thanks
Mark
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
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!
 
 
subject: URL parameter passing
 
Similar Threads
Axis2-1.4 help
I am passing a non-pojo to a web service. Not all attributes are being marshalled
The service cannot be found for the endpoint reference (EPR)
Axis2 POJO web service - wsdl generating xs:anyType
[AXIS2] what's the problem with parameter useOriginalwsdl ?