Russell Butek
[EMAIL PROTECTED]
Please respond to [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: DataHandler and WSDL2Java
Has anyone had any luck getting WSDL2Java to automatically generate a type
mapping which uses the JAFDataHandlerSerializer/Deserializer factory objects
for javax.activation.DataHandler objects? Here are the schemas that I'm
using:
DataHandler.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://activation.javax"
xmlns:tns="http://types.retrieval.services.jgateway.lexisnexis.com"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="1.0">
<complexType name="DataHandler">
<sequence/>
</complexType>
DocRetrieve.xsd:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://types.retrieval.services.jgateway.lexisnexis.com"
xmlns:tns="http://types.retrieval.services.jgateway.lexisnexis.com"
xmlns:activation="http://activation.javax"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="1.0">
- <import namespace="http://activation.javax"
.xsd"/>
- ...
<complexType name="DocumentList">
<sequence>
maxOccurs="25"/>
- </sequence>
</complexType>
...
By default, the type mappings which are generated from this schema use the
generic BeanSerializer/Deserializer factories, which in turn does not
generate a MIME response.
e.g. <typeMapping
xmlns:ns="http://activation.javax"
qname="ns:DataHandler"
type="java:javax.activation.DataHandler"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
- />
factories, things work as they should. Why doesn't the emitter use this
mapping by default for DataHandler types?
Thanks,
Joe Riess
Sr. Software Engineer
Electronic Product Development, LexisNexis
(937) 865-1730
