axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yuan" <>
Subject Question about Soap Message with Attachment
Date Tue, 18 Oct 2005 00:34:14 GMT

I have been looking at how to write a WSDL file to use Soap Message with
Attachment. I have found examples on the web using <mime:multipartRelated>,
example below:

<message name="Request">
		<part name="photo" type="xsd:hexBinary"/> </message>
<message name="Response">
		<part name="status" type="xsd:string"/> </message>

<wsdl:operation name="addPhoto">
            <soap:body use="literal"/>
            <mime:content part="photo" type="image/jpeg"/>

            <soap:body use="literal"/>
            <mime:content part="status" type="text/plain"/>

NOTE: I am not sure this is how you describe parts relate to mime attachment
types, But without this, there will be NULLPointerException in symboltable.
<message name="Request">
		<part name="photo" type="xsd:hexBinary"/> </message>

This seems to describe the structure of the soap message correctly with
respect to the documentation on W3C. SoapAttachment* files uses similar
structure as well. 
I tried using this with WSDL2WS, but the generated skeleton and stub don't
use Attachments at all. It will just have a function (in this case
addPhoto), it just treats it as having input xsd:hexBinary and output
xsd:string, no attachment functions used.

I have also found the file under tests directory in the repository:
testcases/wsdls/Attachment1.wsdl which also uses attachments. When I try to
run WSDL2WS on it, it returns the following error: "Type
{}DataHandler is referenced but not defined."
(basically for all types using namespace). 

I am not sure how this works but is there suppose to be a schema defined for
the DataHandler or any other attachment type? Am I supposes to define it

Also does WSDL2WS handle multiple Attachments as output?

Can anyone point me in the right direction? Any help is greatly appreciated.

Thanks in Advance.


Yuan Liu

View raw message