axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@us.ibm.com
Subject WSDL MIME is broken - need suggestions for arrays
Date Tue, 06 Aug 2002 15:09:44 GMT
Between WSDL 1.1 and JAX-RPC, for MIME we essentially ignore the type given
in the message part and determine the type via the binding.  For example:

<complexType name="ArrayOfBinary"> ... </complexType>

<message name="empty"/>
<message name="m1">
  <part name="body" type="tns:ArrayOfBinary"/>
</message>

<portType name="pt1">
  <operation name="setImage">
    <input message="m1"/>
    <output message="empty"/>
  </operation>
</portType>

<binding name="b1" type="tns:pt1">
  <operation name="setImage">
    <input>
      <mime:multipartRelated>
        <mime:part>
          <mime:content part="body" type="image/jpeg"/>
        </mime:part>
      </mime:multipartRelated>
    </input>
    <output/>
  </operation>
</binding>

The binding says "image/jpeg".  We know that means "java.awt.Image", so
message m1's type could have been anything at all since it's ignored:
"xsd:string", "xsd:anyURI".  While quite odd, this works just dandy.  We
end up with the Java signature:

public void setImage(java.awt.Image body);

Now, how do we map THIS signature to WSDL?

public void setImages(Image[] bodies);

mime:content cannot contain anything but part and type.  I've come up with
2 possible hacks, but they're both rather messy to deal with:
1.  append "[]" to the end of the type string for each dimension.
2.  add additional mime:content entries for each dimension:  "<mime:content
part="body" type="array"/>"

Another option:
3.  completely ignore WSDL 1.1 and come up with our own xml for MIME types.
This is completely non-interoperable, but WSDL MIME is so broken that I
don't know how much interoperability we'd have, anyway.

Any preferences?  Any other suggestions?

Russell Butek
butek@us.ibm.com
Mime
View raw message