I believe that the dynamically generated wsdl from a deployed
axis1.2beta service DOES show type ="tns1:DataHandler" for the return
type of javax.activation.DataHandler.

I wonder if, for the sake of interoperability, the wsdl
file would be better off showing an 'xsd:anyType' return type
instead of 'DataHandler'....

For my own interoperability testing between an Axis1.2beta service
and a WASP client, I had to modify the Axis service to return
the DataHandler as a java.lang.Object so that the WASP client
did not treat the DataHandler as a javabean. After I made that
change, the dynamic wsdl showed a return type of 'tns1:anyType',
and the WASP client was able to turn the Axis-generated
multipart/related
message into a WASP 'org.idoox.wasp.typesMessageAttachment'
instance. The Axis client also still worked.

Here's how I ended up defining the service:

Object getFile(String name) {
     return new DataHandler(new FileDataSource(name));
}

If the dynamic wsdl returned an 'anyType', I might have been able to
leave the Axis service definition like this:

DataHandler getFile(String name) // the rest is the same

Thoughts?

Tom Nelson
RABA Technologies

On Apr 12, 2004, at 6:22 AM, Stuart Barlow wrote:

Yep in the beta release this bug still exists.
Ill raise a bug.

Davanum Srinivas wrote:

Again, if there is a problem with 1.2Beta, we can get this fixed. Please open a bug report.
-- dims
--- Stuart Barlow <[EMAIL PROTECTED]> wrote:
I have looked at the attachments example in the 1.1 release and
can see the DataHandler type mentioned as the return type for
the message in the WSDL.

Is it possible to use the DataHandler class and the AXIS roundtrip
tools?

I have a Java class with method...

public DataHandler getDocumentDataJavaClientOnly(String dst,
    String dmDocID, int versionNumber) throws Exception;


When I run Java2WSDL against this I get...
<wsdl:message name="getDocumentDataJavaClientOnlyResponse">
<wsdl:part name="getDocumentDataJavaClientOnlyReturn" type="xsd:anyType"/>
</wsdl:message>


I guess that Java2WSDL does not recognise the DataHandler type.
This is all in AXIS 1.1 has anyone tried the 1.2 alpha build for
this?

Ta,
Stuart.

=====
Davanum Srinivas - http://webservices.apache.org/~dims/




Reply via email to