Sagar,

We are not doing ours in Arguments, but in headers, but I think if you
change your code to look something like this it might work:

public static Customer getCustomer(String name, String authentication,
Customer cust)
{
            Customer ret = null;
            try
            {
                  String endpoint = "
http://localhost/WebServices/services/PmfCustomerClientAgent";;
                  Service  service = new Service();
                  Call     call    = (Call) service.createCall();
                  call.setTargetEndpointAddress( new java.net.URL(endpoint)
);
                  call.setOperationName( "getCommonObject" );
                  call.addParameter( "arg0", XMLType.XSD_STRING,
ParameterMode.IN);
                  call.addParameter( "arg1", XMLType.XSD_STRING,
ParameterMode.IN);
                  call.addParameter( "arg2",
XMLType.XSD_ANYTYPE,ParameterMode.INOUT );

                  QName qn = new QName("
http://com.chordiant.customer.businessClasses","Customer";);
                  call.registerTypeMapping(Customer.class,
                                          qn,
                                          new
BeanSerializerFactory(Customer.class, qn),
                                          new
BeanDeserializerFactory(Customer.class, qn));

                  call.setReturnType(qn);

                  System.out.println(" invoking getCustomer" );
                  ret = (Customer) call.invoke( new Object[] { name,
authentication, cust} );
            }
            catch (Exception e)
            {
                  System.err.println("Exception occured in the invoke
getCustomer method");
                  System.err.println(e.toString());
            }
}

I can't really test this, but I think that should work.  By setting the
return type to the QName for your class it should know how to deserialize
when it returns from the client.

Let me know how it goes.
Mark



                                                                           
             "Sagar                                                        
             Pidaparthi"                                                   
             <Sagar.Pidaparthi                                          To 
             @chordiant.com>           <[EMAIL PROTECTED]>           
                                                                        cc 
             09/09/04 01:21 PM                                             
                                                                   Subject 
                                       RE: Could not find deserializer     
             Please respond to                                             
             [EMAIL PROTECTED]                                             
                  he.org                                                   
                                                                           
                                                                           
                                                                           




Mark,

Given below are my imports.  They look similar to yours.

import javax.xml.rpc.ParameterMode;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.namespace.QName;
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.BeanSerializerFactory;

given blow is my calling sequence.

Can you comment on my passing of parameters.

Thanks

Sagar


public static Customer getCustomer(String name, String authentication,
Customer cust)
{
Customer ret = null;
             try {
                          String endpoint =
"http://localhost/WebServices/services/PmfCustomerClientAgent";;

              Service  service = new Service();
              Call     call    = (Call) service.createCall();
              call.setTargetEndpointAddress( new java.net.URL(endpoint) );
              call.setOperationName( "getCommonObject" );
              call.addParameter( "arg0", XMLType.XSD_STRING,
ParameterMode.IN
);
              call.addParameter( "arg1", XMLType.XSD_STRING,
ParameterMode.IN
);
              call.addParameter( "arg2", XMLType.XSD_ANYTYPE,
ParameterMode.INOUT );
              call.setReturnType( XMLType.XSD_ANYTYPE );
              System.out.println(" invoking getCustomer" );
              QName qn = new
QName("http://com.chordiant.customer.businessClasses","Customer";);
              call.registerTypeMapping(Customer.class,qn, new
BeanSerializerFactory(Customer.class, qn), new
BeanDeserializerFactory(Customer.class, qn));
              ret = (Customer) call.invoke( new Object[] { name,
authentication, cust} );
 } catch (Exception e) {
System.err.println("Exception occured in the invoke getCustomer method
");
                                      System.err.println(e.toString());
 }

                          return ret;

             }

-----Original Message-----
From: Mark Malinoski [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 09, 2004 9:54 AM
To: [EMAIL PROTECTED]
Subject: RE: Could not find deserializer


Sagar,

I don't see your imports in your e-mail.

Here are all of my imports in my BindingStub.java file.

import com.datatransportstandard.www.utils.DTSRouting;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPException;

import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
import org.apache.axis.message.SOAPEnvelope;
import org.apache.axis.message.SOAPHeaderElement;

The key for the serialization/deserialization is the registerTypeMapping
call.  Without that
the axis engine does not know what to object to call to serialize and
deserialize the object.

The QName object plays a role also.  Look at your return SOAP packet in
TCPMON to determine
how to instantiate the QName object on the client side.

Mark






             "Sagar

             Pidaparthi"

             <Sagar.Pidaparthi
To
             @chordiant.com>           <[EMAIL PROTECTED]>


cc
             09/09/04 12:39 PM


Subject
                                       RE: Could not find deserializer

             Please respond to

             [EMAIL PROTECTED]

                  he.org











Thanks.  However, it still gives me problems.

Here are my importd for this program, can you send me your equivalents
for these.

Thanks once again. very much appreciate your help.

Regards

sagar

-----Original Message-----
From: Mark Malinoski [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 09, 2004 9:29 AM
To: [EMAIL PROTECTED]
Subject: RE: Could not find deserializer


Sagar,

I'm using 1.1.  I'm using BeanSerializationFactory in client code.  On
the
service side I'm using the
<beanMapping> element in my wsdd.

Here are my imports:

import com.datatransportstandard.www.utils.DTSRouting;  // My class that
I
send both directions.

import javax.xml.namespace.QName;
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.BeanSerializerFactory;

One other thing...my DTSRouting class implements java.io.Serializable;

Good Luck,
Mark






             "Sagar

             Pidaparthi"

             <Sagar.Pidaparthi
To
             @chordiant.com>           <[EMAIL PROTECTED]>


cc
             09/09/04 12:22 PM


Subject
                                       RE: Could not find deserializer

             Please respond to

             [EMAIL PROTECTED]

                  he.org











Mark,

Thanks for your message.  Can you please send me your import statements.

Are you using 1.1 or 1.2 beta?

I had to switch to 1.1 due to problems elsewhere in our product.  In 1.1
Do we use BeanSerializerFactory, or Serializer Factory?

Regards

Sagar

-----Original Message-----
From: Mark Malinoski [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 09, 2004 9:07 AM
To: [EMAIL PROTECTED]
Subject: Re: Could not find deserializer


Sagar,

I have not done the type mappping in the wsdd on the client side, but I
have done it in code.

Here is the snippet from my code in the BindingStub:
      QName qn = new QName("http://www.datatransportstandard.com";,
"DTSRouting");
      _call.registerTypeMapping(DTSRouting.class,
                                    qn,
                                    new
BeanSerializerFactory(DTSRouting.
class, qn),
                                    new
BeanDeserializerFactory(DTSRouting.
class, qn));
This needs to go before the invoke.

This works because I can send a DTSRounting object in both directions.

Hope this helps,
Mark







             "Sagar

             Pidaparthi"

             <Sagar.Pidaparthi
To
             @chordiant.com>           <[EMAIL PROTECTED]>


cc
             09/09/04 11:54 AM


Subject
                                       Could not find deserializer

             Please respond to

             [EMAIL PROTECTED]

                  he.org











Hi,

I get the following exception on the client.  I see the response coming
back on the SOAPMonitor, but the client is unable to deserialize the
message.  Is there something missing on my client side that is making it
difficult for the client to deserialize the object?

This is happening both on Axis 1.1 and axis 1.2.




Exception occured in the invoke getCustomer method
org.xml.sax.SAXException: Deserializing parameter 'arg2':  could not
find deserializer for type
{urn:com.chordiant.customer.businessClasses}Customer


My wsdd contains the following line along with others of the same kind.

  <typeMapping
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
qname="ns8:Customer"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
type="java:com.chordiant.customer.businessClasses.Customer"
xmlns:ns8="http://businessClasses.customer.chordiant.com"/>

I would appreciate any help.

Thanks

Sagar




















Reply via email to