Re: axis2 1.3 - MTOM sample: OutOfMemory
Dear Charitha, I've tried increasing timeout from 1 to 1000 but I get the same exception: java.lang.OutOfMemoryError: Java heap space I note that in the my tmp directory (parameter name=attachmentDIR looked=falsec:/tmp//parameter), are present temporary caching files, with sime size of the file to be transfert. Mike - Original Message - From: Charitha Kankanamge [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, September 17, 2007 6:22 PM Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Michele Rossi wrote: Hi! I've build the sample ws-app named mtom (from axis2 distribution, version 1.3), obtaining the sample-mtom.aar archive; I've deployed it on tomcat 6, and run the client app using the ant target run.client, specifing file source and destination; file size is about 6MB; I've change the parameter in axis2.xml to enable attachments caching: parameter name=enableMTOM looked=falsetrue/parameter parameter name=enableSwAtrue/parameter parameter name=cacheAttachments looked=falsetrue/parameter parameter name=attachmentDIR looked=falsec:/tmp//parameter parameter name=sizeThreshold looked=false4000/parameter But we I run the run.client target I get the exception, on the server side: java.lang.OutOfMemory: Java Heap Space I'm using the source code contained in the binary distribution... is this a bug? Mike Mike, Can you please increase the time out(serviceStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1000);) in the sample client(..\axis2-1.3\samples\mtom\src\sample\mtom\client.java) and try again? regards Charitha -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 1.3 - MTOM sample: OutOfMemory
Hi Mike, I just tried out MTOM sample again and transferred ~120MB file successfully in Axis2 1.3/Winxp/jdk15 environment. I'm not sure why you still get this error with the required settings. Can some developer please help Mike to resolve this issue? regards Charitha Michele Rossi wrote: Dear Charitha, I've tried increasing timeout from 1 to 1000 but I get the same exception: java.lang.OutOfMemoryError: Java heap space I note that in the my tmp directory (parameter name=attachmentDIR looked=falsec:/tmp//parameter), are present temporary caching files, with sime size of the file to be transfert. Mike - Original Message - From: Charitha Kankanamge [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, September 17, 2007 6:22 PM Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Michele Rossi wrote: Hi! I've build the sample ws-app named mtom (from axis2 distribution, version 1.3), obtaining the sample-mtom.aar archive; I've deployed it on tomcat 6, and run the client app using the ant target run.client, specifing file source and destination; file size is about 6MB; I've change the parameter in axis2.xml to enable attachments caching: parameter name=enableMTOM looked=falsetrue/parameter parameter name=enableSwAtrue/parameter parameter name=cacheAttachments looked=falsetrue/parameter parameter name=attachmentDIR looked=falsec:/tmp//parameter parameter name=sizeThreshold looked=false4000/parameter But we I run the run.client target I get the exception, on the server side: java.lang.OutOfMemory: Java Heap Space I'm using the source code contained in the binary distribution... is this a bug? Mike Mike, Can you please increase the time out(serviceStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1000);) in the sample client(..\axis2-1.3\samples\mtom\src\sample\mtom\client.java) and try again? regards Charitha -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 1.3 - MTOM sample: OutOfMemory
Michele Rossi wrote: Hi! I've build the sample ws-app named mtom (from axis2 distribution, version 1.3), obtaining the sample-mtom.aar archive; I've deployed it on tomcat 6, and run the client app using the ant target run.client, specifing file source and destination; file size is about 6MB; I've change the parameter in axis2.xml to enable attachments caching: parameter name=enableMTOM looked=falsetrue/parameter parameter name=enableSwAtrue/parameter parameter name=cacheAttachments looked=falsetrue/parameter parameter name=attachmentDIR looked=falsec:/tmp//parameter parameter name=sizeThreshold looked=false4000/parameter But we I run the run.client target I get the exception, on the server side: java.lang.OutOfMemory: Java Heap Space I'm using the source code contained in the binary distribution... is this a bug? Mike Mike, Can you please increase the time out(serviceStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1000);) in the sample client(..\axis2-1.3\samples\mtom\src\sample\mtom\client.java) and try again? regards Charitha -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: axis2 1.3 - MTOM sample: OutOfMemory
How about running your server side JVM with increased memory options ? Using -Xms and -Xmx in the startup script . -Original Message- From: Charitha Kankanamge [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 12:23 PM To: axis-user@ws.apache.org Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Michele Rossi wrote: Hi! I've build the sample ws-app named mtom (from axis2 distribution, version 1.3), obtaining the sample-mtom.aar archive; I've deployed it on tomcat 6, and run the client app using the ant target run.client, specifing file source and destination; file size is about 6MB; I've change the parameter in axis2.xml to enable attachments caching: parameter name=enableMTOM looked=falsetrue/parameter parameter name=enableSwAtrue/parameter parameter name=cacheAttachments looked=falsetrue/parameter parameter name=attachmentDIR looked=falsec:/tmp//parameter parameter name=sizeThreshold looked=false4000/parameter But we I run the run.client target I get the exception, on the server side: java.lang.OutOfMemory: Java Heap Space I'm using the source code contained in the binary distribution... is this a bug? Mike Mike, Can you please increase the time out(serviceStub._getServiceClient().getOptions().setTimeOutInMilliSecond s(1000);) in the sample client(..\axis2-1.3\samples\mtom\src\sample\mtom\client.java) and try again? regards Charitha -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 1.3 - MTOM sample: OutOfMemory
I'm getting the same exception with 256 - 1024 MB for tomcat Michele - Original Message - From: Bhojraj, Santosh [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, September 17, 2007 6:31 PM Subject: RE: axis2 1.3 - MTOM sample: OutOfMemory How about running your server side JVM with increased memory options ? Using -Xms and -Xmx in the startup script . -Original Message- From: Charitha Kankanamge [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 12:23 PM To: axis-user@ws.apache.org Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Michele Rossi wrote: Hi! I've build the sample ws-app named mtom (from axis2 distribution, version 1.3), obtaining the sample-mtom.aar archive; I've deployed it on tomcat 6, and run the client app using the ant target run.client, specifing file source and destination; file size is about 6MB; I've change the parameter in axis2.xml to enable attachments caching: parameter name=enableMTOM looked=falsetrue/parameter parameter name=enableSwAtrue/parameter parameter name=cacheAttachments looked=falsetrue/parameter parameter name=attachmentDIR looked=falsec:/tmp//parameter parameter name=sizeThreshold looked=false4000/parameter But we I run the run.client target I get the exception, on the server side: java.lang.OutOfMemory: Java Heap Space I'm using the source code contained in the binary distribution... is this a bug? Mike Mike, Can you please increase the time out(serviceStub._getServiceClient().getOptions().setTimeOutInMilliSecond s(1000);) in the sample client(..\axis2-1.3\samples\mtom\src\sample\mtom\client.java) and try again? regards Charitha -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 1.3 - MTOM sample: OutOfMemory
I'm using the MTOM-Sample taken from Axis2 release; with plain Axis2 1.3 it works correctly... Michele - Original Message - From: Thilina Gunarathne [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, September 17, 2007 9:25 PM Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Hi Mike, Are you using the MTOM-Sample taken from the Axis2 1.3 release or are you using a modified version... Did you try your use case with plain Axis2 1.3 and using the Axis2 MTOM sample and the client... I'm not sure whether this is something to do with a Tomcat 6, but IMHO chances are very low for that... I note that in the my tmp directory (parameter name=attachmentDIR looked=falsec:/tmp//parameter), are present temporary caching files, with sime size of the file to be transfert. If the above means that you got the whole file tranfered to the temporary file, then the chances are high that you are trying to load the file in to memory from your service implementation.. thanks, Thilina On 9/17/07, Bhojraj, Santosh [EMAIL PROTECTED] wrote: How about running your server side JVM with increased memory options ? Using -Xms and -Xmx in the startup script . -Original Message- From: Charitha Kankanamge [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 12:23 PM To: axis-user@ws.apache.org Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Michele Rossi wrote: Hi! I've build the sample ws-app named mtom (from axis2 distribution, version 1.3), obtaining the sample-mtom.aar archive; I've deployed it on tomcat 6, and run the client app using the ant target run.client, specifing file source and destination; file size is about 6MB; I've change the parameter in axis2.xml to enable attachments caching: parameter name=enableMTOM looked=falsetrue/parameter parameter name=enableSwAtrue/parameter parameter name=cacheAttachments looked=falsetrue/parameter parameter name=attachmentDIR looked=falsec:/tmp//parameter parameter name=sizeThreshold looked=false4000/parameter But we I run the run.client target I get the exception, on the server side: java.lang.OutOfMemory: Java Heap Space I'm using the source code contained in the binary distribution... is this a bug? Mike Mike, Can you please increase the time out(serviceStub._getServiceClient().getOptions().setTimeOutInMilliSecond s(1000);) in the sample client(..\axis2-1.3\samples\mtom\src\sample\mtom\client.java) and try again? regards Charitha -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 1.3 - MTOM sample: OutOfMemory
Hi everyone! I've solved the problem: the java.lang.OutOfMemory: Java Heap Space exception happens if the soapMonitor is enabled; I've tried to disable the module (in Tomcat) and now all is working fine! I think that's important to document this problem. Thanks Michele Rossi - Original Message - From: Thilina Gunarathne [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, September 17, 2007 9:25 PM Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Hi Mike, Are you using the MTOM-Sample taken from the Axis2 1.3 release or are you using a modified version... Did you try your use case with plain Axis2 1.3 and using the Axis2 MTOM sample and the client... I'm not sure whether this is something to do with a Tomcat 6, but IMHO chances are very low for that... I note that in the my tmp directory (parameter name=attachmentDIR looked=falsec:/tmp//parameter), are present temporary caching files, with sime size of the file to be transfert. If the above means that you got the whole file tranfered to the temporary file, then the chances are high that you are trying to load the file in to memory from your service implementation.. thanks, Thilina On 9/17/07, Bhojraj, Santosh [EMAIL PROTECTED] wrote: How about running your server side JVM with increased memory options ? Using -Xms and -Xmx in the startup script . -Original Message- From: Charitha Kankanamge [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 12:23 PM To: axis-user@ws.apache.org Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Michele Rossi wrote: Hi! I've build the sample ws-app named mtom (from axis2 distribution, version 1.3), obtaining the sample-mtom.aar archive; I've deployed it on tomcat 6, and run the client app using the ant target run.client, specifing file source and destination; file size is about 6MB; I've change the parameter in axis2.xml to enable attachments caching: parameter name=enableMTOM looked=falsetrue/parameter parameter name=enableSwAtrue/parameter parameter name=cacheAttachments looked=falsetrue/parameter parameter name=attachmentDIR looked=falsec:/tmp//parameter parameter name=sizeThreshold looked=false4000/parameter But we I run the run.client target I get the exception, on the server side: java.lang.OutOfMemory: Java Heap Space I'm using the source code contained in the binary distribution... is this a bug? Mike Mike, Can you please increase the time out(serviceStub._getServiceClient().getOptions().setTimeOutInMilliSecond s(1000);) in the sample client(..\axis2-1.3\samples\mtom\src\sample\mtom\client.java) and try again? regards Charitha -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 1.3 - MTOM sample: OutOfMemory
Hi Mike, Are you using the MTOM-Sample taken from the Axis2 1.3 release or are you using a modified version... Did you try your use case with plain Axis2 1.3 and using the Axis2 MTOM sample and the client... I'm not sure whether this is something to do with a Tomcat 6, but IMHO chances are very low for that... I note that in the my tmp directory (parameter name=attachmentDIR looked=falsec:/tmp//parameter), are present temporary caching files, with sime size of the file to be transfert. If the above means that you got the whole file tranfered to the temporary file, then the chances are high that you are trying to load the file in to memory from your service implementation.. thanks, Thilina On 9/17/07, Bhojraj, Santosh [EMAIL PROTECTED] wrote: How about running your server side JVM with increased memory options ? Using -Xms and -Xmx in the startup script . -Original Message- From: Charitha Kankanamge [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 12:23 PM To: axis-user@ws.apache.org Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Michele Rossi wrote: Hi! I've build the sample ws-app named mtom (from axis2 distribution, version 1.3), obtaining the sample-mtom.aar archive; I've deployed it on tomcat 6, and run the client app using the ant target run.client, specifing file source and destination; file size is about 6MB; I've change the parameter in axis2.xml to enable attachments caching: parameter name=enableMTOM looked=falsetrue/parameter parameter name=enableSwAtrue/parameter parameter name=cacheAttachments looked=falsetrue/parameter parameter name=attachmentDIR looked=falsec:/tmp//parameter parameter name=sizeThreshold looked=false4000/parameter But we I run the run.client target I get the exception, on the server side: java.lang.OutOfMemory: Java Heap Space I'm using the source code contained in the binary distribution... is this a bug? Mike Mike, Can you please increase the time out(serviceStub._getServiceClient().getOptions().setTimeOutInMilliSecond s(1000);) in the sample client(..\axis2-1.3\samples\mtom\src\sample\mtom\client.java) and try again? regards Charitha -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 1.3 - MTOM sample: OutOfMemory
Cool :).. Nice to hear that.. On 9/17/07, Michele Rossi [EMAIL PROTECTED] wrote: Hi everyone! I've solved the problem: the java.lang.OutOfMemory: Java Heap Space exception happens if the soapMonitor is enabled; I've tried to disable the module (in Tomcat) and now all is working fine! I think that's important to document this problem. Thanks Michele Rossi - Original Message - From: Thilina Gunarathne [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, September 17, 2007 9:25 PM Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Hi Mike, Are you using the MTOM-Sample taken from the Axis2 1.3 release or are you using a modified version... Did you try your use case with plain Axis2 1.3 and using the Axis2 MTOM sample and the client... I'm not sure whether this is something to do with a Tomcat 6, but IMHO chances are very low for that... I note that in the my tmp directory (parameter name=attachmentDIR looked=falsec:/tmp//parameter), are present temporary caching files, with sime size of the file to be transfert. If the above means that you got the whole file tranfered to the temporary file, then the chances are high that you are trying to load the file in to memory from your service implementation.. thanks, Thilina On 9/17/07, Bhojraj, Santosh [EMAIL PROTECTED] wrote: How about running your server side JVM with increased memory options ? Using -Xms and -Xmx in the startup script . -Original Message- From: Charitha Kankanamge [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 12:23 PM To: axis-user@ws.apache.org Subject: Re: axis2 1.3 - MTOM sample: OutOfMemory Michele Rossi wrote: Hi! I've build the sample ws-app named mtom (from axis2 distribution, version 1.3), obtaining the sample-mtom.aar archive; I've deployed it on tomcat 6, and run the client app using the ant target run.client, specifing file source and destination; file size is about 6MB; I've change the parameter in axis2.xml to enable attachments caching: parameter name=enableMTOM looked=falsetrue/parameter parameter name=enableSwAtrue/parameter parameter name=cacheAttachments looked=falsetrue/parameter parameter name=attachmentDIR looked=falsec:/tmp//parameter parameter name=sizeThreshold looked=false4000/parameter But we I run the run.client target I get the exception, on the server side: java.lang.OutOfMemory: Java Heap Space I'm using the source code contained in the binary distribution... is this a bug? Mike Mike, Can you please increase the time out(serviceStub._getServiceClient().getOptions().setTimeOutInMilliSecond s(1000);) in the sample client(..\axis2-1.3\samples\mtom\src\sample\mtom\client.java) and try again? regards Charitha -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Enabling MTOM partially duplicates message
I have opened a JIRA (AXIS2-2861) with a very simple test case. This bug prevents me from switching over to Axis2 so I would really appreciate it if someone could look at it for me. Thanks, Tammy Thilina Gunarathne wrote: Tammy, Sound like a bug to me... Can you test whether this behaviour shows even for a simple scenerio.. Also AFAIKS I do not seee you are using any MTOM specific features in your implementation... Hope you have not mistaken javax.activation.DataSource to OMDataSource... Thanks, Thilina On 6/21/07, Tammy Dugan [EMAIL PROTECTED] wrote: Here is what the response message from by Axis2 service looks like with MTOM disabled: ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData/r:queryDatasetReturnResponse/soapenv:Body/soapenv:Envelope This is what the message looks like with MTOM enabled: --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData/r:queryDatasetReturnResponse/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012-- As you can see, almost the entire message is repeated twice. The first time the end of the message is truncated. This really looks like a bug to me. Any thoughts? I am running the latest released version of Axis2. Here is the code I am running to make this message: OMFactory fact = OMAbstractFactory.getOMFactory(); OMNamespace ns = fact.createOMNamespace(http://spin.regenstrief.org/query;, r); OMElement resultXML = fact.createOMElement(queryDatasetReturnResponse, ns); Connection con = db.openConnection(); // create a dedicated connection for streaming from database OMElement datasetElement = null; InputStream inputStream = readDataSetXMLToInputStream(con, 1, VARIABLE_DATA_SET); //string of xml from database if (inputStream != null) { ns = new OMNamespaceImpl(, ); OMDataSource dataSource = new CustomDataSource(inputStream); datasetElement = new OMSourcedElementImpl(rawData, ns, fact, dataSource); } resultXML.addChild(datasetElement); class CustomDataSource implements OMDataSource { private final InputStream data; public CustomDataSource(InputStream data) { this.data = data; } public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { XMLStreamReader reader = null; try { StreamingOMSerializer serializer = new StreamingOMSerializer(); reader = getReader(); serializer.serialize(reader, xmlWriter); xmlWriter.flush(); } catch (Throwable e) { } } public XMLStreamReader getReader() throws XMLStreamException { XMLStreamReader reader = null; try { reader = StAXUtils.createXMLStreamReader(this.data); } catch (Exception e) { } return reader; } ... } Tammy -- Tammy Dugan Computer Programmer Regenstrief Institute, Inc. Medical Informatics Health Information and Translational Sciences (HITS) Building 410 West 10th Street, Suite 2000 Indianapolis, IN 46202 Main: 317.423.5500 Fax: 317.423.5695 IU campus mail address: HS, 2000 (317) 423 - 5541 Confidentiality Notice: The contents of this message and any files transmitted with it may contain confidential and/or privileged information and are intended solely for the use of the named addressee(s). Additionally, the information contained herein may have been disclosed to you from medical records with confidentiality protected by federal and state laws. Federal regulations and State laws prohibit you from making further disclosure of such information without the specific written consent of the person to whom the information pertains or as otherwise permitted by such regulations. A general authorization for the release of medical or other information is not
Re: [Axis2] Enabling MTOM partially duplicates message
please check the jira. all you have to do is *not* issue the flush from your custom datasource class thanks, dims On 6/26/07, Tammy Dugan [EMAIL PROTECTED] wrote: I have opened a JIRA (AXIS2-2861) with a very simple test case. This bug prevents me from switching over to Axis2 so I would really appreciate it if someone could look at it for me. Thanks, Tammy Thilina Gunarathne wrote: Tammy, Sound like a bug to me... Can you test whether this behaviour shows even for a simple scenerio.. Also AFAIKS I do not seee you are using any MTOM specific features in your implementation... Hope you have not mistaken javax.activation.DataSource to OMDataSource... Thanks, Thilina On 6/21/07, Tammy Dugan [EMAIL PROTECTED] wrote: Here is what the response message from by Axis2 service looks like with MTOM disabled: ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData/r:queryDatasetReturnResponse/soapenv:Body/soapenv:Envelope This is what the message looks like with MTOM enabled: --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData/r:queryDatasetReturnResponse/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012-- As you can see, almost the entire message is repeated twice. The first time the end of the message is truncated. This really looks like a bug to me. Any thoughts? I am running the latest released version of Axis2. Here is the code I am running to make this message: OMFactory fact = OMAbstractFactory.getOMFactory(); OMNamespace ns = fact.createOMNamespace(http://spin.regenstrief.org/query;, r); OMElement resultXML = fact.createOMElement(queryDatasetReturnResponse, ns); Connection con = db.openConnection(); // create a dedicated connection for streaming from database OMElement datasetElement = null; InputStream inputStream = readDataSetXMLToInputStream(con, 1, VARIABLE_DATA_SET); //string of xml from database if (inputStream != null) { ns = new OMNamespaceImpl(, ); OMDataSource dataSource = new CustomDataSource(inputStream); datasetElement = new OMSourcedElementImpl(rawData, ns, fact, dataSource); } resultXML.addChild(datasetElement); class CustomDataSource implements OMDataSource { private final InputStream data; public CustomDataSource(InputStream data) { this.data = data; } public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { XMLStreamReader reader = null; try { StreamingOMSerializer serializer = new StreamingOMSerializer(); reader = getReader(); serializer.serialize(reader, xmlWriter); xmlWriter.flush(); } catch (Throwable e) { } } public XMLStreamReader getReader() throws XMLStreamException { XMLStreamReader reader = null; try { reader = StAXUtils.createXMLStreamReader(this.data); } catch (Exception e) { } return reader; } ... } Tammy -- Tammy Dugan Computer Programmer Regenstrief Institute, Inc. Medical Informatics Health Information and Translational Sciences (HITS) Building 410 West 10th Street, Suite 2000 Indianapolis, IN 46202 Main: 317.423.5500 Fax: 317.423.5695 IU campus mail address: HS, 2000 (317) 423 - 5541 Confidentiality Notice: The contents of this message and any files transmitted with it may contain confidential and/or privileged information and are intended solely for the use of the named addressee(s). Additionally, the information contained herein may have been disclosed to you from medical records with confidentiality protected by federal and state laws. Federal regulations and State laws prohibit you from
Re: [Axis2] Enabling MTOM partially duplicates message
I know. I updated the JIRA with a thank you and a confirmation of the fix. Thanks, Tammy Davanum Srinivas wrote: please check the jira. all you have to do is *not* issue the flush from your custom datasource class thanks, dims On 6/26/07, Tammy Dugan [EMAIL PROTECTED] wrote: I have opened a JIRA (AXIS2-2861) with a very simple test case. This bug prevents me from switching over to Axis2 so I would really appreciate it if someone could look at it for me. Thanks, Tammy Thilina Gunarathne wrote: Tammy, Sound like a bug to me... Can you test whether this behaviour shows even for a simple scenerio.. Also AFAIKS I do not seee you are using any MTOM specific features in your implementation... Hope you have not mistaken javax.activation.DataSource to OMDataSource... Thanks, Thilina On 6/21/07, Tammy Dugan [EMAIL PROTECTED] wrote: Here is what the response message from by Axis2 service looks like with MTOM disabled: ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData/r:queryDatasetReturnResponse/soapenv:Body/soapenv:Envelope This is what the message looks like with MTOM enabled: --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData/r:queryDatasetReturnResponse/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012-- As you can see, almost the entire message is repeated twice. The first time the end of the message is truncated. This really looks like a bug to me. Any thoughts? I am running the latest released version of Axis2. Here is the code I am running to make this message: OMFactory fact = OMAbstractFactory.getOMFactory(); OMNamespace ns = fact.createOMNamespace(http://spin.regenstrief.org/query;, r); OMElement resultXML = fact.createOMElement(queryDatasetReturnResponse, ns); Connection con = db.openConnection(); // create a dedicated connection for streaming from database OMElement datasetElement = null; InputStream inputStream = readDataSetXMLToInputStream(con, 1, VARIABLE_DATA_SET); //string of xml from database if (inputStream != null) { ns = new OMNamespaceImpl(, ); OMDataSource dataSource = new CustomDataSource(inputStream); datasetElement = new OMSourcedElementImpl(rawData, ns, fact, dataSource); } resultXML.addChild(datasetElement); class CustomDataSource implements OMDataSource { private final InputStream data; public CustomDataSource(InputStream data) { this.data = data; } public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { XMLStreamReader reader = null; try { StreamingOMSerializer serializer = new StreamingOMSerializer(); reader = getReader(); serializer.serialize(reader, xmlWriter); xmlWriter.flush(); } catch (Throwable e) { } } public XMLStreamReader getReader() throws XMLStreamException { XMLStreamReader reader = null; try { reader = StAXUtils.createXMLStreamReader(this.data); } catch (Exception e) { } return reader; } ... } Tammy -- Tammy Dugan Computer Programmer Regenstrief Institute, Inc. Medical Informatics Health Information and Translational Sciences (HITS) Building 410 West 10th Street, Suite 2000 Indianapolis, IN 46202 Main: 317.423.5500 Fax: 317.423.5695 IU campus mail address: HS, 2000 (317) 423 - 5541 Confidentiality Notice: The contents of this message and any files transmitted with it may contain confidential and/or privileged information and are intended solely for the use of the named addressee(s). Additionally, the information contained herein may have been disclosed
Re: [Axis2] Enabling MTOM globally on the server-side
Angel, this is *not* ok. please create a JIRA and upload your service and client. I'll take a look. thanks, dims On 6/23/07, Angel Todorov [EMAIL PROTECTED] wrote: Hi Thilina, I have the following issue: When i enable MTOM globally in axis2.xml, on the server-side, by default all my outgoing messages are sent as MIME attachments (i.e Content-type: multipart/related) - as far as I can see in the MTOM Guide, this is OK and a feature. The problem is that my clients always hang when such a message is received by the service client, and the CPU goes to 100 %. I have traced the cause to reach the MIMEBuilder in org.apache.axis2.builders.* , and after that it hangs. I also have to mention that the clients don't send any MTOM optimized messages, but either pure SOAP 1.1 (text+xml content type) , or SOAP 1.2 (application/soap+xml). Has anyone else experienced such behaviour ? Is this normal ? Thanks. P.S: My sources are from 30th of May's Snapshot. Regards, Angel -- Davanum Srinivas :: http://davanum.wordpress.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Enabling MTOM partially duplicates message
Tammy, Sound like a bug to me... Can you test whether this behaviour shows even for a simple scenerio.. Also AFAIKS I do not seee you are using any MTOM specific features in your implementation... Hope you have not mistaken javax.activation.DataSource to OMDataSource... Thanks, Thilina On 6/21/07, Tammy Dugan [EMAIL PROTECTED] wrote: Here is what the response message from by Axis2 service looks like with MTOM disabled: ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData/r:queryDatasetReturnResponse/soapenv:Body/soapenv:Envelope This is what the message looks like with MTOM enabled: --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyr:queryDatasetReturnResponse xmlns:r=http://spin.regenstrief.org/query;.../rawData/r:queryDatasetReturnResponse/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn_uuid_2BE039143DB2744D651182431292012-- As you can see, almost the entire message is repeated twice. The first time the end of the message is truncated. This really looks like a bug to me. Any thoughts? I am running the latest released version of Axis2. Here is the code I am running to make this message: OMFactory fact = OMAbstractFactory.getOMFactory(); OMNamespace ns = fact.createOMNamespace(http://spin.regenstrief.org/query;, r); OMElement resultXML = fact.createOMElement(queryDatasetReturnResponse, ns); Connection con = db.openConnection(); // create a dedicated connection for streaming from database OMElement datasetElement = null; InputStream inputStream = readDataSetXMLToInputStream(con, 1, VARIABLE_DATA_SET); //string of xml from database if (inputStream != null) { ns = new OMNamespaceImpl(, ); OMDataSource dataSource = new CustomDataSource(inputStream); datasetElement = new OMSourcedElementImpl(rawData, ns, fact, dataSource); } resultXML.addChild(datasetElement); class CustomDataSource implements OMDataSource { private final InputStream data; public CustomDataSource(InputStream data) { this.data = data; } public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException { XMLStreamReader reader = null; try { StreamingOMSerializer serializer = new StreamingOMSerializer(); reader = getReader(); serializer.serialize(reader, xmlWriter); xmlWriter.flush(); } catch (Throwable e) { } } public XMLStreamReader getReader() throws XMLStreamException { XMLStreamReader reader = null; try { reader = StAXUtils.createXMLStreamReader(this.data); } catch (Exception e) { } return reader; } ... } Tammy -- Tammy Dugan Computer Programmer Regenstrief Institute, Inc. Medical Informatics Health Information and Translational Sciences (HITS) Building 410 West 10th Street, Suite 2000 Indianapolis, IN 46202 Main: 317.423.5500 Fax: 317.423.5695 IU campus mail address: HS, 2000 (317) 423 - 5541 Confidentiality Notice: The contents of this message and any files transmitted with it may contain confidential and/or privileged information and are intended solely for the use of the named addressee(s). Additionally, the information contained herein may have been disclosed to you from medical records with confidentiality protected by federal and state laws. Federal regulations and State laws prohibit you from making further disclosure of such information without the specific written consent of the person to whom the information pertains or as otherwise permitted by such regulations. A general authorization for the release of medical or other information is not sufficient for this purpose. If you have received this message in error, please notify the sender by return e-mail and delete the original message. Any retention, disclosure, copying, distribution or use of this information by anyone other
Re: [Axis2][Rampart] MTOM Attachment secure?
The File is transferred correctly. But I'm not sure, that both message Parts (the soap Message and the attachment) are encrypted. Without rampart, I can read the XML-File content in clear text on tcpmon. With Rampart and sending the file with Soap With Attachment, its also clear text (Rampart can't secure SWA). Therefore I tried to send the File with mtom. Know, I can't read the xml File. But it doesn't look like an xml encryption. AFAIK rampart will treat your attachment as a binary file.. It'll not be aware of whether you are sending XML as the attachment... ~Thilina If you open a binary file in an text editor, you getan similar result. I don't know, how I can check that the attachment is really encrypted. Has anyone an idea, how can I check, or can anyone take a look to my configuration to check, if mtom attachments are surly encrypted?? Here are my service.xml serviceGroup service name=RampertFileService messageReceivers messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=de.nepatec.jzink.webservice.MTOMSampleMessageReceiverInOut / /messageReceivers parameter locked=false name=ServiceClass de.nepatec.jzink.webservice.RampertFileService /parameter operation name=attachment mep=http://www.w3.org/2004/08/wsdl/in-out; actionMappingattachment/actionMapping outputActionMapping //schemas.xmlsoap.org/wsdl/MTOMServicePortType/AttachmentResponse /outputActionMapping /operation parameter name=enableMTOM locked=falsetrue/parameter module ref=rampart / parameter name=InflowSecurity action itemsTimestamp Signature Encrypt/items passwordCallbackClassde.nepatec.jzink.webservice.PWCBHandler/passwordCallbackClass signaturePropFileservice.properties/signaturePropFile /action /parameter parameter name=OutflowSecurity action itemsTimestamp Signature Encrypt/items userservice/user passwordCallbackClassde.nepatec.jzink.webservice.PWCBHandler/passwordCallbackClass signaturePropFileservice.properties/signaturePropFile signatureKeyIdentifierDirectReference/signatureKeyIdentifier encryptionKeyIdentifierSKIKeyIdentifier/encryptionKeyIdentifier encryptionUseruseReqSigCert/encryptionUser /action /parameter /service /serviceGroup And the client configuration module ref=rampart / parameter name=OutflowSecurity action itemsTimestamp Signature Encrypt/items userclient/user passwordCallbackClassde.nepatec.jzink.webservice.client.PWCBHandler/passwordCallbackClass signaturePropFileclient.properties/signaturePropFile signatureKeyIdentifierDirectReference/signatureKeyIdentifier encryptionKeyIdentifierSKIKeyIdentifier/encryptionKeyIdentifier encryptionUserservice/encryptionUser optimizeParts//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue/optimizeParts /action /parameter parameter name=InflowSecurity action itemsTimestamp Signature Encrypt/items passwordCallbackClassde.nepatec.jzink.webservice.client.PWCBHandler/passwordCallbackClass signaturePropFileclient.properties/signaturePropFile /action /parameter Thanks for reading! _ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071distributionid=0066 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne WSO2, Inc.; http://www.wso2.com/ Home page: http://webservices.apache.org/~thilina/ Blog: http://thilinag.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2][Rampart] MTOM Attachment secure?
I know that rampart handels the file as binary file. :) That is the reason, why I can not check, that the attachment is also encrypted. If I do not write the optimizeParts Element to the clients config file, I can see, that the file is encrypted. Because, there is no binary stuff inside the message and the file ist transfered correctly. With optimizeParts It looks like, that only the soap message is encrypted and not the attachment. But I'm not sure. I don't know a way to check this. If anybody knows, how can I check, please let me know. Or does anybody know, that rampart encrypted mtom attachments?! Thanks for all -Ursprüngliche Nachricht- Von: axis-user@ws.apache.org Gesendet: 08.03.07 15:09:14 An: axis-user@ws.apache.org Betreff: Re: [Axis2][Rampart] MTOM Attachment secure? The File is transferred correctly. But I'm not sure, that both message Parts (the soap Message and the attachment) are encrypted. Without rampart, I can read the XML-File content in clear text on tcpmon. With Rampart and sending the file with Soap With Attachment, its also clear text (Rampart can't secure SWA). Therefore I tried to send the File with mtom. Know, I can't read the xml File. But it doesn't look like an xml encryption. AFAIK rampart will treat your attachment as a binary file.. It'll not be aware of whether you are sending XML as the attachment... ~Thilina If you open a binary file in an text editor, you getan similar result. I don't know, how I can check that the attachment is really encrypted. Has anyone an idea, how can I check, or can anyone take a look to my configuration to check, if mtom attachments are surly encrypted?? Here are my service.xml serviceGroup service name=RampertFileService messageReceivers messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=de.nepatec.jzink.webservice.MTOMSampleMessageReceiverInOut / /messageReceivers parameter locked=false name=ServiceClass de.nepatec.jzink.webservice.RampertFileService /parameter operation name=attachment mep=http://www.w3.org/2004/08/wsdl/in-out; actionMappingattachment/actionMapping outputActionMapping //schemas.xmlsoap.org/wsdl/MTOMServicePortType/AttachmentResponse /outputActionMapping /operation parameter name=enableMTOM locked=falsetrue/parameter module ref=rampart / parameter name=InflowSecurity action itemsTimestamp Signature Encrypt/items passwordCallbackClassde.nepatec.jzink.webservice.PWCBHandler/passwordCallbackClass signaturePropFileservice.properties/signaturePropFile /action /parameter parameter name=OutflowSecurity action itemsTimestamp Signature Encrypt/items userservice/user passwordCallbackClassde.nepatec.jzink.webservice.PWCBHandler/passwordCallbackClass signaturePropFileservice.properties/signaturePropFile signatureKeyIdentifierDirectReference/signatureKeyIdentifier encryptionKeyIdentifierSKIKeyIdentifier/encryptionKeyIdentifier encryptionUseruseReqSigCert/encryptionUser /action /parameter /service /serviceGroup And the client configuration module ref=rampart / parameter name=OutflowSecurity action itemsTimestamp Signature Encrypt/items userclient/user passwordCallbackClassde.nepatec.jzink.webservice.client.PWCBHandler/passwordCallbackClass signaturePropFileclient.properties/signaturePropFile signatureKeyIdentifierDirectReference/signatureKeyIdentifier encryptionKeyIdentifierSKIKeyIdentifier/encryptionKeyIdentifier encryptionUserservice/encryptionUser optimizeParts//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue/optimizeParts /action /parameter parameter name=InflowSecurity action itemsTimestamp Signature Encrypt/items passwordCallbackClassde.nepatec.jzink.webservice.client.PWCBHandler/passwordCallbackClass signaturePropFileclient.properties/signaturePropFile /action /parameter Thanks for reading
Re: [Axis2]Re: MTOM and content-type
Yes.. It is possible..Please see here [1].. You need to construct the soap envelope using OMElements... This [2] might be usefull to figure out OMElements.. Thilina [1] http://ws.apache.org/axis2/1_1/mtom-guide.html#3 [2] http://ws.apache.org/commons/axiom/OMTutorial.html On 1/2/07, Stefan Kok [EMAIL PROTECTED] wrote: Hi Thilina Thanks. Disabling MTOM and enabling SWA did work great. Please see the exert from EtherReal below. Note that the attachment is placed in the Content as base64 string. . . . Content/9j/4AAQSkZJRgABAgIAAAD/4QA +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE . . /9k=/Content /SubmitRequest /soapenv:Body /soapenv:Envelope The server I am sending to, requires that I send it as Content href=cid:C9... / Please see the sample below. Is it possible with SWA ? Content href=cid:C9D026DAE628978D554A777553FD5B7AallowAdaptations=true / /SubmitReq /env:Body /env:Envelope Kind regards Stefan. On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote: Stefan, Please use Soap with Attachments only.. Then it'll be text/xml.. Make sure *not* to enable MTOM at the same time, cause then MTOM will get priority and the message will be MTOM.. See here [1] for more detials... Thilina [1] http://wso2.org/library/264 On 12/29/06, Stefan Kok [EMAIL PROTECTED] wrote: Hi All I have got axis2 to generate the following for me: POST /some HTTP/1.1 SOAPAction: User-Agent: Axis2 Content-Length: 5790 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=text/xml; charset=UTF-8 Authorization: Digest username=username, realm=somerealm, nonce=RZTzxw==028733d3cb3ad64a414de383d252b679e8969982, uri=/some, response=427csaasaawqwqee6be586508c8e91b4, qop=auth, nc=0001, cnonce=61849b59f21f00e0ac46d38f9be4f1b2, algorithm=MD5 Host: fqdn:8082 --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 content-type: application/xop+xml; charset=UTF-8; type=text/xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Headerns1:TransactionID xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2; ns1:mustUnderstand=1MyTransaction/ns1:TransactionID/soapenv:Headersoapenv:Bodyns1:SubmitRequest xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2;xop:Include href=cid:1.urn:uuid:[EMAIL PROTECTED] xmlns:xop=http://www.w3.org/2004/08/xop/include; //ns1:SubmitRequest/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 The server that I send this to, requires that the content-type must be: text/xml; charset=utf-8 and not content-type: application/xop+xml; charset=UTF-8; type=text/xml; I have been searching the web for ideas but have not found much. It must be multipart/related so I cannot turn off MTOM. Kind regards Stefan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stefan Kok [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne WSO2, Inc.; http://www.wso2.com/ Home page: http://webservices.apache.org/~thilina/ Blog: http://thilinag.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2]Re: MTOM and content-type
Hi Thilina Thanks. I should have include some snippets of my code. Sorry. I am including snippets from my code for you now. I have got : org.apache.axiom.soap.SOAPFactory sf = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope env = sf.getDefaultEnvelope(); SOAPHeader sh = env.getHeader() . . . /* Content */ OMElement content = sf.createOMElement(Content, nms); sbmtRequest.addChild(content); FileDataSource fileDataSource = new FileDataSource(/home/stefan/workspace/test/bridge.jpg); DataHandler dh = new DataHandler(fileDataSource); OMText textData = sf.createOMText(dh, false); textData.setOptimize(false); content.addChild(textData); . . . mepClient.execute(true); . . . This gives the in line result. Regards Stefan On Tue, 2007-01-02 at 13:47 +0530, Thilina Gunarathne wrote: Yes.. It is possible..Please see here [1].. You need to construct the soap envelope using OMElements... This [2] might be usefull to figure out OMElements.. Thilina [1] http://ws.apache.org/axis2/1_1/mtom-guide.html#3 [2] http://ws.apache.org/commons/axiom/OMTutorial.html On 1/2/07, Stefan Kok [EMAIL PROTECTED] wrote: Hi Thilina Thanks. Disabling MTOM and enabling SWA did work great. Please see the exert from EtherReal below. Note that the attachment is placed in the Content as base64 string. . . . Content/9j/4AAQSkZJRgABAgIAAAD/4QA +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE . . /9k=/Content /SubmitRequest /soapenv:Body /soapenv:Envelope The server I am sending to, requires that I send it as Content href=cid:C9... / Please see the sample below. Is it possible with SWA ? Content href=cid:C9D026DAE628978D554A777553FD5B7AallowAdaptations=true / /SubmitReq /env:Body /env:Envelope Kind regards Stefan. On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote: Stefan, Please use Soap with Attachments only.. Then it'll be text/xml.. Make sure *not* to enable MTOM at the same time, cause then MTOM will get priority and the message will be MTOM.. See here [1] for more detials... Thilina [1] http://wso2.org/library/264 On 12/29/06, Stefan Kok [EMAIL PROTECTED] wrote: Hi All I have got axis2 to generate the following for me: POST /some HTTP/1.1 SOAPAction: User-Agent: Axis2 Content-Length: 5790 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=text/xml; charset=UTF-8 Authorization: Digest username=username, realm=somerealm, nonce=RZTzxw==028733d3cb3ad64a414de383d252b679e8969982, uri=/some, response=427csaasaawqwqee6be586508c8e91b4, qop=auth, nc=0001, cnonce=61849b59f21f00e0ac46d38f9be4f1b2, algorithm=MD5 Host: fqdn:8082 --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 content-type: application/xop+xml; charset=UTF-8; type=text/xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Headerns1:TransactionID xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2; ns1:mustUnderstand=1MyTransaction/ns1:TransactionID/soapenv:Headersoapenv:Bodyns1:SubmitRequest xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2;xop:Include href=cid:1.urn:uuid:[EMAIL PROTECTED] xmlns:xop=http://www.w3.org/2004/08/xop/include; //ns1:SubmitRequest/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 The server that I send this to, requires that the content-type must be: text/xml; charset=utf-8 and not content-type: application/xop+xml; charset=UTF-8; type=text/xml; I have been searching the web for ideas but have not found much. It must be multipart/related so I cannot turn off MTOM. Kind regards Stefan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,
Re: [Axis2]Re: MTOM and content-type
Try the following, org.apache.axiom.soap.SOAPFactory sf = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope env = sf.getDefaultEnvelope(); SOAPHeader sh = env.getHeader() . . . /* Content */ OMElement content = sf.createOMElement(Content, nms); sbmtRequest.addChild(content); FileDataSource fileDataSource = new FileDataSource(/home/stefan/workspace/test/bridge.jpg); DataHandler dh = new DataHandler(fileDataSource); MessageContext mc = new MessageContext(); String contentType = mc.addAttachment(dh); content.addAttribute(href,contentType,your namespace); . . . mepClient.execute(true); ~Thilina . . . This gives the in line result. Regards Stefan On Tue, 2007-01-02 at 13:47 +0530, Thilina Gunarathne wrote: Yes.. It is possible..Please see here [1].. You need to construct the soap envelope using OMElements... This [2] might be usefull to figure out OMElements.. Thilina [1] http://ws.apache.org/axis2/1_1/mtom-guide.html#3 [2] http://ws.apache.org/commons/axiom/OMTutorial.html On 1/2/07, Stefan Kok [EMAIL PROTECTED] wrote: Hi Thilina Thanks. Disabling MTOM and enabling SWA did work great. Please see the exert from EtherReal below. Note that the attachment is placed in the Content as base64 string. . . . Content/9j/4AAQSkZJRgABAgIAAAD/4QA +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE . . /9k=/Content /SubmitRequest /soapenv:Body /soapenv:Envelope The server I am sending to, requires that I send it as Content href=cid:C9... / Please see the sample below. Is it possible with SWA ? Content href=cid:C9D026DAE628978D554A777553FD5B7AallowAdaptations=true / /SubmitReq /env:Body /env:Envelope Kind regards Stefan. On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote: Stefan, Please use Soap with Attachments only.. Then it'll be text/xml.. Make sure *not* to enable MTOM at the same time, cause then MTOM will get priority and the message will be MTOM.. See here [1] for more detials... Thilina [1] http://wso2.org/library/264 On 12/29/06, Stefan Kok [EMAIL PROTECTED] wrote: Hi All I have got axis2 to generate the following for me: POST /some HTTP/1.1 SOAPAction: User-Agent: Axis2 Content-Length: 5790 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=text/xml; charset=UTF-8 Authorization: Digest username=username, realm=somerealm, nonce=RZTzxw==028733d3cb3ad64a414de383d252b679e8969982, uri=/some, response=427csaasaawqwqee6be586508c8e91b4, qop=auth, nc=0001, cnonce=61849b59f21f00e0ac46d38f9be4f1b2, algorithm=MD5 Host: fqdn:8082 --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 content-type: application/xop+xml; charset=UTF-8; type=text/xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Headerns1:TransactionID xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2; ns1:mustUnderstand=1MyTransaction/ns1:TransactionID/soapenv:Headersoapenv:Bodyns1:SubmitRequest xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2;xop:Include href=cid:1.urn:uuid:[EMAIL PROTECTED] xmlns:xop=http://www.w3.org/2004/08/xop/include; //ns1:SubmitRequest/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 The server that I send this to, requires that the content-type must be: text/xml; charset=utf-8 and not content-type: application/xop+xml; charset=UTF-8; type=text/xml; I have been searching the web for ideas but have not found much. It must be multipart/related so I cannot turn off MTOM. Kind regards Stefan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stefan Kok [EMAIL PROTECTED]
Re: [Axis2]Re: MTOM and content-type
Thilina Thanks. This did work very well. The attachment is binary tough. Do I need to manipulate options or the data handler to write the attachment as base64 ? Regards Stefan On Tue, 2007-01-02 at 14:43 +0530, Thilina Gunarathne wrote: Try the following, org.apache.axiom.soap.SOAPFactory sf = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope env = sf.getDefaultEnvelope(); SOAPHeader sh = env.getHeader() . . . /* Content */ OMElement content = sf.createOMElement(Content, nms); sbmtRequest.addChild(content); FileDataSource fileDataSource = new FileDataSource(/home/stefan/workspace/test/bridge.jpg); DataHandler dh = new DataHandler(fileDataSource); MessageContext mc = new MessageContext(); String contentType = mc.addAttachment(dh); content.addAttribute(href,contentType,your namespace); . . . mepClient.execute(true); ~Thilina . . . This gives the in line result. Regards Stefan On Tue, 2007-01-02 at 13:47 +0530, Thilina Gunarathne wrote: Yes.. It is possible..Please see here [1].. You need to construct the soap envelope using OMElements... This [2] might be usefull to figure out OMElements.. Thilina [1] http://ws.apache.org/axis2/1_1/mtom-guide.html#3 [2] http://ws.apache.org/commons/axiom/OMTutorial.html On 1/2/07, Stefan Kok [EMAIL PROTECTED] wrote: Hi Thilina Thanks. Disabling MTOM and enabling SWA did work great. Please see the exert from EtherReal below. Note that the attachment is placed in the Content as base64 string. . . . Content/9j/4AAQSkZJRgABAgIAAAD/4QA +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE . . /9k=/Content /SubmitRequest /soapenv:Body /soapenv:Envelope The server I am sending to, requires that I send it as Content href=cid:C9... / Please see the sample below. Is it possible with SWA ? Content href=cid:C9D026DAE628978D554A777553FD5B7AallowAdaptations=true / /SubmitReq /env:Body /env:Envelope Kind regards Stefan. On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote: Stefan, Please use Soap with Attachments only.. Then it'll be text/xml.. Make sure *not* to enable MTOM at the same time, cause then MTOM will get priority and the message will be MTOM.. See here [1] for more detials... Thilina [1] http://wso2.org/library/264 On 12/29/06, Stefan Kok [EMAIL PROTECTED] wrote: Hi All I have got axis2 to generate the following for me: POST /some HTTP/1.1 SOAPAction: User-Agent: Axis2 Content-Length: 5790 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=text/xml; charset=UTF-8 Authorization: Digest username=username, realm=somerealm, nonce=RZTzxw==028733d3cb3ad64a414de383d252b679e8969982, uri=/some, response=427csaasaawqwqee6be586508c8e91b4, qop=auth, nc=0001, cnonce=61849b59f21f00e0ac46d38f9be4f1b2, algorithm=MD5 Host: fqdn:8082 --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 content-type: application/xop+xml; charset=UTF-8; type=text/xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Headerns1:TransactionID xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2; ns1:mustUnderstand=1MyTransaction/ns1:TransactionID/soapenv:Headersoapenv:Bodyns1:SubmitRequest xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2;xop:Include href=cid:1.urn:uuid:[EMAIL PROTECTED] xmlns:xop=http://www.w3.org/2004/08/xop/include; //ns1:SubmitRequest/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 The server that I send this to, requires that the content-type must be: text/xml; charset=utf-8 and not
Re: [Axis2]Re: MTOM and content-type
org.apache.axiom.soap.SOAPFactory sf = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope env = sf.getDefaultEnvelope(); SOAPHeader sh = env.getHeader() . /* Content */ OMElement content = sf.createOMElement(Content, nms); sbmtRequest.addChild(content); FileDataSource fileDataSource = new FileDataSource(/home/stefan/workspace/test/bridge.jpg); DataHandler dh = new DataHandler(fileDataSource); /**/ Base64Binary base64Binary = new Base64Binary(); base64Binary.setBase64Binary(dh); base64Binary.setContentType(dh.getContentType()); AttachmentType attachmentType = new AttachmentType(); attachmentType.setBinaryData(base64Binary); attachmentType.setFileName(destination); attachmentRequest.setAttachmentRequest(attachmentType); sample.mtom.service.MTOMSampleStub.AttachmentResponse response = serviceStub.attachment(attachmentRequest); MessageContext mc = new MessageContext(); String contentType = mc.addAttachment(dh); //Not an href //content.addAttribute(href,contentType,your namespace); SOAPFactory fac = OMAbstractFactory.getSOAP11Factory(); //get the envelope SOAPEnvelope env = fac.getDefaultEnvelope(); //get the namespace OMNamespace omNs = fac.createOMNamespace( http://service.soapwithattachments.sample/xsd;, swa); //create uploadFile element OMElement uploadFile = fac.createOMElement(uploadFile, omNs); //create name element OMElement nameEle = fac.createOMElement(name, omNs); nameEle.setText(destinationFile); //create attachmentID element OMElement idEle = fac.createOMElement(attchmentID, omNs); idEle.setText(attachmentID); uploadFile.addChild(nameEle); uploadFile.addChild(idEle); env.getBody().addChild(uploadFile); mc.setEnvelope(env); . . . mepClient.execute(true); ~Thilina . . . This gives the in line result. Regards Stefan On Tue, 2007-01-02 at 13:47 +0530, Thilina Gunarathne wrote: Yes.. It is possible..Please see here [1].. You need to construct the soap envelope using OMElements... This [2] might be usefull to figure out OMElements.. Thilina [1] http://ws.apache.org/axis2/1_1/mtom-guide.html#3 [2] http://ws.apache.org/commons/axiom/OMTutorial.html On 1/2/07, Stefan Kok [EMAIL PROTECTED] wrote: Hi Thilina Thanks. Disabling MTOM and enabling SWA did work great. Please see the exert from EtherReal below. Note that the attachment is placed in the Content as base64 string. . . . Content/9j/4AAQSkZJRgABAgIAAAD/4QA +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE . . /9k=/Content /SubmitRequest /soapenv:Body /soapenv:Envelope The server I am sending to, requires that I send it as Content href=cid:C9... / Please see the sample below. Is it possible with SWA ? Content href=cid:C9D026DAE628978D554A777553FD5B7AallowAdaptations=true / /SubmitReq /env:Body /env:Envelope Kind regards Stefan. On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote: Stefan, Please use Soap with Attachments only.. Then it'll be text/xml.. Make sure *not* to enable MTOM at the same time, cause then MTOM will get priority and the message will be MTOM.. See here [1] for more detials... Thilina [1] http://wso2.org/library/264 On 12/29/06, Stefan Kok [EMAIL PROTECTED] wrote: Hi All I have got axis2 to generate the following for me: POST /some HTTP/1.1 SOAPAction: User-Agent: Axis2 Content-Length: 5790 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=text/xml; charset=UTF-8 Authorization: Digest username=username, realm=somerealm, nonce=RZTzxw==028733d3cb3ad64a414de383d252b679e8969982, uri=/some, response=427csaasaawqwqee6be586508c8e91b4, qop=auth, nc=0001, cnonce=61849b59f21f00e0ac46d38f9be4f1b2, algorithm=MD5 Host: fqdn:8082 --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 content-type: application/xop+xml; charset=UTF-8; type=text/xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED]
Re: [Axis2]Re: MTOM and content-type
Stefan, The attachments by definition suppose to be Binary, cause only sending pure binary will bring the efficiencies of sending attachments.. If it needs to go as base64, I would advise you to send it in line inside the payload as you did earlier... If you really really needs your attachment to be base64, then you have to convert the Binary to base64 string in you client code.. You can use the Base64 encoder which comes with Axiom.. Then you need to create a DataHandler out of the resulting base64 string.. ~Thilina On 1/2/07, Stefan Kok [EMAIL PROTECTED] wrote: Thilina Thanks. This did work very well. The attachment is binary tough. Do I need to manipulate options or the data handler to write the attachment as base64 ? Regards Stefan On Tue, 2007-01-02 at 14:43 +0530, Thilina Gunarathne wrote: Try the following, org.apache.axiom.soap.SOAPFactory sf = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope env = sf.getDefaultEnvelope(); SOAPHeader sh = env.getHeader() . . . /* Content */ OMElement content = sf.createOMElement(Content, nms); sbmtRequest.addChild(content); FileDataSource fileDataSource = new FileDataSource(/home/stefan/workspace/test/bridge.jpg); DataHandler dh = new DataHandler(fileDataSource); MessageContext mc = new MessageContext(); String contentType = mc.addAttachment(dh); content.addAttribute(href,contentType,your namespace); . . . mepClient.execute(true); ~Thilina . . . This gives the in line result. Regards Stefan On Tue, 2007-01-02 at 13:47 +0530, Thilina Gunarathne wrote: Yes.. It is possible..Please see here [1].. You need to construct the soap envelope using OMElements... This [2] might be usefull to figure out OMElements.. Thilina [1] http://ws.apache.org/axis2/1_1/mtom-guide.html#3 [2] http://ws.apache.org/commons/axiom/OMTutorial.html On 1/2/07, Stefan Kok [EMAIL PROTECTED] wrote: Hi Thilina Thanks. Disabling MTOM and enabling SWA did work great. Please see the exert from EtherReal below. Note that the attachment is placed in the Content as base64 string. . . . Content/9j/4AAQSkZJRgABAgIAAAD/4QA +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE . . /9k=/Content /SubmitRequest /soapenv:Body /soapenv:Envelope The server I am sending to, requires that I send it as Content href=cid:C9... / Please see the sample below. Is it possible with SWA ? Content href=cid:C9D026DAE628978D554A777553FD5B7AallowAdaptations=true / /SubmitReq /env:Body /env:Envelope Kind regards Stefan. On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote: Stefan, Please use Soap with Attachments only.. Then it'll be text/xml.. Make sure *not* to enable MTOM at the same time, cause then MTOM will get priority and the message will be MTOM.. See here [1] for more detials... Thilina [1] http://wso2.org/library/264 On 12/29/06, Stefan Kok [EMAIL PROTECTED] wrote: Hi All I have got axis2 to generate the following for me: POST /some HTTP/1.1 SOAPAction: User-Agent: Axis2 Content-Length: 5790 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=text/xml; charset=UTF-8 Authorization: Digest username=username, realm=somerealm, nonce=RZTzxw==028733d3cb3ad64a414de383d252b679e8969982, uri=/some, response=427csaasaawqwqee6be586508c8e91b4, qop=auth, nc=0001, cnonce=61849b59f21f00e0ac46d38f9be4f1b2, algorithm=MD5 Host: fqdn:8082 --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 content-type: application/xop+xml; charset=UTF-8; type=text/xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Headerns1:TransactionID xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2;
Re: [Axis2]Re: MTOM and content-type
Thanks for all you help Thilina. Will give ii a go. Stefan On Wed, 2007-01-03 at 09:38 +0600, Thilina Gunarathne wrote: Stefan, The attachments by definition suppose to be Binary, cause only sending pure binary will bring the efficiencies of sending attachments.. If it needs to go as base64, I would advise you to send it in line inside the payload as you did earlier... If you really really needs your attachment to be base64, then you have to convert the Binary to base64 string in you client code.. You can use the Base64 encoder which comes with Axiom.. Then you need to create a DataHandler out of the resulting base64 string.. ~Thilina On 1/2/07, Stefan Kok [EMAIL PROTECTED] wrote: Thilina Thanks. This did work very well. The attachment is binary tough. Do I need to manipulate options or the data handler to write the attachment as base64 ? Regards Stefan On Tue, 2007-01-02 at 14:43 +0530, Thilina Gunarathne wrote: Try the following, org.apache.axiom.soap.SOAPFactory sf = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope env = sf.getDefaultEnvelope(); SOAPHeader sh = env.getHeader() . . . /* Content */ OMElement content = sf.createOMElement(Content, nms); sbmtRequest.addChild(content); FileDataSource fileDataSource = new FileDataSource(/home/stefan/workspace/test/bridge.jpg); DataHandler dh = new DataHandler(fileDataSource); MessageContext mc = new MessageContext(); String contentType = mc.addAttachment(dh); content.addAttribute(href,contentType,your namespace); . . . mepClient.execute(true); ~Thilina . . . This gives the in line result. Regards Stefan On Tue, 2007-01-02 at 13:47 +0530, Thilina Gunarathne wrote: Yes.. It is possible..Please see here [1].. You need to construct the soap envelope using OMElements... This [2] might be usefull to figure out OMElements.. Thilina [1] http://ws.apache.org/axis2/1_1/mtom-guide.html#3 [2] http://ws.apache.org/commons/axiom/OMTutorial.html On 1/2/07, Stefan Kok [EMAIL PROTECTED] wrote: Hi Thilina Thanks. Disabling MTOM and enabling SWA did work great. Please see the exert from EtherReal below. Note that the attachment is placed in the Content as base64 string. . . . Content/9j/4AAQSkZJRgABAgIAAAD/4QA +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE . . /9k=/Content /SubmitRequest /soapenv:Body /soapenv:Envelope The server I am sending to, requires that I send it as Content href=cid:C9... / Please see the sample below. Is it possible with SWA ? Content href=cid:C9D026DAE628978D554A777553FD5B7AallowAdaptations=true / /SubmitReq /env:Body /env:Envelope Kind regards Stefan. On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote: Stefan, Please use Soap with Attachments only.. Then it'll be text/xml.. Make sure *not* to enable MTOM at the same time, cause then MTOM will get priority and the message will be MTOM.. See here [1] for more detials... Thilina [1] http://wso2.org/library/264 On 12/29/06, Stefan Kok [EMAIL PROTECTED] wrote: Hi All I have got axis2 to generate the following for me: POST /some HTTP/1.1 SOAPAction: User-Agent: Axis2 Content-Length: 5790 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=text/xml; charset=UTF-8 Authorization: Digest username=username, realm=somerealm, nonce=RZTzxw==028733d3cb3ad64a414de383d252b679e8969982, uri=/some, response=427csaasaawqwqee6be586508c8e91b4, qop=auth, nc=0001, cnonce=61849b59f21f00e0ac46d38f9be4f1b2, algorithm=MD5 Host: fqdn:8082 --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 content-type:
Re: [Axis2]Re: MTOM and content-type
Hi Thilina Thanks. Disabling MTOM and enabling SWA did work great. Please see the exert from EtherReal below. Note that the attachment is placed in the Content as base64 string. . . . Content/9j/4AAQSkZJRgABAgIAAAD/4QA +RXhpZgAASUkqAAgBAAsAAgAcGgBBQ0QgU3lzdGVtcyBEaWdpdGFsIEltYWdpbmcA//4AHkFDRCBTeXN0ZW1zIERpZ2l0YWwgSW1hZ2luZwD/wAARCABkAJYDASIAAhEBAxEB/9sAhAAHBAUGBQQHBgUGBwcHCAoRCwoJCQoVDxAMERkWGhoYFhgYHB8oIhwdJh4YGCMvIyYpKi0tLRshMTQxKzQoLC0rAQsLCw8NDx4RER5AKyQrQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQED/xACdAAACAwEBAQAEBQIDBgcBABAAAgEDAgIGBgUHCAgHAQIDAAQRBSESMQYTIkFRYQcUMnGBkSNCodHwFTNSU3KxwSQ0NWJ0gpKzFkNUc4OTsuEXJTY3VaLSAQADAQEBAAABAgMABAURAAICAQQCAgMBAhFBAxIhMRNRBCIUQnH/2gAMAwEAAhEDEQA/AOn9RZ6kzSzQoW8ScGk99ZyWUpeBg0Y7uLcUC011bDCzZA7vCqpNUdhiVQfOvRjBolKSGkWrRtGY7hTVUjw+1A7ZPcaTPMrNkAirIJyrDBqm0TcN4IpJj2VLHyotbCUbPE . . /9k=/Content /SubmitRequest /soapenv:Body /soapenv:Envelope The server I am sending to, requires that I send it as Content href=cid:C9... / Please see the sample below. Is it possible with SWA ? Content href=cid:C9D026DAE628978D554A777553FD5B7AallowAdaptations=true / /SubmitReq /env:Body /env:Envelope Kind regards Stefan. On Sun, 2006-12-31 at 07:35 +0600, Thilina Gunarathne wrote: Stefan, Please use Soap with Attachments only.. Then it'll be text/xml.. Make sure *not* to enable MTOM at the same time, cause then MTOM will get priority and the message will be MTOM.. See here [1] for more detials... Thilina [1] http://wso2.org/library/264 On 12/29/06, Stefan Kok [EMAIL PROTECTED] wrote: Hi All I have got axis2 to generate the following for me: POST /some HTTP/1.1 SOAPAction: User-Agent: Axis2 Content-Length: 5790 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=text/xml; charset=UTF-8 Authorization: Digest username=username, realm=somerealm, nonce=RZTzxw==028733d3cb3ad64a414de383d252b679e8969982, uri=/some, response=427csaasaawqwqee6be586508c8e91b4, qop=auth, nc=0001, cnonce=61849b59f21f00e0ac46d38f9be4f1b2, algorithm=MD5 Host: fqdn:8082 --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 content-type: application/xop+xml; charset=UTF-8; type=text/xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Headerns1:TransactionID xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2; ns1:mustUnderstand=1MyTransaction/ns1:TransactionID/soapenv:Headersoapenv:Bodyns1:SubmitRequest xmlns:ns1=http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2;xop:Include href=cid:1.urn:uuid:[EMAIL PROTECTED] xmlns:xop=http://www.w3.org/2004/08/xop/include; //ns1:SubmitRequest/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn_uuid_D71D1475B0136C8FED11673898742622 The server that I send this to, requires that the content-type must be: text/xml; charset=utf-8 and not content-type: application/xop+xml; charset=UTF-8; type=text/xml; I have been searching the web for ideas but have not found much. It must be multipart/related so I cannot turn off MTOM. Kind regards Stefan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stefan Kok [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 Regarding MTOM Sample
IIRC there were some problems with mtom in axis2 1.0 that have been subsequently fixed. We are getting close to a new release, can you try with the nightly build ? http://people.apache.org/dist/axis2/nightly/axis2-std-1.1-SNAPSHOT-bin.zip http://people.apache.org/dist/axis2/nightly/axis2.war Robert On 10/18/06, T, Uma Maheshwari (Cognizant) [EMAIL PROTECTED] wrote: Hi I ran the MTOM sample that was packaged with the Axis2 1.0 version and when I looked at the request message using SOAPMonitor, the image was sent inline in the Body part. I assumed that if MTOM is enabled, the attachment would be in the MIME boundary and the reference (XOP:include) would be in the SOAP body. But in the sample, the attachment was sent like any other element in the body. Is there a sample which would demonstrate the attachment as reference using MTOM/XOP? Thanks Uma This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Hi Chamikara, I chekout Sandesha2 and run maven. I take the sandesha2-SNAPSHOT.mar, sandesha2-client-SNAPSHOT.jar et sandesha2-SNAPSHOT.jar. I put them on catalina and on the client. Now I have an error when I launch catalina. The problem to the sandesha2-SNAPSHOT.mar. - Deploying module : sandesha2 - StandardWrapper.Throwable java.lang.NoClassDefFoundError: org/apache/ws/policy/ExactlyOne at org.apache.sandesha2.policy.RMPolicyProcessor.processPolicy(RMPolicyProcessor.java:127) at org.apache.sandesha2.util.PropertyManager.loadPropertiesFromModuleDescPolicy(PropertyManager.java:190) at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:56) at org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) at org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) - La servlet /axis2 a généré une exception load() java.lang.NoClassDefFoundError: org/apache/ws/policy/ExactlyOne at org.apache.sandesha2.policy.RMPolicyProcessor.processPolicy(RMPolicyProcessor.java:127) at org.apache.sandesha2.util.PropertyManager.loadPropertiesFromModuleDescPolicy(PropertyManager.java:190) at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:56) at org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) at org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804) at
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Elodie It is in Neethi (WS-Policy). Paul On 7/4/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Hi Chamikara, I chekout Sandesha2 and run maven. I take the sandesha2-SNAPSHOT.mar, sandesha2-client-SNAPSHOT.jar et sandesha2-SNAPSHOT.jar. I put them on catalina and on the client. Now I have an error when I launch catalina. The problem to the sandesha2-SNAPSHOT.mar. - Deploying module : sandesha2 - StandardWrapper.Throwable java.lang.NoClassDefFoundError: org/apache/ws/policy/ExactlyOne at org.apache.sandesha2.policy.RMPolicyProcessor.processPolicy(RMPolicyProcessor.java:127) at org.apache.sandesha2.util.PropertyManager.loadPropertiesFromModuleDescPolicy(PropertyManager.java:190) at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:56) at org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) at org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) - La servlet /axis2 a généré une exception load() java.lang.NoClassDefFoundError: org/apache/ws/policy/ExactlyOne at org.apache.sandesha2.policy.RMPolicyProcessor.processPolicy(RMPolicyProcessor.java:127) at org.apache.sandesha2.util.PropertyManager.loadPropertiesFromModuleDescPolicy(PropertyManager.java:190) at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:56) at org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) at org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Hi Elliod, This is because u hv the old Neethi jar in you tomcat lib directory. Remove this and add the latest Neethi-SNAPSHOT.jar from http://people.apache.org/repository/ws-commons/jars/ Chamikara On 7/4/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Hi Chamikara,I chekout Sandesha2 and run maven.I take the sandesha2-SNAPSHOT.mar, sandesha2-client-SNAPSHOT.jar etsandesha2-SNAPSHOT.jar. I put them on catalina and on the client. Now Ihave an error when I launch catalina. The problem to the sandesha2-SNAPSHOT.mar.- Deploying module : sandesha2- StandardWrapper.Throwablejava.lang.NoClassDefFoundError: org/apache/ws/policy/ExactlyOneatorg.apache.sandesha2.policy.RMPolicyProcessor.processPolicy (RMPolicyProcessor.java:127)atorg.apache.sandesha2.util.PropertyManager.loadPropertiesFromModuleDescPolicy(PropertyManager.java:190)at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java :56)atorg.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128)atorg.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java :104)atorg.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:40)atorg.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java :213)atorg.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)atorg.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)atorg.apache.catalina.core.StandardWrapper.load (StandardWrapper.java:932)atorg.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4176)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)atorg.apache.catalina.core.StandardHost.addChild (StandardHost.java:524)atorg.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)atorg.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)atorg.apache.catalina.startup.HostConfig.deployApps (HostConfig.java:472)atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:119)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:718)atorg.apache.catalina.core.ContainerBase.start (ContainerBase.java:1012)atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)atorg.apache.catalina.core.StandardService.start(StandardService.java:450)at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)at org.apache.catalina.startup.Catalina.start(Catalina.java:551)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke (Method.java:585)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)- La servlet /axis2 a généré une exception load() java.lang.NoClassDefFoundError: org/apache/ws/policy/ExactlyOneatorg.apache.sandesha2.policy.RMPolicyProcessor.processPolicy(RMPolicyProcessor.java:127)atorg.apache.sandesha2.util.PropertyManager.loadPropertiesFromModuleDescPolicy (PropertyManager.java:190)at org.apache.sandesha2.SandeshaModule.init(SandeshaModule.java:56)atorg.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:128) atorg.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:104)atorg.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java :40)atorg.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213)atorg.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)atorg.apache.catalina.core.StandardWrapper.loadServlet (StandardWrapper.java:1105)atorg.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)atorg.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)atorg.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:739)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)atorg.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)atorg.apache.catalina.startup.HostConfig.deployWARs
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Hi Paul 1) Yes, MTOM + XMLBeans code works without WSRM and also WSRM + XMLBeans code works without WSRM. 2) The error for MTOM + WSRM with ADB, I don't know because I can't generate sources. I'm trying to do MTOM + WSRM with ADB on a other little exemple like HelloWorld. I tell you the result when I finish it. Thanks Elodie Paul Fremantle wrote: Elodie I'm not completely clear on the situation! 1) Is the MTOM + XMLBeans code working without WSRM? 2) What is the error you get with ADB? 3) Can you post the WSDL? Paul On 6/29/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Hi Paul Thanks for your response. I wish have more information because I don' t understand why MTOM can't work with XmlBeans? And what is the marshalling I have to use? I try ADB but it not seems to work, I can't generate the server implementation. In more, I create a client-server with only MTOM and I also create the same thing with only WSRM(sandesha2) and both work separetly with XmlBeans. Is the problem is WSRM + MTOM together? And how could I do to resolve my problem? Thanks a lot. Regards Elodie Paul Fremantle wrote: Elodie I think the problem is that you are using MTOM with XMLBeans which does not work. Paul -- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com On 6/28/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Mancinelli Elodie wrote: Sorry, I want to precise my request. When I observe with TCPMon the soap message, the differents messages of WSRM's protocole are created (CreateSequence, CreateSequenceResponse, Message, Acknowldgement and TerminateSequence). These messages are correct. The problem is on the server after messages. Thanks, Regards, Elodie Mancinelli Elodie wrote: Hi all, I try to create an OneWay method which supports WSRM and an attachment. My service is really simple, it's only a println. The method runs successfully when there is only the WSRM implementation, but when I add the attachement part, I have an server error: org.apache.sandesha2.SandeshaException: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error; nested exception is: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:199) Caused by: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java:50) at org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34) at org.apache.axis2.engine.AxisEngine.resumeReceive(AxisEngine.java:497) at org.apache.axis2.engine.AxisEngine.resume(AxisEngine.java:543) at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:189) Caused by: java.lang.RuntimeException: Data binding error at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:174) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java:46) ... 4 more Caused by: org.apache.axiom.om.OMException: java.lang.NullPointerException at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:254) at org.apache.axiom.om.impl.llom.OMStAXWrapper.getTextCharacters(OMStAXWrapper.java:365) at org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1154) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231) at fr.gouv.finances.dgme.presto.SubmitOneWayDocument$Factory.parse(SubmitOneWayDocument.java:128) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:145) ... 5 more Caused by: java.lang.NullPointerException at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:737) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:777) at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:710) at
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Elodie This looks more like a Sandesha bug. I will do a test as well and let you know how it goes. Paul On 7/3/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Hi Paul 1) Yes, MTOM + XMLBeans code works without WSRM and also WSRM + XMLBeans code works without WSRM. 2) The error for MTOM + WSRM with ADB, I don't know because I can't generate sources. I'm trying to do MTOM + WSRM with ADB on a other little exemple like HelloWorld. I tell you the result when I finish it. Thanks Elodie Paul Fremantle wrote: Elodie I'm not completely clear on the situation! 1) Is the MTOM + XMLBeans code working without WSRM? 2) What is the error you get with ADB? 3) Can you post the WSDL? Paul On 6/29/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Hi Paul Thanks for your response. I wish have more information because I don' t understand why MTOM can't work with XmlBeans? And what is the marshalling I have to use? I try ADB but it not seems to work, I can't generate the server implementation. In more, I create a client-server with only MTOM and I also create the same thing with only WSRM(sandesha2) and both work separetly with XmlBeans. Is the problem is WSRM + MTOM together? And how could I do to resolve my problem? Thanks a lot. Regards Elodie Paul Fremantle wrote: Elodie I think the problem is that you are using MTOM with XMLBeans which does not work. Paul -- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com On 6/28/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Mancinelli Elodie wrote: Sorry, I want to precise my request. When I observe with TCPMon the soap message, the differents messages of WSRM's protocole are created (CreateSequence, CreateSequenceResponse, Message, Acknowldgement and TerminateSequence). These messages are correct. The problem is on the server after messages. Thanks, Regards, Elodie Mancinelli Elodie wrote: Hi all, I try to create an OneWay method which supports WSRM and an attachment. My service is really simple, it's only a println. The method runs successfully when there is only the WSRM implementation, but when I add the attachement part, I have an server error: org.apache.sandesha2.SandeshaException: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error; nested exception is: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:199) Caused by: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java:50) at org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34) at org.apache.axis2.engine.AxisEngine.resumeReceive(AxisEngine.java:497) at org.apache.axis2.engine.AxisEngine.resume(AxisEngine.java:543) at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:189) Caused by: java.lang.RuntimeException: Data binding error at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:174) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java:46) ... 4 more Caused by: org.apache.axiom.om.OMException: java.lang.NullPointerException at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:254) at org.apache.axiom.om.impl.llom.OMStAXWrapper.getTextCharacters(OMStAXWrapper.java:365) at org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1154) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231) at fr.gouv.finances.dgme.presto.SubmitOneWayDocument$Factory.parse(SubmitOneWayDocument.java:128) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:145) ... 5 more Caused by: java.lang.NullPointerException at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:737)
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Hi Elodie, Paul, It seems like MTOM + Sandesha2 + NotInOrder case is working. But MTOM + Sadesha2 + InOrder case is not working. When InOrder Invocation is enabled Sandesha2 always pauses the message before its actual invocation and Axis2 closes the InPutStream when the message get paused and the thread get returned. Because of that the service Impl. get exceptions when tring to read the MTOM attachments from the already closed stream. This seems to be a general problem with message pausing. So Elodie, for now disable InOrder invocation in Sandesha2. To do that change the 'InvokeInOrder' policy in the module.xml to 'false' (this is 'true' by default). Chamikara On 7/3/06, Paul Fremantle [EMAIL PROTECTED] wrote: ElodieThis looks more like a Sandesha bug. I will do a test as well and letyou know how it goes.PaulOn 7/3/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Hi Paul 1) Yes, MTOM + XMLBeans code works without WSRM and also WSRM + XMLBeans code works without WSRM. 2) The error for MTOM + WSRM with ADB, I don't know because I can't generate sources. I'm trying to do MTOM + WSRM with ADB on a other little exemple like HelloWorld. I tell you the result when I finish it. Thanks Elodie Paul Fremantle wrote: Elodie I'm not completely clear on the situation! 1) Is the MTOM + XMLBeans code working without WSRM? 2) What is the error you get with ADB? 3) Can you post the WSDL? Paul On 6/29/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Hi Paul Thanks for your response. I wish have more information because I don' t understand why MTOM can't work with XmlBeans? And what is the marshalling I have to use? I try ADB but it not seems to work, I can't generate the server implementation. In more, I create a client-server with only MTOM and I also create the same thing with only WSRM(sandesha2) andboth work separetly with XmlBeans. Is the problem is WSRM + MTOM together? And how could I do to resolve my problem? Thanks a lot. Regards ElodiePaul Fremantle wrote:Elodie I think the problem is that you are using MTOM with XMLBeans which does not work. Paul -- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com On 6/28/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Mancinelli Elodie wrote: Sorry, I want to precise my request. When I observe with TCPMon thesoap message, the differents messages of WSRM's protocole are created(CreateSequence, CreateSequenceResponse, Message, Acknowldgement andTerminateSequence). These messages are correct. The problem is on theserver after messages. Thanks, Regards, Elodie Mancinelli Elodie wrote: Hi all, I try to create an OneWay method which supports WSRM and an attachment.My service is really simple, it's only a println. The method runs successfully when there is only the WSRMimplementation, but when I add the attachement part, I have an servererror: org.apache.sandesha2.SandeshaException: Data binding error; nestedexception is: java.lang.RuntimeException: Data binding error; nestedexception is: org.apache.axis2.AxisFault: Data binding error; nestedexception is: java.lang.RuntimeException: Data binding error at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:199)Caused by: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java :318) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java :50) at org.apache.axis2.receivers.AbstractInMessageReceiver.receive (AbstractInMessageReceiver.java:34) at org.apache.axis2.engine.AxisEngine.resumeReceive (AxisEngine.java:497) at org.apache.axis2.engine.AxisEngine.resume(AxisEngine.java:543) at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:189)Caused by: java.lang.RuntimeException: Data binding error at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:174) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic (PrestoSvcMessageReceiverInOnly.java:46) ... 4 moreCaused by: org.apache.axiom.om.OMException :java.lang.NullPointerException at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java :254) at org.apache.axiom.om.impl.llom.OMStAXWrapper.getTextCharacters(OMStAXWrapper.java:365) at org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader (Locale.java:1154) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject (Locale.java:843) at
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Hi Chamikara, Thanks you for your help. I change the 'InvokeInOrder' policy in the module.xml to 'false' in the sandesha2_1.0 mar. And now,I have an other error. I give you the catalina log: 3 juil. 2006 15:01:45 org.apache.catalina.core.StandardHostValve custom GRAVE: Exception Processing ErrorPage[errorCode=500, location=/axis2-web/Error/error500.jsp] org.apache.jasper.JasperException: getOutputStream() a déjà été appelé pour cette réponse at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:228) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) I search in the mailling list,and I don't find if there is a solution but I find a JIRA bug(http://issues.apache.org/jira/browse/AXIS2-707). Have you an idea? Elodie Chamikara Jayalath wrote: Hi Elodie, Paul, It seems like MTOM + Sandesha2 + NotInOrder case is working. But MTOM + Sadesha2 + InOrder case is not working. When InOrder Invocation is enabled Sandesha2 always pauses the message before its actual invocation and Axis2 closes the InPutStream when the message get paused and the thread get returned. Because of that the service Impl. get exceptions when tring to read the MTOM attachments from the already closed stream. This seems to be a general problem with message pausing. So Elodie, for now disable InOrder invocation in Sandesha2. To do that change the 'InvokeInOrder' policy in the module.xml to 'false' (this is 'true' by default). Chamikara - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Sorry I forget the StackTrace: java.lang.NullPointerException org.apache.sandesha2.msgprocessors.TerminateSeqMsgProcessor.setUpHighestMsgNumbers(TerminateSeqMsgProcessor.java:185) org.apache.sandesha2.msgprocessors.TerminateSeqMsgProcessor.processInMessage(TerminateSeqMsgProcessor.java:128) org.apache.sandesha2.handlers.SandeshaInHandler.invoke(SandeshaInHandler.java:87) org.apache.axis2.engine.Phase.invoke(Phase.java:381) org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473) org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445) org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284) org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)/pre This error appear in the response at the TerminateSequence. Elodie Mancinelli Elodie wrote: Hi Chamikara, Thanks you for your help. I change the 'InvokeInOrder' policy in the module.xml to 'false' in the sandesha2_1.0 mar. And now,I have an other error. I give you the catalina log: 3 juil. 2006 15:01:45 org.apache.catalina.core.StandardHostValve custom GRAVE: Exception Processing ErrorPage[errorCode=500, location=/axis2-web/Error/error500.jsp] org.apache.jasper.JasperException: getOutputStream() a déjà été appelé pour cette réponse at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:228) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) I search in the mailling list,and I don't find if there is a solution but I find a JIRA bug(http://issues.apache.org/jira/browse/AXIS2-707). Have you an idea? Elodie Chamikara Jayalath wrote: Hi Elodie, Paul, It seems like MTOM + Sandesha2 + NotInOrder case is working. But MTOM + Sadesha2 + InOrder case is not working. When InOrder Invocation is enabled Sandesha2 always pauses the message before its actual invocation and Axis2 closes the InPutStream when the message get paused and the thread get returned. Because of that the service Impl. get exceptions when tring to read the MTOM attachments from the already closed stream. This seems to be a general problem with message pausing. So Elodie, for now disable InOrder invocation in Sandesha2. To do that change the 'InvokeInOrder' policy in the module.xml to 'false' (this is 'true' by default). Chamikara - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Hi Elodie, This was due to a bug, fixed now. Please take a latest checkout of Sandesha2. Chamikara On 7/3/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Sorry I forget the StackTrace:java.lang.NullPointerExceptionorg.apache.sandesha2.msgprocessors.TerminateSeqMsgProcessor.setUpHighestMsgNumbers(TerminateSeqMsgProcessor.java:185)org.apache.sandesha2.msgprocessors.TerminateSeqMsgProcessor.processInMessage (TerminateSeqMsgProcessor.java:128)org.apache.sandesha2.handlers.SandeshaInHandler.invoke(SandeshaInHandler.java:87)org.apache.axis2.engine.Phase.invoke(Phase.java:381)org.apache.axis2.engine.AxisEngine.invoke (AxisEngine.java:473)org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445)org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:136)javax.servlet.http.HttpServlet.service(HttpServlet.java:709)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)/preThis error appear in the response at the TerminateSequence. ElodieMancinelli Elodie wrote: Hi Chamikara, Thanks you for your help. I change the 'InvokeInOrder' policy in the module.xml to 'false' in the sandesha2_1.0 mar. And now,I have an other error. I give you the catalina log: 3 juil. 2006 15:01:45 org.apache.catalina.core.StandardHostValve custom GRAVE: Exception Processing ErrorPage[errorCode=500, location=/axis2-web/Error/error500.jsp] org.apache.jasper.JasperException: getOutputStream() a déjà été appelé pour cette réponseat org.apache.jasper.servlet.JspServletWrapper.handleJspException (JspServletWrapper.java:510)at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:314)at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)at org.apache.catalina.core.ApplicationDispatcher.invoke (ApplicationDispatcher.java:672)at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)at org.apache.catalina.core.ApplicationDispatcher.doForward (ApplicationDispatcher.java:398)at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)at org.apache.catalina.core.StandardHostValve.custom (StandardHostValve.java:363)at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284)at org.apache.catalina.core.StandardHostValve.throwable (StandardHostValve.java:228)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148)at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:667)at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (LeaderFollowerWorkerThread.java:80)at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)at java.lang.Thread.run(Thread.java:595) I search in the mailling list,and I don't find if there is a solution but I find a JIRA bug(http://issues.apache.org/jira/browse/AXIS2-707). Have you an idea? Elodie Chamikara Jayalath wrote: Hi Elodie, Paul, It seems like MTOM + Sandesha2 + NotInOrder case is working. But MTOM + Sadesha2 + InOrder case is not working. When InOrder Invocation is enabled Sandesha2 always pauses the message before its actual invocation and Axis2 closes the InPutStream when the message get paused and the thread get returned. Because of that the service Impl. get exceptions when tring to read the MTOM attachments from the already closed stream. This seems to be a general problem with message pausing. So Elodie, for now disable InOrder invocation in Sandesha2. To do that change the 'InvokeInOrder' policy in the module.xml to 'false' (this is 'true' by default). Chamikara
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Hi Chamikara; When you pausing the execution , the best way is to build the envelop fully and then pause. I think that will solve the problem :) Chamikara Jayalath wrote: Hi Elodie, Paul, It seems like MTOM + Sandesha2 + NotInOrder case is working. But MTOM + Sadesha2 + InOrder case is not working. When InOrder Invocation is enabled Sandesha2 always pauses the message before its actual invocation and Axis2 closes the InPutStream when the message get paused and the thread get returned. Because of that the service Impl. get exceptions when tring to read the MTOM attachments from the already closed stream. This seems to be a general problem with message pausing. So Elodie, for now disable InOrder invocation in Sandesha2. To do that change the 'InvokeInOrder' policy in the module.xml to 'false' (this is 'true' by default). Chamikara On 7/3/06, *Paul Fremantle* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Elodie This looks more like a Sandesha bug. I will do a test as well and let you know how it goes. Paul On 7/3/06, Mancinelli Elodie [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Paul 1) Yes, MTOM + XMLBeans code works without WSRM and also WSRM + XMLBeans code works without WSRM. 2) The error for MTOM + WSRM with ADB, I don't know because I can't generate sources. I'm trying to do MTOM + WSRM with ADB on a other little exemple like HelloWorld. I tell you the result when I finish it. Thanks Elodie Paul Fremantle wrote: Elodie I'm not completely clear on the situation! 1) Is the MTOM + XMLBeans code working without WSRM? 2) What is the error you get with ADB? 3) Can you post the WSDL? Paul On 6/29/06, Mancinelli Elodie [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Paul Thanks for your response. I wish have more information because I don' t understand why MTOM can't work with XmlBeans? And what is the marshalling I have to use? I try ADB but it not seems to work, I can't generate the server implementation. In more, I create a client-server with only MTOM and I also create the same thing with only WSRM(sandesha2) and both work separetly with XmlBeans. Is the problem is WSRM + MTOM together? And how could I do to resolve my problem? Thanks a lot. Regards Elodie Paul Fremantle wrote: Elodie I think the problem is that you are using MTOM with XMLBeans which does not work. Paul -- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com http://www.wso2.com On 6/28/06, Mancinelli Elodie [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Mancinelli Elodie wrote: Sorry, I want to precise my request. When I observe with TCPMon the soap message, the differents messages of WSRM's protocole are created (CreateSequence, CreateSequenceResponse, Message, Acknowldgement and TerminateSequence). These messages are correct. The problem is on the server after messages. Thanks, Regards, Elodie Mancinelli Elodie wrote: Hi all, I try to create an OneWay method which supports WSRM and an attachment. My service is really simple, it's only a println. The method runs successfully when there is only the WSRM implementation, but when I add the attachement part, I have an server error: org.apache.sandesha2.SandeshaException: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error; nested exception is: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:199) Caused by: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java :318) at
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Elodie I'm not completely clear on the situation! 1) Is the MTOM + XMLBeans code working without WSRM? 2) What is the error you get with ADB? 3) Can you post the WSDL? Paul On 6/29/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Hi Paul Thanks for your response. I wish have more information because I don' t understand why MTOM can't work with XmlBeans? And what is the marshalling I have to use? I try ADB but it not seems to work, I can't generate the server implementation. In more, I create a client-server with only MTOM and I also create the same thing with only WSRM(sandesha2) and both work separetly with XmlBeans. Is the problem is WSRM + MTOM together? And how could I do to resolve my problem? Thanks a lot. Regards Elodie Paul Fremantle wrote: Elodie I think the problem is that you are using MTOM with XMLBeans which does not work. Paul -- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com On 6/28/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Mancinelli Elodie wrote: Sorry, I want to precise my request. When I observe with TCPMon the soap message, the differents messages of WSRM's protocole are created (CreateSequence, CreateSequenceResponse, Message, Acknowldgement and TerminateSequence). These messages are correct. The problem is on the server after messages. Thanks, Regards, Elodie Mancinelli Elodie wrote: Hi all, I try to create an OneWay method which supports WSRM and an attachment. My service is really simple, it's only a println. The method runs successfully when there is only the WSRM implementation, but when I add the attachement part, I have an server error: org.apache.sandesha2.SandeshaException: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error; nested exception is: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:199) Caused by: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java:50) at org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34) at org.apache.axis2.engine.AxisEngine.resumeReceive(AxisEngine.java:497) at org.apache.axis2.engine.AxisEngine.resume(AxisEngine.java:543) at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:189) Caused by: java.lang.RuntimeException: Data binding error at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:174) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java:46) ... 4 more Caused by: org.apache.axiom.om.OMException: java.lang.NullPointerException at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:254) at org.apache.axiom.om.impl.llom.OMStAXWrapper.getTextCharacters(OMStAXWrapper.java:365) at org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1154) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231) at fr.gouv.finances.dgme.presto.SubmitOneWayDocument$Factory.parse(SubmitOneWayDocument.java:128) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:145) ... 5 more Caused by: java.lang.NullPointerException at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:737) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:777) at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:710) at org.apache.coyote.Request.doRead(Request.java:423) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:283) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:371) at org.apache.catalina.connector.InputBuffer.readByte(InputBuffer.java:292) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:104) at
Re: [Axis2] large MTOM binary data not returning to client
It is an SSL connection to the production server, so I cannot do packet sniffing. By the MTOM entry, do you mean the OMText node that is created from calling factory.createOMText(dataHandler, true) ?I don't think it's the Axis1 client, because the problem is intermittent - sometimes it works on the large data chunks, and sometimes not. -AndrewPaul Fremantle [EMAIL PROTECTED] wrote: Have you tried doing any packet sniffing? It might well be the Axis1client? I assume you have optimised = false on the MTOM entry?PaulOn 6/28/06, Andrew B <[EMAIL PROTECTED]> wrote: Hi, I have an Axis2 service running in our production environment. The web service call completes, but control is not returned to the client. It is passing back 1.2Mb of binary data, via MTOM. Smaller amounts of binary work consistently (say 350Kb or so). The client is Axis1 (Java). The app server is JBoss 4.0.3 running on Linux, with JDK 1.4. MTOM is enabled, according to the documentation: true The server-side processing always completes, in around 1 minute, according to the log files, even when the data is not returned. According to the JBoss console, the request is still being processed, even though the web service call is complete. Any ideas at all are appreciated! Thanks, as always, Andrew Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better.-- Paul FremantleVP/Technology, WSO2 and OASIS WS-RX TC Co-chairhttp://bloglines.com/blog/paulfremantle[EMAIL PROTECTED]"Oxygenating the Web Service Platform", www.wso2.com-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta.
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Hi Paul Thanks for your response. I wish have more information because I don' t understand why MTOM can't work with XmlBeans? And what is the marshalling I have to use? I try ADB but it not seems to work, I can't generate the server implementation. In more, I create a client-server with only MTOM and I also create the same thing with only WSRM(sandesha2) and both work separetly with XmlBeans. Is the problem is WSRM + MTOM together? And how could I do to resolve my problem? Thanks a lot. Regards Elodie Paul Fremantle wrote: Elodie I think the problem is that you are using MTOM with XMLBeans which does not work. Paul -- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com On 6/28/06, Mancinelli Elodie [EMAIL PROTECTED] wrote: Mancinelli Elodie wrote: Sorry, I want to precise my request. When I observe with TCPMon the soap message, the differents messages of WSRM's protocole are created (CreateSequence, CreateSequenceResponse, Message, Acknowldgement and TerminateSequence). These messages are correct. The problem is on the server after messages. Thanks, Regards, Elodie Mancinelli Elodie wrote: Hi all, I try to create an OneWay method which supports WSRM and an attachment. My service is really simple, it's only a println. The method runs successfully when there is only the WSRM implementation, but when I add the attachement part, I have an server error: org.apache.sandesha2.SandeshaException: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error; nested exception is: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:199) Caused by: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java:50) at org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34) at org.apache.axis2.engine.AxisEngine.resumeReceive(AxisEngine.java:497) at org.apache.axis2.engine.AxisEngine.resume(AxisEngine.java:543) at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:189) Caused by: java.lang.RuntimeException: Data binding error at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:174) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java:46) ... 4 more Caused by: org.apache.axiom.om.OMException: java.lang.NullPointerException at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:254) at org.apache.axiom.om.impl.llom.OMStAXWrapper.getTextCharacters(OMStAXWrapper.java:365) at org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1154) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231) at fr.gouv.finances.dgme.presto.SubmitOneWayDocument$Factory.parse(SubmitOneWayDocument.java:128) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:145) ... 5 more Caused by: java.lang.NullPointerException at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:737) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:777) at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:710) at org.apache.coyote.Request.doRead(Request.java:423) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:283) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:371) at org.apache.catalina.connector.InputBuffer.readByte(InputBuffer.java:292) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:104) at java.io.FilterInputStream.read(FilterInputStream.java:66) at java.io.PushbackInputStream.read(PushbackInputStream.java:120) at org.apache.axiom.attachments.MIMEBodyPartInputStream.read(MIMEBodyPartInputStream.java:49) at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:106) at
Re: [Axis2,Sandesha2]MTOM/XOP + WSRM
Mancinelli Elodie wrote: Sorry, I want to precise my request. When I observe with TCPMon the soap message, the differents messages of WSRM's protocole are created (CreateSequence, CreateSequenceResponse, Message, Acknowldgement and TerminateSequence). These messages are correct. The problem is on the server after messages. Thanks, Regards, Elodie Mancinelli Elodie wrote: Hi all, I try to create an OneWay method which supports WSRM and an attachment. My service is really simple, it's only a println. The method runs successfully when there is only the WSRM implementation, but when I add the attachement part, I have an server error: org.apache.sandesha2.SandeshaException: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error; nested exception is: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:199) Caused by: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java:50) at org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34) at org.apache.axis2.engine.AxisEngine.resumeReceive(AxisEngine.java:497) at org.apache.axis2.engine.AxisEngine.resume(AxisEngine.java:543) at org.apache.sandesha2.workers.InOrderInvoker.run(InOrderInvoker.java:189) Caused by: java.lang.RuntimeException: Data binding error at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:174) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.invokeBusinessLogic(PrestoSvcMessageReceiverInOnly.java:46) ... 4 more Caused by: org.apache.axiom.om.OMException: java.lang.NullPointerException at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:254) at org.apache.axiom.om.impl.llom.OMStAXWrapper.getTextCharacters(OMStAXWrapper.java:365) at org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1154) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231) at fr.gouv.finances.dgme.presto.SubmitOneWayDocument$Factory.parse(SubmitOneWayDocument.java:128) at fr.gouv.finances.dgme.presto.PrestoSvcMessageReceiverInOnly.fromOM(PrestoSvcMessageReceiverInOnly.java:145) ... 5 more Caused by: java.lang.NullPointerException at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:737) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:777) at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:710) at org.apache.coyote.Request.doRead(Request.java:423) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:283) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:371) at org.apache.catalina.connector.InputBuffer.readByte(InputBuffer.java:292) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:104) at java.io.FilterInputStream.read(FilterInputStream.java:66) at java.io.PushbackInputStream.read(PushbackInputStream.java:120) at org.apache.axiom.attachments.MIMEBodyPartInputStream.read(MIMEBodyPartInputStream.java:49) at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:106) at javax.mail.internet.InternetHeaders.init(InternetHeaders.java:92) at javax.mail.internet.MimeBodyPart.init(MimeBodyPart.java:59) at org.apache.axiom.attachments.PartOnMemory.init(PartOnMemory.java:31) at org.apache.axiom.attachments.Attachments.getPart(Attachments.java:451) at org.apache.axiom.attachments.Attachments.getNextPart(Attachments.java:359) at org.apache.axiom.attachments.Attachments.getPart(Attachments.java:324) at org.apache.axiom.attachments.Attachments.getDataHandler(Attachments.java:274) at org.apache.axiom.om.impl.mtom.MTOMStAXSOAPModelBuilder.getDataHandler(MTOMStAXSOAPModelBuilder.java:151) at org.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(OMTextImpl.java:341) at org.apache.axiom.om.impl.llom.OMTextImpl.getInputStream(OMTextImpl.java:368) at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:238) My client is: public static void testSubmitOneWayWSRM()
Re: [axis2] Is MTOM with WSDL Documented?
+1 indeed.. Its an urgent requirement.. I've seen so many people getting in to trouble with MTOM+WSDL. One more thing I would like you to consider is writing and packing a WSDL for the MTOM sample :). Thanks, ~Thilina On 6/15/06, Eran Chinthaka [EMAIL PROTECTED] wrote: robert lazarski wrote: However, looking at the axis2 docs I do not see MTOM use with WSDL documented. Assuming I can get it to work, I could enhance the MTOM docs to show how it works. I could open up a jir and assign it to myself. Any interest?A big +1.-- Chinthaka-- May the SourcE be with u http://webservices.apache.org/~thilina/http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
Re: [axis2] Is MTOM with WSDL Documented?
Sounds good Robert. I don't think we do this well. thanks, dims On 6/14/06, robert lazarski [EMAIL PROTECTED] wrote: Hi all, I'm currently programming an Axis2 WSDL based service that sends binary data, and I plan on using MTOM. The WSDL fragment I think I can use looks like this: xs:element name=MyBinaryData xs:complexType xs:simpleContent xs:extension base=xs:base64Binary xs:attribute ref=xmime:contentType use=required/ /xs:extension /xs:simpleContent /xs:complexType /xs:element I'm basing this off of Anne's post here: http://marc.theaimsgroup.com/?l=axis-userm=114123711724485w=2 However, looking at the axis2 docs I do not see MTOM use with WSDL documented. Assuming I can get it to work, I could enhance the MTOM docs to show how it works. I could open up a jir and assign it to myself. Any interest? Robert http://www.braziloutsource.com -- Davanum Srinivas : http://wso2.com/blogs/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] Is MTOM with WSDL Documented?
robert lazarski wrote: However, looking at the axis2 docs I do not see MTOM use with WSDL documented. Assuming I can get it to work, I could enhance the MTOM docs to show how it works. I could open up a jir and assign it to myself. Any interest? A big +1. -- Chinthaka signature.asc Description: OpenPGP digital signature
RE: [Axis2] Vanishing MTOM attachments
Hi Thilina, The fix you did to OMTextImpl seemed to fix the problem I'm seeing, so thanks very much for that. :) The only problem is that the fix was committed to AXIS2-753 (Setting SOAP Version URI to type 1.2 creates invalid Content-Type that fails during parsing) which seems to be a different client side problem, instead of the other JIRA I raised (AXIS2-752, Problem handling multiple binary MTOM attachments). So I think 752 has been fixed, but 753 is still an issue. Kind regards, Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 20 May 2006 03:57 To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: [Axis2] Vanishing MTOM attachments Can you post your client code for the creation of the OMElements... And the XML payload of the root MIME part... Your earlier posted code and the message snaphots does not contain any valuable thing... I think you are talking about the XOP:Include element as the extra added element... ~Thilina On 5/19/06, Davanum Srinivas [EMAIL PROTECTED] wrote: Timo, Please create a JIRA issue with some code/wsdl whatever is needed to recreate the problem. thanks, dims On 5/19/06, Timo Ahokas [EMAIL PROTECTED] wrote: Ok, I think I know what's happening... --[Example 1] Client sends: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement /OMElement --[Example 2] Client sends: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement --[Example 3] Client sends: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement OMElementattachment 3/OMElement /OMElement So it seems that the code that is constructing the OMElement for the service has a bug and it adding the attachments back incorrectly - it seems to be adding any extra ones (2,3,...) to the parent element, instead of the current one. Anyone familiar with the code - where would this be handled? Kind regards, Timo -Original Message- From: Timo Ahokas [mailto: [EMAIL PROTECTED] Sent: 19 May 2006 13:39 To: axis-user@ws.apache.org Subject: RE: [Axis2] Vanishing MTOM attachments Hi Thilina, I tried what you suggested by doing this on the server side: public OMElement service(OMElement element) { element.build(); element.buildNext (); element.detach(); OMNode firstOMChild = element.getFirstOMChild(); OMNode nextOMSibling = firstOMChild.getNextOMSibling(); if(nextOMSibling != null) { OMNode nextOMSibling2 = nextOMSibling.getNextOMSibling(); if(nextOMSibling2 != null) { OMNode nextOMSibling3 = nextOMSibling2.getNextOMSibling(); } } ... firstOMChild is the XML payload nextOMSibling is the first binary attachment nextOMSibling2 should be the second binary attachment (but is null) nextOMSibling3 should be the third binary attachment (-||-) I'm guessing that something is going wrong when the over-the-wire data is being demarshalled and before the OMElement is even handed down to my service (which would explain why I see the data coming in into Axis, but not when it reaches my service). But I could obviously misinterpret what the debugger is displaying. And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... I think my point was that if all binary mime processing is deferred, then why does one out of the three attachments come through fine? Unless the first one is pre-loaded and any latter ones are deferred... Has anyone successfully received multiple binary attachments with Axis 1.0? :) And Thilina - good luck with the exams... :) Cheers Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 12:50 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments Hi, See my comments below Thanks a lot for the response. :) WC.. public OMElement mediaTransformation(OMElement element) { try { element.build (); element.detach(); Iterator
Re: [Axis2] Vanishing MTOM attachments
Aaaha. Nice finding... Any comments from SOAP1.2 specialists... Anyway this content type needs to be fixed... Please log a Jira... ~Thilina Content-Type: multipart/related;boundary=MIMEBoundaryurn_uuid_26C55753A5E981E64A11479668765601;type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED];start-info=application/soap+xml; charset=UTF-8;action="" This then presumably blows up on the server inside thejavax.mail.internet.ParameterListconstructor, since the action="" can't be parsed properly - resulting inthe not sohelpful SOAPEnvelope must contain a body element which is either first or second childelement of the SOAPEnvelope a few levels up (masking the OMException with aInvalidContent Type Field in the Mime Message message),1) Is the action parameter supposed to have a value? 2) As other people presumably have this working, am I missing aconfiguration on the client side?My client look pretty much like this at the moment:EndpointReference target = new EndpointReference(url); ServiceClient serviceClient = new ServiceClient();Options options = new Options();options.setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI );options.setTransportInProtocol(Constants.TRANSPORT_HTTP);options.setTo(target);serviceClient.setOptions(options);OMElement payload = getOMElement(messageContent);OMElement result = serviceClient.sendReceive (payload);I haven't still had the chance to follow up where the other attachmentsvanish to... anyhelp would be appreciated. :)Kind regards,Timo-Original Message-From: Timo Ahokas [mailto: [EMAIL PROTECTED]]Sent: 18 May 2006 14:07To: Axis UserSubject: [Axis2] Vanishing MTOM attachmentsHi all,We are using Axis2 1.0 (client server) and sending XML and binary MTOM attachments to the server. The XML document and thefirst binary attachment are received without problems, but anyadditional attachments never reach the server (are not availablefrom the OMElement when the server-side code starts executing). I'm sending roughly the following from the client:OMElementOMElement OMElement XML document (constructed via StAXOMBuilder.getDocumentElement()) /OMElement /OMElementOMElement OMText Binary attachment 1 (via factory.createOMText(datahandler, true)) /OMText/OMElementOMElement OMText Binary attachment 2 /OMText/OMElementOMElement OMText Binary attachment n /OMText/OMElement/OMElementThis is sent out without problems from the client (as confirmed by running through the Axis1 SoapMon proxy). The message on the wirelooks like fine, the first part of the multipart contains themessage (SOAP message with a XML payload and include referencesfor all the 1-n binary attachments) and each of the binary attachments are included in separate parts of the message.But when the message reaches the server, only the first binarypart seems to be in the OMElement that the server has constructed.If I return that to the client, again looking at the wire representation, only the first binary attachment is in place.Also (possibly related to how the message is constructed), if I tryto set SOAP version to 1.2 on the client(options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI )),I get the following error on the server side:2006-05-18 13:30:11,108 [ERROR][http-80-Processor24][org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/voxsurf].[AxisServlet]]:Servlet.service () for servlet AxisServlet threw exception org.apache.axiom.om.OMException: SOAPEnvelope must contain a body element which iseither first or second child element of the SOAPEnvelope.atorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getBody (SOAPEnvelopeImpl.java:142)atorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.addChild(SOAPEnvelopeImpl.java:103)atorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:82) atorg.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183)atorg.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:153)at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)...But looking at the messages sent over the wire, only the soapenvis different, and both messages start otherwise similarly: ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope soapenv:Header/ soapenv:Body ... body contentIs there something fundamentally wrong in our approach for sending themultiple binary attachments in the single message? Has someone been able to do something similar using Axis2 1.0? Are there any debug flags etcI could enable to see what happens when the message from the wire isbeing processed?Kind regards,Timo Ahokas -To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]-- May the SourcE be with u
RE: [Axis2] Vanishing MTOM attachments
Hi Thilina, Thanks a lot for the response. Just to confirm what in doing on the server side: public OMElement mediaTransformation(OMElement element) { try { element.build(); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc); } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); } So when I get an element in, and inspect in the Eclipse debugger, I see the XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary attachment. But the iterator only contains one element, so none of the other attachments are processed. And I'm not currently returning the same content back anyway, I'm constructing a new response element from scratch. I have tried with/without the element.build()/buildNext()/detach(), with no changes in behaviour. I wasn't able to find an omElement.buildAll() though? And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), as the on the wire message looks something like this: POST /service HTTP/1.1 User-Agent: Axis/2.0 Host: 127.0.0.1 Transfer-Encoding: chunked Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=application/soap+xml; charset=UTF-8 --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: application/xop+xml; charset=UTF-8; type=application/soap+xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED] !-- soap message with embedded XML content and include references to all attachments -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpeg content-transfer-encoding: binary content-id: 1.urn:uuid:[EMAIL PROTECTED] !-- binary content -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpeg content-transfer-encoding: binary content-id: 2.urn:uuid:[EMAIL PROTECTED] !-- binary content -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpeg content-transfer-encoding: binary content-id: 3.urn:uuid:[EMAIL PROTECTED] !-- binary content -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011-- To get this to run, I'm starting the client from a debugger and changing the soapActionString (\\) to an empty string (because othervise the parsing fails on the server side). Any ideas? Thanks - really appreciate your help... :) Kind regards, Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 09:20 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments You need to build the elements if you are going to echo them back to the client.. IIRC you can call omElement.buildAll() to overcome your problem... Axis2 do deffered building of mime parts.. That means mime parts will be read only if the user requests them... In your case you are writing back the response while the attachments are still in the stream which might be the cause for vanishing of other mime parts... ~Thilina On 5/18/06, Timo Ahokas [EMAIL PROTECTED] wrote: Hi all, We are using Axis2 1.0 (client server) and sending XML and binary MTOM attachments to the server. The XML document and the first binary attachment are received without problems, but any additional attachments never reach the server (are not available from the OMElement when the server-side code starts executing). I'm sending roughly the following from the client: OMElement OMElement OMElement XML document (constructed via StAXOMBuilder.getDocumentElement()) /OMElement /OMElement OMElement OMText Binary attachment 1 (via factory.createOMText(datahandler, true)) /OMText /OMElement OMElement OMText Binary attachment 2 /OMText /OMElement OMElement OMText Binary attachment n /OMText /OMElement /OMElement This is sent out without problems from the client (as confirmed by running through the Axis1 SoapMon proxy). The message on the wire looks like fine, the first part of the multipart contains the message (SOAP message with a XML payload and include references for all
Re: [Axis2] Vanishing MTOM attachments
Hi, See my comments below Thanks a lot for the response. :) WC.. public OMElement mediaTransformation(OMElement element) { try { element.build (); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc); } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); }So when I get an element in, and inspect in the Eclipse debugger, I see the XML contentand the first binary attachment, but none of the other attachments. When Ithen let thecode run through, it extracts (and successfully saves to disc) the firstbinaryattachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator..IIRC there was aJira regarding this Iterator.. Try traversing the tree manually... Going through each and every Element with getNextSibling, getChild. Just to make sure where the problem is... are processed. And I'm not currently returning the same content back anyway,I'mconstructing a new response element from scratch. I have tried with/without the element.build()/buildNext()/detach(), with nochangesin behaviour. I wasn't able to find an omElement.buildAll() though? Yeahh.. May be it's not there now. But I'm sure build() might be doing the same thing.. I'm in touch with the code base a lot due to my oncoming exams :)... And ifthe mime processing is deferred, why would the element contain the first attachment(and not just the soap/xml part), Can't get your point clearly... ~Thilina as the on the wire message looks something like this:POST /service HTTP/1.1User-Agent: Axis/2.0 Host: 127.0.0.1Transfer-Encoding: chunkedContent-Type: multipart/related;boundary=MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011;type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED];start-info=application/soap+xml; charset=UTF-8 --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011content-type: application/xop+xml; charset=UTF-8;type=application/soap+xml;content-transfer-encoding: binarycontent-id: 0.urn:uuid:[EMAIL PROTECTED]!-- soap message with embedded XML content and include references to allattachments MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpegcontent-transfer-encoding: binarycontent-id: 1.urn:uuid:[EMAIL PROTECTED] !-- binary content MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011content-type: image/jpegcontent-transfer-encoding: binarycontent-id: 2.urn:uuid:[EMAIL PROTECTED]!-- binary content MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011content-type: image/jpegcontent-transfer-encoding: binary content-id: 3.urn:uuid:[EMAIL PROTECTED]!-- binary content MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011-- To get this to run, I'm starting the client from a debugger and changing thesoapActionString (\\) to an empty string (because othervise the parsingfails on the server side). Any ideas? Thanks - really appreciate your help... :)Kind regards,Timo-Original Message-From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]]Sent: 19 May 2006 09:20 To: axis-user@ws.apache.orgSubject: Re: [Axis2] Vanishing MTOM attachmentsYou need to build the elements if you are going to echo them back to theclient.. IIRC you can call omElement.buildAll()to overcome your problem...Axis2 do deffered building of mime parts.. That means mime parts will beread only if the user requests them...In your case you are writing back the response while the attachments are still in the stream which might be the cause for vanishing of other mimeparts...~ThilinaOn 5/18/06, Timo Ahokas [EMAIL PROTECTED] wrote: Hi all,We are using Axis2 1.0 (client server) and sending XML andbinary MTOM attachments to the server. The XML document and thefirst binary attachment are received without problems, but anyadditional attachments never reach the server (are not available from the OMElement when the server-side code starts executing).I'm sending roughly the following from the client:OMElementOMElementOMElementXML document (constructed via StAXOMBuilder.getDocumentElement())/OMElement/OMElementOMElementOMTextBinary attachment 1 (via factory.createOMText(datahandler, true))/OMText /OMElementOMElementOMTextBinary attachment 2/OMText/OMElementOMElementOMTextBinary attachment n/OMText /OMElement/OMElementThis is sent out without problems from the client (as confirmed byrunning through the Axis1 SoapMon proxy). The message on the wirelooks like fine, the first part of the multipart contains the message (SOAP message with a XML payload and include referencesfor all the 1-n binary
Re: [Axis2] Vanishing MTOM attachments
I'm *not* in touch with the code base :)
RE: [Axis2] Vanishing MTOM attachments
Hi Thilina, I tried what you suggested by doing this on the server side: public OMElement service(OMElement element) { element.build(); element.buildNext(); element.detach(); OMNode firstOMChild = element.getFirstOMChild(); OMNode nextOMSibling = firstOMChild.getNextOMSibling(); if(nextOMSibling != null) { OMNode nextOMSibling2 = nextOMSibling.getNextOMSibling(); if(nextOMSibling2 != null) { OMNode nextOMSibling3 = nextOMSibling2.getNextOMSibling(); } } ... firstOMChild is the XML payload nextOMSibling is the first binary attachment nextOMSibling2 should be the second binary attachment (but is null) nextOMSibling3 should be the third binary attachment (-||-) I'm guessing that something is going wrong when the over-the-wire data is being demarshalled and before the OMElement is even handed down to my service (which would explain why I see the data coming in into Axis, but not when it reaches my service). But I could obviously misinterpret what the debugger is displaying. And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... I think my point was that if all binary mime processing is deferred, then why does one out of the three attachments come through fine? Unless the first one is pre-loaded and any latter ones are deferred... Has anyone successfully received multiple binary attachments with Axis 1.0? :) And Thilina - good luck with the exams... :) Cheers Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 12:50 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments Hi, See my comments below Thanks a lot for the response. :) WC.. public OMElement mediaTransformation(OMElement element) { try { element.build (); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc); } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); } So when I get an element in, and inspect in the Eclipse debugger, I see the XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary attachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator.. IIRC there was a Jira regarding this Iterator.. Try traversing the tree manually... Going through each and every Element with getNextSibling, getChild. Just to make sure where the problem is... are processed. And I'm not currently returning the same content back anyway, I'm constructing a new response element from scratch. I have tried with/without the element.build()/buildNext()/detach(), with no changes in behaviour. I wasn't able to find an omElement.buildAll() though? Yeahh.. May be it's not there now. But I'm sure build() might be doing the same thing.. I'm in touch with the code base a lot due to my oncoming exams :)... And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... ~Thilina as the on the wire message looks something like this: POST /service HTTP/1.1 User-Agent: Axis/2.0 Host: 127.0.0.1 Transfer-Encoding: chunked Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=application/soap+xml; charset=UTF-8 --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: application/xop+xml; charset=UTF-8; type=application/soap+xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED] !-- soap message with embedded XML content and include references to all attachments -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpeg content-transfer-encoding: binary content-id: 1.urn:uuid:[EMAIL PROTECTED] !-- binary content -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpeg content-transfer-encoding: binary content-id: 2.urn:uuid:[EMAIL PROTECTED] !-- binary content -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content
RE: [Axis2] Vanishing MTOM attachments
Ok, I think I know what's happening... --[Example 1] Client sends: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement /OMElement --[Example 2] Client sends: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement --[Example 3] Client sends: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement OMElementattachment 3/OMElement /OMElement So it seems that the code that is constructing the OMElement for the service has a bug and it adding the attachments back incorrectly - it seems to be adding any extra ones (2,3,...) to the parent element, instead of the current one. Anyone familiar with the code - where would this be handled? Kind regards, Timo -Original Message- From: Timo Ahokas [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 13:39 To: axis-user@ws.apache.org Subject: RE: [Axis2] Vanishing MTOM attachments Hi Thilina, I tried what you suggested by doing this on the server side: public OMElement service(OMElement element) { element.build(); element.buildNext(); element.detach(); OMNode firstOMChild = element.getFirstOMChild(); OMNode nextOMSibling = firstOMChild.getNextOMSibling(); if(nextOMSibling != null) { OMNode nextOMSibling2 = nextOMSibling.getNextOMSibling(); if(nextOMSibling2 != null) { OMNode nextOMSibling3 = nextOMSibling2.getNextOMSibling(); } } ... firstOMChild is the XML payload nextOMSibling is the first binary attachment nextOMSibling2 should be the second binary attachment (but is null) nextOMSibling3 should be the third binary attachment (-||-) I'm guessing that something is going wrong when the over-the-wire data is being demarshalled and before the OMElement is even handed down to my service (which would explain why I see the data coming in into Axis, but not when it reaches my service). But I could obviously misinterpret what the debugger is displaying. And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... I think my point was that if all binary mime processing is deferred, then why does one out of the three attachments come through fine? Unless the first one is pre-loaded and any latter ones are deferred... Has anyone successfully received multiple binary attachments with Axis 1.0? :) And Thilina - good luck with the exams... :) Cheers Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 12:50 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments Hi, See my comments below Thanks a lot for the response. :) WC.. public OMElement mediaTransformation(OMElement element) { try { element.build (); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc); } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); } So when I get an element in, and inspect in the Eclipse debugger, I see the XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary attachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator.. IIRC there was a Jira regarding this Iterator.. Try traversing the tree manually... Going through each and every Element with getNextSibling, getChild. Just
Re: [Axis2] Vanishing MTOM attachments
Timo, Please create a JIRA issue with some code/wsdl whatever is needed to recreate the problem. thanks, dims On 5/19/06, Timo Ahokas [EMAIL PROTECTED] wrote: Ok, I think I know what's happening... --[Example 1] Client sends: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement /OMElement --[Example 2] Client sends: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement --[Example 3] Client sends: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement OMElementattachment 3/OMElement /OMElement So it seems that the code that is constructing the OMElement for the service has a bug and it adding the attachments back incorrectly - it seems to be adding any extra ones (2,3,...) to the parent element, instead of the current one. Anyone familiar with the code - where would this be handled? Kind regards, Timo -Original Message- From: Timo Ahokas [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 13:39 To: axis-user@ws.apache.org Subject: RE: [Axis2] Vanishing MTOM attachments Hi Thilina, I tried what you suggested by doing this on the server side: public OMElement service(OMElement element) { element.build(); element.buildNext(); element.detach(); OMNode firstOMChild = element.getFirstOMChild(); OMNode nextOMSibling = firstOMChild.getNextOMSibling(); if(nextOMSibling != null) { OMNode nextOMSibling2 = nextOMSibling.getNextOMSibling(); if(nextOMSibling2 != null) { OMNode nextOMSibling3 = nextOMSibling2.getNextOMSibling(); } } ... firstOMChild is the XML payload nextOMSibling is the first binary attachment nextOMSibling2 should be the second binary attachment (but is null) nextOMSibling3 should be the third binary attachment (-||-) I'm guessing that something is going wrong when the over-the-wire data is being demarshalled and before the OMElement is even handed down to my service (which would explain why I see the data coming in into Axis, but not when it reaches my service). But I could obviously misinterpret what the debugger is displaying. And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... I think my point was that if all binary mime processing is deferred, then why does one out of the three attachments come through fine? Unless the first one is pre-loaded and any latter ones are deferred... Has anyone successfully received multiple binary attachments with Axis 1.0? :) And Thilina - good luck with the exams... :) Cheers Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 12:50 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments Hi, See my comments below Thanks a lot for the response. :) WC.. public OMElement mediaTransformation(OMElement element) { try { element.build (); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc); } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); } So when I get an element in, and inspect in the Eclipse debugger, I see the XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary attachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator
Re: [Axis2] Vanishing MTOM attachments
Can you post your client code for the creation of the OMElements... And the XML payload of the root MIME part... Your earlier posted code and the message snaphots does not contain any valuable thing... I think you are talking about the XOP:Include element as the extra added element... ~Thilina On 5/19/06, Davanum Srinivas [EMAIL PROTECTED] wrote: Timo,Please create a JIRA issue with some code/wsdl whatever is needed torecreate the problem. thanks,dimsOn 5/19/06, Timo Ahokas [EMAIL PROTECTED] wrote: Ok, I think I know what's happening... --[Example 1] Client sends: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement /OMElement --[Example 2] Client sends: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement --[Example 3] Client sends: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement OMElementattachment 3/OMElement /OMElement So it seems that the code that is constructing the OMElement for the service has a bug and it adding the attachments back incorrectly - it seems to be adding any extra ones (2,3,...) to the parent element, instead of the current one. Anyone familiar with the code - where would this be handled? Kind regards, Timo -Original Message- From: Timo Ahokas [mailto: [EMAIL PROTECTED]] Sent: 19 May 2006 13:39 To: axis-user@ws.apache.org Subject: RE: [Axis2] Vanishing MTOM attachments Hi Thilina, I tried what you suggested by doing this on the server side: public OMElement service(OMElement element) { element.build(); element.buildNext (); element.detach(); OMNode firstOMChild = element.getFirstOMChild(); OMNode nextOMSibling = firstOMChild.getNextOMSibling(); if(nextOMSibling != null) { OMNode nextOMSibling2 = nextOMSibling.getNextOMSibling(); if(nextOMSibling2 != null) { OMNode nextOMSibling3 = nextOMSibling2.getNextOMSibling(); } } ... firstOMChild is the XML payload nextOMSibling is the first binary attachment nextOMSibling2 should be the second binary attachment (but is null) nextOMSibling3 should be the third binary attachment (-||-) I'm guessing that something is going wrong when the over-the-wire data is being demarshalled and before the OMElement is even handed down to my service (which would explain why I see the data coming in into Axis, but not when it reaches my service). But I could obviously misinterpret what the debugger is displaying. And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... I think my point was that if all binary mime processing is deferred, then why does one out of the three attachments come through fine? Unless the first one is pre-loaded and any latter ones are deferred... Has anyone successfully received multiple binary attachments with Axis 1.0? :) And Thilina - good luck with the exams... :) Cheers Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]] Sent: 19 May 2006 12:50 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments Hi, See my comments below Thanks a lot for the response. :) WC..public OMElement mediaTransformation(OMElement element) { try {element.build ();element.detach();Iterator serviceIterator = element.getChildElements();OMElement servicePayload = (OMElement) serviceIterator.next();OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next();// Handle attachments, if there are any.DataHandler attachmentDH; while(serviceIterator.hasNext()) {OMElement attachmentElement = (OMElement) serviceIterator.next();OMText attachment = (OMText) attachmentElement.getFirstOMChild();/* extract data and persist */}processXML(xmlDoc);} catch (Exception e) { e.printStackTrace();}return createResponseMessage();} So when I get an element in, and inspect in the Eclipse debugger, I see the XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary attachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator.. IIRC there was a Jira regarding this Iterator.. Try traversing the tree manually... Going through each
RE: [Axis2] Vanishing MTOM attachments
A bit more info: If the SOAP version is set to 1.2, the action parameter is empty and is encoded in the following way: Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_26C55753A5E981E64A11479668765601; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=application/soap+xml; charset=UTF-8;action=; This then presumably blows up on the server inside the javax.mail.internet.ParameterList constructor, since the action= can't be parsed properly - resulting in the not so helpful SOAPEnvelope must contain a body element which is either first or second child element of the SOAPEnvelope a few levels up (masking the OMException with a Invalid Content Type Field in the Mime Message message), 1) Is the action parameter supposed to have a value? 2) As other people presumably have this working, am I missing a configuration on the client side? My client look pretty much like this at the moment: EndpointReference target = new EndpointReference(url); ServiceClient serviceClient = new ServiceClient(); Options options = new Options(); options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setTo(target); serviceClient.setOptions(options); OMElement payload = getOMElement(messageContent); OMElement result = serviceClient.sendReceive(payload); I haven't still had the chance to follow up where the other attachments vanish to... any help would be appreciated. :) Kind regards, Timo -Original Message- From: Timo Ahokas [mailto:[EMAIL PROTECTED] Sent: 18 May 2006 14:07 To: Axis User Subject: [Axis2] Vanishing MTOM attachments Hi all, We are using Axis2 1.0 (client server) and sending XML and binary MTOM attachments to the server. The XML document and the first binary attachment are received without problems, but any additional attachments never reach the server (are not available from the OMElement when the server-side code starts executing). I'm sending roughly the following from the client: OMElement OMElement OMElement XML document (constructed via StAXOMBuilder.getDocumentElement()) /OMElement /OMElement OMElement OMText Binary attachment 1 (via factory.createOMText(datahandler, true)) /OMText /OMElement OMElement OMText Binary attachment 2 /OMText /OMElement OMElement OMText Binary attachment n /OMText /OMElement /OMElement This is sent out without problems from the client (as confirmed by running through the Axis1 SoapMon proxy). The message on the wire looks like fine, the first part of the multipart contains the message (SOAP message with a XML payload and include references for all the 1-n binary attachments) and each of the binary attachments are included in separate parts of the message. But when the message reaches the server, only the first binary part seems to be in the OMElement that the server has constructed. If I return that to the client, again looking at the wire representation, only the first binary attachment is in place. Also (possibly related to how the message is constructed), if I try to set SOAP version to 1.2 on the client (options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)), I get the following error on the server side: 2006-05-18 13:30:11,108 [ERROR][http-80-Processor24][org.apache.catalina .core.ContainerBase.[Catalina].[localhost].[/voxsurf].[AxisServlet]]: Servlet.service() for servlet AxisServlet threw exception org.apache. axiom.om.OMException: SOAPEnvelope must contain a body element which is either first or second child element of the SOAPEnvelope. at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getBody(SOAPEnvelopeImpl.ja va:142) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.addChild(SOAPEnvelopeImpl.j ava:103) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl. java:82) at org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java :183) at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168 ) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) ... But looking at the messages sent over the wire, only the soapenv is different, and both messages start otherwise similarly: ?xml version=1.0 encoding=UTF-8? soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope; soapenv:Header/ soapenv:Body ... body content Is there something fundamentally wrong in our approach for sending the multiple binary attachments in the single message? Has someone been able to do something similar using Axis2 1.0? Are there any debug flags etc I could enable to see what happens when the message from the wire is being processed? Kind regards, Timo Ahokas
Re: [axis2]axis2 + mtom
Have you tried with Axis2 1.0.. I fixed a content type issue lately, but wasn't able to check whether it'll solve the Java Mail issue... Gerenimo java Mail Sun's Java mail are different implementations of Java Mail spec. We can't use Sun's Java mail through Maven repositories due to licensing issues... ~ThilinaOn 5/10/06, Stefan Vladov [EMAIL PROTECTED] wrote: Hi,sorry to bother you again with the same old stuff... my problem was thejavamail implementation... an exception of type ParseException is thrownsomewhere injavax.mail.internet.ContentType#ContentType (String type), which is called bypublic Attachments(InputStream inStream, String contentTypeString, boolean fileCacheEnable, String attachmentRepoDir, String fileThreshold)in org.apache.axiom.attachments.Attachments,called from TransportUtils and so on...I wasn't able to debug javamail further to see the exact cause.Anyway my question is: is MTOM in axis2 meant to work only with geronimo mail implementation and if you are familiar with the issue, have youcome up with some workaround.As I am totally unfamiliar with the differences between geronimo's andsun's implementations I thought the problem might be in the registered handlers in the mailcap-s of the jars, however now I saw that the code isdifferent althogh packages, classes and methods are the same :( .geronimo source is looks like that:public ContentType(String type) throws ParseException{int slash = type.indexOf(/);int semi = type.indexOf(;);try{ _major = type.substring(0, slash);if(semi == -1){_minor = type.substring(slash + 1);} else{_minor = type.substring(slash + 1, semi);_list = new ParameterList(type.substring(semi + 1));}}catch(StringIndexOutOfBoundsException e){throw new ParseException(Type invalid: + type);}},whereas sun's javamail 1.4 as well as 1.3.1 are:public ContentType(String s)throws ParseException {HeaderTokenizer headertokenizer = new HeaderTokenizer(s,()@,;:t []/?=);HeaderTokenizer.Token token = headertokenizer.next();if(token.getType() != -1) throw new ParseException();primaryType = token.getValue();token = headertokenizer.next();if((char)token.getType() != '/')throw new ParseException();token = headertokenizer.next();if(token.getType() != -1)throw new ParseException();subType = token.getValue();String s1 = headertokenizer.getRemainder();if(s1 != null) list = new ParameterList(s1);}Anyway I am serving the web services on Jetty embedded in an application(which actually provides the services ) and I somehow don't want to switchto geronimo's implementation, so please if somebody has been through this HEEELP! I have fixed the SOAP version issue+a potential content type issue recently. Are you using Sun's impl of Java Mail? Please try with the latest svn heads.. Even the latest Axis2 RC + Axiom RC would be fine.. ~Thilina On 5/2/06, Stefan Vladov [EMAIL PROTECTED] wrote: Hi guys, This is probably a very stupid problem, however since I consider myself a newbie and I've been using web services for about 2-3 weeks the issue has turned out to be quite a bottleneck for me. So here is my problem: I was trying to make the following scenario with apache axis2 0.95 - a client requests a file from by providing a name and a web service sends it (the file) as a binary attachment. However since things did not work I tried rewriting the sample and I still have the same problem. My version that is quite similar to the original looks like that: public class MTOMClient { private static EndpointReference targetEPR = new EndpointReference(http://localhost:8011/services/WSMTOMTest);private static imageFileName = some image name; public static void main (String[] args){try{OMFactory fac = OMAbstractFactory.getOMFactory();OMNamespace omNs = fac.createOMNamespace(http://blabla, bla);OMElement method = fac.createOMElement(handle, omNs);Image image;image = new ImageIO().loadImage(new FileInputStream(imagefilename));ImageDataSource dataSource = new ImageDataSource(calendar.jpg,image);DataHandler dataHandler = new DataHandler(dataSource);OMText textData = fac.createText(dataHandler, true);OMElement imageElement = fac.createOMElement(imageElement, omNs);imageElement.addChild(textData);method.addChild(imageElement);Options options = new Options(); options.setTo(targetEPR);options.setSoapVersionURI( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);options.setTransportInProtocol(Constants.TRANSPORT_HTTP );options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);//Blocking invocationServiceClient serviceClient = new ServiceClient();serviceClient.setOptions(options);OMElement result = serviceClient.sendReceive(method);StringWriter writer = new StringWriter();result.serialize(XMLOutputFactory.newInstance ().createXMLStreamWriter(writer)); writer.flush();System.out.println(writer.toString());}catch (Exception e){ e.printStackTrace();}} } and I got the following exception: Transport level information does not match with SOAP Message namespace URIat
Re: [axis2]axis2 + mtom
Hi, yes I wrote the previous mail before being well familiar with the problem I'm using axis2 1.0 as you suggested... also I saw there was a similar thread in the developer mailing list - http://marc.theaimsgroup.com/?l=axis-devm=114127380803712w=2 and i also tried using the same javamail implementation in the client and the server side... again no use. Every time the same exception thrown in the ContentType constructor... actually in the content type costructor the content type is correctly parsed as multipart/related but then from the rest of the string while populating the ParameterList a ParseException is thrown. I wasn't able to see on which exactly parameter... somehow the values of the variables are not shown in eclipse while debugging... actually I checked out the glassfish project and there is no debuglevel set in the compile task of the ant script... anyway maybe I'm doing sth wrong... I tried several versions of sun's javamail implementation but this part is all the same... for now I have no idea what to do except for using geronimo implementation... I haven't tried sun's WS implementation but I plan to look through java wsdp 2.0 and see how are attachments dealt with there... after all my http header looks fine: POST /services/WSMTOMTest HTTP/1.1 User-Agent: Axis/2.0 Host: 127.0.0.1:8011 Content-Length: 1660 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_F23678BB911F58EC2511473375344002; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=application/soap+xml; charset=UTF-8;action=; and I'm curious what would a similar header generated with their ws framework look like. Thanks for the reply again! Best wishes! Stefan Have you tried with Axis2 1.0.. I fixed a content type issue lately, but wasn't able to check whether it'll solve the Java Mail issue... Gerenimo java Mail Sun's Java mail are different implementations of Java Mail spec. We can't use Sun's Java mail through Maven repositories due to licensing issues... ~Thilina On 5/10/06, Stefan Vladov [EMAIL PROTECTED] wrote: Hi, sorry to bother you again with the same old stuff... my problem was the javamail implementation... an exception of type ParseException is thrown somewhere in javax.mail.internet.ContentType#ContentType(String type) , which is called by public Attachments(InputStream inStream, String contentTypeString, boolean fileCacheEnable, String attachmentRepoDir, String fileThreshold) in org.apache.axiom.attachments.Attachments, called from TransportUtils and so on... I wasn't able to debug javamail further to see the exact cause. Anyway my question is: is MTOM in axis2 meant to work only with geronimo mail implementation and if you are familiar with the issue, have you come up with some workaround. As I am totally unfamiliar with the differences between geronimo's and sun's implementations I thought the problem might be in the registered handlers in the mailcap-s of the jars, however now I saw that the code is different althogh packages, classes and methods are the same :( . geronimo source is looks like that: public ContentType(String type) throws ParseException { int slash = type.indexOf(/); int semi = type.indexOf(;); try { _major = type.substring(0, slash); if(semi == -1) { _minor = type.substring(slash + 1); } else { _minor = type.substring(slash + 1, semi); _list = new ParameterList(type.substring(semi + 1)); } } catch(StringIndexOutOfBoundsException e) { throw new ParseException(Type invalid: + type); } } ,whereas sun's javamail 1.4 as well as 1.3.1 are: public ContentType(String s) throws ParseException { HeaderTokenizer headertokenizer = new HeaderTokenizer(s, ()@,;:t []/?=); HeaderTokenizer.Token token = headertokenizer.next(); if(token.getType() != -1) throw new ParseException(); primaryType = token.getValue(); token = headertokenizer.next(); if((char)token.getType() != '/') throw new ParseException(); token = headertokenizer.next(); if(token.getType() != -1) throw new ParseException(); subType = token.getValue(); String s1 = headertokenizer.getRemainder(); if(s1 != null) list = new ParameterList(s1); } Anyway I am serving the web services on Jetty embedded in an application (which actually provides the services ) and I somehow don't want to switch to geronimo's implementation, so please if
Re: [axis2]axis2 + mtom
Hi, sorry to bother you again with the same old stuff... my problem was the javamail implementation... an exception of type ParseException is thrown somewhere in javax.mail.internet.ContentType#ContentType(String type) , which is called by public Attachments(InputStream inStream, String contentTypeString, boolean fileCacheEnable, String attachmentRepoDir, String fileThreshold) in org.apache.axiom.attachments.Attachments, called from TransportUtils and so on... I wasn't able to debug javamail further to see the exact cause. Anyway my question is: is MTOM in axis2 meant to work only with geronimo mail implementation and if you are familiar with the issue, have you come up with some workaround. As I am totally unfamiliar with the differences between geronimo's and sun's implementations I thought the problem might be in the registered handlers in the mailcap-s of the jars, however now I saw that the code is different althogh packages, classes and methods are the same :( . geronimo source is looks like that: public ContentType(String type) throws ParseException { int slash = type.indexOf(/); int semi = type.indexOf(;); try { _major = type.substring(0, slash); if(semi == -1) { _minor = type.substring(slash + 1); } else { _minor = type.substring(slash + 1, semi); _list = new ParameterList(type.substring(semi + 1)); } } catch(StringIndexOutOfBoundsException e) { throw new ParseException(Type invalid: + type); } } ,whereas sun's javamail 1.4 as well as 1.3.1 are: public ContentType(String s) throws ParseException { HeaderTokenizer headertokenizer = new HeaderTokenizer(s, ()@,;:t []/?=); HeaderTokenizer.Token token = headertokenizer.next(); if(token.getType() != -1) throw new ParseException(); primaryType = token.getValue(); token = headertokenizer.next(); if((char)token.getType() != '/') throw new ParseException(); token = headertokenizer.next(); if(token.getType() != -1) throw new ParseException(); subType = token.getValue(); String s1 = headertokenizer.getRemainder(); if(s1 != null) list = new ParameterList(s1); } Anyway I am serving the web services on Jetty embedded in an application (which actually provides the services ) and I somehow don't want to switch to geronimo's implementation, so please if somebody has been through this HEEELP! I have fixed the SOAP version issue+ a potential content type issue recently. Are you using Sun's impl of Java Mail? Please try with the latest svn heads.. Even the latest Axis2 RC + Axiom RC would be fine.. ~Thilina On 5/2/06, Stefan Vladov [EMAIL PROTECTED] wrote: Hi guys, This is probably a very stupid problem, however since I consider myself a newbie and I've been using web services for about 2-3 weeks the issue has turned out to be quite a bottleneck for me. So here is my problem: I was trying to make the following scenario with apache axis2 0.95 - a client requests a file from by providing a name and a web service sends it (the file) as a binary attachment. However since things did not work I tried rewriting the sample and I still have the same problem. My version that is quite similar to the original looks like that: public class MTOMClient { private static EndpointReference targetEPR = new EndpointReference(http://localhost:8011/services/WSMTOMTest;); private static imageFileName = some image name; public static void main (String[] args) { try { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://blabla;, bla); OMElement method = fac.createOMElement(handle, omNs); Image image; image = new ImageIO().loadImage(new FileInputStream(imagefilename)); ImageDataSource dataSource = new ImageDataSource(calendar.jpg,image); DataHandler dataHandler = new DataHandler(dataSource); OMText textData = fac.createText(dataHandler, true); OMElement imageElement = fac.createOMElement(imageElement, omNs); imageElement.addChild(textData); method.addChild(imageElement); Options options = new Options(); options.setTo(targetEPR); options.setSoapVersionURI( SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
Re: [axis2]axis2 + mtom
I have fixed the SOAP version issue+ a potential content type issue recently. Are you using Sun's impl of Java Mail? Please try with the latest svn heads.. Even the latest Axis2 RC + Axiom RCwould be fine.. ~Thilina On 5/2/06, Stefan Vladov [EMAIL PROTECTED] wrote: Hi guys,This is probably a very stupid problem, however since I consider myself anewbie and I've been using web services for about 2-3 weeks the issue has turned out to be quite a bottleneck for me. So here is my problem: I wastrying to make the following scenario with apache axis2 0.95 - a clientrequests a file from by providing a name and a web service sends it (the file) as a binary attachment. However since things did not work I triedrewriting the sample and I still have the same problem. My version that isquite similar to the original looks like that:public class MTOMClient { private static EndpointReference targetEPR = newEndpointReference(http://localhost:8011/services/WSMTOMTest); private static imageFileName = some image name; public static void main (String[] args) { try { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace (http://blabla, bla); OMElement method = fac.createOMElement(handle, omNs); Image image; image = new ImageIO().loadImage(new FileInputStream(imagefilename)); ImageDataSource dataSource = newImageDataSource(calendar.jpg,image); DataHandler dataHandler = new DataHandler(dataSource); OMText textData = fac.createText(dataHandler, true); OMElement imageElement = fac.createOMElement(imageElement,omNs); imageElement.addChild(textData); method.addChild(imageElement); Options options = new Options(); options.setTo(targetEPR); options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setTransportInProtocol (Constants.TRANSPORT_HTTP); options.setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE); //Blocking invocation ServiceClient serviceClient = new ServiceClient(); serviceClient.setOptions(options); OMElement result = serviceClient.sendReceive(method); StringWriter writer = new StringWriter(); result.serialize(XMLOutputFactory.newInstance ().createXMLStreamWriter(writer)); writer.flush(); System.out.println(writer.toString()); } catch (Exception e) { e.printStackTrace(); } }}and I got the following exception: Transport level information does notmatch with SOAP Message namespace URI atorg.apache.ws.commons.soap.impl.builder.StAXSOAPModelBuilder.identifySOAPVersion (StAXSOAPModelBuilder.java:123)...which I believe was caused by the fact that the factory for thesoapenvelope was SOAP12Factory. The exception seems to be thrown on theclient side however tcpmon displays a nice request message and a response with AxisFault in it, which somehow confuses me :(! Since I didn't knowhow to specify factory class name I changed the option of theclient toSOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI and the exception changed :) toorg.apache.axis2.AxisFault: org.apache.axis2.AxisFault: Invalid ContentType Field in the Mime Message; nested exception is: org.apache.ws.commons.om.OMException: Invalid Content Type Field in the Mime Message atorg.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:295) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:160) which also is thrown I believe on the client side but still I see requestand response in tcpmon. Now, my request message looks like that:POST /services/WSMTOMTest HTTP/1.1User-Agent: Axis/2.0 Host: localhost:8011Transfer-Encoding: chunkedContent-Type: multipart/related;boundary=MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181;type=application/xop+xml;start= 0.urn:uuid:[EMAIL PROTECTED];start-info=application/soap+xml; charset=UTF-8;action="">645--MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181 content-type:application/xop+xml; charset=UTF-8; type=application/soap+xml;content-transfer-encoding:binarycontent-id:0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelopexmlns:soapenv=http://www.w3.org/2003/05/soap-envelopesoapenv:Header /soapenv:Bodybla:handlexmlns:bla=http://blablabla:imageElementxop:Includehref="" href="mailto:1.urn:uuid:[EMAIL PROTECTED]"> 1.urn:uuid:[EMAIL PROTECTED]xmlns:xop=http://www.w3.org/2004/08/xop/include//bla:imageElement/bla:handle/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181content-id:1.urn:uuid:[EMAIL PROTECTED]content-type:image/jpeg content-transfer-encoding:binary-binary data-MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181--0and the only difference that I noticed between this message and the one of the sample is the start-info property which was text/xml in theoriginal, as well as the type attributes of the mime parts... oh and theempty action. I'm using the standard axis2.xml configuration file, nothing extraordinary in the services.xml and the service is very simple too:public class WSMTOMTest{ public
Re: axis2 and mtom
Thanks Thilina, MTOM was obviously not switched by default in my deployment. I will explore Secure MTOM, it seems perfect for my needs. Regards, Brian. Thilina Gunarathne wrote: Hi Brian, See my comments below... On 3/12/06, *Brian Shields* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi all, I am having some trouble sending attachments with axis2 messages. Until now I have been sending a large xml string as a parameter of a web service call. I recently applied security to this and I am getting a lot of errors when the string parameter goes beyond a certain size. What I am exploring as a work around is sending the xml file as an attachment using MTOM. From some v quick research i think this is the best approach when security is involved. You can also consider using Secure MTOM directly if you r going for encryption... An encrypted payload(cipher value) is a binary content. Normally in the context of web services people encode the payloadcipher value using base64 and send it..Now with MTOM we can directly send the encrypted payload as an binary attachment. Axis2 provides secure MTOM support... My problem is on the parsing of this message. I am getting a ContentID is null message. Is this because I have not specified the MIME type in the Client? AFAIK this does not matter a lot when using data handlers... My client code looks like... OMElement value = fac.createOMElement(Text, omNs); DataHandler dh = new DataHandler(new ByteArrayDataSource( s.getBytes())); OMText text = fac.createText(dh, true); value.addChild(text); where s is a String. The server code to parse this looks like... OMElement binaryElement = element.getFirstElement(); OMText binaryNode = (OMText) binaryElement.getFirstOMChild(); binaryNode.setOptimize(true); DataHandler actualDH = (DataHandler)binaryNode.getDataHandler(); Do u have MTOM enabled in the client side. MTOM is switched ON by default , but it's worth checking... You can use HttpTracer (aka TCPMON) to see the wire level message. For me it seems ur message still transmits without MTOM optimisation. You can try doing a hack by adding this line in between the 3d and 4th lines in the above given server code... binaryNode.setOptimize(true); I don't recomend this usage in the long run.. But give it a try.. If it does not give the same error, then it means ur message was not optimized earlier... ~Thilina -- May the SourcE be with u http://webservices.apache.org/~thilina/ http://webservices.apache.org/%7Ethilina/ http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina -- Brian Shields BSc. MSc., PhD Candidate, Department of Information Technology, National University of Ireland, Galway, Ireland.
Re: axis2 and mtom
Hi Brian, See my comments below... On 3/12/06, Brian Shields [EMAIL PROTECTED] wrote: Hi all,I am having some trouble sending attachments with axis2 messages. Untilnow I have been sending a large xml string as a parameter of a web service call. I recently applied security to this and I am getting a lotof errors when the string parameter goes beyond a certain size. What Iam exploring as a work around is sending the xml file as an attachment using MTOM. From some v quick research i think this is the best approachwhen security is involved. You can also consider using Secure MTOM directly if you r going for encryption... An encrypted payload(cipher value)is a binary content. Normally in the context of web services people encode the payloadcipher value using base64 and send it..Now with MTOM we can directly send the encrypted payload as an binary attachment. Axis2 provides secure MTOM support... My problem is on the parsing of this message. I am getting a ContentIDis null message. Is this because I have not specified the MIME type in the Client? AFAIK this doesnot matter a lot when using data handlers... My client code looks like...OMElement value = fac.createOMElement(Text, omNs);DataHandler dh = new DataHandler(new ByteArrayDataSource( s.getBytes()));OMText text = fac.createText(dh, true);value.addChild(text);where s is a String.The server code to parse this looks like...OMElement binaryElement = element.getFirstElement();OMText binaryNode = (OMText) binaryElement.getFirstOMChild(); binaryNode.setOptimize(true); DataHandler actualDH = (DataHandler)binaryNode.getDataHandler(); Do u have MTOM enabled in the client side. MTOM is switched ON by default, but it's worth checking... You can use HttpTracer (aka TCPMON) to see the wire level message. For me it seems ur message still transmits without MTOM optimisation. You can try doing a hack by adding this line in between the 3d and 4th lines in the above given server code... binaryNode.setOptimize(true); I don't recomend this usage in the long run.. But give ita try.. If it does not give the same error, then it means ur message was not optimized earlier... ~Thilina-- May the SourcE be with uhttp://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
Re: [Axis2] Fwd: mtom vs. swa
SwA uses cid references with Href attributes in elements to refer to mime parts. MTOM/XOP does the same... For an SwA only endpoint xop:include.../ element is just an element with a href attribute which contains an cid reference to a mime part.. So a SwA endpoint will treat it as a normal SwA message yes.. I understand... There can be much several complication when doing this.. Like the type parameter you mentioned. But I don't think any SwA endpoint is programmed to reject a message with that type parameter Since this application/xop+xml was introduced long after the SwA implementations came to existance. Lets hope for the Best... Anyway MTOM/XOP is the future for sending binary Attachments with SOAP... understand how its accomplished unless there is some negotiation going on between client and server. For instance, how can a SwA server implementation (such as Axis 1.2) understand what to do with XOP elements embedded in the MIME attachments unless a client like Axis2 .9 is smart enough to realize that the server implementation doesn't support MTOM/XOP and changes the wire format to SwA internally so that the SwA server implementation can understand. People have to wait for some time till Axis2 gets it's ws-policy implementation up, to expect Axis2 to be this Smart ;-) ~Thilina Thanks for any additional insight. From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 26, 2005 9:20 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Fwd: mtom vs. swa What we meant by wire format is the packaging and arrangement of MIME parts in the message.. SwA uses Content-ID's Elements with href attributes to identify MIME parts (Of course SwA supports Content-Location which is not mentioned in MTOM/XOP)... MTOM does the same (With addition of XOP element )... I will not accept the statement about Axis 1.2 would fails unless somebody proves it using Axis2... Couple of guys tested Axis2 .9 with Axis1.2 and I heard them saying it worked.. ~Thilina On 7/27/05, Thilina Gunarathne [EMAIL PROTECTED] wrote: Forwarding with Axis2 Prefix. -- Forwarded message -- From: Tony Dean [EMAIL PROTECTED] Date: Jul 27, 2005 4:25 AM Subject: mtom vs. swa To: axis-user@ws.apache.org In the Axis2 documentation, I read a blurp about the definition of MTOM. I will include it here: MTOM (SOAP Message Transmission Optimization Mechanism) http://www.w3.org/TR/2004/PR-soap12-mtom-20041116/ is a elegent solution for the above problems created by merging the above two techniques. MTOM is actually a by reference method. Wire format of a MTOM optimised message is same as the Soap with Attachments message , which also makes it backward compatible with SwA endpoints. Most notable feature of MTOM is the use of XOP:Include element which is declared in XML Binary Optimized Packaging (XOP) http://www.w3.org/TR/2004/PR-xop10-20041116/ specification to refer to the binary attachments of the message.With the use of this exclusive element the attached binary content logically become inline(by value) with the SOAP document even though actually it is attached seperately. This merges the two realms by making it possible to work only with one data model. With this the it becomes trivial to idetify the data by looking at XML making reliance on DTDs obsolute. With this the technologies which works based XML component of the data can work with one data model. I do not understand how you can say Wire format of a MTOM optimised message is same as the Soap with Attachments message , which also makes it backward compatible with SwA endpoints. They are not the same as far as I can tell. An Indigo (WSE 3.0) client sending MTOM/XOP mime attachment content would cause an Axis 1.2 server to choke because it would not understand type=application/xop+xml. It would only be able to process SwA attachment content. Right? I'm I missing something here. Thanks in advance for clearing this statement up. -Confused. Tony Dean SAS Institute Inc. 919.531.6704 [EMAIL PROTECTED] SAS... The Power to Know http://www.sas.com -- May the SourcE be with u http://www.bloglines.com/blog/thilina -- May the SourcE be with u http://www.bloglines.com/blog/thilina -- May the SourcE be with u http://www.bloglines.com/blog/thilina