JAXB compiler problem in handling xsd:any and nillble = "true"

Dear all,
i am using jdeveloper 10.1.3.1 production release version.
i am designing a xml schema that contain element of attribute nillable="true", for extensible, contain tag <xsd:any>.
but i encounter 2 problem:
1. for xml schema element with attribute nillable="true", no corresponding isNil(), setNil
method is generated (refer to jaxb 1.0 spec. 5.7.1)
2. cannot handle tag <xs:any> that generate incorrect java source code (cannot compile) [refer to jaxb 1.0 spec 5.9.5)
*** i have add jaxb customization tag inside the <xs:any> tag
***   <xs:annotation><xs:appinfo>
***               <jaxb:property name="Extension"/>
***</xs:appinfo></xs:annotation>
Does oracle's JAXB implementation conform to the JAXB 1.0 spec?
Is it a known bug?
Could anybody help me?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Refer to section
E.2 Not Required XML Schema
concepts
"A JAXB implementation is not required to support the following XML Schema
concepts for this version of the specification. A JAXB implementation may
choose to support these features in an implementation dependent manner."
E.2.2 Not supported while manipulating the XML
content
Schema component: wildcard
(any)
how can i know if an xml element with xsi:nil="true" (unmarshal)
and set xsi:nil="true" for an element (marshal) ?
According to the JAXB 1.0 specification:
If {nillable} is "true", the methods setNil() and isNil() are
generated.

Similar Messages

  • Trouble with xsd:any and web services

    I am trying to generate client code from a WSDL for a getter and setter for a chunk of XML.
    The getter:<s:element name="GetData">
      <s:complexType>
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="id" type="s:string"/>
        </s:sequence>
      </s:complexType>
    </s:element>
    <s:element name="GetDataResponse">
      <s:complexType>
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="GetDataResult">
            <s:complexType>
              <s:sequence>
                <s:any/>
              </s:sequence>
            </s:complexType>
          </s:element>
        </s:sequence>
      </s:complexType>
    </s:element>The setter:<s:element name="SetData">
      <s:complexType>
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="id" type="s:string"/>
          <s:element minOccurs="0" maxOccurs="1" name="data">
            <s:complexType>
              <s:sequence>
                <s:any/>
              </s:sequence>
            </s:complexType>
          </s:element>
        </s:sequence>
      </s:complexType>
    </s:element>
    <s:element name="SetDataResponse">
      <s:complexType/>
    </s:element>When we use the <autotype> and <clientgen> ant tasks to generate our web service client code from the WSDL, we're getting the following warnings:
    [autotype] Autotyping for wsdl http://xxx.xxx.xxx.xxx:8080/xxx/xxx.asmx?WSDL
    [autotype] WARNING: Unable to fully map ['http://xxx.xxx/xxx/xxx/2005/11/30']:GetDataResultAnonType using javax.xml.soap.SOAPElement
    [autotype] WARNING: Unable to fully map ['http://xxx.xxx/xxx/xxx/2005/11/30']:dataAnonType using javax.xml.soap.SOAPElement
    [autotype] WARNING: Unable to fully map ['http://xxx.xxx/xxx/xxx/2005/11/30']:SetData using javax.xml.soap.SOAPElement
    [autotype] WARNING: Unable to fully map ['http://xxx.xxx/xxx/xxx/2005/11/30']:GetDataResponse using javax.xml.soap.SOAPElementOur client code for the getData() call looks mostly correct. There's a GetData object created with an "id" field. Typically, I've seen that when the web service method calls are generated, it gives me two ways to call:
    - one that takes a bean (in this case, a GetData object)
    - one that takes the actual fields (in this case, just a String)
    Only the method that takes the bean is getting generated, but that's not a big deal.
    The client code for the setData() call, however, is all screwed up. There is no SetData bean object, and the only method call that gets generated takes just a SOAPElement, the "id" field is left completely out. Without any way to specify the id of the data I'm setting, the setData() method call is worthless.
    My first suspicion was that the Ant tasks did not know how to handle the <any> tag. But we're getting exactly what we want, a SOAPElement object returned in the getter and a SOAPElement to set in the setter. The problem is that it's leaving out the "id" string in the setter. I guess I'm having a hard time seeing why it's almost working.
    Anyone have any ideas? I almost feel like this could be a bug. Sorry for the long post.
    Tobin

    Hi!
    Did you ever solve this? I get similar warnings for our wsdl, and can't figure out if they are the kind I can ignore, or if they indicate that my code will go down the drain :).
    /JMK

  • Compile problem using TOMCAT 5.0 and Apache ANT

    I got some sample from book.
    i just follow the step, place it the class file. it work. it run. show all the detail.
    but when i wan to compile it from java file, error came out
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Error allocating a servlet instance
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         java.lang.Thread.run(Unknown Source)
    root cause
    java.lang.NoClassDefFoundError: com/jspbook/HelloWorld (wrong name: HelloWorld)
         java.lang.ClassLoader.defineClass1(Native Method)
         java.lang.ClassLoader.defineClass(Unknown Source)
         java.security.SecureClassLoader.defineClass(Unknown Source)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         java.lang.Thread.run(Unknown Source)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.in CMD:
    set java_home = C:\Program Files\Java\jdk1.5.0_08
    set classpath = C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib
    and Apache tomcat originally dont have servlet.jar but servlet-api.jar, i copy the servlet.jar from my friend
    i compile it using Apache ANT
    here the build.xml
    <?xml version="1.0" ?>
    <project name="jspbook" default="build" basedir=".">
      <target name="build">
        <echo>Starting Build </echo>
        <!-- Turn Tomcat Off -->
        <antcall target="tomcatOff"/>
        <!-- Compile Everything -->
        <antcall target="compile"/>
        <!-- Turn Tomcat On -->
        <antcall target="tomcatOn"/>
        <echo>Build Finished </echo>
      </target>
      <target name="tomcatOff">
        <echo>Turning Off Tomcat </echo>
        <exec executable="bash" os="Windows">
          <arg value="../../bin/shutdown.bat"/>
        </exec>
        <exec executable="bash" os="Linux">
          <arg value="../../bin/shutdown.sh"/>
        </exec>
      </target>
      <target name="tomcatOn">
        <echo>Starting Tomcat </echo>
        <exec executable="bash" os="Windows">
          <arg value="../../bin/startup.bat"/>
        </exec>
        <exec executable="bash" os="Linux">
          <arg value="../../bin/startup.sh"/>
        </exec>
      </target>
      <target name="compile">
        <javac
          srcdir="WEB-INF/classes"
          extdirs="WEB-INF/lib:../../common/lib"
          classpath="../../common/lib/servlet.jar"
          deprecation="yes"
          verbose="no">
          <include name="com/jspbook/**"/>
        </javac>
      </target>
    </project>compile success, but error in IE
    paste the sample class file in,restart tomcat. i work again!
    what is the problem!
    even i compile the code inside the Jcreator, after set required libraries to servlet.jar or servlet-api.jar
    compile it, success then run it in IE, same error!!!.
    what should i do.
    stil a beginer in servlet and jsp anyway.

    and Apache tomcat originally dont have servlet.jar but servlet-api.jar, i copy the servlet.jar from my friend servlet.jar is an OLD version, you should only use servlet-api.jar!
    wrong name: HelloWorldPerhaps there is a mistake in the class or packagename of the source file. Post the source here.

  • Jaxb xsd:any problem

    I am not sure how to set the namespace (please see schema snippet below). Do I do this with setAny(java.lang.Object)? What kind of object do I pass to setAny() because it is trying to class cast it to JAXBObject. How do I create an instance of JAXBObject?
    I have in my xsd:
    <xsd:element name="order">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:any namespace="urn:abc.com" minOccurs="0" maxOccurs="1"/>
                        <xsd:element ref="a"/>
                        <xsd:element ref="b"/>
                   </xsd:sequence>
                   <xsd:attribute name="locale" type="xsd:string" use="optional"/>
                   <xsd:attribute name="sourceid" type="xsd:string" use="optional"/>
              </xsd:complexType>
         </xsd:element>

    Refer to section
    E.2 Not Required XML Schema
    concepts
    "A JAXB implementation is not required to support the following XML Schema
    concepts for this version of the specification. A JAXB implementation may
    choose to support these features in an implementation dependent manner."
    E.2.2 Not supported while manipulating the XML
    content
    Schema component: wildcard
    (any)
    how can i know if an xml element with xsi:nil="true" (unmarshal)
    and set xsi:nil="true" for an element (marshal) ?
    According to the JAXB 1.0 specification:
    If {nillable} is "true", the methods setNil() and isNil() are
    generated.

  • JAXB Compiler Interface generation problem

    I have a schema where two different elements extend the same base type. The JAXB compiler throws the following error. How do I fix this?
    parsing a schema...
    An interface with the same name "generated.FooType" is generated from more than one schema component.
    line 10 of sample.xsd
    (Relevant to above error) another one is generated from this schema component.
    line 23 of sample.xsd
    Failed to parse a schema.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" >     <xsd:element name="Sample" type="Sample_Type"/>
         <xsd:complexType name="Sample_Type">
              <xsd:sequence>
                        <xsd:element     ref="Foo"/>
                        <xsd:element     ref="Bar"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:element name="Foo">
              <xsd:complexType>
                   <xsd:complexContent>
                        <xsd:extension base="Foo_Type"/>
              </xsd:complexContent>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="Bar">
              <xsd:complexType>
                   <xsd:complexContent>
                        <xsd:extension base="Foo_Type"/>
                   </xsd:complexContent>
              </xsd:complexType>
         </xsd:element>
         <xsd:complexType name="Foo_Type">
                   <xsd:sequence>
                             <xsd:element ref="FooBar"/>
                        </xsd:sequence>
         </xsd:complexType>
         <xsd:element name="FooBar" type="FooBar_Type"/>
         <xsd:simpleType name="FooBar_Type">
              <xsd:restriction base="xsd:long"/>
         </xsd:simpleType>
    </xsd:schema>

    The problem is because of you have a complex type Foo_Type
    Solution:
    =============
    Replace all occurences of Foo_Type with something else say "Some_Type"
    It should work
    Explaination:
    =============
    Basically you were getting FooType generated from 2 cases. You have an element "Foo" inside which you have an anonymous complex type. So the java class for the anonymous complex type would be "FooType"
    Then you had a named complex type Foo_Type and the java class would be "FooType" again because "_" is removed when generating classes
    Hence the compiler reported the error
    For more explaination see Section 5.7.2 of the spec Also Table 3.2 of the spec
    Also you seem to be using xjc <schemafile>
    Hence the code by default gets generated in package "generated"
    Recommendation
    =============
    Use xjc -p com.something <schemafile>
    to get the package com.something

  • How to handle "xsd:anyAttributes" with jaxb

    Need help for how to handling "xsd:anyAttribute" with jaxb!
    Here is part of my xml schema.
    <xsd:attributeGroup name="DataAttributes">
    <xsd:anyAttribute namespace="##local" processContents="lax"/>
    </xsd:attributeGroup>
    <xsd:element name="Data">
    <xsd:complexType>
         <xsd:attributeGroup ref="DataAttributes"/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="MA_Verify">
    <xsd:complexType>
         <xsd:sequence>
         <xsd:element ref="Data" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
         <xsd:attributeGroup ref="verifyAttributes"/>
    </xsd:complexType>
    </xsd:element>
    I have an application which only knows the attribute names and values at runtime. (Thest attributes are string.) Therefore, I cannot define attribute names in the schema and have to use xsd:anyAttribute.
    I was able to generate all jaxb code. However, the interfaces generated for Data and DataType are basically all empty. The impl classes are empty too, since no get or set methods exist for the attribute.
    Some thoughts for handling this case, but do not know if it will work.
    (1) write some derive classes on top of the generated jaxb classes.
    (2) write customized method to handle the 'Data' element level and its attributes. Similar to parseMethod or printMethod for the javaType.
    (if there is a way)
    Can anyone give me suggestions, directions or an laternate way to handle the situation?
    Your help will be greatly appreciated.
    Ruth

    xsd:anyAttribute is not supported by JAXB.
    http://java.sun.com/xml/jaxb/users-guide/jaxb-works.html#unsupported

  • I have a downloaded font file for a school problem on a flash drive and I do not know how to install it into my photoshop application. Need to be walked through this as I am an older user who does not understand any of this stuff.

    I have a downloaded font file for a school problem on a flash drive and I do not know how to install it into my photoshop application. Need to be walked through this as I am an older user who does not understand any of this stuff.

    Fonts are handled by your operating system and installed through the respective System Control panel (Windows) or Fontbook (Mac). On Windows simply type "Fonts" in the search bar in the start menu and when you open the panel/ folder use File --> Add Font. On Mac the procedures are similar, you just need to find the Fontbook app in Applications:Utilities.
    Mylenium

  • Jpcap locating and code compilation problem for packet sniffing

    To my previous thread "How to capture and Read Packets", I've got reply to use jpcap. Yes I have tried to use this but the when I tried to compile the code it gives a lot of error, surely because javac cant find the jpcap library. I have download the library which is in installation form and when I installed library the jpcap, instead of installing in lib of JRE or JDK it installed in system32 of window file system and hence the compiler unable to locate this file kindly tell me how can I tackle this problem. i.e. how can and where should I place jpcap.dll file
    Regards,
    Danish Kamran

    Hi
    Thanks for the response.
    I would like to know if it is possible to capture all the data that is returned from a running port in a server. For eg. if oracle Apps Instance is running on port 1615, will I be able to capture all the data (before sending it to the DB server, through JpCap or any other java program) that, that form is sending to the Oracke DB Server?
    What I need to to develop is an intermediate (middleware) Database Simulator using java for an oracle application. I need to capture the data that oracle application is sending into this Simulator and then send it to the Oracle DB server, after performing some operations in the simulator. Is this possible through java socket programming?
    Thanks in advance.
    Revathi

  • JAXB, Compiling a schema problem

    Hi,
    I�m trying to test the examples from the JWSDP tutorial (section "Using JAXB") and I get the following error when executing:
    C:\tutoriales\jwstutorial13\examples\jaxb\unmarshal-read>%JWSDP_HOME%\jaxb\bin\xjc.bat po.xsd -p primer.po
    parsing a schema...
    compiling a schema...
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
    Caused by: java.lang.NullPointerException
    at com.sun.tools.xjc.generator.SkeletonGenerator.generateStaticRuntime(SkeletonGenerator.java:233)
    at com.sun.tools.xjc.generator.SkeletonGenerator.<init>(SkeletonGenerator.java:128)
    at com.sun.tools.xjc.generator.SkeletonGenerator.generate(SkeletonGenerator.java:108)
    at com.sun.tools.xjc.Driver.generateCode(Driver.java:366)
    at com.sun.tools.xjc.Driver.run(Driver.java:215)
    at com.sun.tools.xjc.Driver._main(Driver.java:80)
    at com.sun.tools.xjc.Driver.access$000(Driver.java:46)
    at com.sun.tools.xjc.Driver$1.run(Driver.java:60)
    I suppose could be configuration issues or path issues but I can�t get over it.
    Thanks

    http://forum.java.sun.com/thread.jsp?forum=34&thread=484038&tstart=0&trange=15

  • Hi. I am just about to move from the UK to Kuwait. Will I have any problems using my iPhone 4 and able to join a local carrier using this device please?

    Hi. I am just about to move from the UK to Kuwait. Will I have any problems using my iPhone 4 and able to join a local carrier using this device please?

    If your phone is locked to a particular carrier, you must contact them to request they unlock it. Once they've taken care of that and you've followed the instructions to complete the unlock process, you will be able to use the phone elsewhere.
    ~Lyssa

  • HT3552 I have been trying to download apps from the app store and every time it tells me there is a problem with my previous billing and direct me to put in new billing information and every time i do that it still will not let me download any apps.

    I have been trying to download apps from the app store and every time it tells me there is a problem with my previous billing and direct me to put in new billing information and every time i do that it still will not let me download any apps.

    Have a look here >  http://support.apple.com/kb/TS1646

  • I am having problems with the Preview application.  When I try to use it to open a pdf document it gets hung-up and I have to select force quit to close it.   Any ideas on how to resolve this problem?  Thanks for any help

    I am having problems with the Preview application.  When I try to use it to open a pdf document it gets hung-up and I have to select force quit to close it.   Any ideas on how to resolve this problem?  Thanks for any help

    Can you open the Preview program without loading a file, like by itself?
    If it doesn't load then I suspect a corrupt Preview preference file.
    Deleting the System Preference or other .plist file
    Can you open other files with Preview, like jpg's and images?
    How about other PDFs? or is it just that one you have downloaded?
    Run through this list of fixes
    Step by Step to fix your Mac

  • I installed Mountain Lion on my iMac. Now I cannot access the Internet. All the other computers and tablets have no problem. I did PRAM and MC reset, modem reset, etc., all the usual ju-ju. I also cannot connect on my local network to any other computer.

    I installed Mountain Lion on my iMac. Now I cannot access the Internet. All the other computers and tablets on the network have no problem. I did PRAM and MC reset, modem reset, etc., all the usual ju-ju. I also cannot connect on my local network to any other computer. Yet Network control panel says I am connect to the modem, and Network Diagnosis says I am connected to the Internet. It's like the blind man who has eyes that cannot see. BTW, I am not some newbee. I have been a Machead since the early nineties and set up a half dozen networks, including the one I am using at home to which the iMac mysteriously is there but not. This has me stumped! I am considering going back to 10.7!

    Select  ▹ System Preferences ▹ Network ▹ Advanced ▹ TCP/IP. What values are shown for the following:
    Configure IPv4
    IPv4 Address
    Subnet Mask
    Router

  • Why is the sound of my new ipad cutting out intermittently and what does Apple recommend to solve the problem in lieu of any updates?

    Why is the sound of my new ipad cutting out intermittently and what does Apple recommend to solve the problem in lieu of any updates? All of a sudden without changing any settings, the audio on my NEW ipad cuts in and out on applications/ games, keypad noise and lock sounds. The rocker button only seems to work while the sound is intermittently being heard before, after a few seconds of noise not doing anything when sound goes off.
    This is highly frustrating as I've noticed others posting about such issues as far back as April. Anybody had the same thing happen to them? Is this likely software (ios6) or hardware issue? What are the solutions Apple???

    Apple has no physical stores of their own in Dubai, so unless you mean that you purchased from the online Apple Store for the UAE, you purchased from a dealer, who may or may not have been authorized. You can check the expiration date of the warranty on your iPad yourself by entering in the serial number here:
    https://selfsolve.apple.com/agreementWarrantyDynamic.do
    If it does indeed show the warranty has expired, then what you need to do from here will depend on who you purchased the iPad from and when you really did purchase it. Perhaps you actually purchased it in August and are just misremembering? Check your receipt. If you confirm that you did purchase within the last calendar year, tell us exactly where you got it and we can probably offer advice.
    Regards.

  • My computer sees the auto duplexer on my Epson Stylus PX720WD but iworks says it is not installed. I have contacted Epson and I have the impression that they don't know how to solve this problem. Anyone got any ideas?

    My computer sees the auto duplexer on my Epson Stylus PX720WD but iworks says it is not installed. I have contacted Epson and I have the impression that they don't know how to solve this problem. Anyone got any ideas?

    If you print to PDF first, and then print it from Preview does it work?

Maybe you are looking for

  • How to map CC to Dynamic Email Recipient

    Hi , I am using BO XI 3.1. I created a Publication with source Document as Web Intelligence Report and used Dynamic Recipients (Source Web Intelligence Report). I have configured the destination as Email and sending report in PDF format as attachment

  • Help! findResource isn't working!

    I'm at a complete loss. In my classloader, I print out all the URLs of the ClassLoader (which extends URLClassLoader). When it prints them out, one of the URLs is: file://D:/Resources/Factory.cfg However, when I call classLoader.findResource( "Factor

  • Cannot launch Word, Excel or Quicken

    I recently updated to Mac OS 10.5 with an installation disk, then to OS X 10.5.6 via software update. I had some problems with the initial update, but they seemed to be resolved. Since the software update I am unable to launch Word, Excel or Quicken,

  • Stripe Size for BE6000 RAID 10 Configuration.

    Hey, What should the stripe size be for the BE6000 RAID configuration should you have to rebuild the volume? When we got a BE6000 and looked the Stripe size seemed to be set to 64K, but I see documentation saying that 128K is what should be used (alt

  • Page scrolling with keyboard not working

    Scrolling not working using keyboard. Page Up / Page Down, Arrow Keys - Up, Down, Left & Right - keys do not work. Scrolling is possible only by using the scroll bar.