JAXB tromps schema DataType definition

This is my first attempt at working w/ XML Schema (and XML in general) so please pardon me if I am not providing enough information. I am using a jwsdp1.3 out of the box w/ J2SDK_1.4.2 for this work.
I'm trying to create a set of bindings using the HDF5-File.xsd Schema
http://hdf.ncsa.uiuc.edu/DTDs/HDF5File http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd
I get the following error using ant compile:
compile:
[echo] Compiling the schema...
[xjc] Compiling file:<path>/jwstutorial13/examples/jaxb/HDF5/HDF5-File.xsd
[xjc] [ERROR] A class/interface with the same name "HDF5.File.DataType" is already in use.
[xjc] line 117 of HDF5-File.xsd
[xjc] [ERROR] (Relevant to above error) another one is generated from here.
[xjc] line 130 of HDF5-File.xsd
The offending lines from the schema look like this:
116     <xs:element name="Data">
117          <xs:complexType>
118               <xs:choice>
119                    <xs:element ref="hdf5:NativeHDF5"/>
120                    <xs:element ref="hdf5:DataFromFile"/>
121                    <xs:element ref="hdf5:NoData"/>
122               </xs:choice>
123          </xs:complexType>
124     </xs:element>
125     <xs:element name="DataFromFile" type="xs:string">
126          <xs:annotation>
127               <xs:documentation>Format of the data in this element is not defined.</xs:documentation>
128          </xs:annotation>
129     </xs:element>
130     <xs:element name="DataType">
131          <xs:complexType>
132               <xs:choice>
133                    <xs:element ref="hdf5:AtomicType"/>
134                    <xs:element ref="hdf5:CompoundType"/>
135                    <xs:element ref="hdf5:VLType"/>
136                    <xs:element ref="hdf5:ArrayType"/>
137               </xs:choice>
138          </xs:complexType>
139     </xs:element>
I noticed when I renamed DataType to DatumType in the xsd then class-bindings are created in an appropriate manner. It seems that JAXB or some underlying mechanism is dirtying up the namespace by creating a DataType class from the 'Data' type (or element name) and not differentiating the xsd's 'DataType' element name from the 'DataType' classes created for the xsd 'Data' element name.
Is there a problem with my name space definition? See Below
<xs:schema targetNamespace="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:hdf5="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File" elementFormDefault="unqualified" attributeFormDefault="unqualified">
I cannot change the schema as it is not mine, are there any other solutions to this problem?
thanks in advance

I think the problem is that you are using anonymous types, and the JAXB compiler adds Type to the end of each one. Make them not anonymous to give them any name you like.
See:
http://www.onjava.com/lpt/a/4446

Similar Messages

  • Read DataType Definition in a Java Mapping,

    Hi,
    Is there a way to load a DataType Definition and parse the fields and attribute of this data type from java code?
    I am in a custom Adapter Module (PI 7.1) and need to dynamically load the definition of a DataType to do some FCC.
    I would like to do the FCC based on the DataType definition rather then on the Communication Channel's adapter module configuration.
    Thanks,
    Martin

    Hi Martin Lavoie,
    I understand, you are getting a flat file and want to convert it into XML or the other way, converting XML to flat file in SAP PI 7.1 using File channel.
    First, why you are going for Adapter module? (I think even you don't like it) It is resource intensive to develop, running in production system, maintain. If already there is an adapter module, leave it as it is. Consider using Java mapping over adapter module. Java mapping is relatively less resource intensive to develop, running in production system, maintain. Java mapping can do the payload conversion what you are planning to do in adapter module. If you write adapter module (generic), you have to use it in interfaces (all channels) where you need to transform the payload. If you write java mapping (generic), you can use it in operational mapping in all interfaces where you need payload transformation, along with other graphical mappings.
    Second, as of now, there is no way to access Data type XSD (which are declared in ESR) using SAP PI. In PI 7.1 EHp1 payload validation using XSD can be done, by placing XSD file in folder on PI server. From PI 7.3, validation is based on Data type (XSD) defined in ESR. First place, you are interested in payload transformation not payload validation. So there is no way you can access XSD in ESR from Adapter module dynamically. I guess you can upload XSD along with adapter module, but maintenance in not all easy.
    Finally, I donu2019t recommend adapter module for you requirement. Try using FCC. You may say whenever there is change in XSD (change in field lengths), you have to change FCC (edit the channel), and I donu2019t see better option than this. If you think FCC will not be sufficient for your requirement, and then go for Java mapping. Writing generic java mapping will be a good challenge.  Java mapping should be uploaded with XSD (or parameter file) for every interface and should be edited if there is a change in XSD.
    Regards,
    K_Raghu_Vamsee
    Edited by: Raghu Vamsee on Jan 7, 2011 12:28 AM

  • Losing datatype definition from a collection type

    Hi,
    When I reload a model design from an xml repository, I am losing the datatype definition from a collection type.
    It goes like this:
    - In a collection type, the datatype is selected from a list of structure types (pre-defined).
    - I save the whole model.
    - So far, the datatype assignment is kept.
    - If I exit from Data Modeler, the next time I reload the saved model, the collection datatype definition is lost...
    Does anyone know how to resolve this issue?
    Note: this looks very similar to a previous thread named 'Losing source-target mapping from a data flow diagram process'.
    Thanks,
    /Mario

    Hi Mario,
    Thanks for letting us know about this problem. I have logged a bug on this.
    If you should find any more problems like this, please let us know.
    Thanks,
    David

  • NEWBIE - JAXB and Schema definition

    Hi,
    I've defined an schema that defines a sequence of elements (of a complex type)
    When I use the JAXB tool to generate the classes, the Interfaces created
    do not have any kind of setxxx() in orther to add any element, but instead has created the correspondig Lis getxxx()
    Anybody knows where can be the problem???

    Problem solved <Sorry for the waste of time/space>

  • Troubleshoot JAXB "chameleon schema" Errors

    I am trying to use xjc from JAXB 2.1 to generate Java code for the HL7 CDA R2 format. Unfortunately, there appears to be errors in XML Schema files and so xjc fails with this exception.
    The XML Schema files can be downloaded from http://xreg2.nist.gov/cda-validation/downloads/archives/HITSP_C37_TestPackage_03Jan_2008.zip.There are total 7 Schema files, and their names are: LabCDA.xsd, LabPOCD_MT000040.xsd, TF_Vol3_Lab.xsd, datatypes.xsd, datatypes-base.xsd, NarrativeBlock.xsd and voc.xsd. The relationship of the Schema files are complex: LabCDA.xsd is the top level Schema and includes LabPOCD_MT000040.xsd; LabPOCD_MT000040.xsd incluedes datatypes.xsd, NarrativeBlock.xsd and voc.xsd and imports TF_Vol3_Lab.xsd; TF_Vol3_Lab.xsd incluedes datatypes.xsd; datatypes.xsd incluedes datatypes-base.xsd; datatypes-base.xsd includes voc.xsd; voc.xsd includes datatypes.xsd.
    [ERROR] (Relevant to above error) another "AdxpPostBox" is generated from here.
    line 1158 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called "
    chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo
    rums.java.net/jive/thread.jspa?threadID=18631 for more about this.
    line 1158 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.ADXP" is already in use. Use a class customization
    to resolve this conflict.
    line 950 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) another "ADXP" is generated from here.
    line 950 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called "
    chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo
    rums.java.net/jive/thread.jspa?threadID=18631 for more about this.
    line 950 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.AdxpDeliveryInstallationArea" is already in use. U
    se a class customization to resolve this conflict.
    line 1123 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) another "AdxpDeliveryInstallationArea" is generated from here.
    line 1123 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called "
    chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo
    rums.java.net/jive/thread.jspa?threadID=18631 for more about this.
    line 1123 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] A class/interface with the same name "test.jaxb.labreport.cda.EnFamily" is already in use. Use a class customiza
    tion to resolve this conflict.
    line 1288 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) another "EnFamily" is generated from here.
    line 1288 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Relevant to above error) This confusing error happened most likely because the schema uses a technique called "
    chameleon schema", which causes a single definition to be loaded multiple times into different namespaces. See http://fo
    rums.java.net/jive/thread.jspa?threadID=18631 for more about this.
    line 1288 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] Two declarations cause a collision in the ObjectFactory class.
    line 1048 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] (Related to above error) This is the other declaration.
    line 1048 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes-base.xsd
    [ERROR] Two declarations cause a collision in the ObjectFactory class.
    line 694 of file:/F:/rcp_workspace/testCreate/processable/coreschemas/datatypes.xsd
    I have referred http://forums.java.net/jive/thread.jspa?messageID=278619 and http://forums.java.net/jive/thread.jspa?threadID=18631, and solved id problem, but Unfortunately I don't know how to deal with the errors above.So I am looking help at here.
    Edited by: wangxf_2000 on Jul 7, 2009 10:10 PM

    JAXB has extra rules that it uses to validate the schema. I believe this is for simplicity in the code generation side. For example, you can't have a maxOccurs="unbounded" element in an "all" complex element, it must be in a "sequence".
    In this case (and hopefully all others) fixing the schema so that JAXB will accept it is not going to hurt anything. A length requirement is both a maxLength and a minLength.
    There are some rules I don't appreciate that JAXB tacks on. For example, if you import another schema into your binding schema, and don't use every type specified in the imported schema, it will balk. Why? I can't think of a good reason. It really makes it a pain in the ass to create reusable custom XML types. I have to have a different schema for every type.

  • JAXB binding schema type conversions

    If your DTD contains something like this:
    <!ELEMENT chicken (egg+)>
    then JAXB gives you a Chicken class with a method that returns a List of Egg objects.
    How can I specify in the binding schema that this collection should be a Hashtable (or other type of collection), not the default List? I think I probably have to write some sort of conversion class, but what is the syntax and how do I get it into my binding schema?

    Hi you can use the <option> tag at the top-level of your binding schema definition. You can define the default collection type of to be used e.g.
    <options default-reference-collection-type="array"/>
    Or you can use the collection attribute of most element bindings e.g.
    <choice property="entries" collection="array"/>
    But only arrays and lists are supported. If you want a different collection type, then you will have to subclass the generated classes and use the Collections class and the collection classes to convert between different collection types.
    Hope this helps.

  • JAXB binding schema problem

    hi friends,
    i didn't get implementation classes for xsd during the binding schema.i insatlled Jwsdp2.0and j2sdk1.5.Is any give me me an idea

    Hi
    Go through the sun website for doing so. This would give you a clue as to how to.
    http://java.sun.com/xml/jaxb/jaxb-docs.pdf
    It teaches you a step by step procedure to go ahead.

  • Exception when using the unsignedByte, short  XML Schema datatypes

    Hi,
    I am generating the java classes form my XSD file, where i have defined the
    datatypes like int and short.
    Example:
    1) <xs:element name="Red" type="xs:unsignedByte"/>
    2) <xs:element name="Border" type="xs:int" default="0"/>
    but JAXB is giving the following exception -
    DefaultValidationEventHandler: [ERROR]: Unexpected text ""
    Location:
    java.lang.NullPointerException
         at com.sun.xml.bind.DatatypeConverterImpl.parseShort(DatatypeConverterImpl.java:90)
         at javax.xml.bind.DatatypeConverter.parseShort(DatatypeConverter.java:170)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.ColorTypeImpl$Unmarshaller.eatText1(ColorTypeImpl.java:373)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.ColorTypeImpl$Unmarshaller.handleText(ColorTypeImpl.java:350)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.AbstractUnmarshallingEventHandlerImpl.text(AbstractUnmarshallingEventHandlerImpl.java:82)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.SAXUnmarshallerHandlerImpl.consumeText(SAXUnmarshallerHandlerImpl.java:210)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.SAXUnmarshallerHandlerImpl.processText(SAXUnmarshallerHandlerImpl.java:214)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.SAXUnmarshallerHandlerImpl.endElement(SAXUnmarshallerHandlerImpl.java:139)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:140)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:131)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:178)
         at com.sumasoft.tbws.xmlapi.TBWSUnmarshaller.readXML(TBWSUnmarshaller.java:66)
         at com.sumasoft.tbws.xmlapi.TBWSUnmarshaller.<init>(TBWSUnmarshaller.java:43)
         at com.sumasoft.tbws.xmlapi.TBWSUnmarshaller.main(TBWSUnmarshaller.java:188)
    --------------- linked to ------------------
    javax.xml.bind.UnmarshalException: Unexpected text ""
    - with linked exception:
    [java.lang.NullPointerException]
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.SAXUnmarshallerHandlerImpl.handleEvent(SAXUnmarshallerHandlerImpl.java:577)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.AbstractUnmarshallingEventHandlerImpl.reportError(AbstractUnmarshallingEventHandlerImpl.java:139)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.AbstractUnmarshallingEventHandlerImpl.handleUnexpectedTextException(AbstractUnmarshallingEventHandlerImpl.java:121)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.ColorTypeImpl$Unmarshaller.handleText(ColorTypeImpl.java:363)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.AbstractUnmarshallingEventHandlerImpl.text(AbstractUnmarshallingEventHandlerImpl.java:82)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.SAXUnmarshallerHandlerImpl.consumeText(SAXUnmarshallerHandlerImpl.java:210)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.SAXUnmarshallerHandlerImpl.processText(SAXUnmarshallerHandlerImpl.java:214)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.SAXUnmarshallerHandlerImpl.endElement(SAXUnmarshallerHandlerImpl.java:139)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
         at com.sumasoft.tbws.xmlapi.form.formelements.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:140)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:131)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:178)
         at com.sumasoft.tbws.xmlapi.TBWSUnmarshaller.readXML(TBWSUnmarshaller.java:66)
         at com.sumasoft.tbws.xmlapi.TBWSUnmarshaller.<init>(TBWSUnmarshaller.java:43)
         at com.sumasoft.tbws.xmlapi.TBWSUnmarshaller.main(TBWSUnmarshaller.java:188)
    If the Datatypes are valid then why the JAXB is throwing this exception?
    Any one knows , plz help.

    I have a reason to believe that my anti virus scanner is modifying the jar file.
    I had initially downloaded the jar file from sourceforge. It had the com.iwss.... package.
    Now i dowloaded the file in zip format and that package is not there in the zip file. But i have a new problem now.
    My eclispe just crashed with the following error message.
    JVM terminated. Exit code=1
    D:\Oracle\product\10.1.0\Client_2\jre\1.4.2\bin\javaw.exe
    -Xms40m
    -Xmx256m
    -jar C:\eclipse\startup.jar
    -os win32
    -ws win32
    -arch x86
    -launcher C:\eclipse\eclipse.exe
    -name Eclipse
    -showsplash 600
    -exitdata 1bc_74
    -vm D:\Oracle\product\10.1.0\Client_2\jre\1.4.2\bin\javaw.exe
    -vmargs
    -Xms40m
    -Xmx256m
    -jar C:\eclipse\startup.jar

  • JAXB: Multiple Schema

    I have three XSD files, let say A.xsd, B.xsd and C.xsd
    B.xsd and C.xsd are including A.xsd
    A.xsd has some global complex/simple types, that other xsd(A,B) uses.
    How should I compile these schemas, so that classes generated from A.xsd are shared between classes of B.xsd and C.xsd?
    I need this, so that I can write some utility methods for common types.
    Sanjay

    Hi
    Go through the sun website for doing so. This would give you a clue as to how to.
    http://java.sun.com/xml/jaxb/jaxb-docs.pdf
    It teaches you a step by step procedure to go ahead.

  • Best datatype definition for sequence generated PK

    Hi everyone,
    I realize the actual answer to this question will most likely be "it doesn't really matter," but as a typical database developer, my over-analytical self just can't move past this unless I handle it the "best" way.
    I have surrogate primary keys in my tables generated by sequences incremented by 1. So, I want to enforce the constraint on this column to not allow decimal values like 38.5, for instance...just integers. I don't necessarily care about the precision, since, as far as I'm aware, there are no negative impacts for defining a column as NUMBER(38) vs NUMBER(10).
    So, I've come to find three ways in defining this datatype to accomplish this. All of them end up being defined as NUMBER(38), which is why I figured it doesn't really matter, but there are some slight differences.
    1.  CREATE TABLE IMOVERTHINKING (MY_PK NUMBER(*,0));
    2.  CREATE TABLE IMOVERTHINKING (MY_PK INTEGER);
    3.  CREATE TABLE IMOVERTHINKING (MY_PK NUMBER(38));The first two essentially do exactly the same thing. In USER_TAB_COLUMNS, both of those will give me a PRECISION of NULL and SCALE of 0. The third one will give me a PRECISION of 38 and SCALE of 0.
    So, does anyone have a suggestion for a "best practice?" Is it best to define a PRECISION like in #3? Or, what about scalability? Say, if Oracle changes the max PRECISION to 58 one day. Will the undefined PRECISION automatically reflect that? Will I have to redefine all columns that used the #3 approach?
    Thanks for any advice in advance.
    Mark

    Yeah, I have them as just plain number currently, but was thinking I shouldn't allow decimals, so I need to specify 0 scale. I don't have any restrictions on precision. I was kindof wondering how come I seem to be the only one worried about this, because, like you say, even Oracle just uses plain number. People would probably say that, since it's senquence-generated, decimals should never be a problem... But, I have an IF statement in my trigger to override the sequence if a primary key value is supplied (for my development purposes when loading bulk data sometimes I want to use the same primary keys as in my test/prod environments). Also, people would probably say that, since it's a pk field, it is essentially a relationship identifier, and it shouldn't matter if it has decimals in it or not. True, but it still bothers me, lol.

  • JAXB - xml schema problems

    Hi, I'm having problems constructing a correct schema for my XML input. I already have this XML:
    <resultSet>
    <row id="1">
      <col name="ID">1</col>
      <col name="parentID">0</col>
      <col name="categoryName">Brands</col>
    </row>
    <row id="2">
      <col name="ID">2</col>
      <col name="parentID">0</col>
      <col name="categoryName">Laerdal</col>
    </row>
    (...) etc. for 244 rows
    </resultSet>I've looked at the examples to try to figgure out how the schema (XSD) should look like, but I keep getting rumtime exceptions. Here's my XSD so far:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="resultSet" type="CategoryType"/>
    <xsd:complexType name="CategoryType">
         <xsd:sequence>
         <xsd:element name="row" type="CategoryRow"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="CategoryRow">
         <xsd:sequence>
              <xsd:element name="col" type="CategoryCol"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="CategoryCol">
         <xsd:sequence>
              <xsd:element name="ID" type="xsd:int"/>
              <xsd:element name="parentID" type="xsd:int"/>
              <xsd:element name="categoryName" type="xsd:string"/>
         </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>I can't find any examples on converting XML to a schema that would define it.
    Help anyone??
    by the way, this is the runtime exception I get:
    DefaultValidationEventHandler: [ERROR]: Unexpected end of element {}:col
    javax.xml.bind.UnmarshalException: Unexpected end of element {}:col
         at com.sun.xml.bind.unmarshaller.UnreportedException.createUnmarshalException(UnreportedException.java:59)
         at com.sun.xml.bind.unmarshaller.SAXUnmarshallerHandlerImpl.reportAndThrow(SAXUnmarshallerHandlerImpl.java:406)
         at com.sun.xml.bind.unmarshaller.SAXUnmarshallerHandlerImpl.endElement(SAXUnmarshallerHandlerImpl.java:108)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
         at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
         at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
         at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
         at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:139)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:129)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:134)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:138)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:151)
         at no.xait.dod.communication.dataAccess.sendXML(dataAccess.java:121)
         at no.xait.dod.designondemand.<init>(designondemand.java:87)
         at no.xait.dod.designondemand.main(designondemand.java:602)
    Process terminated with exit code 0

    Modified schema:
    <xsd:element name="resultSet">
    <xsd:complexType>
    <xsd:sequence>     
    <xsd:element ref="row" minOccurs="0" maxOccurs="unbounded"//>     
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="row">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="col" minOccurs="0" maxOccurs="unbounded"//>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="col">
    <xsd:complexType>
    <xsd:sequence>          
    <xsd:element name="ID" type="xsd:int"/>     
    <xsd:element name="parentID" type="xsd:int"/>          
    <xsd:element name="categoryName" type="xsd:string"/>     
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>

  • Special Problem about XML schema simpleType definition

    hi, OracleTeam,
    hi, Bruno,
    Fiena comes again :( :p
    It seems you do not use Oracle schema processor . I met a problem about schema ...
    here is test1.xsd
    <?xml version="1.0"?>
    <schema xmlns = "http://www.w3.org/1999/XMLSchema"
    targetNamespace = "http://www.sample.com"
    xmlns:vs ="http://www.sample.com">
    <element name = "Test" type= "vs:test" minOccurs ="1" maxOccurs="1"/>
    <simpleType name= "test">
    <restriction base="integer">
    <minInclusive value="-1290"/>
    <maxInclusive value="29035"/>
    </restriction>
    </simpleType>
    </schema>
    here is test1.xml
    <?xml version="1.0"?>
    <video:Video xmlns:video="http://www.sample.com"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xsi:schemaLocation="http://www.sample.com test1.xsd"
    >
    <Test>11</Test>
    </video:Video>
    but when I validate the two files with schema processor , it will said :
    Validation failed, error 909 ( not parer, but schema processor)
    I don't know why everytime I define "simplyType" , it will show this error...
    Thank you no matter you can answer me :)
    Best wishes,
    fiena
    null

    Thank you,
    I do understand it,
    but why or when it is necessary to have this structure ?
    I ask because I found simple exsamples of XML-Datafiles without this :
    like this example
    <A31>
    <HEADER>TEST HEADER</HEADER>
    <MASSNAHME>NR_10-0009/02-A07</MASSNAHME>
    <TEILMASSNAHME>
    <LFDNR>1</LFDNR>
    <STT3X>dies ist text 1</STT3X>
    </TEILMASSNAHME>
    <TEILMASSNAHME>
    <LFDNR>2</LFDNR>
    <STT3X>dies ist text 2</STT3X>
    </TEILMASSNAHME>
    </A31>
    in contrast to that :
    <A31>
    <A31_ITEM>
    <HEADER>TEST HEADER</HEADER>
    <MASSNAHME>NR_10-0009/02-A07</MASSNAHME>
    <TEILMASSNAHME>
    <TEILMASSNAHME_ITEM>
    <LFDNR>1</LFDNR>
    <STT3X>dies ist text 1</STT3X>
    </TEILMASSNAHME_ITEM>
    <TEILMASSNAHME_ITEM>
    <LFDNR>2</LFDNR>
    <STT3X>dies ist text 2</STT3X>
    </TEILMASSNAHME_ITEM>
    </TEILMASSNAHME>
    </A31_ITEM>
    </A31>
    this creates finally different ( incorrect ) schema-files
    to import into nested tables ?
    Norbert

  • JAXB -Binding Schema

    What entries should you make in the binding schema for:
    <rate year="2001">7.00</rate>
    so that it constructs a class rate with a field "content" as a double and a field year as an int?

    same questions:
    in DTD defines
    <!ELEMENT SERVICETYPE     (#PCDATA)>
    <!ATTLIST SERVICETYPE     
         type           CDATA #REQUIRED
         anon           CDATA #REQUIRED>
    how should I define the element SERVICETYPE in my binding Schema?
    Gang

  • Unable to compile the JAXB generated java files

    Hi
    I am using JAXB 2.0 API for binding process.
    I have products.xml file as
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE PRODUCTDATA SYSTEM "products.dtd">
    <PRODUCTDATA>
    <PRODUCT PRODID="P001" CATEGORY="Books">
    <PRODUCTNAME>Gone with the wind</PRODUCTNAME>
    <DESCRIPTION>This is abt American Civil War</DESCRIPTION>
    <PRICE>25.00</PRICE>
    <QUANTITY>3</QUANTITY>
    </PRODUCT>
    </PRODUCTDATA>
    and products.xsd(Schema file) as
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="PRODUCTDATA" type="prdt"/>
    <xsd:complexType name="prdt">
    <xsd:sequence>
    <xsd:element name="PRODUCT" type="prd" maxOccurs="unbounded" />
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="prd">
    <xsd:sequence>
    <xsd:element name="PRODUCTNAME" type="xsd:string"/>
    <xsd:element name="DESCRIPTION" type="xsd:string"/>
    <xsd:element name="PRICE" type="xsd:positiveInteger"/>
    <xsd:element name="QUANTITY" type="xsd:nonNegativeInteger"/>
    </xsd:sequence>
    <xsd:attribute name="PRODID" type="pid" use="required"/>
    <xsd:attribute name="CATEGORY" type="xsd:string" use="optional"/>
    </xsd:complexType>
    <xsd:simpleType name="pid">
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[p]{1}/d{3}"/>
    <xsd:length value="4"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>
    I am converting these schema file to java files by using binding compiler xjc.
    So that three java files are genearated automatically.
    1) ObjectFactory.java
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.0 in JDK 1.6
    // See http://java.sun.com/xml/jaxb
    // Any modifications to this file will be lost upon recompilation of the source schema.
    // Generated on: 2008.06.23 at 04:09:25 PM IST
    package testing.jaxb;
    import javax.xml.bind.JAXBElement;
    import javax.xml.bind.annotation.XmlElementDecl;
    import javax.xml.bind.annotation.XmlRegistry;
    import javax.xml.namespace.QName;
    * This object contains factory methods for each
    * Java content interface and Java element interface
    * generated in the testing.jaxb package.
    * <p>An ObjectFactory allows you to programatically
    * construct new instances of the Java representation
    * for XML content. The Java representation of XML
    * content can consist of schema derived interfaces
    * and classes representing the binding of schema
    * type definitions, element declarations and model
    * groups. Factory methods for each of these are
    * provided in this class.
    @XmlRegistry
    public class ObjectFactory {
    private final static QName PRODUCTDATAQNAME = new QName("", "PRODUCTDATA");
    * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: testing.jaxb
    public ObjectFactory() {
    * Create an instance of {@link Prd }
    public Prd createPrd() {
    return new Prd();
    * Create an instance of {@link Prdt }
    public Prdt createPrdt() {
    return new Prdt();
    * Create an instance of {@link JAXBElement }{@code <}{@link Prdt }{@code >}}
    @XmlElementDecl(namespace = "", name = "PRODUCTDATA")
    public JAXBElement<Prdt> createPRODUCTDATA(Prdt value) {
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value);
    2)Prdt.java
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.0 in JDK 1.6
    // See http://java.sun.com/xml/jaxb
    // Any modifications to this file will be lost upon recompilation of the source schema.
    // Generated on: 2008.06.23 at 04:09:25 PM IST
    package testing.jaxb;
    import java.util.ArrayList;
    import java.util.List;
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
    * <p>Java class for prdt complex type.
    * <p>The following schema fragment specifies the expected content contained within this class.
    * <pre>
    * <complexType name="prdt">
    * <complexContent>
    * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    * <sequence>
    * <element name="PRODUCT" type="{}prd" maxOccurs="unbounded"/>
    * </sequence>
    * </restriction>
    * </complexContent>
    * </complexType>
    * </pre>
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "prdt", propOrder = {
    "product"
    public class Prdt {
    @XmlElement(name = "PRODUCT", required = true)
    protected List<Prd> product;
    * Gets the value of the product property.
    * <p>
    * This accessor method returns a reference to the live list,
    * not a snapshot. Therefore any modification you make to the
    * returned list will be present inside the JAXB object.
    * This is why there is not a <CODE>set</CODE> method for the product property.
    * <p>
    * For example, to add a new item, do as follows:
    * <pre>
    * getPRODUCT().add(newItem);
    * </pre>
    * <p>
    * Objects of the following type(s) are allowed in the list
    * {@link Prd }
    public List<Prd> getPRODUCT() {
    if (product == null) {
    product = new ArrayList<Prd>();
    return this.product;
    3) Prd.java
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.0 in JDK 1.6
    // See http://java.sun.com/xml/jaxb
    // Any modifications to this file will be lost upon recompilation of the source schema.
    // Generated on: 2008.06.23 at 04:09:25 PM IST
    package testing.jaxb;
    import java.math.BigInteger;
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlAttribute;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
    * <p>Java class for prd complex type.
    * <p>The following schema fragment specifies the expected content contained within this class.
    * <pre>
    * <complexType name="prd">
    * <complexContent>
    * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    * <sequence>
    * <element name="PRODUCTNAME" type="{http://www.w3.org/2001/XMLSchema}string"/>
    * <element name="DESCRIPTION" type="{http://www.w3.org/2001/XMLSchema}string"/>
    * <element name="PRICE" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
    * <element name="QUANTITY" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/>
    * </sequence>
    * <attribute name="CATEGORY" type="{http://www.w3.org/2001/XMLSchema}string" />
    * <attribute name="PRODID" use="required" type="{}pid" />
    * </restriction>
    * </complexContent>
    * </complexType>
    * </pre>
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "prd", propOrder = {
    "productname",
    "description",
    "price",
    "quantity"
    public class Prd {
    @XmlElement(name = "PRODUCTNAME", required = true)
    protected String productname;
    @XmlElement(name = "DESCRIPTION", required = true)
    protected String description;
    @XmlElement(name = "PRICE", required = true)
    protected BigInteger price;
    @XmlElement(name = "QUANTITY", required = true)
    protected BigInteger quantity;
    @XmlAttribute(name = "CATEGORY")
    protected String category;
    @XmlAttribute(name = "PRODID", required = true)
    protected String prodid;
    * Gets the value of the productname property.
    * @return
    * possible object is
    * {@link String }
    public String getPRODUCTNAME() {
    return productname;
    * Sets the value of the productname property.
    * @param value
    * allowed object is
    * {@link String }
    public void setPRODUCTNAME(String value) {
    this.productname = value;
    * Gets the value of the description property.
    * @return
    * possible object is
    * {@link String }
    public String getDESCRIPTION() {
    return description;
    * Sets the value of the description property.
    * @param value
    * allowed object is
    * {@link String }
    public void setDESCRIPTION(String value) {
    this.description = value;
    * Gets the value of the price property.
    * @return
    * possible object is
    * {@link BigInteger }
    public BigInteger getPRICE() {
    return price;
    * Sets the value of the price property.
    * @param value
    * allowed object is
    * {@link BigInteger }
    public void setPRICE(BigInteger value) {
    this.price = value;
    * Gets the value of the quantity property.
    * @return
    * possible object is
    * {@link BigInteger }
    public BigInteger getQUANTITY() {
    return quantity;
    * Sets the value of the quantity property.
    * @param value
    * allowed object is
    * {@link BigInteger }
    public void setQUANTITY(BigInteger value) {
    this.quantity = value;
    * Gets the value of the category property.
    * @return
    * possible object is
    * {@link String }
    public String getCATEGORY() {
    return category;
    * Sets the value of the category property.
    * @param value
    * allowed object is
    * {@link String }
    public void setCATEGORY(String value) {
    this.category = value;
    * Gets the value of the prodid property.
    * @return
    * possible object is
    * {@link String }
    public String getPRODID() {
    return prodid;
    * Sets the value of the prodid property.
    * @param value
    * allowed object is
    * {@link String }
    public void setPRODID(String value) {
    this.prodid = value;
    Next step is to compile these three files
    So I am compiling these three files it gives me compiler error as:
    testing/jaxb/ObjectFactory.java:31: illegal character: \64
    @XmlRegistry
    ^
    testing/jaxb/ObjectFactory.java:63: illegal character: \64
    @XmlElementDecl(namespace = "", name = "PRODUCTDATA")
    ^
    testing/jaxb/ObjectFactory.java:65: <identifier> expected
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value
    ^
    testing/jaxb/ObjectFactory.java:65: <identifier> expected
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value
    ^
    testing/jaxb/ObjectFactory.java:65: '{' expected
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value
    ^
    testing/jaxb/Prdt.java:38: illegal character: \64
    @XmlAccessorType(XmlAccessType.FIELD)
    ^
    testing/jaxb/Prdt.java:39: illegal character: \64
    @XmlType(name = "prdt", propOrder = {
    ^
    testing/jaxb/Prdt.java:44: illegal character: \64
    @XmlElement(name = "PRODUCT", required = true)
    ^
    testing/jaxb/Prdt.java:45: <identifier> expected
    protected List<Prd> product;
    ^
    testing/jaxb/Prdt.java:69: <identifier> expected
    public List<Prd> getPRODUCT() {
    ^
    testing/jaxb/Prdt.java:75: ';' expected
    ^
    testing/jaxb/Prd.java:43: illegal character: \64
    @XmlAccessorType(XmlAccessType.FIELD)
    ^
    testing/jaxb/Prd.java:44: illegal character: \64
    @XmlType(name = "prd", propOrder = {
    ^
    testing/jaxb/Prd.java:52: illegal character: \64
    @XmlElement(name = "PRODUCTNAME", required = true)
    ^
    testing/jaxb/Prd.java:53: <identifier> expected
    protected String productname;
    ^
    testing/jaxb/Prd.java:54: illegal character: \64
    @XmlElement(name = "DESCRIPTION", required = true)
    ^
    testing/jaxb/Prd.java:55: <identifier> expected
    protected String description;
    ^
    testing/jaxb/Prd.java:56: illegal character: \64
    @XmlElement(name = "PRICE", required = true)
    ^
    testing/jaxb/Prd.java:57: <identifier> expected
    protected BigInteger price;
    ^
    testing/jaxb/Prd.java:58: illegal character: \64
    @XmlElement(name = "QUANTITY", required = true)
    ^
    testing/jaxb/Prd.java:59: <identifier> expected
    protected BigInteger quantity;
    ^
    testing/jaxb/Prd.java:60: illegal character: \64
    @XmlAttribute(name = "CATEGORY")
    ^
    testing/jaxb/Prd.java:61: <identifier> expected
    protected String category;
    ^
    testing/jaxb/Prd.java:62: illegal character: \64
    @XmlAttribute(name = "PRODID", required = true)
    ^
    testing/jaxb/Prd.java:63: <identifier> expected
    protected String prodid;
    ^
    25 errors
    I want all three files to compiled successfully.If it is compiled only then I will continue on Unmarshalling process

    I suspect you are trying to compile the files one by one. You may also be trying to compile them disregarding the package structure.
    From your post, I gather these files are in the package: com.geindustrial.sqms
    Therefore, if they are not so already, put them under a directory structure:
    com/geindustrial/sqms
    and then compile with:
    javac com/geindustrial/sqms/AddCtq.java com/geindustrial/sqms/Ctq.java com/geindustrial/sqms/VariableData.java
    (The above is all on one line.)
    HTH,
    Manuel Amago.

  • WSDL, custom datatypes, fault element name issues

    Hello all,
    I am having a LOT of problems with BEAs webservices. I am posting
    this here in the hope that someone can help me and tell me what I am
    doing incorrectly. I am running
    WebLogic Server 7.0 SP1 Mon Sep 9 22:46:58 PDT 2002 206753
    WebLogic XMLX Module 7.0 SP1 Mon Sep 9 22:54:41 PDT 2002 206753
    Background:
    My goal is to make my company's product web services aware. I take an
    EJB, try to run it through the standard ant tasks and generate a web
    services accessible EJB. Sounds pretty easy, but complex types seem
    to make this quite difficult.
    I have been able to create a web service accessible EJB (only since
    7.0.1), but I am quite unhappy with the quality of what I am able to
    produce.
    I have a datatype which acts as a key, but it does not follow the
    javabeans idiom - i.e. it does not have a default constructor or
    accessor methods and I am not in the position to change it. I have
    created a codec for this class which works and an xml schema (both by
    hand). Its name is AgentKey. I have also had to use the autotyper to
    create codecs and typemapping entries for java.util.Properties,
    I can connect using the WebLogic classes and I am now trying to
    interact using MS Excel and Apache's Axis as my test clients.
    Issues:
    My first question deals with generating a client. There seem to be
    two ways to generate a client. Firstly via the <client> subtask of
    <servicegen><service>, the second way via <clientgen> task. Since I
    am using a custom data type (AgentKey) I have to manually insert the
    AgentKey schema into the web-services.xml file generated by
    servicegen. When I try to generate a client via the
    servicegen/service/client task there is no opportunity for me to
    insert this datatype schema information and I therefore get the
    following messages (lots of them, but I'm only including one):
    [servicegen] WARNINIG: Unable to find a javaType for the xmlType:['java:net.agentis.apml.runtime']:AgentKey.
    Make sure that you have registered this xml type in the type mapping
    [servicegen] Using SOAPElement instead
    BTW: I am also receiving the same problem with java.util.Properties.
    BTW: WARNING is misspelt
    If I attempt to generate a client class via the <clientgen> task, I
    need to supply either a wsdl or ear file as a parameter. I cannot
    supply a wsdl file because I haven't deployed the EAR yet (and I don't
    want to until the EAR has the client classes in it), and I can't
    supply the EAR because I want the ear to include the client classes.
    It is a bit of a catch 22 situation. Is there a solution I can't see?
    NOTE: it would be very, very nice if you added a schemaMapping
    attribute to the <servicegen/service> task so the web-services.xml
    file didn't have to be manually hacked. Something similar to the
    typemapping attribute already in the servicegen/service task would do
    it.
    My next problem deals with the validity of the WSDL. I am seeing that
    the WSDL created has exceptions defined multiple times. I saw a
    message from Manjo saying that it looked like a bug. I agree and
    would like to get a copy of the patch. On a more significant note,
    when is either SP2 or 7.1 due for release?
    Another problem with the WSDL (once you have cleansed the multiple
    exception messages) is that the fault elements of the
    binding/operation elements require names and they don't have any. For
    example, this is straight from the deployed EJB WSDL file:
    <binding name="ExampleAgentPortSoapBinding" type="tns:ExampleAgentPort">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="serviceWithPrimitiveDatatypes">
    <soap:operation soapAction="" style="rpc"/>
    <input>
    <soap:body use="encoded" namespace="http://sillyurl.com/reallysilly"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </input>
    <output>
    <soap:body use="encoded" namespace="http://sillyurl.com/reallysilly"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </output>
    <fault>
    <soap:body use="encoded" namespace="http://sillyurl.com/reallysilly"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </fault>
    </operation>
    <operation ...
    The schema definition at http://schemas.xmlsoap.org/wsdl/ says the
    fault element require a name attribute:
    <complexType name =" tBindingOperationFault">
    <complexContent>
    <extension base="wsdl:tExtensibleDocumented">
    <attribute name="name" type="NCName" use="required"/>
    </extension>
    </complexContent>
    </complexType>
    The name of the fault should be the same name as the fault in the
    portType definition. In my example the name is "AgentisException" as
    evidenced by this snippet:
    <portType name="ExampleAgentPort">
    <operation name="serviceWithPrimitiveDatatypes">
    <input message="tns:serviceWithPrimitiveDatatypes"/>
    <output message="tns:serviceWithPrimitiveDatatypesResponse"/>
    <fault name="AgentisException" message="tns:AgentisException"/>
    </operation>
    Once these changes have been made then the WSDL will validate. Are
    there plans to fix these bugs?
    On a different note, when I try to interact with a method that uses a
    custom data type, such as AgentKey, via the "WebLogic Webservice
    standard testing home page" the custom data type without a default
    constructor cannot be rendered correctly. For instance, the AgentKey
    value is:
    <!-- Do not know how to create a sample instance for this part due to the following
    exception:java.lang.InstantiationException: net.agentis.apml.runtime.AgentKey.
    Pls replace this with the correct XML before invoking the service. --->
    <agentKey/>
    Since I can't deploy a valid WSDL, I can't get either Axis or Excel to
    connect to my web services.
    When I attempt to invoke Axis' (beta 1.1) wsdl2java I recieve the
    following message.
    java.io.IOException: ERROR: Fault is missing a name= attribute in operation
    "serviceWithPrimitiveDatatypes", in binding {http://sillyurl.com/reallysilly}ExampleAgentPortSoapBinding.
    This seems understandable considering the issues I mentioned earlier.
    Unfortunately Excel doesn't really give me anything to go with. If I
    type in the WSDL URI then it will give me a list of methods I can
    invoke, but if I try to add the service I get the very unhelpful "The
    Web Service References Tool could not generate the requested code.
    Any changes that were made to your project have been rolled back."
    Any help with those two issues would be greatly appreciated also.
    One final issue is that I cannot seem to fix is taskdef'ing
    <servicegen> properly from Ant. I can do the actual taskdef but then
    it cannot find classes from within the weblogic.jar. If I run the
    setExamplesEnv.cmd first the I don't need to do the taskdef and
    everything works fine. Has anyone else had this issue? (we can't run
    that command on our clients desktops before we build our build scripts
    - anyway, I've put it down to one of those weird Ant classpath
    issues.)
    In summary:
    Problems I can see and would like some help on are:
    - multiple exception messages
    - fault operations with no name
    - the ability to generate client code with complex data types before
    the EAR is deployed.
    Could the product team add
    - a clean way to add in schema datatypes without having to manually
    hack the web-services.xml file.
    I know this has been quite a long email, but it has been months in the
    making. Anyone's time would be greatly appreciated.
    Mark Mansour
    Agentis Software
    [email protected]

    Hi Mark,
    From your base post:
    My next problem deals with the validity of the WSDL. I am seeing that
    the WSDL created has exceptions defined multiple times. I saw a
    message from Manjo saying that it looked like a bug. I agree and
    would like to get a copy of the patch. On a more significant note,
    when is either SP2 or 7.1 due for release?I would recommend starting here with support since getting valid WSDL seems to be the root of most of
    your issues.
    Concerning the upcoming release, I believe it is scheduled for late this quarter; contact Michael
    ([email protected]) for more information.
    Also, at the bottom of this post:
    I would just like to see an automated way to do this (I've had to write my own
    utility to do this for me :(Does the autotype ant task help in this situation? Have you taken a look at this?
    http://e-docs.bea.com/wls/docs70/webserv/anttasks.html#1080062
    Thanks,
    Bruce
    Mark Mansour wrote:
    Hiya Bruce,
    I will try and get some time to follow this up with the support people too.
    In response:
    Problems I can see and would like some help on are:
    - multiple exception messages
    In your client code, you can set the following property to avoid the exceptionmessages so that the typemapping
    registry can be setup.
    //dont parse wsdl till we set the typemapping
    System.setProperty( "weblogic.webservice.servicenamechecking","false" );
    This is not a client issue. The WSDL is generating incorrect WSDL. Here is a
    little snippet :
    <message name="AgentisException" >
    <part name="AgentisException" xmlns:partns="http://www.w3.org/2001/XMLSchema"
    type="partns:string" />
    </message>
    <message name="setTraceLevel" >
    <part name="agentKey" xmlns:partns="java:net.agentis.apml.runtime" type="partns:AgentKey"
    />
    <part name="intVal" xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:int"
    />
    </message>
    <message name="AgentisException" >
    <part name="AgentisException" xmlns:partns="http://www.w3.org/2001/XMLSchema"
    type="partns:string" />
    </message>
    As you can see the AgentisException is defined twice (in my real WSDL it is redefined
    every time a method has the AgentisException in its interface (which in my case
    is 5 times))
    - fault operations with no nameI believe the fault issues that you have raised have been addressed in the upcomingrelease that will be
    available for beta testing shortly. Contact [email protected] if you
    want to participate in the beta.
    great. Is there any ETA on the final release date?
    - the ability to generate client code with complex data types before
    the EAR is deployed.
    There is an example to show how to do this: http://dev2dev.bea.com/direct/webservice/dyncmplx.zip
    Unfortunately this doesn't solve my problem. I still don't have an EAR or WSDL
    file from which I can generate a client to be included in the final EAR file that
    gets deployed to the server. My original post explains this a bit better.
    Could the product team add
    - a clean way to add in schema datatypes without having to manually
    hack the web-services.xml file.
    Take a look at http://dev2dev.bea.com/direct/webservice/wswa.html#qz50 and others
    in this area.
    This was more in reference to the building of the web services in the first place
    rather than registering custom datatypes at runtime. The manual procedure is
    documented at http://edocs.bea.com/wls/docs70/webserv/customdata.html#1058102,
    I would just like to see an automated way to do this (I've had to write my own
    utility to do this for me :(
    Hope this helps,
    Bruce
    Thanks Bruce.
    Mark

Maybe you are looking for

  • Can't start Help in PS CS5

    When I click on the Photoshop Help menu item, I get an Adobe Air error dialog with the text 'This installation of the application is damaged.  Try re-installing or contacting the publisher for assistance.' I've reinstalled but it didn't help. The con

  • V9 title tag not taking

    I had been adding title tags in v6 and using with Lightbox action to display the title on the bottom of the enlarged image. However, title tag does not seem to work in v9. Only way I've been able to do this is to add <a title="title here" href="image

  • Are there any way to get my iphone back ?

    My iphone 4S ios 7 was stolen today and it's offline in find my iphone, are there any chance i can get it back

  • LMS 3.2 dmtgd Startup Error

    Running on a Windows 2008 (with SP1) system.  The system was running properly until someone tried to run a script they had been using on the previous LMS 3.1 system.  Now the daemon manager will not start, and the dmgrDBg.log file has the following e

  • UMX - Can I setup Data Security in UMX similar to Security Rules?

    Hi; Is it possible to setup something similar to Security Rules in UMX? I would like to grant the same Role to different users, and assign these users different security. All my reading of UMX so far has pointed me to creating objects and granting se