[ http://issues.apache.org/jira/browse/AXIS2-1221?page=all ]
Davanum Srinivas updated AXIS2-1221:
------------------------------------
Attachment: my.diff
Thilina,
Could you please try this patch? Am able to generate both mtom and non-mtom
messages from the generated stub as follows:
public class Main {
public static void main(String[] args) throws Exception {
ImageHandlerServiceStub stub = new ImageHandlerServiceStub();
//stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);
Image image = new Image();
ImageAttachment_type1 param = new ImageAttachment_type1();
image.setImageAttachment(param);
image.setMetaInfo("text/xml");
param.setBase64Binary(new DataHandler(new FileDataSource(new
File("C:/junk/adminmain.jpg"))));
stub.uploadImage(image);
}
}
And i can get the full byte array sent on the service skeleton uploadImage
method.
thanks,
dims
> ADB Code generation for XMIME (http://www.w3.org/TR/xml-media-types/) is
> incorrect
> ----------------------------------------------------------------------------------
>
> Key: AXIS2-1221
> URL: http://issues.apache.org/jira/browse/AXIS2-1221
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: databinding
> Reporter: Thilina Gunarathne
> Assigned To: Davanum Srinivas
> Priority: Blocker
> Attachments: my.diff
>
>
> Schema :
> <xsd:element name="image-attachment">
> <xsd:complexType>
> <xsd:simpleContent>
> <xsd:extension base="xsd:base64Binary">
> <xsd:attribute ref="xmime:contentType" />
> </xsd:extension>
> </xsd:simpleContent>
> </xsd:complexType>
> </xsd:element>
> Axis2 Generated Message:
> <ns1:image-attachment>
> <ns1:base64Binary
> xmlns:ns1="http://www.w3.org/2001/XMLSchema">.....Some Base64 characters or
> XOP:include.........</ns1:base64Binary>
> </ns1:image-attachment>
> According to the http://www.w3.org/TR/xml-media-types/ specification above
> generated message is incorrect... Image-Attachment element should have the
> base64 content, not an element with the name of base64Binary....
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]