Announcement Announcement Module
Collapse
No announcement yet.
getting error while typecasting SimpleType to SympleanyType Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • getting error while typecasting SimpleType to SympleanyType

    I am using a wsa.xsd file in which I have given definition like ..bellow
    wsa.xsd

    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd=(blocked

    xmlns:wsa
    targetNamespace" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xsd:element name="To" />
    <xsd:element name="From" type="wsa:From"/>
    <xsd:element name="ReplyTo" type="wsa:ReplyTo"/>
    <xsd:element name="FaultTo" type="wsa:FaultTo"/>
    <xsd:element name="MessageID" type="xsd:simpleType"/>
    <xsd:element name="Action" type="xsd:simpleType"/>

    <xsd:simpleType name='To'>
    <xsd:restriction base="xsd:string" />
    </xsd:simpleType>

    <xsd:simpleType name="Action">
    <xsd:restriction base="xsd:string" />
    </xsd:simpleType>
    <xsd:simpleType name="MessageID">
    <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>





    <xsd:complexType name="From">
    <xsd:sequence>
    <xsd:element minOccurs="0" name="Address" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="ReplyTo">
    <xsd:sequence>
    <xsd:element minOccurs="0" name="Address" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="FaultTo">
    <xsd:sequence>
    <xsd:element minOccurs="0" name="Address" type="xsd:string" />
    </xsd:sequence>
    </xsd:complexType>

    </xsd:schema>


    this xsd file are being used in a wsdl and implemented on on ESB server..now the simple type elemens are being typecasted to SimplAnyType in java code..here I am getting error like anyType can not be typecasted to simple any type...Now my question is how I define the wsa simpleType fields so that it can be typecasted..

    error is as....

    java.lang.ClassCastException: com.ibm.ws.bo.bomodel.impl.DynamicBusinessObjectIm pl incompatible with org.eclipse.emf.ecore.sdo.EDataObjectSimpleAnyType
    at com.nasco.header.HandleHeader.processSOAPHeaders(H andleHeader.java:173)
    at com.nasco.header.ProcessHeader.processHeader(Proce ssHeader.java:50)
    at sca.component.mediation.java.Custom2078055676.doMe diate(Custom2078055676.java:99)
    at sca.component.mediation.java.Custom2078055676.medi ate(Custom2078055676.java:74)
    at com.ibm.ws.sibx.scax.mediation.engine.JavaMediatio nPrimitive.performInvocation(JavaMediationPrimitiv e.java:310)
    at com.ibm.ws.sibx.scax.mediation.engine.JavaMediatio nPrimitive.invoke(JavaMediationPrimitive.java:207)
    at com.ibm.ws.sibx.scax.mediation.engine.MediationPri mitive.invokeConnections(MediationPrimitive.java:3 03)
    at com.ibm.ws.sibx.scax.mediation.engine.Input.invoke (Input.java:132)
    at com.ibm.ws.sibx.scax.mediation.engine.RequestFlow. invokeFlow(RequestFlow.java:128)
    at com.ibm.ws.sibx.scax.mediation.engine.MediationFlo w.invokeRequestFlow(MediationFlow.java:132)
    at com.ibm.wsspi.sibx.mediation.flow.ejb.MediationFlo wBean.invokeRequestFlow(MediationFlowBean.java:216 )
    at com.ibm.wsspi.sibx.mediation.flow.ejb.EJSLocalStat elessBXBenifitsMediationFlowExt_1dd9da15.invokeReq uestFlow(Unknown Source)
    at com.ibm.ws.sibx.scax.mediation.component.ejb.EJBMe diationFlowComponentImpl.invokeRequestFlow(EJBMedi ationFlowComponentImpl.java:205)
    at com.ibm.ws.sibx.scax.runtime.handler.MFCImplementa tionHandler.processMessage(MFCImplementationHandle r.java:189)
    at com.ibm.ws.sca.internal.message.impl.MessageDispat cherImpl.processMessageWithPCI(MessageDispatcherIm pl.java:714)
    at


    Please anybody suggest......]
Working...
X