DateFormat problem xsd

Hi all,
I have an ESB project in which there is a file adapter. This file adapter reads files from a folder applying this files an xsd.
In each file, there is a date which can be 22-FEB-2007 or 2-FEB-2007. The problem is the day, which can be a 1 digit number or a 2 digit number.
In the xsd file, I have defined the date element like this:
<xsd:element name="FechaFin" type="xsd:dateTime" nxsd:skipMode="before"
nxsd:skip="20" nxsd:dateFormat="dd-MMM-yyyy hh:mm"
nxsd:localeLanguage="es" nxsd:style="terminated"
nxsd:terminatedBy="${eol}">
</xsd:element>
So, it works all right when the date in the source file is 22-FEB-2007, but gives an unparseable error when the date in the source file is 2-FEB-2007.
I tried doing this:
<xsd:element name="FechaFin" type="xsd:dateTime" nxsd:skipMode="before"
nxsd:skip="20" nxsd:dateFormat=’"d-MMM-yyyy hh:mm” | “dd-MMM-yyyy hh:mm"’
nxsd:localeLanguage="es" nxsd:style="terminated"
nxsd:terminatedBy="${eol}">
</xsd:element>
which again gave an unparseable error.
And also tried this:
<xsd:element name="FechaIni"
nxsd:skip="19" nxsd:skipMode="before"
nxsd:localeLanguage="es" nxsd:style="fixedLength"
nxsd:length="17">
<xsd:simpleType>
<xsd:restriction base="xsd:dateTime">
<xsd:pattern
value="([0-3])?[0-9][-][A-Z][A-Z][A-Z][-][0-2][0-2][0-9][0-9]"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
This works, I mean, the file adapter reads the file and gets the date but the element is a string, so, when i try to save that date in the database, it saves a wrong date. (string saved as date gives a wrong result)
I also tried reading the date as a string, and after that, converting that string in a dateTime type in the xsl mapping file. But again didn't work. The date gets read as a string ok, and then in the mapping file the result is a blank element.
Does anybody know how can I solve this problem? I really need help, don't know what else to do...
Thanks a lot in advance.
Zaloa

Hi again,
I tried to solve the dates problem using a simpleType definition with a union element inside. This way, it would be possible to parse one format or another, right? So this is what I wrote:
<xsd:element name="FechaIni" type="tipoFecha" nxsd:skip="19"
nxsd:skipMode="before"
nxsd:localeLanguage="es" nxsd:style="fixedLength"
nxsd:length="17">
</xsd:element>
<xsd:simpleType name="tipoFecha">
<xsd:union>
<xsd:simpleType nxsd:dateFormat="dd-MMM-yyyy hh:mm">
<xsd:restriction base="xsd:dateTime">
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType nxsd:dateFormat="d-MMM-yyyy hh:mm">
<xsd:restriction base="xsd:dateTime">
</xsd:restriction>
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
With this, if the file has 22-FEB-2007 or 2-FEB-2007, is read ok. The problem is that nxsd:dateFormat is not working in the simpleType element.I mean, the date is read as a string.
Does anybody now how to solve this? Or where can I find nxsd:dateFormat documentation?
Please, I need help with this. Thanks anyway,
Zaloa
Message was edited by:
Zaloa

Similar Messages

  • DateFormat problem in xsd

    Hi all,
    I have an ESB project in which there is a file adapter. This file adapter reads files from a folder applying this files an xsd.
    In each file, there is a date which can be 22-FEB-2007 or 2-FEB-2007. The problem is the day, which can be a 1 digit number or a 2 digit number.
    In the xsd file, I have defined the date element like this:
    <xsd:element name="FechaFin" type="xsd:dateTime" nxsd:skipMode="before"
    nxsd:skip="20" nxsd:dateFormat="dd-MMM-yyyy hh:mm"
    nxsd:localeLanguage="es" nxsd:style="terminated"
    nxsd:terminatedBy="${eol}">
    </xsd:element>
    So, it works all right when the date in the source file is 22-FEB-2007, but gives an unparseable error when the date in the source file is 2-FEB-2007.
    I tried doing this:
    <xsd:element name="FechaFin" type="xsd:dateTime" nxsd:skipMode="before"
    nxsd:skip="20" nxsd:dateFormat=’"d-MMM-yyyy hh:mm” | “dd-MMM-yyyy hh:mm"’
    nxsd:localeLanguage="es" nxsd:style="terminated"
    nxsd:terminatedBy="${eol}">
    </xsd:element>
    which again gave an unparseable error.
    And also tried this:
    <xsd:element name="FechaIni"
    nxsd:skip="19" nxsd:skipMode="before"
    nxsd:localeLanguage="es" nxsd:style="fixedLength"
    nxsd:length="17">
    <xsd:simpleType>
    <xsd:restriction base="xsd:dateTime">
    <xsd:pattern
    value="([0-3])?[0-9][-][A-Z][A-Z][A-Z][-][0-2][0-2][0-9][0-9]"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    This works, I mean, the file adapter reads the file and gets the date but the element is a string, so, when i try to save that date in the database, it saves a wrong date. (string saved as date gives a wrong result)
    I also tried reading the date as a string, and after that, converting that string in a dateTime type in the xsl mapping file. But again didn't work. The date gets read as a string ok, and then in the mapping file the result is a blank element.
    Does anybody know how can I solve this problem? I really need help, don't know what else to do...
    Thanks a lot in advance.
    Zaloa

    Hi again,
    I tried to solve the dates problem using a simpleType definition with a union element inside. This way, it would be possible to parse one format or another, right? So this is what I wrote:
    <xsd:element name="FechaIni" type="tipoFecha" nxsd:skip="19"
    nxsd:skipMode="before"
    nxsd:localeLanguage="es" nxsd:style="fixedLength"
    nxsd:length="17">
    </xsd:element>
    <xsd:simpleType name="tipoFecha">
    <xsd:union>
    <xsd:simpleType nxsd:dateFormat="dd-MMM-yyyy hh:mm">
    <xsd:restriction base="xsd:dateTime">
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType nxsd:dateFormat="d-MMM-yyyy hh:mm">
    <xsd:restriction base="xsd:dateTime">
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:union>
    </xsd:simpleType>
    With this, if the file has 22-FEB-2007 or 2-FEB-2007, is read ok. The problem is that nxsd:dateFormat is not working in the simpleType element. I mean, the date is read as a string.
    Does anybody now how to solve this? Or where can I find nxsd:dateFormat documentation?
    Please, I need help with this. Thanks anyway,
    Zaloa
    Message was edited by:
    zaloa

  • HUGE PROBLEM: xsd:import generates invalid WSDL during deploy (11.1.1.3.0)

    Hi,
    I have a big problem:
    if I create a bpel/mediator based on XSDs that use xsd:import, like this:
    <xsd:import schemaLocation="./Generic.xsd" namespace="http://test.mydomain.com/test/Generic"/>
    when i deploy, I get an error trying to test the service using oracle EM.
    THe error looks like:
    Either the WSDL URL is invalid or the WSDL file is not valid or incorrect. - java.io.IOException: WSDLException: faultCode=OTHER_ERROR: Lettura di WSDL da http://dev-oraclevmmac:8001/soa-infra/services/default/TestSOAProject/bpelprocess2_client_ep?XSD=./xsd/Test.xsd non riuscita: WSDL non trovato
    What can I do ?

    Yes, of course XSD and WSDL are valid inside JDev. I validated them also using XMLSpy.
    The problem is that the WSDL becomes invalid through deployment.
    But, after some hour of investigation, I've come to a solution: I have to puth the ABSOLUTE PATH ('relative' to the .bpel file) inside each xsd:import and inside wsdls.
    So, my example is now:
    <xsd:import schemaLocation="../xsd/Generic.xsd" namespace="http://test.mydomain.com/test/Generic"/>

  • DateFormat  Problem by "recycling" legacy systems

    Folks,
    Congratulations to the Jheadstart development team!
    Now I am traing to "recycle" a legacy system and have problems with the German DateFormat 01.03.2005 and the expected dd-MMM-yyyy DateFormat...
    What should I do?
    Regards
    Boris

    Boris,
    When you generate an application with JHeadstart, you can specify the desired date format in the Application Structure File, at Service level.
    See also the JHeadstart Developer's Guide, Chapter 5, and look for date format. It tells you how to specify different formats for different languages.
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • OWSM GATEWAY PROBLEM .xsd error

    Hi,
    I am working on OWSM gateways.I deployed a mail web service and tried to virtualise it using OWSM gateways. I have registered the service . When i use the link for service wsdl generated by OWSM in internet explorer i can see the wsdl file but when do the same using test page in OWSM i get the following error.
    java.io.IOException: The document 'http://localhost:8888/gateway/services/alshirawiMail.xsd' contains HTML tags.
    Also i have only tried with web services but when i try to virtualise THE WHOLE BPEL PROCESS i get error like
    java.io.IOException: The document 'http://localhost:8888/gateway/services/rule_doesnot_work.xsd' contains HTML tags.
    Please reply.
    Thanks and regards.
    Vishnu
    Message was edited by:
    user607746

    Hi
    The problem with xsd resolved but now when i invoke the service from test page i am getting this error.
    <env:Envelope
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">null
    <env:Body>
    <env:Fault
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <faultcode>env:Server</faultcode>
    <faultstring>ORABPEL-08021 Cannot find partner wsdl. parnterLink "OWSM_SYNC_BPEL_PROCESS" is not found in process "OWSM_SYNC_BPEL_PROCESS" (revision "1.0") Please check the deployment descriptor of the process to find the correct partnerLink name. </faultstring>
    null</env:Fault>
    </env:Body>
    </env:Envelope>

  • Dateformat Problems

    I'm getting a wierd problem with dateformat, coldfusion
    version 6,1. I just installed the updater as well, but not sure if
    I now need to run it, or how to run it. There were mentions of this
    problem in the updater fixes, so it might well be down to that.
    If I need to run the updater can someone tell me how?
    Here's the issue anyway
    Can anyone tell me why this dateformat string works
    #DATEFORMAT("Mon, 23 Oct 2006 07:04 CDT", "m/d/")#
    I get 10/23
    While this one
    #DATEFORMAT("Wed, 18 Oct 2006 07:40 CDT", "m/d/")#
    gives me this java error
    Parameter validation error for function DATEFORMAT.
    The value of the parameter 1, which is currently "Wed, 18 Oct
    2006 07:40 CDT", must be a class java.util.Date value.
    I'm ouputting some dates from an rss feed and some dates
    work, and some don't, while they are all in the same format?
    Any help will be greatly appreciated.

    > The value of the parameter 1, which is currently "Wed,
    18 Oct 2006 07:40 CDT",
    Right. "Wed, 18 Oct 2006 07:40 CDT" is a string...
    > must be a class java.util.Date value.
    ... not a java.util.Date. So that explains the error.
    Although the error
    pretty much did that too ;-)
    As per
    http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000441.htm,
    dateFormat() does not take a string as its first argument, it
    takes a date.
    I suggest you attempt to parse your string with
    parseDateTime():
    http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000594.htm
    Then you can use the result in dateFormat().
    Adam

  • ThinGraph timezone / dateFormat problem

    Hey,
    We're using BI Beans to display history statistics concerning security attacks/issues per day. Normally, the X-axis looks like this (dots act like spaces):
    18....21....24....27....30....02....05....08....11....14
    Oct 10............................Nov............................
    A customer of ours complained last week about his graph labels on the X-axis to be displayed incorrectly. They sent a screenshot displaying the labels like this (*vertically* aligned underneath the X-axis, dots act like spaces):
    2010-....2010-....2010-....2010-....2010-....2010-....
    We were thinking this had to do with the daylight saving time switch of last week, so we started to investigate why especially this customer had problems and the others didn't. Then we saw that the Java timezone was set to Australia/Sydney instead of our software's default Etc/GMT. That seemed to be causing the problem described here. It appears that the Tasmanian timezone is the only Australian Timezone that shows the X-axis labels correctly.
    We currently changed the customer's timezone to the one above, but what could be causing the dateFormat to be displayed incorrectly? It seems the Date objects are just printed out as 2010-10-18 hh:ss (only the '2010-' part is visible on the graph), instead of actually formatting them.
    I already did a search on Google and this forum, but I can't seem to find any thread concerning the problem we have.
    The version of the library we're using (and this in a Java 1.5 environment):
    ComponentBuildVersion=3.2.2.0.24.2
    ComponentBuildMode=nondebug
    Copyright=Copyright ¬ 2001, 2005, Oracle. All rights reserved.
    ComponentNumber=10.1.2.67.0
    ReleaseDescription=BI Beans 10.1.2 Production Release
    We're not actually defining a custom dateFormat in our XML configuration. We only use the predefined Oracle constants, which have always worked up until now, for the default timezone:
    <Graph version="3.2.0.22" name="Graph" ... timeAxisTimeFormat="NONE" timeAxisDayFormat="AUTOMATIC" timeAxisMonthFormat="MONTH_SHORT" timeAxisYearFormat="YEAR_SHORT" graphType="LINE_VERT_ABS">
    Anyone else had this problem?
    Thanks and kind regards,
    Jeroen

    If you're in the states that value is probably correct. What you are looking at is the date and time "01 Jan 70 00:00:00 GMT" translated into your own time zone.
    That's what 0 epoch time means.
    If you want "now" do
    Timestamp = new Timestamp(System.currentTimeMillis());

  • DateFormat problem

    Hi,
    I have the input date in my csv file as a string and I was able to convert into into the required format which is: "YYYY-MM-DDTHH:MI:SS"
    The problem when when my input date is in the format 01/22/2009 it works fine but when I have the date as 1/22/2009 or a 1/3/2009, it fails to transform (i.e., when MM and DD just M and D for single digit months and days).
    Can anyone please help me on how can I convert the input string to MM/DD/YYYY before I convert it to the required format.
    Thanks and appreciate your help
    -Prapoorna

    Hi,
         You can use nested substring Xpath functions and concat all these strings to form your standard format. I was facing similar problem to convert date from YYYY/MM/DD 00:00:00 to YYYY-MM-DDThh:mm:ss format.
         I have use the below mentioned code to convert the date format where $date is the input date variable.
    <db:P_X_DATE_FROM>
    <xsl:value-of select='concat(substring($date,1.0,4.0),"-",substring($date,6.0,2.0),"-",substring($date,9.0,2.0),"T",substring($date,12.0,8.0))'/>
    </db:P_X_DATE_FROM>
         I think you have to do the reverse thing here. You have to take two characters for both DD and MM incase of ‘01/22/2009’. In case of ‘1/22/2009’ or ‘11/3/2008’ you should take only one character.
         I think this information can help you.
    Thanks & Regards,
    Jyotirmoy.

  • A dateformat problem!

    A date may be represented in the form : yyddd.
    For example, a date 01035 would represent 4 February, 2001, while 99365 would represent 31 December 1999.
    how can i write a Java prog which takes an integer parameter in the above form and returns the date as a String in the ddmmyy form?
    can any one pls give me a solution for that?

    A date may be represented in the form : yyddd.
    For example, a date 01035 would represent 4 February,
    2001, while 99365 would represent 31 December 1999.
    how can i write a Java prog which takes an integer
    parameter in the above form and returns the date as a
    String in the ddmmyy form?
    can any one pls give me a solution for that?Check out the SimpleDateFormat Class
    http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    An input format of yyDDD and an output format of ddMMyy seems reasonable
    Good Luck
    Lee

  • Error while generating proxy

    Hi everyone ,
    I am trying to create client proxy in SAP(directly calling webservice, not via XI) but getting this error:
    (WSDL is after error)
    <?xml version="1.0" encoding="utf-8" ?>
    - <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    - <asx:values>
    <SYSTEMFAULT href="#o139" />
    </asx:values>
    - <asx:heap xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:abap="http://www.sap.com/abapxml/types/built-in" xmlns:cls="http://www.sap.com/abapxml/classes/global" xmlns:dic="http://www.sap.com/abapxml/types/dictionary">
    - <cls:CX_AI_SYSTEM_FAULT id="o139">
    - <CX_ROOT>
    <TEXTID>F63AFF63DBE4BB4786A7F52CC4167145</TEXTID>
    <PREVIOUS />
    <KERNEL_ERRID />
    - <INTERNAL_SOURCE_POS>
    <PROGID>186</PROGID>
    <CONTID>993</CONTID>
    </INTERNAL_SOURCE_POS>
    </CX_ROOT>
    <CX_STATIC_CHECK />
    - <CX_AI_SYSTEM_FAULT>
    <CODECONTEXT>http://www.sap.com/xml_errorcodes</CODECONTEXT>
    <CODE>SOAP:112</CODE>
    <ERRORTEXT>no extended error message (SOAP_ESERVER)</ERRORTEXT>
    <LANGUAGE />
    </CX_AI_SYSTEM_FAULT>
    </cls:CX_AI_SYSTEM_FAULT>
    </asx:heap>
    </asx:abap>
    using this WSDL :
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:soapenc="http://schemas.xmlsoap.org/encoding/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:s0="http://thrdt2:8079/wsdl/CustomerSearchService"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    targetNamespace="http://thrdt2:8079/wsdl/CustomerSearchService">
        <types>
            <s:schema targetNamespace="http://thrdt2:79/wsdl/CustomerSearchService">
                <s:element name="FaultAdvice">
                    <s:complexType>
                        <s:sequence>
                            <s:element name="FaultMsg" type="s:string"/>
                        </s:sequence>
                    </s:complexType>
                </s:element>
                <s:element name="CustomerSearch">
                    <s:complexType>
                        <s:sequence>
                            <s:element name="InputMsg" type="s:string"/>
                        </s:sequence>
                    </s:complexType>
                </s:element>
                <s:element name="CustomerSearchResponse">
                    <s:complexType>
                        <s:sequence>
                            <s:element name="OutputMsg" type="s:string"/>
                        </s:sequence>
                    </s:complexType>
                </s:element>
            </s:schema>
        </types>
        <message name="CustomerSearch">
            <part name="parameters" element="s0:CustomerSearch"/>
        </message>
        <message name="CustomerSearchResponse">
            <part name="parameters" element="s0:CustomerSearchResponse"/>
        </message>
        <portType name="CustomerSearchService_portType">
            <operation name="CustomerSearch" >
                <input name="input" message="s0:CustomerSearch"/>
                <output name="output" message="s0:CustomerSearchResponse"/>
            </operation>
        </portType>
        <binding name="CustomerSearchService_Binding" type="s0:CustomerSearchService_portType">
            <binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
            <operation name="CustomerSearch">
                <operation soapAction="CustomerSearch" style="document"/>
                <input>
                    <soap:body use="literal" />
                </input>
                <output>
                    <soap:body use="literal" />
                </output>
            </operation>
        </binding>
        <service name="CustomerSearchService">
            <port name="CustomerSearchService_Port" binding="s0:CustomerSearchService_Binding">
                <soap:address location="http://thrdt2:80/CustomerSearchService"/>
            </port>
        </service>
    </definitions>
    What could be the problem in WSDL which SAP couldnot handle????
    thanks,
    Pranav

    in the above wsdl this line is what causing the problem
    <xsd:schema targetNamespace="http://apnnain:8079/xsd/HelloWorldService"d>
    whats that extra d?
    is this a typo ?
    Raja

  • JAXB unmarshalling elements with xs:type explicitly set

    I am working with XML content where the XSD defines an element as being of a complexType (say "ParentType") but the content explicitly sets the element's xs:type attribute to an extension of that complexType (say "ChildType").
    As far as I can tell the XML is valid, but JAXB issues the following when unmarshalling:
    DefaultValidationEventHandler: [ERROR]: Unexpected element {}:child1
    javax.xml.bind.UnmarshalException: Unexpected element {}:child1
    Where <child1> is added via the extension.
    Is this a problem with JAXB or my XSD?
    (XSD and XML enclosed below)
    XSD ------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:complexType name="ParentType">
    <xs:sequence>
    <xs:element name="parent1" type="xs:string"/>
    <xs:element name="parent2" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="ChildType">
    <xs:complexContent>
    <xs:extension base="ParentType">
    <xs:sequence>
    <xs:element name="child1" type="xs:string"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:element name="root">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="child" type="ParentType"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    XML -----------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="problem.xsd">
    <child xsi:type="ChildType">
    <parent1/>
    <parent2/>
    <child1/>
    </child>
    </root>

    JAXB doesn't handle OO schema design. I tried to do something similar where I defined a type called base and then defined that my document contained 1 or more base elements. Then I tried to unmarshall a document that contained elements that were of types extending from base. I ended up with the same issue.
    It seems that when the xjc compiler defines the classes it isn't smart enough to realize the element defined as parent could also contain a child element since child extends parent. Your XSD and XML are valid.
    I would think that JAXB should identify that because there is a type the extends the defined type, that an element of the sub-type might be subsituted i.e. check the actual type of the element in the XML before attempting to unmarshall it as the default type. It doesn't do that. I am not sure if this is as desinged, or a flaw in the implementation.

  • JAXB compiler error : Complex Type Definition Representation Error

    Hi,
    I have a problem when I try to generate Java classes for the XML Digital Signature schema along with the XAdES extension. Apparently, we got an XML validation issue when the XAdES schema is parsed.
    Here is the xjc tool ouput :
    [ERROR] src-ct.1: Complex Type Definition Representation Error for type 'IdentifierType'.  When complexContent is used, the base type must be a complexType.
      line 33 of XAdES.xsd
    [ERROR] src-ct.1: Complex Type Definition Representation Error for type 'EncapsulatedPKIDataType'.  When complexContent is used, the base type must be a complexType.
      line 57 of XAdES.xsdNow these are the schema lines from XAdES.xsd that cause the problem :
    <xsd:complexType name="IdentifierType">
      <xsd:complexContent>
        <xsd:extension base="xsd:anyURI">
          <xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
        </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="EncapsulatedPKIDataType">
      <xsd:complexContent>
        <xsd:extension base="xsd:base64Binary">
          <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
        </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>The most disturbing thing is that those two schemas I used (e.g. xmldsig-core-schema.xsd and XAdES.xsd) come directly from the W3C, so they should be fully compliant to the XML schema spec, shouldn't they ?
    Moreover, I tried to validate these two schemas with XML Spy 4.3 and the problem occurs in slightly different way. In fact, the <xsd:complexContent> tags are replaced silently by XML Spy with <xsd:simpleContent> tags in order to validate the schema. So XML Spy seems to have a problem too with these complex type definitions. Besides, if I replace the <xsd:complexContent> tags the same way as XML Spy does, and if I run again the JAXB compiler, it works fine...
    Does anyone have any knowledge about this issue ? I'd like very much to hear about anyone who has experienced or better solved the same kind of issue.
    By the way, here is the version of JAXB that I use :
    xjc version "1.0.2-b15-fcs"
    JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build 1.0.2-b15-fcs)Any help appreciated.
    Thanks,
    Gregory

    <xsd:extension base="xsd:anyURI">
    <xsd:extension base="xsd:base64Binary">
    The base attribute of the xs:extension elements shoule refer to a complexType.
    For example,
    <xs:complexType name="complexTypeA">
    </xs:complexType>
    <xsd:complexType name="IdentifierType">
    <xsd:complexContent>
    <xsd:extension base="complexTypeA">
    <xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>

  • DB Insert failed through JDBC Adapter

    Hi all,
    My system is on the latest patches of XI3.0 SP9. I am trying to insert some records into a database through JDBC adapter. The XML arriving at JDBC adapter is:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns:MaterialDataUpdate_Msg xmlns:ns="http://acsis.com/ManufacturingManagement">
    <MaterialData>
    <TMP_MAT_SERIAL action="INSERT">
      <table>TMP_MAT_SERIAL</table>
      <access>
      <MATNO>0000000012</MATNO>
      <BATCH>32151</BATCH>
      <ITM_SERIAL>453176587769</ITM_SERIAL>
      <WEIGHT>12.34</WEIGHT>
      <T_TIME>2005-01-21 13:21:34.432</T_TIME>
      </access>
      </TMP_MAT_SERIAL>
      </MaterialData>
      </ns:MaterialDataUpdate_Msg>
    The connection to the database looks ok. My JDBC adapter config is pointing to "jdbc:microsoft:sqlserver://sapsrv03:1433;databaseName=JDE".
    In rwb, I got the following error:
    Unable to execute statement for table or stored procedure. "TMP_MAT_SERIAL" due to java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'TMP_MAT_SERIAL'.
    I have checked the database "JDE", and the table 'TMP_MAT_SERIAL' does exist.
    Does anyone have any idea about this error?
    Thanks a lot for helping!
    Hart

    Hi Hart Liu,
    My system is on the latest patches of XI3.0 SP9. I am trying to insert some records into a database through JDBC adapter.
    We have been facing with problem XSD structure in the jdbc side. We r manually created XSD structure. In the adapter engine we don’t have any action item. In u r mail
    U r structure contains action attribute.
    Can u plz help me out to generate the right XSD structure?
    We have one more doubt, is there any automatically structure-generated option? plz let us know.......
    We r waiting for u r reply....
    Plz help me!!!!!!!!
    Regards,
    Anil

  • LSX-00344: namespace  values differ

    Hello
    I’am trying to implement a repository for LOM metadata (imsproject.org), the main schema imports from this one (only showing relevant parts) :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://www.w3.org/XML/1998/namespace"
    xmlns:xsd=http://www.w3.org/2001/XMLSchema elementFormDefault="unqualified" version="1.1">
         <xsd:annotation>
              <xsd:documentation>In namespace-aware XML processors, the "xml" prefix is bound to the namespace name http://www.w3.org/XML/1998/namespace.</xsd:documentation>
              <xsd:documentation>Do not reference this file in XML instances</xsd:documentation>
         </xsd:annotation>
         <xsd:attribute name="lang" type="xsd:language">
              <xsd:annotation>
                   <xsd:documentation>Refers to universal XML 1.0 lang attribute</xsd:documentation>
              </xsd:annotation>
         </xsd:attribute>
    </xsd:schema>
    The main then schema imports the "http://www.w3.org/XML/1998/namespace" namespace (also a simplified version):
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://www.imsglobal.org/xsd/simple" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xdb="http://xmlns.oracle.com/xdb"
    xmlns="http://www.imsglobal.org/xsd/simple" elementFormDefault="qualified" version="1.2">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://nautilus:8080/home/DEV/xsd/ims_xml.xsd"/>
    These two schemas are registered, but when I try to validate an instance, an error is raised:
    DECLARE
    v_xml XMLTYPE;
    BEGIN
    v_xml := XMLTYPE.createXML('<lom
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://www.imsglobal.org/xsd/simple"
    xsi:noNamespaceSchemaLocation="http://nautilus:8080/home/DEV/xsd/simple.xsd">
    <description> <langstring xml:lang="en">Metadata is information about an
    object, be it physical or digital. As the number of objects grows
    lack of information or .</langstring> <langstring xml:lang="nl">Metadata is informatie over een object. Het kan hierbij gaan om. </langstring></description>
    </lom>','http://nautilus:8080/home/DEV/xsd/simple.xsd');
    v_xml.SchemaValidate();
    END;
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00344: namespace values "http://www.imsglobal.org/xsd/simple" and "" differ
    ORA-06512: at "SYS.XMLTYPE", line 333
    ORA-06512: at line 17
    Reading the info on this error it says:
    “Cause: The targetNamespace specified in the schema document differed from either:”
    1)     “The value of the namespace attribute identified in the import element information item.”
    I think it’s not the problem:
    <xsd:schema targetNamespace="http://www.w3.org/XML/1998/namespace"
    xmlns:xsd=http://www.w3.org/2001/XMLSchema elementFormDefault="unqualified" version="1.1">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://nautilus:8080/home/DEV/xsd/ims_xml.xsd"/>
    2)     The value of the enclosing schema's namespace attribute
    <xsd:schema targetNamespace="http://www.w3.org/XML/1998/namespace"
    xmlns:xsd=http://www.w3.org/2001/XMLSchema elementFormDefault="unqualified" version="1.1">
    Here is the problem and questions,
    I have tried with no success (in ims_xml.xsd ):
    xmlns:xml="http://www.w3.org/XML/1998/namespace
    xmlns="http://www.w3.org/XML/1998/namespace
    The question is: Both schemas must be of the same targetNamespace?
    Any help is welcome
    Thanks in advance
    Mario Garcia

    Playing around with XMLSpy, I created this doc, and with the auto-generated attributes worked fine.
    But in XMLSpy the first document also worked.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <lom xmlns="http://www.imsglobal.org/xsd/simple" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/simple http://nautilus:8080/home/DEV/xsd/simple.xsd">
    - <description>
    <langstring xml:lang="en">What's UP?</langstring>
    <langstring xml:lang="es">¿Que onda?</langstring>
    </description>
    </lom>

  • Unable to Generating a proxy class for the Enterprise Service

    Hi ,
    I  am trying to consuming an SAP  XI Web
    Service in Visual Studio 2005. I followd this document <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3057b5a7-99d0-2910-8f8f-f357dc4b70b5">Consume ES Workplace Enterprise Services with Microsoft .Net 2.0 and Visual Studio .Net 2005:</a>.
    While try to create a Proxy Class for the WSDL  file(XI)  using wsdl.exe tool it shows the error  like this "There is an error in XML document -Value cannot be null Parameter name:name".
    If there  any way to pass the parameter  through wsdl.exe tool .
    Regards,
    Malini.V

    Check for unnecessary spaces in the WSDL file. Especially in xsd:union tags.
    I had the following problem:
    <xsd:union memberTypes=" xsd:time genericTime" ...
    Correct:
    <xsd:union memberTypes="xsd:time genericTime" ...
    and WSDL.exe was able to generate the proxy class code.
    Kind regards
    Holger

Maybe you are looking for

  • DI API - Goods Receipt (OIGN) - HOWTO Set Price List ?

    Hi everyone, I want to create a Goods Receipt Document via DI API Documents doc = (Documents)cmp.GetBusinessObject(BoObjectTypes.oInventoryGenEntry); I set doc.DocDate of the document header, and doc.Lines.ItemCode, doc.Lines.Quantity of document lin

  • "Java-Bean: True" missing after being packed in jar file

    Hi All X86, Windows XP Professional, J2SDK 1.4.2 I complied a section of code ", which is from << Thinking In Java>>(3rd). Created a manifest file "BangBean.tmp" << Name: bangbean/BangBean.class Java-Bean: True >> And then packed class files into "Ba

  • Does not appear

    When I plug my Ipod into the computer, it does not appear anywhere on the computer, not even in itunes. I ahev tried looking in most places but nothing happens except that sound when you connect and disconnect it. Any suggestions?

  • 100% height not working in Internet Explorer

    I'm using the following CSS code to have a verticle div tag stretch down the left side: }#leftbar { background-color: #2E4A72; height: 100%; width: 180px; border-right-width: 1px; border-right-style: solid; border-right-color: #FFFFFF; position: abso

  • ANALYSIS method for CCh(ChannelName,StatValueIndex)?

    Hi, I am trying to compute a simple mean of a channel and usually use CCh(ChannelName,StatValueIndex), where StatValueIndex = 0.  Is this available somewhere on the DIAdem ANALYSIS panel?  Thank you! Julia