You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Thomas Mueller <tm...@tmueller.com> on 2003/02/17 23:56:09 UTC

Type Mapping

Hi,

I can't find any useful current documentation describing type mapping
from java types to SOAP. I'm sure there are lot of documents but I can't
find them :-(
http://www-106.ibm.com/developerworks/webservices/library/ws-soapmap1/?open&l=930,t=grws
looks very good but it's outdated.

I have for example the following class:

public class file implements java.io.Serializable {
  public String filename;
  public String md5sum;
  public long   mtime;
}

I'd like to return a 'file'. The automatically generated wsdl file looks
good for me, a complexType is constructed, but when I call the method
that should return the file I get an exception:

java.io.IOException: No serializer found for class
com.tmueller.ws.SyncBalancer.datatypes.file in registry
org.apache.axis.encoding.TypeMappingImpl@9fe84e

I tried both, using the deployment descriptor and
org.apache.axis.encoding.TypeMapping but I can't get it work.

Does anyone have an example how to do that?

Thanks a lot!


-- 
MfG Thomas Mueller - http://www.tmueller.com for pgp key (95702B3B)

AW: Type Mapping

Posted by Peter Koch <pe...@ivyteam.ch>.
you have to register your own class (datatype) in the deployment descriptor
of your service.

See the <beanMapping..> element in
http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-axis/java/docs/reference.ht
ml#Deployment

by the way, the built in type mapping is described in
http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-axis/java/docs/user-guide.h
tml#DataMapping

cheers,
peter

-----Ursprungliche Nachricht-----
Von: Thomas Mueller [mailto:tmm@tmueller.com]
Gesendet: Montag, 17. Februar 2003 23:56
An: axis-user@ws.apache.org
Betreff: Type Mapping


Hi,

I can't find any useful current documentation describing type mapping
from java types to SOAP. I'm sure there are lot of documents but I can't
find them :-(
http://www-106.ibm.com/developerworks/webservices/library/ws-soapmap1/?open&
l=930,t=grws
looks very good but it's outdated.

I have for example the following class:

public class file implements java.io.Serializable {
  public String filename;
  public String md5sum;
  public long   mtime;
}

I'd like to return a 'file'. The automatically generated wsdl file looks
good for me, a complexType is constructed, but when I call the method
that should return the file I get an exception:

java.io.IOException: No serializer found for class
com.tmueller.ws.SyncBalancer.datatypes.file in registry
org.apache.axis.encoding.TypeMappingImpl@9fe84e

I tried both, using the deployment descriptor and
org.apache.axis.encoding.TypeMapping but I can't get it work.

Does anyone have an example how to do that?

Thanks a lot!


--
MfG Thomas Mueller - http://www.tmueller.com for pgp key (95702B3B)