• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

addition of namespace to every element

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

SOAPFactory that is shipped with JDK1.6.x seems to add the prefix:namspace declaration to each child element in the soap envelope, for the actual elements of the payload. The namespace is declared at the envelope level and I thought just a prefix needs to be added to the actual usage of the elements.

Yes, this is not posing any problems, however, just got curious because even when those attributes are removed, the message still successfuly gets processed-

any hints on how to disable it?

Thanks,
Chinni
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Make sure that the attribute elementFormDefault is not set to "qualified" in the XML schema declaration for the payload.
The default value is "unqualified" (no elementFormDefault attribute is present).
If you do code-first development, you will want to use the @XmlSchema annotation on the packet level. Example from the API documentation:

@javax.xml.bind.annotation.XmlSchema (
elementFormDefault=XmlNsForm.UNQUALIFIED
...
)

<!-- XML Schema fragment -->
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:po="http://www.example.com/PO1"
elementFormDefault="unqualified">


If this is not the cause of the "problem", then I do not know what it may be.
Best wishes!
 
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic