Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TRKD /
avatar image
Question by Susan Genoray · Aug 31, 2015 at 10:29 AM · trkdglassfish

Glassfish Metro: resolving JAXB naming conflicts and customizing packages names

During the generation of proxy classes for TRKD API services using Glassfish Metro (wsimport tool) we are getting errors like these:

[wsimport] [ERROR] Property "Value" is already defined. Use <jaxb:property> to resolve this conflict.

[wsimport] line 56 of jar:file:/D:/runtime/metro-2.1.1/lib/webservices-tools.jar!/com/sun/xml/xsom/impl/parser/datatypes.xsd

[wsimport] [ERROR] The following location is relevant to the above error

[wsimport] line 436 of http://api.rkd.reuters.com/schemas/Fundamentals/LookUp_1.xsd

Could this be a problem with name collision within the files? If so, how can I resolve this conflict?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by DevTrev · Aug 31, 2015 at 11:20 AM

These errors are known for some services (e.g. Fundamentals, SignificantDevelopments, etc) during the generation of proxy classes for TRKD API services using the Glassfish Metro (wsimport) tool.

In this example, the reason of such error was in the name collision. LookUp_1.xsd file (part of TRKD Fundamentals service definition) contains the element Value identical to a JAX-WS internally declared element.

In order to resolve the conflict you need to re-define name of the collision element using custom JAXB bindings like the following (e.g. using toValue instead of Value):

<jaxb:bindings schemaLocation=http://api.rkd.reuters.com/schemas/Fundamentals/LookUp_1.xsd node="/xs:schema">

<jaxb:bindings schemaLocation=http://api.rkd.reuters.com/schemas/Fundamentals/LookUp_1.xsd node=".//xs:attribute[@name='Value']"> <jaxb:property name="toValue"/>

</jaxb:bindings>

…

</jaxb:bindings>

Another feature of JAXB bindings that might come in handy is the customization of package names which can help make package name more readable. By default wsimport generates package names based on target namespace URI like the following:

com.reuters.ns._2006._05._01.webservices.rkd.quotes_1

In order to get something similar to: com.reuters.webservice.rkd.quotes You need to define the following binding: <jaxb:bindings schemaLocation="http://api.rkd.reuters.com/schemas/Quotes/Quotes_1.xsd" node="/xs:schema">

<jaxb:schemaBindings> <jaxb:package name="com.reuters.webservice.rkd.quotes" />

</jaxb:schemaBindings>

</jaxb:bindings>

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
No one has followed this question yet.

Related Questions

TRKD QoS range request yields "Unavailable Concrete Service."

KNOWLEDGE DIRECT API - Search - Derivative Instruments - Get field IssueISIN

Complete List of Filings with Filings Search v2

Exception error while using .NET web service client code

How do you get Free Cash Flow through the TRKD API?

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges