Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JAXB Namespaceing problem  RSS feed

 
Devin Whalen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am having problems with namespace prefixing for a SOAP response I am returning to a third party. I am returning something like this (I have trimmed it down and changed a lot of the names for this example):




What they need returned is this:




So, what I need to do is to set the default namespace for some nodes and not have any prefix on the nodes, and force a prefix for other nodes and the prefix has to be a certain value.
I realize that this shouldn't matter from an XML perspective but however they are parsing this, they require it to look like that.

Is this doable with a JAXB web service?

I have found this:
http://jaxb.java.net/tutorial/section_6_2_3-Annotations-for-the-Schema-XmlSchema.html#Annotations%20for%20the%20Schema:%20XmlSchema

where you add XMLSchema info to the package-info.java file. However, this doesn't seem to be working for me.

Any help would be appreciated.

Thanks.




 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!