[jboss-user] [JBossWS] - Re: Enabling MTOM-Support at JBossWS client fails
The cause is, may be, in 'protected' declaration. I used private DataHandler stmtContent; @XmlElement(name = StatementContent, required = false) @XmlMimeType(application/zip) public final DataHandler getStmtContent() { return this.stmtContent; } public final void setStmtContent(DataHandler stmtContent) { this.stmtContent = stmtContent; } and it works fine with .NET client. Another thing you can do: put into your endpoint declaration @MTOM(enabled = true) in addition to @BindingType View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4170061#4170061 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4170061 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: Enabling MTOM-Support at JBossWS client fails
Well, I am using document/literal wrapped for my wsdl file, and what I have found so far is that mtom only works if the parameter type of the method is DataHandler. For example, this works: @WebMethod @RequestWrapper(localName = sendOctet, targetNamespace = http://xxx.com/webservice/mtom/;, className = com.xxx.webservice.mtom.SendOctet) @ResponseWrapper(localName = sendOctetResponse, targetNamespace = http://xxx.com/stat/webservice/mtom/;, className = com.xxx.webservice.mtom.SendOctetResponse) public void sendOctet( @WebParam(name = octet, targetNamespace = ) DataHandler octet, But if I pass something like List, or another holder bean that contains a DataHandler field, mtom does not work anymore, and the message is send inline. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4170124#4170124 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4170124 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: Enabling MTOM-Support at JBossWS client fails
The following code works for me (java 6, JBoss 5.0.0CR1, jbossws Core 3.02): @WebService(...) @EndpointConfig(...) @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) @MTOM(enabled = true) @BindingType(value = http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true;) public class StatementService { ... @WebMethod(operationName = GetStatementContent) public StatementListDO getStatementContent(@WebParam(name = FileName) final String fileName) { StatementListDO sldo = new StatementListDO(); ... ArrayList statements = new ArrayList(1); final File f7z = new File(fileName); StatementDO statement = new StatementDO(); statement.setStmtContent(new DataHandler(new FileDataSource(f7z))); statements.add(statement); sldo.setStatements(statements); return sldo; } ... } @XmlType @XmlRootElement(name = StatementList) public class StatementListDO implements Serializable { private ArrayList statements; @XmlElement(name = Statements, nillable = true, required = false) public final ArrayList getStatements() { return this.statements; } public final void setStatements(ArrayList statements) { this.statements = statements; } } @XmlType public final class StatementDO implements Serializable { ... private DataHandler stmtContent; @XmlElement(name = StatementContent, required = false) @XmlMimeType(application/zip) public final DataHandler getStmtContent() { return this.stmtContent; } public final void setStmtContent(DataHandler stmtContent) { this.stmtContent = stmtContent; } ... } View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4170135#4170135 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4170135 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: Enabling MTOM-Support at JBossWS client fails
I hope my example should work also if I used StatementListDO as web parameter. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4170136#4170136 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4170136 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: Enabling MTOM-Support at JBossWS client fails
You use the very old stack. May be, one of these bugs are the cause (these were fixed since your revision): [JBWS-1736] - MTOM property at service-ref level [JBWS-1460] @XmlMimeType on SEI parameter declarations [JBWS-1973] - MTOM/XOP attachments not inlined when using JAX-WS handlers [JBWS-2000] - MTOM: Chunked encoding transfer problem [JBWS-2012] - Attachment support for JAX-WS collections [JBWS-2014] - MTOM + WS-Security not working View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4170138#4170138 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4170138 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: Enabling MTOM-Support at JBossWS client fails
Thank you very much for the replies. In your case the code is working because StatementDO has a single DataHandler field. public final class StatementDO implements Serializable { ... private DataHandler stmtContent; I think the problem is when there is a List of DataHandlers. public final class StatementDO implements Serializable { ... private List stmtContent; I also think you are right and the problem might be taken care of by this: [JBWS-2012] - Attachment support for JAX-WS collections unfortunately it was fixed in version 3.0.2 and I can't move up to that version yet since I am running Jboss 4.0.5 for now. Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4170156#4170156 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4170156 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: Enabling MTOM-Support at JBossWS client fails
Hi, I have been trying to compare my classes with the sample xop examples in jbossws package and finally I was able to find the problem. Here are my classes: class AttachmentType { @XmlMimeType(application/octet-stream) protected DataHandler dh; class AttachmentTypeHolder { protected List attachments; In my endpoint class if I have the following method signature, then the xop works: public AttachmentType echoDataHandler(DHRequest request) but if I change the method signature to this: public AttachmentHolder echoDataHandler(DHRequest request) then the response is returned inline and not xop encoded. Is there anything I have to do to fix this. I am using Doc/Literal Wrapped wsdl, with a WSDL-first approach. Any help would really be appreciated. Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169948#4169948 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169948 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: Enabling MTOM-Support at JBossWS client fails
Hi, I am also having the same problem. I am using JAX-WS 2.0.3 with jboss 4.0.5, and enabling mtom on the client side to send an attachment to the server. When I check the content of the msg in trace mode, it looks like it is inline. Is there anything else I need to do or maybe the trace mode is not showing the correct msg body? Any help would be appreciated. Thanks, View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4169113#4169113 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4169113 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user