aspose file tools
The moose likes Web Services and the fly likes Problem with Namespace Prefix in AXIS Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Problem with Namespace Prefix in AXIS" Watch "Problem with Namespace Prefix in AXIS" New topic
Author

Problem with Namespace Prefix in AXIS

Anup Bansal
Ranch Hand

Joined: Sep 12, 2006
Posts: 69
Hi All,

I am using AXIS 1.4 to access a Webservice. I am able to properly connect to the service and receive the response.
However I am facing a problem in validating the response.
The webservice sends the response with different namespace prefixes and by the time I receive the response, the namespace prefixes are modified and hence the validation fails.
I have set the value of enableNamespacePrefixOptimization to 'true' in my client-config.wsdd but this too does not seem to work.

Can anyone please provide me the solution to this?

Thansk in advance,
Anup
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

If your validation depends on a particular namespace prefix then it is wrong. As long as the namespace prefix is mapped to the correct namespace URI, it doesn't matter what you choose for the prefix. That's a rule of XML and namespaces.

So the solution (unless I misunderstand the question) is to fix the validation to not depend on a specific namespace prefix.
Anup Bansal
Ranch Hand

Joined: Sep 12, 2006
Posts: 69
Thanks Paul!
I understand your concern. But this is how the webservice has been designed.
We cannot change it as that is a third party service and so that is not an option. Can we in anyway make AXIS use the prefixes as received?

Regards,
Anup
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Problem with Namespace Prefix in AXIS
 
Similar Threads
NameSpace Prefix
namespace prefix
Namespace URI's
axis and axis 2
Prefixes on responses from Websphere