Missing xsi:type, invalid xml generated, jaxb 1.6

Hi,
i've this XML Schema defined for my doc/lit web service:
<complexType name="CasDataType">
  <sequence>
    <element name="key"  type="long"  nillable="false  minOccurs="1" maxOccurs="1"/>
  </sequence>
</complexType>
<complexType name="AddressDataType">
  <complexContent>
    <extension base="tns:CasDataType">
      <sequence>
        <element name="FirstName"  nillable="true" minOccurs="0" type="string"/>
        <element name="LastName"  nillable="true" minOccurs="0" type="string"/>
      </sequence>
    </extension>
  </complexContent>
</complexType>If i create a AddressDataType and return it with my web service, the jaxb-marshaller generates this xml code:
<casDataTypes>
      <key>123</key>
      <FirstName>Ingo</FirstName>
      <LastName>Siebert</LastName>
</casDataTypes>But correct would be this:
<casDataTypes xsi:type="AddressDataType" >
      <key>123</key>
      <FirstName>Ingo</FirstName>
      <LastName>Siebert</LastName>
</casDataTypes>Is this error already known?
Is it fixed with jaxb 2.0?
I doesn't like annotations, is it possible with jaxb 2.0 (XJC task) to geneate files without annotations?
Cheers,
Ingo

Not got a single answer , surprise whether the question is too dumb to ask or JAXB doesn't support feature or my requirement is weird :-) ... in any case let me know please
regards

Similar Messages

  • Invalid XML generated

    I thought I was figuring this stuff out, but I guess not. I've generated an xml
    instance using xmlBeans. When I check it with the validate() method, it comes
    back 'true' or valid. But if I run the Xerces sample app, counter, against it,
    I get the following errors:
    java sax.Counter -v output.xml[Error] output.xml:2:14: Document is invalid: no grammar found.
    [Error] output.xml:2:14: Document root element "ns1:Envelope", must match DOCTYP
    E root "null".
    output.xml: 280 ms (22 elems, 0 attrs, 0 spaces, 343 chars)
    I've attached the xml file I generated using:
    InputStream IS = envelope.newInputStream(xo);
    FileOutputStream FOS = new FileOutputStream("output.xml");
    byte[] transfer = new byte[2048];
    int count = 0;
    while ( ( count = IS.read(transfer)) != -1 )
    FOS.write(transfer, 0, count);
    Ken.
    [output.xml]

    For some reason when I use MapForce tool to generate my xslt mapping source, it is generating the following statement in the xsl file.
         <xsl:namespace-alias stylesheet-prefix="n" result-prefix="#default"/>
    So at the root element of XML file, it is replacing the character n with '#default' for some reason, I don;t know the purpose of this.
    As you suggested, I changed the name space, still I experienced same problem.
    It is now resolved after removing the above xsl statement from the xsl file before creating/uploading the relevant zip file into archives folder.
    It works fine now. Thanks for the clue.

  • Xsi:type information is missing after Marshalling in JAXB

    Hi,
    I'm trying to mock the webservice, i have created classes for schema using JAXB (without any customization) and it's working. But when i try to marhsall my objects , it doesn't generate the xsi:type information of any element and attribute. I want this information since my webservice client needs this information.
    I have tried to use mapSimpleTypeDef ="true" generateElementProperty="false" but it doesn�t help.
    Following is output of marshal process
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <MessageRetrieveResponseReturn xmlns:java="java:types.api.brokerapi.soap.mms"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <return>
         <APIVersion>1.0</APIVersion>
         <ErrorCode>1000</ErrorCode>
         <ErrorInfo> Success</ErrorInfo>
         <BillingInfo xsi:type="java:BillingInfoObject" xsi:nil="true"/>
              <HeaderInfo xsi:type="java:HeaderInfoType" xsi:nil="true"/>
              <Content xsi:type="java:MessageContentType" xsi:nil="true"/>
              </return>
    </MessageRetrieveResponseReturn>
    I want output to be look like following
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <MessageRetrieveResponseReturn xmlns:java="java:types.api.brokerapi.soap.mms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <return xsi:type="java:MessageRetrieveResponse" >
         <APIVersion xsi:type="java:apiVersionType">1.0</APIVersion>
         <ErrorCode xsi:type="xsd:string">1000</ErrorCode>
         <ErrorInfo xsi:type="xsd:string">Success</ErrorInfo>
         <BillingInfo xsi:type="java:BillingInfoObject" xsi:nil="true"/>
              <HeaderInfo xsi:type="java:HeaderInfoType" xsi:nil="true"/>
              <Content xsi:type="java:MessageContentType" xsi:nil="true"/>
              </return>
    </MessageRetrieveResponseReturn>
    I'm new to JAXB. Please let me know what I�m missing here
    Regards

    Not got a single answer , surprise whether the question is too dumb to ask or JAXB doesn't support feature or my requirement is weird :-) ... in any case let me know please
    regards

  • How to include atribute xsi:type in the xml generated through java

    Hi,
    i am generating an xml using java and castor.
    I want to include this attribute in my xml:
    xsi:type="abc"
    for example:
    My snippet is:
    Underwriting_detail[] underwritingDetail = new Underwriting_detail[1];
    underwritingDetail[0] = new Underwriting_detail();
    underwritingDetail[0].setContent(fulfillmentPreResponseTO.getUnderwritingDetailsMainAnswer1());
    underwritingDetail[0].setQuestion_code(fulfillmentPreResponseTO.getUnderwritingDetailsMainQuestionCode1());
    underwritingDetail[0].setAnswer_format(AnswerFormatType.YESNO);
    underwritingDetail[0].setSequence_number(fulfillmentPreResponseTO.getUnderwritingDetailsSequenceNumber());
    Result is:
    <underwriting_detail answer_format="YesNo" sequence_number="1" question_code="JVL1Q1">NO</underwriting_detail>
    The requirement is:
    <underwriting_detail xsi:type="NonStdUWQuestion" answer_format="YesNo" sequence_number="1" question_code="JVL1Q1">No</underwriting_detail>
    There is no method defined in the underwriting_detail class to add this attribute. Is there any way to add this xsi:type="NonStdUWQuestion" in this tag?

    yes, is a question of JSF
    Component dataTable

  • JAXB 1.6 and xsi:type attribute

    Does JAXB version 1.6 suppurt xsi:type attribute? I have mapped schema to Java classes and when I marshall it to xml, xsi:type attribute is missing.

    I found one workaround for the problem,
    "<from variable="StopSeq"/>"
    As of now , StopSeq was a variable created by me in BPEL file.
    I was using this variable to do some calculations.
    As a workaround of the problem, I created a schema with "StopSeqType" as a simple int type element.
    Then inside the BPEL, I marked the the existing variable "StopSeq" as a type of "StopSeqType" of my new schema.
    After this change I found the expected result.
    Now my doubt is , Is it the case for all variables created in BPEL ?
    If yes , how we can prevent this ?

  • Internal Exception: oracle.xml.parser.v2.XMLParseException xsi:type "toplin

    i am using toplink 10.1.3.0.0 with oracle app server 10.1.2.2, i am using change field optimistic locking and generating the project xml,
    application runs great locally in the jdeveloper, but when it is deployed on app server getting following error
    here are the headers from both my project.xml as well as session xml..
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink:object-persistence version="Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)" xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <opm:name>PROJ</opm:name>
    <opm:class-mapping-descriptors>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink-sessions version="4.5" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <session xsi:type="server-session">
    <name>PROJSession</name>
    <event-listener-classes/>
    <logging xsi:type="toplink-log">
    <log-level>finer</log-level>
    </logging>
    <primary-project xsi:type="xml">PROJ.xml</primary-project>
    <login xsi:type="database-login">
    <platform-class>oracle.toplink.platform.database.oracle.OraclePlatform</platform-class>
    <user-name></user-name>
    any help/idea appreciated...
    Exception [TOPLINK-9005] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> file [PROJ.xml].
    Internal Exception: Exception [TOPLINK-25004] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.XMLMarshalException
    Exception Description: An error occurred unmarshalling the document
    Internal Exception: Exception [TOPLINK-27101] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.platform.xml.XMLPlatformException
    Exception Description: An error occurred while parsing the document.
    Internal Exception: oracle.xml.parser.v2.XMLParseException: xsi:type "toplink:changed-field-locking-policy" not resolved to a type definition
    at oracle.toplink.exceptions.SessionLoaderException.failedToLoadProjectXml(SessionLoaderException.java:74)
    at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.loadProjectConfig(TopLinkSessionsFactory.java:316)
    at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.createSession(TopLinkSessionsFactory.java:241)
    at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildServerSessionConfig(TopLinkSessionsFactory.java:215)
    at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildSession(TopLinkSessionsFactory.java:168)
    at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildTopLinkSessions(TopLinkSessionsFactory.java:124)
    at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.load(XMLSessionConfigLoader.java:103)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:367)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:334)
    at myProjectPackage.common.data.toplink.ToplinkDataManagerPeer.<init>(ToplinkDataManagerPeer.java:41)
    at myProjectPackage.common.data.DataManagerFactory.getDataManagerInstance(DataManagerFactory.java:40)
    at myProjectPackage.common.servlet.NYSDOTFilter.getDataManager(NYSDOTFilter.java:964)
    at myProjectPackage.common.servlet.NYSDOTFilter.doFilter(NYSDOTFilter.java:144)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    at myProjectPackage.caf.servlet.NYSDOTCAFFilter.doFilter(NYSDOTCAFFilter.java:90)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
    at myProjectPackage.common.servlet.NYSDOTLoginFilter.doFilter(NYSDOTLoginFilter.java:95)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:669)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:228)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:570)

    first thanks for your reply,
    i already figured that out and deployed it using 10.1.3.1 jars
    my question
    1) if it is a bug , how come it works fine with jdeveloper (
    i would appreciate if you could provide any info about it.
    2) i dont want to sound sarcastic , but 10.1.3.1 has of optimistic locking and the recommended solution i found was to use descriptor.getQueryManager().setUpdateCallCacheSize(0);
    looks like 10.1.3.1 fixed one bug and introduced other one which was working fine earlier...
    is there any other way of fixing optimistic locking issue other than using the
    descriptor.getQueryManager().setUpdateCallCacheSize(0);
    where i can find the latest/greatest (up to date patched version of toplink)
    thanks again for your help

  • DSP Web Service Data Source runtime error "Invalid xsi:type qname"

    I have created a DSP data service that uses a web service as a data source.
    The web service wraps an Oracle PL/SQL package and works when tested independantly of the DSP data service.
    When I test the DSP data service using the weblogic workshop test view I get the error below:
    weblogic.xml.query.exceptions.XQueryDynamicException: {err}XQ0027: Validation failed: error: cvc-elt.4.2: Invalid xsi:type qname: 'ns0:EmpRecUser' in element getEmpResponseElement@http://hr/EmpWebService.wsdl/types/
    (The full stack trace and the WSDL imported into DSP are at the bottom of this posting)
    I am new to DSP but I have created data services from the DSP tutorials succesfully before.
    This is the first data service I have tried to create which is not from a DSP tutorial.
    I dont really understand the error message.
    It appears to me that type EmpRecUser is being prefixed by the wrong name space. In the WSDL the namespace is 'tns:' in the error message the namespace is: 'ns0'.
    <element name="getEmpResponseElement">
    <complexType>
    <sequence>
    <element name="result" type="tns:EmpRecUser" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    I created the web service in Oracle J Developer from the tutorial URL below.
    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm#p
    weblogic.xml.query.exceptions.XQueryDynamicException: {err}XQ0027: Validation failed: error: cvc-elt.4.2: Invalid xsi:type qname: 'ns0:EmpRecUser' in element getEmpResponseElement@http://hr/EmpWebService.wsdl/types/
         at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.giveToken(XMLValidatorForXMLBeans.java:169)
         at weblogic.xml.query.schema.ValidatingIterator.fetchNext(ValidatingIterator.java:148)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at com.bea.ld.wrappers.ws.JAXRPCWebserviceIterator.fetchNext(JAXRPCWebserviceIterator.java:104)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
         at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:134)
         at weblogic.xml.query.runtime.sequences.Subsequence.fetchNext(Subsequence.java:101)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:238)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.runtime.core.QueryIterator.fetchNext(QueryIterator.java:127)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.xdbc.util.Serializer.processNamespaces(Serializer.java:340)
         at weblogic.xml.query.xdbc.util.Serializer.processElement(Serializer.java:262)
         at weblogic.xml.query.xdbc.util.Serializer.process(Serializer.java:206)
         at weblogic.xml.query.xdbc.util.Serializer.serializeItems(Serializer.java:152)
    Caused by: weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans$ValidationException: null
         at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans$ExceptionCollection.add(XMLValidatorForXMLBeans.java:340)
         at org.apache.xmlbeans.impl.validator.Validator.emitError(Validator.java:175)
         at org.apache.xmlbeans.impl.validator.Validator.emitFieldError(Validator.java:207)
         at org.apache.xmlbeans.impl.validator.Validator.emitFieldError(Validator.java:193)
         at org.apache.xmlbeans.impl.validator.Validator.beginEvent(Validator.java:458)
         at org.apache.xmlbeans.impl.validator.Validator.nextEvent(Validator.java:246)
         at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.processBeginElementToken(XMLValidatorForXMLBeans.java:1205)
         at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.processToken(XMLValidatorForXMLBeans.java:1322)
         at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.processTokensOnHold(XMLValidatorForXMLBeans.java:1349)
         at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.gotBeginElementToken(XMLValidatorForXMLBeans.java:772)
         at weblogic.xml.query.schema.xmlbeans.XMLValidatorForXMLBeans.giveToken(XMLValidatorForXMLBeans.java:100)
         at weblogic.xml.query.schema.ValidatingIterator.fetchNext(ValidatingIterator.java:148)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at com.bea.ld.wrappers.ws.JAXRPCWebserviceIterator.fetchNext(JAXRPCWebserviceIterator.java:104)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
         at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:134)
         at weblogic.xml.query.runtime.sequences.Subsequence.fetchNext(Subsequence.java:101)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:238)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.runtime.core.QueryIterator.fetchNext(QueryIterator.java:127)
         at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
         at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
         at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
         at weblogic.xml.query.xdbc.util.Serializer.processNamespaces(Serializer.java:340)
         at weblogic.xml.query.xdbc.util.Serializer.processElement(Serializer.java:262)
         at weblogic.xml.query.xdbc.util.Serializer.process(Serializer.java:206)
         at weblogic.xml.query.xdbc.util.Serializer.serializeItems(Serializer.java:152)
         at com.bea.ld.server.QueryInvocation.getResult(QueryInvocation.java:461)
    <definitions
    name="EmpWebService"
    targetNamespace="http://hr/EmpWebService.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://hr/EmpWebService.wsdl"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns0="http://hr/EmpWebService.wsdl/types/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    >
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://hr/EmpWebService.wsdl/types/"
    elementFormDefault="qualified" xmlns:tns="http://hr/EmpWebService.wsdl/types/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">
    <element name="getEmpElement">
    <complexType>
    <sequence>
    <element name="empNo" type="decimal" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    <element name="getEmpResponseElement">
    <complexType>
    <sequence>
    <element name="result" type="tns:EmpRecUser" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="EmpRecUser">
    <complexContent>
    <extension base="tns:EmpRecBase">
    <sequence>
    <element name="departmentId" type="decimal" nillable="true"/>
    <element name="managerId" type="decimal" nillable="true"/>
    <element name="hireDate" type="dateTime" nillable="true"/>
    <element name="jobId" type="string" nillable="true"/>
    <element name="employeeId" type="decimal" nillable="true"/>
    <element name="commissionPct" type="decimal" nillable="true"/>
    <element name="salary" type="decimal" nillable="true"/>
    <element name="lastName" type="string" nillable="true"/>
    </sequence>
    </extension>
    </complexContent>
    </complexType>
    <complexType name="EmpRecBase">
    <sequence/>
    </complexType>
    </schema>
    </types>
    <message name="EmpWebService_getEmp">
    <part name="parameters" element="tns0:getEmpElement"/>
    </message>
    <message name="EmpWebService_getEmpResponse">
    <part name="parameters" element="tns0:getEmpResponseElement"/>
    </message>
    <portType name="EmpWebService">
    <operation name="getEmp">
    <input message="tns:EmpWebService_getEmp"/>
    <output message="tns:EmpWebService_getEmpResponse"/>
    </operation>
    </portType>
    <binding name="EmpWebServiceSoapHttp" type="tns:EmpWebService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="getEmp">
    <soap:operation soapAction="http://hr/EmpWebService.wsdl/getEmp"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="EmpWebService">
    <port name="EmpWebServiceSoapHttpPort" binding="tns:EmpWebServiceSoapHttp">
    <soap:address location="http://localhost:8888/PL_SQL_WS-GetEmployee-context-root/EmpWebServiceSoapHttpPort"/>
    </port>
    </service>
    </definitions>

    DSP validates the results from webservices. Whatever you tested the webservice with outside of DSP, probably does not.
    Can you capture the output of the webservice and attach it as well? You can capture the webservice response by running the wls server with the command-line property -Dweblogic.webservice.verbose=true
    Can you also open a case with customer support for this? I will not likely have much time to look at it.
    - Mike
    btw - the namespace prefixes are just place-holders that are defined with xmlns:prefix="some-uri". It is the namespace uri's that must be equivalent. If, in one case you have the definition xmlns:tns="myUri" and in another case xmlns:ns0="myUri" - then tns:EmpRecUser is equivalent to ns0:EmpRecUser.
    Perhaps in the webservice result there is no definition, or an incorrect definition for the namespace prefix ns0 - that would explain the complaint about the QName ns0:EmpRecUser. According to the wsdl, there should be a definition for ns0 as :
    xmlns:ns0="http://hr/EmpWebService.wsdl"
    in the webservice response.

  • Invalid XML Response - missing xmlns=''

    I have a simple BPEL WebService using a xsd elementFormDefault="unqualified".
    {color:#0000ff}+&lt;schema attributeFormDefault="unqualified"+
    elementFormDefault="unqualified"
    targetNamespace="http://xmlns.oracle.com/InvalidXMLResponse"
    xmlns="http://www.w3.org/2001/XMLSchema"&gt;
    +&lt;element name="InvalidXMLResponseProcessRequest"&gt;+
    +&lt;complexType&gt;+
    +&lt;sequence&gt;+
    +&lt;element name="input" type="string"/&gt;+
    +&lt;/sequence&gt;+
    +&lt;/complexType&gt;+
    +&lt;/element&gt;+
    +&lt;element name="InvalidXMLResponseProcessResponse"&gt;+
    +&lt;complexType&gt;+
    +&lt;sequence&gt;+
    +&lt;element name="result" type="string"/&gt;+
    +&lt;/sequence&gt;+
    +&lt;/complexType&gt;+
    +&lt;/element&gt;+
    +&lt;/schema&gt;+{color}
    I invoke this WebService with the Web Service Test Page of OC4J
    and get an invalid xml-response (missing xmlns="").
    If i look inside the bpel-console in the instance-flow at the reply activity the
    xml-response looks good.
    GOOD Reponse (at bpel-console):
    +&lt;InvalidXMLResponseProcessResponse xmlns="http://xmlns.oracle.com/InvalidXMLResponse"&gt;+
    +&lt;result {color:#ff0000}*xmlns=""*{color}&gt;test&lt;/result&gt;+
    +&lt;/InvalidXMLResponseProcessResponse&gt;+
    Invalid Response (at every WS Client):
    +&lt;InvalidXMLResponseProcessResponse xmlns="http://xmlns.oracle.com/InvalidXMLResponse"&gt;+
    +&lt;result&gt;test&lt;/result&gt;+
    +&lt;/InvalidXMLResponseProcessResponse&gt;+
    It seams that the xml serializer of the oc4j container does create a valid xml-response.

    I just retested the testcase with an other test environment (10.1.3.4 MLR#3) and everything worked fine.
    {color:#0000ff}+&lt;env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"&gt;+
    +&lt;env:Header/&gt;+
    +&lt;env:Body&gt;+
    +&lt;InvalidXMLResponseProcessResponse xmlns="http://xmlns.oracle.com/InvalidXMLResponse"&gt;+
    +&lt;result xmlns=""&gt;test&lt;/result&gt;+
    +&lt;/InvalidXMLResponseProcessResponse&gt;+
    +&lt;/env:Body&gt;+
    +&lt;/env:Envelope&gt;+{color}
    So there should be an availagle bugfix for this issue.
    I need this bugfix for 10.1.3.3.1 because this is our production environment.

  • GetXMLSchema java method generates invalid XML Schema document

    Hi all,
    I managed to get the xdk FAQ demo to work eventually on oracle 9.2.0.1.0 for windows, I noticed however that when I generate an XML Schema definition against a query, the document contains an outdated namespace declaration (minor flaw) and "nullable" attributes instead of "nillable", resulting in an invalid XML Schema document when edited with certain tools like Altova's XmlSpy.
    How can I fix this?
    See below for the XML Schema source.
    Bye,
    Flavio
    <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
    <xsd:element name="ROWSET">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ROW" minOccurs="0" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="CATEGORY" type="xsd:string" minOccurs="0"/>
    <xsd:element name="QUESTION" type="xsd:string" minOccurs="0"/>
    <xsd:element name="ANSWER" type="xsd:string" minOccurs="0"/>
    <xsd:element name="LANGUAGE" type="xsd:string" minOccurs="0"/>
    <xsd:element name="SENDBY" type="xsd:string" nullable="true" minOccurs="0"/>
    <xsd:element name="CREATETIME" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="num" type="xsd:integer"/>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>

    With my (trial) copy of XMLSPY (version 2004 rel.3), I get following pop-up when opening that schema:
    "This schema is written in an old standard:
    http://www.w3.org/2000/10/XMLSchema
    Do you want XMLSPY to convert it to the new one:
    http://www.w3.org/2001/XMLSchema"
    When I click "Yes" and save, I get a perfectly valid schema (with nullable replaced by nillable).

  • "xsi:type" attribute coming automatically in XML by using Assign activity

    Hi,
    I am using below copy operation in assign activity
    *<copy>*
    *<from variable="StopSeq"/>*
    *<to variable="InvokeGlog_IV" part="Transmission"*
    *query="/ns2:Transmission/ns2:TransmissionBody/ns2:GLogXMLElement/ns2:ActualShipment/ns2:Shipment    /ns2:ShipmentStop[bpws:getVariableData('SCounter')]/ns2:StopSequence"/>*
    *</copy>*
    which is copying from one local variable(StopSeq of int type ) to another variable(StopSequence of string type).
    It was working fine in SOA 11.1.1.3 and I was getting result as below
    Expected Result *<StopSequence>1</StopSequence>*
    But recently we have migrated from 11.1.1.3 to 11.1.1.5 and we started to get below output for the same assign activity.
    Current Result *<StopSequence xsi:type="ns:int">1</StopSequence>*
    Please suggest.
    Thanks

    I found one workaround for the problem,
    "<from variable="StopSeq"/>"
    As of now , StopSeq was a variable created by me in BPEL file.
    I was using this variable to do some calculations.
    As a workaround of the problem, I created a schema with "StopSeqType" as a simple int type element.
    Then inside the BPEL, I marked the the existing variable "StopSeq" as a type of "StopSeqType" of my new schema.
    After this change I found the expected result.
    Now my doubt is , Is it the case for all variables created in BPEL ?
    If yes , how we can prevent this ?

  • XPath Question related to xsi:type

    I have the response of a service callout that I need to process. The service callout response uses xsi:type to specify the type of the object being returned. I need to use the value of the xsi:type attribute to collect the xml elements.
    Here is the xpath that I am trying to use:
    $addAssetInfoResponse/ast:addAssetInfoResponse/ast:result/ast:asset\[local-name-from-QName(attribute::xsi:type)='Customer'\]
    (ast: is mapped to http://www.fatspaniel.com/ws/asset/)
    When I test this XPath with the following XML fragement as value of addAssetInfoResponse variable:
    <env:Body xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <ns2:addAssetInfoResponse xmlns:ns2="http://www.fatspaniel.com/ws/asset/" >
    <ns2:result>
    <ns2:status>SUCCESS</ns2:status>
    <ns2:asset xsi:type="ns4:Customer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="http://www.fatspaniel.com/ws/sysobj/" >
    <entityId>106934</entityId>
    <type>Customer</type>
    <name>AAI Customer - 200909081651</name>
    </ns2:asset>
    </ns2:result>
    </ns2:addAssetInfoResponse>
    </env:Body>
    I get the following error:
    Error executing the transformation: {err}XP0021: "ns4:Customer": can not cast to {http://www.w3.org/2001/XMLSchema}QName: error: Invalid QName value: Can't resolve prefix 'ns4'
    Have I made a mistake in the xpath ? Is there a better way for extracting assets elements of certain type ?
    Thank you.
    Rahul Phadnis
    Edited by: RahulPhadnis on Sep 15, 2009 10:57 AM

    John Spencer wrote:
    Unless I missed something in the 11g new features, the maximum line length in DBMS_OUTPUT.Put_Line is still 255 characters.
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> set serveroutput on
    SQL> exec dbms_output.put_line(lpad('X',512,'X'));
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Marshaling problem in creation of xml thru JAXB

    Hi java gurus,
    I am trying to create an XML which will has the data of database using JAXB. I am able to generate JAXB classes, but its giving some error the stack trace is like this
    java.lang.NoSuchMethodError: com.sun.xml.bind.marshaller.XMLWriter.setXmlDecl(Z)V
         at org.bas.dss.common.vo.bii.impl.runtime.MarshallerImpl.createWriter(MarshallerImpl.java:223)
         at org.bas.dss.common.vo.bii.impl.runtime.MarshallerImpl.createWriter(MarshallerImpl.java:238)
         at org.bas.dss.common.vo.bii.impl.runtime.MarshallerImpl.createWriter(MarshallerImpl.java:233)
         at org.bas.dss.common.vo.bii.impl.runtime.MarshallerImpl.marshal(MarshallerImpl.java:126)
         at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:66)
         at org.bas.dss.common.dao.MetaDAO.createInstInformation(MetaDAO.java:627)
         at org.bas.core.fidownload.DownloadActionHandler.getInstInfoXMLData(DownloadActionHandler.java:163)
         at org.bas.core.fidownload.DownloadActionHandler.performPreDownloadAction(DownloadActionHandler.java:74)
         at org.bas.core.fidownload.DownloadAction.perform(DownloadAction.java:129)
         at org.bas.core.fidownload.DownloadAction.execute(DownloadAction.java:79)
    the method is like this,
    valueObject = getInstInformation (registrationId, appVersionId);
    System.out.println("MetaDAO-->valueObject:"+valueObject); //here i am gettingthe object
    context = JAXBContext.newInstance("org.bas.dss.common.vo.bii");
    System.out.println("MetaDAO-->context:"+context); //here i am getting the context
    sumissionInfoMarshaller = context.createMarshaller();
    System.out.println("MetaDAO-->sumissionInfoMarshaller:"+sumissionInfoMarshaller); //here also i am getting some object type
    sumissionInfoMarshaller.setProperty(
    Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);
    System.out.println("MetaDAO-->MetaDAO-->");
    sumissionInfoMarshaller.marshal (valueObject, streamToWrite); // the problem is coming here.
    anyone can suggest what will be the problem, and tell me how can i resolve this issue,
    thanks in advance,
    varma

    Pl post this question to SDK Forum

  • XSLT Mapper doesn't support xsi:type

    I'm starting to think that XSLT Mapper supports only the basic features of XML Schema ...
    It (XSLT Mapper in JDeveloper) does not seem to support mapping to generate this kind of element (cannot do it in Design view, when added to the Source view, cannot go back to Design view):
    <HighLevel:ParentEntity xsi:type="HighLevel:AChildEntity" xmlns:HighLevel="someNamespace">
    <A>ABC</A>
    <B>1</B>
    <FromAChildEntity>ABCDE</FromAChildEntity>
    </HighLevel:ParentEntity>
    If we leave this in Source view and run the xsl, the resulting XML has a validation error, the last element (FromAChildEntity is not known). The XML is valid in XML Spy.
    This problem combines with not being able to map two source elements to one target element, makes XSLT Mapper not able to deal with XML Schema inheritance at all.... ?

    I just want to reformat the XML from the original message (didn't realize I had to escape some of the characters). This is the XML that cannot be validated by JDeveloper):
    <HighLevel:ParentEntity xsi:type="HighLevel:AChildEntity" xmlns:HighLevel="someNamespace">
    &lt;A&gt;ABC&lt;/A&gt;
    &lt;B&gt;1&lt;/B&gt;
    <FromAChildEntity>ABCDE</FromAChildEntity>
    </HighLevel:ParentEntity>

  • How to catch invalid XML inside orchestration

    I have an Passthrough Pipeline and passing an invalid XML , I am unable to capture inside an orcestration.
    I get the error -
    The published message could not be routed because no subscribers were found.
    If i pass valid XML orchestration picks up and process it.    Is there any way to capture this in orchestration
    Regards
    Suresh

    I believe your orchestration will have a Typed Schema, therefore the subscription of Orchestration will be as below-
    ReceivePortID == [Port ID] and MessageType == [MessageType of your msg at first Receive Shape]
    So when you are using XML Receive Pipeline it promotes the MessageType element in the incoming message
    which helps in satisfying the above filter.
    However if you use PassThrough pipeline it doesn't touches the incoming message at all and thus no MessageType
    was not promoted so the above filter condition is not met.
    If you want to receive Untyped Message in Orchestration you will have to create a msg of type System.XML.XMLDocument
    and assign it to first receive shape.
    This will generate filter condition as- ReceivePortID
    == [Port ID], without MessageType, which will allow orchestration to subscribe your message
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • SendXSIType not displaying xsi:type information in soap

    We're attempting to communicate with a webservice that requires type information be passed with the SOAP request. I've seen many notes that suggest setting the sendXSIType = true in the partnerLinkBinding will accomplish this. I have set this value and verified it is in the deployed bpel.xml, but the process is still not generating the SOAP request with xsi:type information.
    Has anyone encountered this issue and overcome it? Any advice is much appreciated.
    Thanks,
    Mike

    In case anyone is curious...
    sendXSIType appears to ONLY work with rpc/endcoded style .wsdl files. There is currently a bug logged with Oracle support to determine a fix for document style webservices.
    As a workaround, I used <bpelx:rename> to recast the datatype to itself. Which basically forces the datatype to be used in the SOAP output. More info can be found here:
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/manipdoc.htm

Maybe you are looking for

  • Mac Mini Slow Boot. Leopard

    I have a Mac Mini 5 months old running Leopard as delivered. Recently has started taking 5 minutes to boot. I see no obvious troubleshooting tools I would expect with a Windows PC to assist. What are the likley causes? What tools can I use to debug p

  • "Screen output without connection to user" execption in CRM webui

    Hi All, My requirement is as follows: When user changes the status of a service request in WEBUI, the service request number should be sent to ECC through an RFC function call. For this I have created an action profile using method call(by creating a

  • Privacy Settings on profile details

    I was looking at my profile and I noticed that my date of birth is set to public... I do not want my date of birth viewable to the public, only to my skype contacts.  How do I change this as I can not see any way to do that. Thanks Diane

  • House Accounts

    How can I create House Accounts that all Users can access irrespective of their role. Public Sharing Groups are on a User by User basis -- I need all Users to automatically fall in to the share rule. Thanks!!

  • How can I get my printer online?

    My Canon MX310 printer is offline and although I have found various ways to get it online using Windows I cannot  find a solution for my Mac Mini. Can anyone help, please?