You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Raman N. Chikkamagalur" <rn...@cise.ufl.edu> on 2002/08/11 02:26:34 UTC

Re: [WSIF] Making DynamicInvoker.java work for Complex types


Hello Aleksander,
  Thanks for the reply and for the mailing list address (I tried to post
the message at
  alpaworks WSIF discussion group).

  >i think what you need is generic and dynamic representation of
  >any xsd type you may use without need to map to java class,
  >otherwise you need ot have on CLASSPATH not only class
  >but also register serializer and deserialzier (at least for Apache
SOAP)

  I am looking for is a way to make Dyanamic Invoker work for Complex
Types. It is ok for me to set the CLASSPATH for the java classes and
register serializers and Deserializer. But I don't know which WSIF APIs I
should use to register serializer and deserializer.

  >please get the latest WSIF from apache, experiment with it and
  >then post results to the mailing lists and i am sure people will
  >be willing ot help you but you need ot be more specific: would you
  >like for example such dynamic handling of complex types work with
  >every WSIF provider (apache soap, axis, java-local, jms etc.) or
  >to make it only working with one WSIF providers. how exactly input
  >to DynamicInvoker should be represented (as XML string, JDOM etc.)?

  I am working on the latest version of WSIF (downloaded from
http://xml.apache.org/dist/axis/nightly/).

  The following is the scenarion I am testing:
  I have a wsdl document located at
"http://localHost:8080/axis/services/HelloServer?wsdl".
   The service returns an Complex type (Java Class).
  The signature of the method in web-service is:
  "Customer sayHelloTo(String name)"
  The invocation is perfect because the input argument is of simple type.
  I used TCPmon to check the returned SOAP message. It has the complex
type "Customer" instance in XML format. But the deserialization at the
client side fails. I would be glad if anyone of you could help me in
understanding how to register serializer and deserializers using WSIF
framework.

  The following is the exception message I am getting at the client side:



============================================================================================
  org.xml.sax.SAXException: Deserializing parameter 'sayHelloToReturn':
could not
   find deserializer for type {urn:Customer}Customer
          at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:231)
          at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Dese
  rializationContextImpl.java:857)
          at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
  va:199)
          at
org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
  t.java:644)
          at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:235)
          at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:259)
          at org.apache.axis.client.Call.invoke(Call.java:1806)
          at org.apache.axis.client.Call.invoke(Call.java:1711)
          at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.in
  vokeRequestResponseOperation(Unknown Source)
          at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.ex
  ecuteRequestResponseOperation(Unknown Source)
          at clients.ComplexTypeDI.invokeMethod(ComplexTypeDI.java:216)
          at clients.ComplexTypeDI.main(ComplexTypeDI.java:46)
  [ERROR] Call - -Exception: <org.xml.sax.SAXException: Deserializing
parameter 's
  ayHelloToReturn':  could not find deserializer for type
{urn:Customer}Customer>
  Result:

  Done!
==================================================================================================