• Post Reply Bookmark Topic Watch Topic
  • New Topic

NameSpace Prefix

 
Nikhil Reddy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am talking to a webservice server. The sample requests they gave me has a different namespace prefix compared to one I generated. I generated using axis. Does namespace prefix matter, see the example here. The one they had in their successful request
<star:TN>
< <tel:Npa>407</tel:Npa>
< <tel:Nxx>422</tel:Nxx>
< <tel:Line>0307</tel:Line>
</star:TN>
The one I generated has this format. Does it matter, Prefix's differ, but everything else is same.
<TN>
<<ns9:Npa>407</ns9:Npa>
<<ns10:Nxx>422</ns10:Nxx>
<<ns11:Line>0307</ns11:Line>
</TN>

When I generate using axis. this is what I am getting
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's impossible to tell without seeing the namespace URIs that are associated with the prefixes. If the namespace URIs are the same but the prefixes are different then (assuming compliant XML processors) there should not be a problem. I say "should not" but there's a lot of code out there that incorrectly looks at prefixes instead of URIs.

However since you didn't generate any namespace prefix for the TN element and you generated several different prefixes instead of the tel: prefix, there's a good chance you aren't generating the correct XML.
 
Nikhil Reddy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read somewhere prefix's doesn't matter. I am using axis Framework. Axis is generating those namespaces(ns9, ns10, ns11).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!