How to resolve xjc method name conflict?
Hi! I'm having a problem with certain types of schema constructs and the method names in the xjc-generated classes. E.g., given the schema fragment:
<xs:element name="DocRef_type">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="value" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="medline"/>
<xs:enumeration value="pubmed"/>
<xs:enumeration value="ncbigi"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
xjc (current release) fails on this schema, because it would generate overlapping method names: one getValue() to return the integer value, and one getValue() to return the string attribute named "value". Now, I know I can fix this by just changing 'name="value"' to 'name="somethingElse"' in the above attribute, but this breaks existing XML data we've already got that uses value="...".
Is there some way to tell xjc to use a different name mapping to resolve this conflict in the generated java class?
TIA for any tips,
- Paul
You can customize the name of the property representing the attribute. E.g.:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
jaxb:version="1.0">
<xs:attribute name="value" use="required">
<xs:annotation>
<xs:appinfo>
<jaxb:property name="attValue"/>
</xs:appinfo>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
-- Ed
Similar Messages
-
How to resolve a host name from IP using JNDI/DNS service provider
Hi
I got two questions on JNDI/DNS service provider:
1) How to resolve a host name when i got an IP
I understand How I do it inverse.
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.dns.DnsContextFactory");
env.put(Context.PROVIDER_URL, "dns://"+server+"/"+domain);
DirContext ictx = new InitialDirContext(env);
Attributes attrs1 = ictx.getAttributes(host, new String[] {"A"});
2) This example above works when I specify the domain in the provider url.
If I am not specifing a domain but only the dns server I got an NameNotFoundException.
What should I do if I don't got the domain?
get the availible domains and loop on them?Hi,
if your DNS server supports that, you can do a reverse DNS lookup. This works as follows:
String server = "your.dns.server";
String domain = "in-addr.arpa";
String ip = "4.3.2.1";
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.dns.DnsContextFactory");
env.put(Context.PROVIDER_URL, "dns://" + server + "/" + domain);
DirContext ictx = new InitialDirContext(env);
Attributes attrs1 = ictx.getAttributes(ip, new String[] {"PTR"});1: Use the pseudo-domain in-addr.arpa
2: Use the reverse IP address for lookup, i.e. if your host has 1.2.3.4, use 4.3.2.1!!
3: Request the PTR attribute
see also [http://en.wikipedia.org/wiki/Reverse_DNS_lookup|http://en.wikipedia.org/wiki/Reverse_DNS_lookup]
Martin -
How to get the method names in a class
hi friends,
Could any of you tell me the report or function module to display all the method names in a given class.
thanks in advance.
regards,
kumarHi Kumar ,
Open ur class in SE24 transaction ,there is a tab for methods ..
u'll get the list of methods form there ... n in source u'll get their operative details
Regards
Renu -
How to resolve service command-key conflicts?
Every time I type command-M to check mail in Eudora 6.2.4, I hear a system beep. This is not coming from Eudora, as I have alerts turned off. I thought it might be a service conflict and have tried Service Scrubber, but to no avail (spell catcher 10.2.3 has a shortcut command-shift-M for modify selection, but that's all I can find).
Does anyone have any ideas? Services are a great idea in MacOS X, but how the system deals with hotkey conflicts leaves a lot to be desired!eudora 6.2.4 works fine for me, even command-M. but there is a thing on eudora's web site about sounds not working properly, if you have eudora's sounds selected. i dont remember that it said anything about fixing that problem by having alerts turned off.
you might try going to preferences / keyboard and mouse / keyboard shortcuts and changing the check mail to 'control left arrow'. it's handy to just check the mail with 2 fingers next to each other.
in any case, if the beep goes away... it might help you solve the problem. you can always put it back. -
How to resolve remote computer name
My DNS provider responds "success" to all requests, regardless of whether or not the name is valid. When using a web browser, for example, it will take me to a web page that displays marketing information and Google search results for whatever domain name I tried typing in. This is nuisance, but manageable when working with the web.
However, when dropping to the shell and trying to do something like "ssh {computername}", I am unable to do so because it attempts to connect to the wrong IP address.
How do I get Mac OSX to resolve these names on my local network using Bonjour or some other resolution protocol before sending it off to default DNS?
On Windows, NETBIOS kicks in names are resolved easily. Is something like this possible on Mac?
Message was edited by: parleerBonjour would be
computer-name.local
where the .local is the specify info you need.
You could use a different DNS server, such as the OpenDNS.org servers.
System Preferences -> Network -> Advanced -> DNS
Anything you enter will always be used first regardless of what the display says. You can verify this by looking at /etc/resolv.conf
You could also specify a search domain in the same Network DNS system preference. For example you could specify .local so by default Bonjour would be searched if you do not specify a domain in your search names.
Message was edited by: BobHarris -
How to resolve same file extensions conflict using LabVIEW ?
All,
Let's say I have two files withe the same file extension. One of the files opens only with one particular program whereas another file opens only with another program.
So I was wondering, by using LabVIEW , if there is a way to tell (programatically) to which program are each of these files assigned to.
I am not quite sure if there is something that can be done by using WINAPI or .NET?
Please help
Thank youThe only way you are going to be able to do that is if there is something within the file itself that gives an indication what program might have saved it.
For example, in the header for an .xls file, there is probably something that describes it as Microsoft Excel, perhaps even the version of Excel, that was put there when Excel saved it. But if you have another program save the file, let's say notepad was used and the user picked .xls as the file extension, then there is nothing that will describe that Notepad saved it.
But all of this is basically what ToeCutter was already telling you.
If you need more help, then you will have to provide more information such as what types of files and what programs were used that got their file extensions mixed up. -
how to resolve unresolved column error when we change column name in BMM Layer and removed alias in presentation layer
Looks like the presentation column got Alias before your BMM changes, so in your case renaming logical column and deleting alias is not good to go.
Keep Alias -
How to Resolve Name in IIS 8.
Dear
I Try to Configure IIS 8 and its Working Properly in IP Address Like For Example "125.209.86.102",
Now Problem is How To Configure to Name and Resolve like for Example "www.test.com" But yet not Working...
Please Help me and My question is How to Resolve to name not a IP address....You have to configure A Record in your DNS to resolve this ip address. See the below links.
http://www.tutorialspoint.com/shorttutorials/adding-host-a-dns-records-in-windows-server-2008-r2
http://support.microsoft.com/kb/168322/en-us
Akshay Pate -
Could anyone please help. I want to pass a method's name to someother method, how can i pass the name of the method.
say, I am in method1() and i want to pass its name that is method1 to another method method2(String str) , str would be method1's name. How can I do this.Could anyone please help. I want to pass a method's
name to someother method, how can i pass the name of
the method.
say, I am in method1() and i want to pass its name
that is method1 to another method method2(String str)
, str would be method1's name. How can I do this.you would say method2("method1"); -
How can I execute method of Component for name
Hello,
My program has JInternalFrame with some components. Write me please - how can I execute method of Component for name of Component ?
Like this:
... findObject("jTextArea1").cut();
Thank you in advance.just cycle through the container's components until
you find one where getName equals "jTextArea1"Thank you for your answer.
I'm creating components in runtime (I add panel+JTextArea in JTabbedPane) and I don't know how many components will be in JTabbedPane.
I know only it's names.
I wan't to execute metod JTextaRea_n_.cut() via using JTextaRea_n_.Name.
How ? -
Junit : How can I get the method name (say testMyAddress) that failed
My code is below
TestSuite masterSuite = new TestSuite(testClass);
TestResult result = new TestResult();
masterSuite.run(result);
Enumeration errors = result.errors();
while (errors.hasMoreElements())
TestFailure error = (TestFailure)errors.nextElement();
Test test = error.failedTest();
/*will give me the class name but how can I get the method that threw the exception.
I can get fName (that contains the method name) field to get the method,but being private I cannot hold of the field.
Wondering if there is any easy way to get the method name that threw exception,without writing unneccessary code
Class c1 = test.getClass();
thx
mgetting all methods is no good!
My test class looks like this
MyTestClass{
testGoodData(){
asserttrue(.....);
testBadData(){
asserttrue(.....);
testNullData(){
asserttrue(.....);
someHelperMethod(){
thx
m -
trouble uploading to shootproof, keep getting an error that says "internal error, name not unique, color" any idea what this is and how to resolve it?
Note that you should be cautious when you get the 'untrusted' error message and that you should never create a permanent exception in cases like this without investigating the cause.
If you have created a permanent exception then best is to remove it in the Server tab in the Certificate Manager.
*Tools > Options > Advanced > Certificates/Encryption: View Certificates -
TS4123 how to resolve itunes store X youku conflict
how to resolve itunes store X youku conflict
i can see there is both windows and apple and also youku in LSP but ive tried to delete youku and just run itunes yet it wont access itune store i just keep on getting loading bar that wont load .
any suggestions
THANKSi can see there is both windows and apple and also youku in LSP but ive tried to delete youku and just run itunes yet it wont access itune store i just keep on getting loading bar that wont load .
Let's try wiclee's instructions from the following post (basically, it returns the values in the Winsock-related registry key to their default settings, removing any leftover material from the youku LSP):
Re: i cannot connect to itunes on my laptop -
How to resolve database PSU conflict errors
Hello:
I am in process of applying the database PSU Patch 18522512 for 11.2.0.3 and running into conflict issues with other patches, please take a look at the following conflict issues and let me know how to resolve these conflict issues and installed the PSU patch 18522512.
/cherdb_1/oracle/VIS12/11.2.0/PATCHES/PSU/18522512
cheron.aarcorp.com:(oracle):> opatch apply
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /cherdb_1/oracle/VIS12/11.2.0
Central Inventory : /vol01/app/oraInventory
from : /cherdb_1/oracle/VIS12/11.2.0/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.3.0
Log file location : /cherdb_1/oracle/VIS12/11.2.0/cfgtoollogs/opatch/opatch2014-08-06_10-59-59AM_1.log
Verifying environment and performing prerequisite checks...
Composite Patch 18522512 is a bug superset of 16929165,16992075,17468141,13001379,14123213,13931044,9858539,8547978,14237793,14207902,13923995,13544396,13528551,13499128,13477790,13466801,13366202,13259364,13070939,13036331,12971775,12845115,12780983 in OH.
Composite Patch 18522512 conflicts with installed patch(es) 17875948, 16040940, 19078951, 17693770, 17912217, 13004894, 14649883, 12942119, 16438289, 13040331, 17600719, 13146719, 18116376
Conflict Description:
Here are the specific sub-patches of composite patch 18522512 that conflict with 17875948, 16040940, 19078951, 17693770, 17912217, 13004894, 14649883, 12942119, 16438289, 13040331, 17600719, 13146719, 18116376
Sub-Patch 13696216 conflicts with 19078951 conflicts with 18116376
Sub-Patch 13923374 conflicts with 19078951
Sub-Patch 16056266 conflicts with 19078951
Sub-Patch 16619892 conflicts with 19078951 conflicts with 17912217 conflicts with 17875948 conflicts with 17600719 conflicts with 16438289 conflicts with 13004894
Sub-Patch 16902043 conflicts with 19078951 conflicts with 17875948 conflicts with 12942119 conflicts with 13146719 conflicts with 13040331
Sub-Patch 17540582 conflicts with 19078951 conflicts with 17693770 conflicts with 14649883
Sub-Patch 18031683 conflicts with 19078951 conflicts with 17875948
Sub-Patch 18522512 conflicts with 19078951 conflicts with 16040940
Conflict Remedy:
Refer to My Oracle Support Note 1299688.1 for instructions on resolving patch conflicts.
UtilSession failed: Composite conflicts with existing oneoffs.
Log file location: /cherdb_1/oracle/VIS12/11.2.0/cfgtoollogs/opatch/opatch2014-08-06_10-59-59AM_1.log
OPatch failed with error code 73
Thanks & appreciated for your help.
Syed.Hi Syed,
You can raise SR for merging the conflict patches and refer to the MOS document provided to resolve.
Thanks,
Uday -
Jars package name Conflicts, How to ?
Hi Pros,
I have two jar files in my web application lib directory, let's say jar1 and jar2.
jar1 contains a class, lets say Class1 under the package com.something1.something2
jar2 also contains a class with same name i.e. Class1 under the same package i.e. com.something1.something2
Now I need my Tomcat to use jar1 for some functionality and jar2 for some other functionality
So, existence of both these jars is must.
How to set the application to go for one particular Class1 say Class1 from jar1 ?
Thanks in Advance,
Abhijit SalunkheUsing Netbeans, I created two different applications JavaApp4, JavaApp5 containing test.com.NewClass.Why? Don't do that.
Then, I created one more Java Application JavaApp6 in which I added jars of JavaApp4 and JavaApp5.Why? Don't do that.
When I tried to instantiate NewClass in JavaApp6, it was giving the method name of the jar I added first.And you expected what, exactly?
Don't do this. It doesn't work. It's not intended to work. Package names are provided so you can disambiguate classes. Do that.
Maybe you are looking for
-
I got a scam call from a phisher, but I didn't know it. I gave them access to my laptop, laptop password my phone number, address, and email address. They had remote control of my computer and they had me download a program called "Clean My Mac." Sup
-
Batch Print multiple files in one click
I created an Automator app that allows the user to: 1) Ask for multiple Finder Items 2) Print Finder items Problem is that when it runs I have to click the OK button in the print dialogue once for each individual file. If I run this workflow for 80 f
-
Multiple Libraries and Music Folder Locations
I'm stumped. I keep three libraries on my MacBook Pro. The folder structure for where the library and xml files live is basically: ~\Music\iTunes\ATV ~\Music\iTunes\Pete ~\Music\iTunes\Jen Each library is associated with its own Music Folder, on an e
-
Data transfer from planning to ASO.
Hi, Like that: Data load in Planning, and data retrieve in ASO. And we want a real time data transfer from Planning to ASO. Transparent partition from BSO to ASO is a choice, but the performance is an issue. If we user replicated partition, data cann
-
i can't see any reason, why not?