Dan,
 
We had PropertyNamedAndValueType.class as return type. The code below
was something we were trying differently. The correct code is:

public Class getSerializableType()
        {
                return PropertyNameAndValueType.class;
        }

Muse.xml has:
    <custom-serializer>
 
<java-serializable-type>com.cisco.cmp.schemas.x2006.x07.chameleon.Proper
tyNameAndValueType</java-serializable-type>
 
<java-serializer-class>com.cisco.nm.cmp.nbi.wsdm.common.serializer.Prope
rtyNameAndValueTypeSerializer</java-serializer-class>
    </custom-serializer>

We are still seeing the array type mismatch error.

--Baseer




-----Original Message-----
From: Daniel Jemiolo [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 15, 2007 9:12 AM
To: [email protected]
Subject: RE: Array type mismatch with custom serialziers.

I think your problem is this:

        public Class getSerializableType()
        {
                return WSDMGatewayWrapperProxy.class;
        }

You should be returning PropertyNameAndValueType.class. The code is
creating an array of WSDMGatewayWrapperProxy elements and then trying to
put PropertyNameAndValueType objects into it - that's why there's the
cast excpetion. Since this serializer is for PropertyNameAndValueType,
that's what has to be returned by getSerializableType().

Dan


"Baseer Khan \(bakhan\)" <[EMAIL PROTECTED]> wrote on 03/12/2007 11:04:23

PM:

> Dan,
> Here is the stack trace. Attached is the serializer class that we
> register in muse.xml
> 
> Operation definiton implemeted in one of the capability class is as
> follows -
> 
> public EndpointReference get(String queryName,
> PropertyNameAndValueType[] queryArgs) throws Exception;
> 
> Thanks.
> 
> --Baseer
> 
> array element type mismatch
> 
>    java.lang.reflect.Array.set(Native Method)
> 
>
org.apache.muse.core.serializer.ArraySerializer.fromXML(ArraySerializer.
> java:124)
> 
>
org.apache.muse.core.routing.ReflectionMessageHandler.fromXML(Reflection
> MessageHandler.java:135)
> 
> org.apache.muse.core.SimpleResource.invoke(SimpleResource.java:351)
> 
>
org.apache.muse.core.routing.SimpleResourceRouter.invoke(SimpleResourceR
> outer.java:278)
> 
>
org.apache.muse.core.platform.axis2.AxisIsolationLayer.invoke(AxisIsolat
> ionLayer.java:132)
> 
>
org.apache.muse.core.platform.axis2.AxisIsolationLayer.handleRequest(Axi
> sIsolationLayer.java:84)
>    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
> 
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>    java.lang.reflect.Method.invoke(Method.java:585)
> 
>
org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogi
> c(RawXMLINOutMessageReceiver.java:88)
> 
>
com.cisco.nm.cmp.nbi.wsdm.server.routing.WsMessageReceiver.invokeBusines
> sLogic(WsMessageReceiver.java:66)
> 
>
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(Abst
> ractInOutSyncMessageReceiver.java:39)
>    org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:493)
>    23 more...
> 
> 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 12, 2007 6:27 AM
> To: [email protected]
> Subject: Re: Array type mismatch with custom serialziers.
> 
> Hmmm... this actually looks like a new problem. Can you send the stack
> trace and info about the WSDL operation/Java method that is causing
the
> problem?
> 
> Thanks,
> Dan
> 
> 
> 
> "Baseer Khan \(bakhan\)" <[EMAIL PROTECTED]> wrote on 03/12/2007
12:24:31
> AM:
> 
> > I thought this problem was reported and fixed earlier. But I am
still 
> > getting "Array element type mismatch" error, if my capability class 
> > contains array of arguments and that the type of custom defined 
> > Serializer. Looks like in ArraySerializer - the array is initialized

> > with certain type and when it tries to add a element after calling
my 
> > custom serializer, it throws this exception.
> > 
> > Looks like there is mismatch in types when array is initialzed with 
> > what is being added to that array. Has anybody else encountered this
> problem.
> > 
> > Thanks.
> > 
> > --Baseer
> > 
> > 
> > <soapenv:Envelope
> >     xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";
> > xmlns:wsa="http://www.w3.org/2005/08/addressing";>
> >     <soapenv:Header>
> >
> <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
> >         <wsa:ReplyTo>
> > 
> > <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
> >         </wsa:ReplyTo>
> > 
> >
<wsa:MessageID>urn:uuid:B332423E28D5EC1B4111736731993222</wsa:MessageI
> > D>
> > 
> >
<wsa:Action>http://schemas.cmp.cisco.com/2006/07/QueryService/getReque
> > st
> > </wsa:Action>
> >         <wsa:RelatesTo
> >
wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply";>uuid
> > :6 7c695d0-08c4-e818-58aa-89a9168404f0</wsa:RelatesTo>
> >     </soapenv:Header>
> >     <soapenv:Body>
> >         <soap:Fault
> xmlns:soap="http://www.w3.org/2003/05/soap-envelope";
> > xmlns:tns="http://axis2.platform.core.muse.apache.org";>
> >             <soap:Code>
> >                 <soap:Value>soap:Receiver</soap:Value>
> >             </soap:Code>
> >             <soap:Reason>
> >                 <soap:Text>array element type mismatch</soap:Text>
> >             </soap:Reason>
> >         </soap:Fault>
> >     </soapenv:Body>
> > </soapenv:Envelope>
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to