You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/14 17:21:52 UTC

[jira] Created: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1609

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1609
    Summary: No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             1.2 Beta

   Assignee: 
   Reporter: Sébastien Tardif

    Created: Thu, 14 Oct 2004 8:19 AM
    Updated: Thu, 14 Oct 2004 8:19 AM
Environment: Axis 09/23/2004

Description:
My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.

Take a look a the class:
public class OctetStream {
    private byte[] bytes = null;

    public OctetStream() {
    }

    public OctetStream(byte[] bytes) {
        this.bytes = bytes;
    }

    public byte[] getBytes() {
        return this.bytes;
    }

    public void setBytes(byte[] bytes) {
        this.bytes = bytes;
    }
}

It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".

As a third issues:

The JAX-RPC 1.1 specification said:


7.5 Mapping between MIME types and Java types
The following table specifies the standard Java mapping for a subset of the MIME types.
The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
required to conform to the above mapping. This mapping is reflected in the mapped Java
method signatures and WSDL description. A WSDL/XML to Java mapping tool is
required to provide an option to map the above set of MIME types to the
javax.activation.DataHandler class. The DataHandler class provides methods to
get access to the stream representation of the data for a MIME type.
A Java to WSDL mapping tool is required to provide a facility for specifying metadata
related to the above mapping between Java and MIME types. This metadata identifies
whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
mapped to an XML schema type (based on the section 4.2, "XML to Java Type
Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
or MIME type text/plain. The mapping metadata identifies a specific mapping.
If a MIME type is mapped to the javax.activation.DataHandler, the getContent
method of the DataHandler class must return instance of the corresponding Java type
for a specific MIME content type.
A JAX-RPC implementation is required to support the above MIME types (as specified
in the TABLE 7-1) and provide implementation of the required
javax.activation.DataContentHandler classes.
...
A JAX-RPC implementation is not required to support MIME types beyond that
specified in the above table. These additional MIME types may be mapped and
supported using the javax.activation.DataHandler class and Java Activation
Framework.
TABLE 7-1 Mapping of MIME Types
MIME Type Java Type
image/gif java.awt.Image
image/jpeg java.awt.Image
text/plain java.lang.String
multipart/* javax.mail.internet.MimeMultipart
text/xml or application/xml javax.xml.transform.Source

Here the approch of another stack:

From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html

JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by "sebastien tardif (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1609?page=history ]

sebastien tardif updated AXIS-1609:
-----------------------------------

    Attachment: AXIS-1609-simpler-diff.txt

Included is a simpler patch that does the modification suggested by previous comments. 

ant clean all-tests have been run successfully.

> No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1609
>          URL: http://issues.apache.org/jira/browse/AXIS-1609
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta
>  Environment: Axis 09/23/2004
>     Reporter: Sébastien Tardif
>  Attachments: AXIS-1609-simpler-diff.txt, diff.txt, docHarbor.wsdl
>
> My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.
> Take a look a the class:
> public class OctetStream {
>     private byte[] bytes = null;
>     public OctetStream() {
>     }
>     public OctetStream(byte[] bytes) {
>         this.bytes = bytes;
>     }
>     public byte[] getBytes() {
>         return this.bytes;
>     }
>     public void setBytes(byte[] bytes) {
>         this.bytes = bytes;
>     }
> }
> It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".
> As a third issues:
> The JAX-RPC 1.1 specification said:
> 7.5 Mapping between MIME types and Java types
> The following table specifies the standard Java mapping for a subset of the MIME types.
> The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
> required to conform to the above mapping. This mapping is reflected in the mapped Java
> method signatures and WSDL description. A WSDL/XML to Java mapping tool is
> required to provide an option to map the above set of MIME types to the
> javax.activation.DataHandler class. The DataHandler class provides methods to
> get access to the stream representation of the data for a MIME type.
> A Java to WSDL mapping tool is required to provide a facility for specifying metadata
> related to the above mapping between Java and MIME types. This metadata identifies
> whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
> mapped to an XML schema type (based on the section 4.2, "XML to Java Type
> Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
> or MIME type text/plain. The mapping metadata identifies a specific mapping.
> If a MIME type is mapped to the javax.activation.DataHandler, the getContent
> method of the DataHandler class must return instance of the corresponding Java type
> for a specific MIME content type.
> A JAX-RPC implementation is required to support the above MIME types (as specified
> in the TABLE 7-1) and provide implementation of the required
> javax.activation.DataContentHandler classes.
> ...
> A JAX-RPC implementation is not required to support MIME types beyond that
> specified in the above table. These additional MIME types may be mapped and
> supported using the javax.activation.DataHandler class and Java Activation
> Framework.
> TABLE 7-1 Mapping of MIME Types
> MIME Type Java Type
> image/gif java.awt.Image
> image/jpeg java.awt.Image
> text/plain java.lang.String
> multipart/* javax.mail.internet.MimeMultipart
> text/xml or application/xml javax.xml.transform.Source
> Here the approch of another stack:
> From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html
> JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1609?page=all ]

Davanum Srinivas reassigned AXIS-1609:
--------------------------------------

    Assign To: Davanum Srinivas

> No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1609
>          URL: http://issues.apache.org/jira/browse/AXIS-1609
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta
>  Environment: Axis 09/23/2004
>     Reporter: Sébastien Tardif
>     Assignee: Davanum Srinivas
>  Attachments: AXIS-1609-simpler-diff.txt, diff.txt, docHarbor.wsdl
>
> My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.
> Take a look a the class:
> public class OctetStream {
>     private byte[] bytes = null;
>     public OctetStream() {
>     }
>     public OctetStream(byte[] bytes) {
>         this.bytes = bytes;
>     }
>     public byte[] getBytes() {
>         return this.bytes;
>     }
>     public void setBytes(byte[] bytes) {
>         this.bytes = bytes;
>     }
> }
> It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".
> As a third issues:
> The JAX-RPC 1.1 specification said:
> 7.5 Mapping between MIME types and Java types
> The following table specifies the standard Java mapping for a subset of the MIME types.
> The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
> required to conform to the above mapping. This mapping is reflected in the mapped Java
> method signatures and WSDL description. A WSDL/XML to Java mapping tool is
> required to provide an option to map the above set of MIME types to the
> javax.activation.DataHandler class. The DataHandler class provides methods to
> get access to the stream representation of the data for a MIME type.
> A Java to WSDL mapping tool is required to provide a facility for specifying metadata
> related to the above mapping between Java and MIME types. This metadata identifies
> whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
> mapped to an XML schema type (based on the section 4.2, "XML to Java Type
> Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
> or MIME type text/plain. The mapping metadata identifies a specific mapping.
> If a MIME type is mapped to the javax.activation.DataHandler, the getContent
> method of the DataHandler class must return instance of the corresponding Java type
> for a specific MIME content type.
> A JAX-RPC implementation is required to support the above MIME types (as specified
> in the TABLE 7-1) and provide implementation of the required
> javax.activation.DataContentHandler classes.
> ...
> A JAX-RPC implementation is not required to support MIME types beyond that
> specified in the above table. These additional MIME types may be mapped and
> supported using the javax.activation.DataHandler class and Java Activation
> Framework.
> TABLE 7-1 Mapping of MIME Types
> MIME Type Java Type
> image/gif java.awt.Image
> image/jpeg java.awt.Image
> text/plain java.lang.String
> multipart/* javax.mail.internet.MimeMultipart
> text/xml or application/xml javax.xml.transform.Source
> Here the approch of another stack:
> From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html
> JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1609?page=comments#action_56458 ]
     
Davanum Srinivas commented on AXIS-1609:
----------------------------------------

Sébastien,

This patch changes a WHOLE lot of public api's and hence diffult at this late juncture. Can you please see if it can be made any better (avoid changing wholesale changes to api's)?

thanks,
dims

> No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1609
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1609
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta
>  Environment: Axis 09/23/2004
>     Reporter: Sébastien Tardif
>  Attachments: diff.txt, docHarbor.wsdl
>
> My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.
> Take a look a the class:
> public class OctetStream {
>     private byte[] bytes = null;
>     public OctetStream() {
>     }
>     public OctetStream(byte[] bytes) {
>         this.bytes = bytes;
>     }
>     public byte[] getBytes() {
>         return this.bytes;
>     }
>     public void setBytes(byte[] bytes) {
>         this.bytes = bytes;
>     }
> }
> It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".
> As a third issues:
> The JAX-RPC 1.1 specification said:
> 7.5 Mapping between MIME types and Java types
> The following table specifies the standard Java mapping for a subset of the MIME types.
> The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
> required to conform to the above mapping. This mapping is reflected in the mapped Java
> method signatures and WSDL description. A WSDL/XML to Java mapping tool is
> required to provide an option to map the above set of MIME types to the
> javax.activation.DataHandler class. The DataHandler class provides methods to
> get access to the stream representation of the data for a MIME type.
> A Java to WSDL mapping tool is required to provide a facility for specifying metadata
> related to the above mapping between Java and MIME types. This metadata identifies
> whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
> mapped to an XML schema type (based on the section 4.2, "XML to Java Type
> Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
> or MIME type text/plain. The mapping metadata identifies a specific mapping.
> If a MIME type is mapped to the javax.activation.DataHandler, the getContent
> method of the DataHandler class must return instance of the corresponding Java type
> for a specific MIME content type.
> A JAX-RPC implementation is required to support the above MIME types (as specified
> in the TABLE 7-1) and provide implementation of the required
> javax.activation.DataContentHandler classes.
> ...
> A JAX-RPC implementation is not required to support MIME types beyond that
> specified in the above table. These additional MIME types may be mapped and
> supported using the javax.activation.DataHandler class and Java Activation
> Framework.
> TABLE 7-1 Mapping of MIME Types
> MIME Type Java Type
> image/gif java.awt.Image
> image/jpeg java.awt.Image
> text/plain java.lang.String
> multipart/* javax.mail.internet.MimeMultipart
> text/xml or application/xml javax.xml.transform.Source
> Here the approch of another stack:
> From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html
> JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by "sebastien tardif (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1609?page=comments#action_55397 ]
     
sebastien tardif commented on AXIS-1609:
----------------------------------------

OctetStream should never have been created. It doesn't bring anything more that DataHandler provides. 

http://java.sun.com/j2ee/1.4/docs/api/javax/activation/DataHandler.html
DataHandler already has:

getInputStream() which at least support streaming( not having all the data in memory ).

The simpler is that OctetStream extends DataHandler.

This way people expecting a DataHandler or an interface that permit to stream will be satisfied and it should be backward compatible with the legacy OctetStream.

> No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1609
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1609
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta
>  Environment: Axis 09/23/2004
>     Reporter: Sébastien Tardif
>  Attachments: docHarbor.wsdl
>
> My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.
> Take a look a the class:
> public class OctetStream {
>     private byte[] bytes = null;
>     public OctetStream() {
>     }
>     public OctetStream(byte[] bytes) {
>         this.bytes = bytes;
>     }
>     public byte[] getBytes() {
>         return this.bytes;
>     }
>     public void setBytes(byte[] bytes) {
>         this.bytes = bytes;
>     }
> }
> It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".
> As a third issues:
> The JAX-RPC 1.1 specification said:
> 7.5 Mapping between MIME types and Java types
> The following table specifies the standard Java mapping for a subset of the MIME types.
> The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
> required to conform to the above mapping. This mapping is reflected in the mapped Java
> method signatures and WSDL description. A WSDL/XML to Java mapping tool is
> required to provide an option to map the above set of MIME types to the
> javax.activation.DataHandler class. The DataHandler class provides methods to
> get access to the stream representation of the data for a MIME type.
> A Java to WSDL mapping tool is required to provide a facility for specifying metadata
> related to the above mapping between Java and MIME types. This metadata identifies
> whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
> mapped to an XML schema type (based on the section 4.2, "XML to Java Type
> Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
> or MIME type text/plain. The mapping metadata identifies a specific mapping.
> If a MIME type is mapped to the javax.activation.DataHandler, the getContent
> method of the DataHandler class must return instance of the corresponding Java type
> for a specific MIME content type.
> A JAX-RPC implementation is required to support the above MIME types (as specified
> in the TABLE 7-1) and provide implementation of the required
> javax.activation.DataContentHandler classes.
> ...
> A JAX-RPC implementation is not required to support MIME types beyond that
> specified in the above table. These additional MIME types may be mapped and
> supported using the javax.activation.DataHandler class and Java Activation
> Framework.
> TABLE 7-1 Mapping of MIME Types
> MIME Type Java Type
> image/gif java.awt.Image
> image/jpeg java.awt.Image
> text/plain java.lang.String
> multipart/* javax.mail.internet.MimeMultipart
> text/xml or application/xml javax.xml.transform.Source
> Here the approch of another stack:
> From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html
> JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by "S?bastien Tardif (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1609?page=history ]

Sébastien Tardif updated AXIS-1609:
-----------------------------------

    Attachment: diff.txt

Here the patch following the official instruction to submit a patch. All unit tests are passing.
This patch add a new parameter to WSDL2Java:
  -m, --dataHandlerOnly
          always map attachments to the DataHandler type

With this patch Axis will be more JAX-RPC compliant.

> No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1609
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1609
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta
>  Environment: Axis 09/23/2004
>     Reporter: Sébastien Tardif
>  Attachments: diff.txt, docHarbor.wsdl
>
> My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.
> Take a look a the class:
> public class OctetStream {
>     private byte[] bytes = null;
>     public OctetStream() {
>     }
>     public OctetStream(byte[] bytes) {
>         this.bytes = bytes;
>     }
>     public byte[] getBytes() {
>         return this.bytes;
>     }
>     public void setBytes(byte[] bytes) {
>         this.bytes = bytes;
>     }
> }
> It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".
> As a third issues:
> The JAX-RPC 1.1 specification said:
> 7.5 Mapping between MIME types and Java types
> The following table specifies the standard Java mapping for a subset of the MIME types.
> The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
> required to conform to the above mapping. This mapping is reflected in the mapped Java
> method signatures and WSDL description. A WSDL/XML to Java mapping tool is
> required to provide an option to map the above set of MIME types to the
> javax.activation.DataHandler class. The DataHandler class provides methods to
> get access to the stream representation of the data for a MIME type.
> A Java to WSDL mapping tool is required to provide a facility for specifying metadata
> related to the above mapping between Java and MIME types. This metadata identifies
> whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
> mapped to an XML schema type (based on the section 4.2, "XML to Java Type
> Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
> or MIME type text/plain. The mapping metadata identifies a specific mapping.
> If a MIME type is mapped to the javax.activation.DataHandler, the getContent
> method of the DataHandler class must return instance of the corresponding Java type
> for a specific MIME content type.
> A JAX-RPC implementation is required to support the above MIME types (as specified
> in the TABLE 7-1) and provide implementation of the required
> javax.activation.DataContentHandler classes.
> ...
> A JAX-RPC implementation is not required to support MIME types beyond that
> specified in the above table. These additional MIME types may be mapped and
> supported using the javax.activation.DataHandler class and Java Activation
> Framework.
> TABLE 7-1 Mapping of MIME Types
> MIME Type Java Type
> image/gif java.awt.Image
> image/jpeg java.awt.Image
> text/plain java.lang.String
> multipart/* javax.mail.internet.MimeMultipart
> text/xml or application/xml javax.xml.transform.Source
> Here the approch of another stack:
> From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html
> JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by "sebastien tardif (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-1609?page=comments#action_12315743 ] 

sebastien tardif commented on AXIS-1609:
----------------------------------------

Dims,

Please merge. I didn't touch the cvs code for a while so I'm not setup. 

> No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1609
>          URL: http://issues.apache.org/jira/browse/AXIS-1609
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta
>  Environment: Axis 09/23/2004
>     Reporter: Sébastien Tardif
>     Assignee: Davanum Srinivas
>  Attachments: AXIS-1609-simpler-diff.txt, diff.txt, docHarbor.wsdl
>
> My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.
> Take a look a the class:
> public class OctetStream {
>     private byte[] bytes = null;
>     public OctetStream() {
>     }
>     public OctetStream(byte[] bytes) {
>         this.bytes = bytes;
>     }
>     public byte[] getBytes() {
>         return this.bytes;
>     }
>     public void setBytes(byte[] bytes) {
>         this.bytes = bytes;
>     }
> }
> It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".
> As a third issues:
> The JAX-RPC 1.1 specification said:
> 7.5 Mapping between MIME types and Java types
> The following table specifies the standard Java mapping for a subset of the MIME types.
> The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
> required to conform to the above mapping. This mapping is reflected in the mapped Java
> method signatures and WSDL description. A WSDL/XML to Java mapping tool is
> required to provide an option to map the above set of MIME types to the
> javax.activation.DataHandler class. The DataHandler class provides methods to
> get access to the stream representation of the data for a MIME type.
> A Java to WSDL mapping tool is required to provide a facility for specifying metadata
> related to the above mapping between Java and MIME types. This metadata identifies
> whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
> mapped to an XML schema type (based on the section 4.2, "XML to Java Type
> Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
> or MIME type text/plain. The mapping metadata identifies a specific mapping.
> If a MIME type is mapped to the javax.activation.DataHandler, the getContent
> method of the DataHandler class must return instance of the corresponding Java type
> for a specific MIME content type.
> A JAX-RPC implementation is required to support the above MIME types (as specified
> in the TABLE 7-1) and provide implementation of the required
> javax.activation.DataContentHandler classes.
> ...
> A JAX-RPC implementation is not required to support MIME types beyond that
> specified in the above table. These additional MIME types may be mapped and
> supported using the javax.activation.DataHandler class and Java Activation
> Framework.
> TABLE 7-1 Mapping of MIME Types
> MIME Type Java Type
> image/gif java.awt.Image
> image/jpeg java.awt.Image
> text/plain java.lang.String
> multipart/* javax.mail.internet.MimeMultipart
> text/xml or application/xml javax.xml.transform.Source
> Here the approch of another stack:
> From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html
> JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1609?page=comments#action_55506 ]
     
Davanum Srinivas commented on AXIS-1609:
----------------------------------------

Please follow instructions here on how to submit a patch:
http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages/SubmitPatches

thanks,
dims

> No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1609
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1609
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta
>  Environment: Axis 09/23/2004
>     Reporter: Sébastien Tardif
>  Attachments: docHarbor.wsdl
>
> My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.
> Take a look a the class:
> public class OctetStream {
>     private byte[] bytes = null;
>     public OctetStream() {
>     }
>     public OctetStream(byte[] bytes) {
>         this.bytes = bytes;
>     }
>     public byte[] getBytes() {
>         return this.bytes;
>     }
>     public void setBytes(byte[] bytes) {
>         this.bytes = bytes;
>     }
> }
> It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".
> As a third issues:
> The JAX-RPC 1.1 specification said:
> 7.5 Mapping between MIME types and Java types
> The following table specifies the standard Java mapping for a subset of the MIME types.
> The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
> required to conform to the above mapping. This mapping is reflected in the mapped Java
> method signatures and WSDL description. A WSDL/XML to Java mapping tool is
> required to provide an option to map the above set of MIME types to the
> javax.activation.DataHandler class. The DataHandler class provides methods to
> get access to the stream representation of the data for a MIME type.
> A Java to WSDL mapping tool is required to provide a facility for specifying metadata
> related to the above mapping between Java and MIME types. This metadata identifies
> whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
> mapped to an XML schema type (based on the section 4.2, "XML to Java Type
> Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
> or MIME type text/plain. The mapping metadata identifies a specific mapping.
> If a MIME type is mapped to the javax.activation.DataHandler, the getContent
> method of the DataHandler class must return instance of the corresponding Java type
> for a specific MIME content type.
> A JAX-RPC implementation is required to support the above MIME types (as specified
> in the TABLE 7-1) and provide implementation of the required
> javax.activation.DataContentHandler classes.
> ...
> A JAX-RPC implementation is not required to support MIME types beyond that
> specified in the above table. These additional MIME types may be mapped and
> supported using the javax.activation.DataHandler class and Java Activation
> Framework.
> TABLE 7-1 Mapping of MIME Types
> MIME Type Java Type
> image/gif java.awt.Image
> image/jpeg java.awt.Image
> text/plain java.lang.String
> multipart/* javax.mail.internet.MimeMultipart
> text/xml or application/xml javax.xml.transform.Source
> Here the approch of another stack:
> From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html
> JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by ax...@ws.apache.org.
The following issue has been updated:

    Updater: sebastien tardif (mailto:at925@freenet.carleton.ca)
       Date: Fri, 15 Oct 2004 3:17 PM
    Comment:
The WSDL file containing some attachments using MIME type application/octet-stream. Attachment done using SwA standard.
    Changes:
             Attachment changed to docHarbor.wsdl
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/AXIS-1609?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1609

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1609
    Summary: No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             1.2 Beta

   Assignee: 
   Reporter: Sébastien Tardif

    Created: Thu, 14 Oct 2004 8:19 AM
    Updated: Fri, 15 Oct 2004 3:17 PM
Environment: Axis 09/23/2004

Description:
My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.

Take a look a the class:
public class OctetStream {
    private byte[] bytes = null;

    public OctetStream() {
    }

    public OctetStream(byte[] bytes) {
        this.bytes = bytes;
    }

    public byte[] getBytes() {
        return this.bytes;
    }

    public void setBytes(byte[] bytes) {
        this.bytes = bytes;
    }
}

It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".

As a third issues:

The JAX-RPC 1.1 specification said:


7.5 Mapping between MIME types and Java types
The following table specifies the standard Java mapping for a subset of the MIME types.
The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
required to conform to the above mapping. This mapping is reflected in the mapped Java
method signatures and WSDL description. A WSDL/XML to Java mapping tool is
required to provide an option to map the above set of MIME types to the
javax.activation.DataHandler class. The DataHandler class provides methods to
get access to the stream representation of the data for a MIME type.
A Java to WSDL mapping tool is required to provide a facility for specifying metadata
related to the above mapping between Java and MIME types. This metadata identifies
whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
mapped to an XML schema type (based on the section 4.2, "XML to Java Type
Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
or MIME type text/plain. The mapping metadata identifies a specific mapping.
If a MIME type is mapped to the javax.activation.DataHandler, the getContent
method of the DataHandler class must return instance of the corresponding Java type
for a specific MIME content type.
A JAX-RPC implementation is required to support the above MIME types (as specified
in the TABLE 7-1) and provide implementation of the required
javax.activation.DataContentHandler classes.
...
A JAX-RPC implementation is not required to support MIME types beyond that
specified in the above table. These additional MIME types may be mapped and
supported using the javax.activation.DataHandler class and Java Activation
Framework.
TABLE 7-1 Mapping of MIME Types
MIME Type Java Type
image/gif java.awt.Image
image/jpeg java.awt.Image
text/plain java.lang.String
multipart/* javax.mail.internet.MimeMultipart
text/xml or application/xml javax.xml.transform.Source

Here the approch of another stack:

From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html

JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1609?page=comments#action_56460 ]
     
Tom Jordahl commented on AXIS-1609:
-----------------------------------

Would it be better to add a getter/setting setting for the data handler mapping rather than adding another argument to the constructor?


> No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1609
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1609
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta
>  Environment: Axis 09/23/2004
>     Reporter: Sébastien Tardif
>  Attachments: diff.txt, docHarbor.wsdl
>
> My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.
> Take a look a the class:
> public class OctetStream {
>     private byte[] bytes = null;
>     public OctetStream() {
>     }
>     public OctetStream(byte[] bytes) {
>         this.bytes = bytes;
>     }
>     public byte[] getBytes() {
>         return this.bytes;
>     }
>     public void setBytes(byte[] bytes) {
>         this.bytes = bytes;
>     }
> }
> It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".
> As a third issues:
> The JAX-RPC 1.1 specification said:
> 7.5 Mapping between MIME types and Java types
> The following table specifies the standard Java mapping for a subset of the MIME types.
> The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
> required to conform to the above mapping. This mapping is reflected in the mapped Java
> method signatures and WSDL description. A WSDL/XML to Java mapping tool is
> required to provide an option to map the above set of MIME types to the
> javax.activation.DataHandler class. The DataHandler class provides methods to
> get access to the stream representation of the data for a MIME type.
> A Java to WSDL mapping tool is required to provide a facility for specifying metadata
> related to the above mapping between Java and MIME types. This metadata identifies
> whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
> mapped to an XML schema type (based on the section 4.2, "XML to Java Type
> Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
> or MIME type text/plain. The mapping metadata identifies a specific mapping.
> If a MIME type is mapped to the javax.activation.DataHandler, the getContent
> method of the DataHandler class must return instance of the corresponding Java type
> for a specific MIME content type.
> A JAX-RPC implementation is required to support the above MIME types (as specified
> in the TABLE 7-1) and provide implementation of the required
> javax.activation.DataContentHandler classes.
> ...
> A JAX-RPC implementation is not required to support MIME types beyond that
> specified in the above table. These additional MIME types may be mapped and
> supported using the javax.activation.DataHandler class and Java Activation
> Framework.
> TABLE 7-1 Mapping of MIME Types
> MIME Type Java Type
> image/gif java.awt.Image
> image/jpeg java.awt.Image
> text/plain java.lang.String
> multipart/* javax.mail.internet.MimeMultipart
> text/xml or application/xml javax.xml.transform.Source
> Here the approch of another stack:
> From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html
> JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-1609?page=comments#action_12315590 ] 

Davanum Srinivas commented on AXIS-1609:
----------------------------------------

Sebastien,

could you please update the patch? have trouble applying it against latest CVS. or just let me know and i will merge the changes by hand.

thanks,
dims

> No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1609
>          URL: http://issues.apache.org/jira/browse/AXIS-1609
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta
>  Environment: Axis 09/23/2004
>     Reporter: Sébastien Tardif
>     Assignee: Davanum Srinivas
>  Attachments: AXIS-1609-simpler-diff.txt, diff.txt, docHarbor.wsdl
>
> My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.
> Take a look a the class:
> public class OctetStream {
>     private byte[] bytes = null;
>     public OctetStream() {
>     }
>     public OctetStream(byte[] bytes) {
>         this.bytes = bytes;
>     }
>     public byte[] getBytes() {
>         return this.bytes;
>     }
>     public void setBytes(byte[] bytes) {
>         this.bytes = bytes;
>     }
> }
> It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".
> As a third issues:
> The JAX-RPC 1.1 specification said:
> 7.5 Mapping between MIME types and Java types
> The following table specifies the standard Java mapping for a subset of the MIME types.
> The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
> required to conform to the above mapping. This mapping is reflected in the mapped Java
> method signatures and WSDL description. A WSDL/XML to Java mapping tool is
> required to provide an option to map the above set of MIME types to the
> javax.activation.DataHandler class. The DataHandler class provides methods to
> get access to the stream representation of the data for a MIME type.
> A Java to WSDL mapping tool is required to provide a facility for specifying metadata
> related to the above mapping between Java and MIME types. This metadata identifies
> whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
> mapped to an XML schema type (based on the section 4.2, "XML to Java Type
> Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
> or MIME type text/plain. The mapping metadata identifies a specific mapping.
> If a MIME type is mapped to the javax.activation.DataHandler, the getContent
> method of the DataHandler class must return instance of the corresponding Java type
> for a specific MIME content type.
> A JAX-RPC implementation is required to support the above MIME types (as specified
> in the TABLE 7-1) and provide implementation of the required
> javax.activation.DataContentHandler classes.
> ...
> A JAX-RPC implementation is not required to support MIME types beyond that
> specified in the above table. These additional MIME types may be mapped and
> supported using the javax.activation.DataHandler class and Java Activation
> Framework.
> TABLE 7-1 Mapping of MIME Types
> MIME Type Java Type
> image/gif java.awt.Image
> image/jpeg java.awt.Image
> text/plain java.lang.String
> multipart/* javax.mail.internet.MimeMultipart
> text/xml or application/xml javax.xml.transform.Source
> Here the approch of another stack:
> From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html
> JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS-1609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS-1609:
-----------------------------------

    Assignee:     (was: Davanum Srinivas)

> No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS-1609
>                 URL: https://issues.apache.org/jira/browse/AXIS-1609
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.2 Beta
>         Environment: Axis 09/23/2004
>            Reporter: Sébastien Tardif
>         Attachments: AXIS-1609-simpler-diff.txt, diff.txt, docHarbor.wsdl
>
>
> My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.
> Take a look a the class:
> public class OctetStream {
>     private byte[] bytes = null;
>     public OctetStream() {
>     }
>     public OctetStream(byte[] bytes) {
>         this.bytes = bytes;
>     }
>     public byte[] getBytes() {
>         return this.bytes;
>     }
>     public void setBytes(byte[] bytes) {
>         this.bytes = bytes;
>     }
> }
> It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".
> As a third issues:
> The JAX-RPC 1.1 specification said:
> 7.5 Mapping between MIME types and Java types
> The following table specifies the standard Java mapping for a subset of the MIME types.
> The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
> required to conform to the above mapping. This mapping is reflected in the mapped Java
> method signatures and WSDL description. A WSDL/XML to Java mapping tool is
> required to provide an option to map the above set of MIME types to the
> javax.activation.DataHandler class. The DataHandler class provides methods to
> get access to the stream representation of the data for a MIME type.
> A Java to WSDL mapping tool is required to provide a facility for specifying metadata
> related to the above mapping between Java and MIME types. This metadata identifies
> whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
> mapped to an XML schema type (based on the section 4.2, "XML to Java Type
> Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
> or MIME type text/plain. The mapping metadata identifies a specific mapping.
> If a MIME type is mapped to the javax.activation.DataHandler, the getContent
> method of the DataHandler class must return instance of the corresponding Java type
> for a specific MIME content type.
> A JAX-RPC implementation is required to support the above MIME types (as specified
> in the TABLE 7-1) and provide implementation of the required
> javax.activation.DataContentHandler classes.
> ...
> A JAX-RPC implementation is not required to support MIME types beyond that
> specified in the above table. These additional MIME types may be mapped and
> supported using the javax.activation.DataHandler class and Java Activation
> Framework.
> TABLE 7-1 Mapping of MIME Types
> MIME Type Java Type
> image/gif java.awt.Image
> image/jpeg java.awt.Image
> text/plain java.lang.String
> multipart/* javax.mail.internet.MimeMultipart
> text/xml or application/xml javax.xml.transform.Source
> Here the approch of another stack:
> From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html
> JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-1609) No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.

Posted by ax...@ws.apache.org.
The following comment has been added to this issue:

     Author: Davanum Srinivas
    Created: Fri, 15 Oct 2004 12:01 PM
       Body:
Sébastien,

Can you please upload YOUR wsdl?

thanks,
dims
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1609?page=comments#action_54222

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1609

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1609
    Summary: No option available to map all MIME type to javax.activation.DataHandler as required by JAX-RPC 1.1 specification.
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             1.2 Beta

   Assignee: 
   Reporter: Sébastien Tardif

    Created: Thu, 14 Oct 2004 8:19 AM
    Updated: Fri, 15 Oct 2004 12:01 PM
Environment: Axis 09/23/2004

Description:
My use case is to use SwA and doing streaming from end to end. The type of attachment is not known. So as suggested by many documents I use the mime type: "application/octet-stream". Wsdl2Java utility use org.apache.axis.attachments.OctetStream to represent the data. It's a class specific to Axis which is one of my concern.

Take a look a the class:
public class OctetStream {
    private byte[] bytes = null;

    public OctetStream() {
    }

    public OctetStream(byte[] bytes) {
        this.bytes = bytes;
    }

    public byte[] getBytes() {
        return this.bytes;
    }

    public void setBytes(byte[] bytes) {
        this.bytes = bytes;
    }
}

It doesn't support streaming! It's probably the reason why people will use attachment instead of the most compatible way: "xsd:base64Binary".

As a third issues:

The JAX-RPC 1.1 specification said:


7.5 Mapping between MIME types and Java types
The following table specifies the standard Java mapping for a subset of the MIME types.
The Java to WSDL/XML and WSDL/XML to Java mapping for the MIME types is
required to conform to the above mapping. This mapping is reflected in the mapped Java
method signatures and WSDL description. A WSDL/XML to Java mapping tool is
required to provide an option to map the above set of MIME types to the
javax.activation.DataHandler class. The DataHandler class provides methods to
get access to the stream representation of the data for a MIME type.
A Java to WSDL mapping tool is required to provide a facility for specifying metadata
related to the above mapping between Java and MIME types. This metadata identifies
whether a Java type is mapped to a MIME type (using the WSDL MIME binding) or is
mapped to an XML schema type (based on the section 4.2, "XML to Java Type
Mapping"). For example, a java.lang.String can be mapped to either an xsd:string
or MIME type text/plain. The mapping metadata identifies a specific mapping.
If a MIME type is mapped to the javax.activation.DataHandler, the getContent
method of the DataHandler class must return instance of the corresponding Java type
for a specific MIME content type.
A JAX-RPC implementation is required to support the above MIME types (as specified
in the TABLE 7-1) and provide implementation of the required
javax.activation.DataContentHandler classes.
...
A JAX-RPC implementation is not required to support MIME types beyond that
specified in the above table. These additional MIME types may be mapped and
supported using the javax.activation.DataHandler class and Java Activation
Framework.
TABLE 7-1 Mapping of MIME Types
MIME Type Java Type
image/gif java.awt.Image
image/jpeg java.awt.Image
text/plain java.lang.String
multipart/* javax.mail.internet.MimeMultipart
text/xml or application/xml javax.xml.transform.Source

Here the approch of another stack:

From: https://jax-rpc.dev.java.net/whitepaper/1.1.2/attachments-howto.html

JAXRPC specification uses the JavaBeans Activation Framework to support various MIME content types. The DataHandler class provides a consistent interface to the data represented in various MIME types. A DataHandler class uses the DataContentHandler interface to convert between a stream and specific Java object based on the MIME type. JAXRPC uses SAAJ, which provides DataContentHandlers for the MIME types supported by JAXRPC. If the MIME type is not one of the JAXRPC supported MIME types, then the user has to register corresponding DataContentHandlers. Here "text/plain" and "text/xml" are both JAXRPC supported MIME types and is taken care of automatically. A DataHandler can be instantiated using the constructor DataHandler(Object obj, String mime_type). The method DataHandler.getContentType returns the MIME type of the encapsulatd data and DataHandler.getContent method retruns a Java object based on the MIME type of the encapsulated data. If you do not want the MIME types to map to coresponding Java types, you can use wscompile with -datahandleronly option to map all MIME types to DataHandler.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira