Announcement Announcement Module
Collapse
No announcement yet.
Passing Complex data type between coperative portlets results in class cast exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing Complex data type between coperative portlets results in class cast exception

    I am getting a class cast exception when I am trying to pass an Java Bean object using portlet wiring mechansim. However, when I do a getClass() of the object which is passed from the source to the target I am getting the same class which I am trying to cast. The Address bean has fields like street ,state,country. Also when I try to convert the object to string i have passed from my source to target, It has all the values in bean .

    I think there is some mistake in my WSDL file.Can any body help me in this regard.

    Here is my source WSDL.
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="Accountsportlet_Service"
    targetNamespace="http://internetBanking"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlnsortlet="http://www.ibm.com/wps/c2a"
    xmlns:tns="http://internetBanking"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <types>
    <xsd:schema targetNamespace="http://internetBanking">
    <xsd:complexType name="AddressType">
    </xsd:complexType>
    </xsd:schema>
    </types>
    <message name="Address_Response">
    <part name="Address_Output" type="tns:AddressType" />
    </message>
    <portType name="Accountsportlet_Service">
    <operation name="Accountsportlet">
    <output message="tns:Address_Response" />
    </operation>
    </portType>
    <binding name="Accountsportlet_Binding"
    type="tns:Accountsportlet_Service">
    <portlet:binding />
    <operation name="Accountsportlet">
    <portlet:action name="serviceCenterHome" actionNameParameter="ACTION_NAME" type="standard" />
    <output>
    <portletaram name="Address" class="com.beans.Address" partname="Address_Output"
    boundTo="request-attribute" />
    </output>
    </operation>
    </binding>
    </definitions>


    Here is my target WSDL.
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="CustomUserIdportlet_Service"
    targetNamespace="http://internetBanking"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlnsortlet="http://www.ibm.com/wps/c2a"
    xmlns:tns="http://internetBanking"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <types>
    <xsd:schema targetNamespace="http://internetBanking">
    <xsd:complexType name="AddressType">
    </xsd:complexType>
    </xsd:schema>
    </types>
    <message name="AddressType_Request">
    <part name="AddressType_Input" type="tns:AddressType" />
    </message>
    <portType name="CustomUserIdportlet_Service">
    <operation name="CustomUserIdportlet">
    <input message="tns:AddressType_Request" />
    </operation>
    </portType>
    <binding name="CustomUserIdportlet_Binding"
    type="tns:CustomUserIdportlet_Service">
    <portlet:binding />
    <operation name="CustomUserIdportlet">
    <portlet:action name="customUserId" actionNameParameter="ACTION_NAME" type="standard"
    caption="RECIEVE.ADDRESS" description="Recieving Address" />
    <input>
    <portletaram name="Address" class="com.beans.Address" partname="AddressType_Input"
    boundTo="request-attribute" />
    </input>
    </operation>
    </binding>
    </definitions>
Working...
X