Re: axis2 multiple ports, dime support (SWA)
Does axis2 V1.5.1 support receiving and sending SWA in DIME-Format? I am not sure but certainly it supports SWA. Axis2 supports SWA over MIME... AFAIK Axis2 does not support DIME.. Axis1.x support DIME.. thanks, Thilina Why does wsdl2java-tool generates multiple java-classes for one and the same xml-complex-type (adb Databinding)? is this an anonymous complex type? for named complex types it generates only one. thanks, Amila. Thank you, Alex -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: MTOM send only a part of the file
Connection timeout? On Wed, Dec 16, 2009 at 4:21 AM, agripel pienar_ser...@yahoo.com wrote: I`ve created a web service that uploads a picture to the server.In eclipse it works just fine , but when I try to use the client of the WS in a web-page it only transfers about 12 k of the picture. It always gets stuck there (this also happens when i`m testing the service in soapUI). I`m using jdk 1.6.0_03 , axis2-1.5 and Tomcat 6.0.20. Any help would be greatly appreciated. Thank you. -- View this message in context: http://old.nabble.com/MTOM-send-only-a-part-of-the-file-tp26808355p26808355.html Sent from the Axis - User mailing list archive at Nabble.com. -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: enableMTOM=optional setting question - MTOM-aware clients vs. non-MTOM aware clients
Hi, When EnableMTOM is set to optional, Axis2 will reply back using MTOM if it received a MTOM message or otherwise if it did not receive a MTOM message. Receiving a MTOM message does not necessaraly mean that the message needs to have attachments. It can just be that the SOAP message is just wrapped by MTOM (MIME+required content type headers). Your MTOM enables clients can send the requests using MTOM and get back the attachment using MTOM, while other clients will get a base64encoded version of the data. thanks, Thilina PS: According to what I have heard, above behaviour is similar to .net behaviour. On Thu, Jan 8, 2009 at 12:57 PM, Matt Friedman matt.fried...@gmail.comwrote: Hi, We are doing some tests using enableMTOM=optional. I did search the lists quite a bit, but I'm still a bit confused about the following. We originally built the service for MTOM aware clients but our assumption (as often happens) turns out to be incorrect. Some of the clients will not be MTOM aware whatsoever. In fact some of the clients will be WebSphere web service clients (non Axis2 / non-MTOM). The methods in question return PDF files along with other information. So, the question is: if we set enableMTOM=optional and we have some clients that are MTOM aware and some that are MTOM oblivious, will we get the expected result? In my mind the expected result would be that the non-MTOM clients will get base64 responses, while the MTOM aware clients will get the optimized MIME responses. Is this correct? Also, if the above is true, then how does the service determine if the client is MTOM aware or not? Many thanks, -- -- Matt Friedman -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: thread safe axis2 client stub
AFAIK creating a stub is not expensive, but creating the AxisConfiguration ConfigurationContext is very expensive. You can create one AxisConfiguration ConfigurationContext and share it across any number of clients. No need to create them per thread basis.. thanks, Thilina On Mon, Dec 15, 2008 at 12:51 AM, Shehan Simen ssi...@itree.com.au wrote: Hi Samera, So do we have to create a ConfigurationContext for each thread? Is'nt it too much for each thread? Regards, Shehan *From:* Sameera Jayasoma [mailto:sameera.madus...@gmail.com] *Sent:* 2008-12-15 15:06 *To:* axis-user@ws.apache.org *Subject:* Re: thread safe axis2 client stub On Tue, Dec 9, 2008 at 9:50 PM, Paul French paul.fre...@kirona.com wrote: This seems strange to me that the client stub cannot be made thread safe. After reading the below I have changed my client service to create the client stub on each call to one of my service methods since the client stub is not thread safe. I have no idea how inefficient this is? I have noticed that every time I create the client stub (for each and every call) I get the message: `[INFO] Deploying module: metadataExchange - file:/C:/downloads/axis2/axis2-1.4.1/lib/mex-1.4.1.jar It suggests a lot of work is going on to simply service a single web service call. you get the above message, when creating a new ConfigurationContext instance. Creating a CC instance is a heavy operation, therefore you can instantiate a CC instance once and use it for all subsequent calls. Sameera The link below suggests some tricks you can do to make things more efficient. What are these tricks? Thanks Paul -- *From:* Amila Suriarachchi [mailto:amilasuriarach...@gmail.com] *Sent:* 09 December 2008 04:26 *To:* axis-user@ws.apache.org *Subject:* Re: thread safe axis2 client stub I was not aware of this. If the axis2 design not permits this it is better not to use it. thanks, Amila. On Mon, Dec 8, 2008 at 10:00 AM, Shehan Simen ssi...@itree.com.au wrote: Also this link: http://markmail.org/message/iif5rdpgqahk4u5t#query:axis2%20client%20stub%20thread%20safe+page:2+mid:eenup3ck5ib6fzqq+state:results *From:* Amila Suriarachchi [mailto:amilasuriarach...@gmail.com] *Sent:* 2008-12-08 15:26 *To:* axis-user@ws.apache.org *Subject:* Re: thread safe axis2 client stub I have tested with Axis2 1.4 and it worked fine. can you please send the mail thread you mentioned? thanks, Amila. On Mon, Dec 8, 2008 at 9:48 AM, Shehan Simen ssi...@itree.com.au wrote: Hi Amila, Thank you for your response. But I found in some discussion, it is saying that the client stub is not thread safe. Is this problem fixed now? In which version I can find it then? Regards, Shehan *From:* Amila Suriarachchi [mailto:amilasuriarach...@gmail.com] *Sent:* 2008-12-08 15:13 *To:* axis-user@ws.apache.org *Subject:* Re: thread safe axis2 client stub yes thanks, Amila. On Mon, Dec 8, 2008 at 9:31 AM, Shehan Simen ssi...@itree.com.au wrote: Hi, I am going to invoke a web service via a client stub generated by axis2. I want to have a single instance of the stub across my application. So when I initiate the stub (when I call the constructor), I don't like to call it again throughout my application. Is it thread safe? Regards, Shehan -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ -- Sameera http://sameera-jayasoma.blogspot.com/ http://www.flickr.com/photos/sameera-jayasoma -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: [Axis2]Finding current tomcat Port from Axis2
Hi Deepal, On Thu, Dec 18, 2008 at 2:45 PM, Deepal jayasinghe deep...@gmail.comwrote: No, that code again go and call listenerManager.getEPRforService(..), which I was using. I walked through the code, and listenerManager.getEPRforService(..) work fine with other transports, but with tomcat, it reads the port off the first request. When in doubt (before the request arrives) it give 8080, which is the case thilina was complaining . I think that is the intended behavior, because the same code should work for both client side and the server side. I doubt whether it's the correct behaviour. In my case I was mislead for some time that this gives the correct port using some magic underneath and it took me some debuging time to realise the method does not return *correct* information. IMHO if it can't return the correct one, then it should not return any assumptions.. At least we should document this behaviour in BIG CAPITAL letters all the API's. thanks, Thilina For my usecase, I can not wait for the first request as what I am developing is a management agent. for now, I wrote a code to parse tomcat server.xml. Well, what you are doing is ok, iff you are going to use your application in tomcat. A better approach would be either feed the port number using axis2.xml or web.xml Deepal -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: MTOM issue when MTOM_THRESHOLD property is set
Hi,Is that the MTOM_File_caching_threshold u r talking about or a new feature introduced recently?. If it's the former, it should not have any effect on the outgoing messages. How r u looking at the messages? TCPMON truncates the larger messages. thanks, Thilina On Fri, Dec 5, 2008 at 5:34 AM, Chinmoy Chakraborty [EMAIL PROTECTED]wrote: Hi All, I am facing a problem regarding MTOM. If I do not set MTOM_THRESHOLD property, everything works fine (MTOM stuffs) for small text file (2 kb) but little bigger file (around 35kb .doc) file gets truncated. If I do set MTOM_THRESHOLD property, entire file content appears in SOAP node. I guess 'cid' becomes NULL When I do set MTOM_THRESHOLD property. Please help. Chinmoy -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Axis2.1.4 MTOM w/ XmlBeans
Hi, I see that Axis2.1.1 had documentation that supported MTOM with XmlBeans ( http://ws.apache.org/axis2/1_1/mtom-guide.html#252). Axis 2.1.4 no longers has this documentation. Is MTOM supported with 2.1.4 and XmlBeans? I am curious since it seems that schema containing binary data works with XmlBeans as expected. The only difference is that the byte array is made available and not a data handler. It was broken and nobody was able/interested in fixing it. Also I cannot recall the exact error, may be you can find it in the JIRA. To be honest I'm not a big fan of using XMLBeans for MTOM mainly due to the following inefficiency in XMLBeans when it comes to binary data handling.. XMLBeans does not support binary, but Axiom supports. So when using XMLBeans the binary data gets converted to base64 encoded string inside XMLBeans and then back to binary when writing the message. ADB seems to have a file caching mechanism described here ( http://ws.apache.org/axis2/1_3/mtom-guide.html#41). Is this specific to ADB? Or can this mechanism somehow be applied to XmlBeans? I'd like to not have the entire document loaded into memory and would like to stream to to disk if over a certain size using XmlBeans as the data binding library. File caching is generic to Axis2.. It does not depend on the data binding as it happens in a much deeper layer. But I feel that even when file caching is there, XMLBeans might try to load the content of the attachment in to the memory. thanks, Thilina Thanks, Alejandro - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Threshold for File size in MTOM
Hi,Currently it's not possible to specify this from Axis2.. IIRC somebody in this list earlier mentioned that it is possible to configure your servlet container to limit the incoming message size..May be that'll help as a work around. thanks, Thilina On Tue, Oct 14, 2008 at 1:41 PM, Sriram Vaidyanathan [EMAIL PROTECTED] wrote: Hello Axis Users, I am new to MTOM processing using Axis2. In MTOM, is there a way to specify the maximum attachment size on the server so that anything exceeding that size is rejected. Can this achieved by configuration or should I need to use a custom handler to enforce this limit. Any insight on this would be appreciated. Thanks Sriram -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: MTOM Attachment - OMElement using AXIOM
Hi, 1.Can I send in attachment(s) to webservice without change in the method signature and can I still access the attachments using the MessgeContext.getCurrentMessageContext().getAttachmentMap() ?? If so how do I do that? You can send SwA type attachments without changing the methode signature or your WSDL. myServiceMethod(String param0,String param1, String param2, OMElement attachment) I want to use myServiceMethod(String param0,String param1,String param2) and still be able to send the attachments using MTOM - how is it possible? Unlike SwA, MTOM attachments needs to be reflected in the WSDL.. If you are using POJO deployment then your service method must capture it... You can change your method as follows.. myServiceMethod(String param0,String param1,String param2, Datahandler yourAttachment) 2.Also another thing - I send in only one attachment to the webr service and I have three String parameters in the web service that I send in from my client, The last of the String parameters is an xml message and it shows up like an attachment in the AttachmentMap obtained from messageContext. the content type is obviously text/xml. But the only attachment I am sending is image. The Attachment Map has these two attachments where as I am expecting only one. Right now I am making it work by skipping the first in the AttachmentMap everytime. But how do I make sure I see only image in the attachmentMap? The first attachment you see must be the SOAP envelope... You can't avoid it... SopaEnvelope gets transmit as an attachment when you use MTOM or SwA... BTW is there any particular reason for using OMElements in the client side.. It would be much easier if you used some another API like code generation or RPCclient... thanks, Thilina This is how my client is sending the request to webservice ServiceClient sc= new ServiceClient() Options options = new Options(); options.set. // I set ENABLE_MTOM in one of these. sc.setOptions(options); sc.sendRecieve(payload) Where payload is created using Axiom. method.addChild(param0); method.addChild(param1); method.addChild(param2); method.addChild(attachment); Where attachment is a OMElement created by adding OMText obtained from the datahandlers of the attachments. Why does param2 show up as attachment in AttachmentMap of MessageContext. Any help is appreciated. Thanks a ton for looking into this in advance, Asmita Hi Thilina, Thanks for such a detailed response. Yes I got the sample in http://thilinag.blogspot.com/2008/04/download-file-from-axis2-web-service.html http://thilinag.blogspot.com/2008/04/download-file-from-axis2-web-service.html working and was able to retrieve the content on the server side. I used MTOM to get the contents of attachment from client to server. There was only one file in this case and also I was using wsdl generated client. Rather now I would like to use my own client by using ServiceClient /OperationClient to get the contents of the multiple attachments to the server side. The thing is I am using a service that is prewritten and I am not using the wsdl to generate either the client or the service. My service goes something like this, and I am using MTOM String MyServiceMethod(String s1, String s2, String s3), where String s1,s2 and s3 - neither has got anything to do with the attachments. I have to use datahandlers on the client side to send the attachment to the service. Something like messageContext.addAttachment(datahandler[i]) where 'i' represents the ith attachment. Now on the service side when I do MessageContext msgContext = MessageContext.getCurrentMessageContext() msgContext.getAttachmentMap and retrieve contextIDs on the AttachmentMap, I don't see the content of attachment I passed in when I write the dataHandler into a file. Even the contextType doesn't match. Rather it has the s3 that I sent in the parameter of the MyServiceMethod. I will need to use tcpmon to see what exactly is happening to my messages. Thanks for your help, Asmita From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2008 12:57 AM To: axis-user@ws.apache.org Subject: Re: Attachment SwA or MTOM Hi, I was successfully able to write an independent web service with a client to test where the attachments' file name is passed as parameter in the web service method. Based on the lines of http://thilinag.blogspot.com/2008/04/download-file-from-axis2-web-service.html http://thilinag.blogspot.com/2008/04/download-file-from-axis2-web-service.html Hope what u meant is that you were able to retrieve the content of the file in the server side. Did u had a look at the MTOM sample that comes with Axis2? Axis2 MTOM sample uploads a file to a webservice using a WSDL generated client and a service. My requirement in real world is that my web service may
Re: Attachment SwA or MTOM
Hi, I was successfully able to write an independent web service with a client to test where the attachments' file name is passed as parameter in the web service method. Based on the lines of http://thilinag.blogspot.com/2008/04/download-file-from-axis2-web-service.html Hope what u meant is that you were able to retrieve the content of the file in the server side. Did u had a look at the MTOM sample that comes with Axis2? Axis2 MTOM sample uploads a file to a webservice using a WSDL generated client and a service. My requirement in real world is that my web service may or may not have the attachments [0 or many attachments]. And my web service method should be able to support all the scenarios There are obvious two ways of doing it: - Add the array of attachment filenames in the webservice method signature and send it using MTOM (based on the arcticle above ) - Or send the attachments internal to soap message using data handlers using SwA (Can we do the same thing and say enableMTOM=true?) based on this article Attachments go externally when SwA is used. No..you can't mix SwA and MTOM.. Looks like you are somehow confused with the filenames vs file content... I would suggest you to use MTOM, unless there is a requirement to support legacy web service clients (eg: axis 1.x).. First look at the MTOM sample and get it to working. Focus on getting the attachment content right.. When you can get the attachments to the service, getting file names is a piece of cake. Then you can modify the WSDL given with the sample to make it support an array of optional elements containing attachments.. Adding max/minoccurs to the following element and wraping it using another parent element will do the trick. xsd:element name=AttachmentRequest type=tns:AttachmentType minOccurs=0 maxOccurs=unbounded / Then you can code generate to your modified WSDL to write your new service and client. You can use MTOM sample client service as references. You may also look at http://ws.apache.org/axis2/1_4_1/mtom-guide.html to get an idea about Axis2 attachments.. Please use a http sniffer like tcpmon (ws.apache.org/commons/tcpmon) to trace your messages and to verify whether the attachments are there in the message. thanks, Thilina - http://wso2.org/library/1148 *When using method 1*, how do we handle the array of Strings to send to the client, I want to use handwritten client so I am using OMElement fileNamesArray = BeanUtil.getOMElement(new QName(omNs.getNamespaceURI(),attchFileNames), filenames, null, false, null); But this does not get me the datasource for the file in the webservice. *When using method 2* and I access the datahandler from messageContext obtained using getCurrentMessageContext, my data handlers are empty. So I am not able to achieve the solution to transfer the file from client to webservice by either of the ways. Help is really appreciated as I am completely stuck! Thanks in advance, Asmita -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Status of enableMTOM=optional and Axis Faults / JIRA AXIS2-3340
Hi Rainer, As I replied to Mark, may be you can start a thread in the dev list proposing to make Axis2 wrap the error messages with MIME when MTOM is enabled. Let's see the reaction of the community.. Personally I'm not a big fan of been bug compatible. But let's see the community reaction.. We have to think of interoperability with other web service stacks too... thanks, Thilina On Fri, Sep 5, 2008 at 6:03 AM, Menzner, Rainer [EMAIL PROTECTED] wrote: Hi, about 10 month ago I filed a JIRA (AXIS2-3340) which describes a malfunctioning of Axis2-13. in error message creation when enableMTOM=optional and the input message is MTOM-formatted. JIRA indicates that there was no activity on this. Is this fixed in Axis2-1.4? In my opinion this is a serious issue because it prevents proper interaction of WSE3 client with axis2 services. I know that the true cause is at Microsoft which makes invalid assumptions about the type of message expected, but Microsoft apparently is not going to fix this reported bug in WSE3. Has anybody updates on this? Thanks, -Rainer -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Webservice Client
Small correction.. use MTOM for sending your binary data http://ws.apache.org/axis2/1_0/mtom-guide.html You may look at the latest doc. http://ws.apache.org/axis2/1_4_1/mtom-guide.html thanks, Thilina Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. -- Subject: Webservice Client Date: Wed, 3 Sep 2008 17:31:40 +0100 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Can someone please provide me with the sample code. I wanted to write a standalone java application which has to submit an xml to a webservice (I think written in .net). Also I have to upload an image to the same webservice using a different method. I went thru google but am very much confused now. I am new in this area. -- Stay up to date on your PC, the Web, and your mobile phone with Windows Live. See Nowhttp://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/ -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Log Incoming/Outgoing SOAP Messages
I think I answered you earlier.. http://markmail.org/message/mhzz22ixhhhsotmd On Wed, Sep 3, 2008 at 1:48 AM, StrongSteve [EMAIL PROTECTED] wrote: The SOAP Part would be enough. Can you give my an example on how to achive this goal? Thanks! Stefan Thilina Gunarathne wrote: Also do u really need to log all the large attachments in your log file... I would recommend logging only the SOAP part.. thanks, Thilina On Tue, Sep 2, 2008 at 7:07 AM, keith chapman [EMAIL PROTECTED]wrote: Oh this is because env.serialize will still build the axiom object model for you. env.serializeAndConsume can do the trick (serializes the message without building the object model) but the issue is that it will also consume the stream. May be you can try this as a workaround. Have you enabled file caching on the server? you can do this by setting the following properties in the axis2.xml parameter name=enableMTOMoptional/parameter parameter name=cacheAttachmentstrue/parameter parameter name=attachmentDIRwork/mtom/parameter parameter name=sizeThreshold4000/parameter This will write the attachments which are large in size to the file system. Thanks, Keith. On Tue, Sep 2, 2008 at 4:08 PM, StrongSteve [EMAIL PROTECTED] wrote: I am not quite sure where the exception occurs, but your approach with env.serialize(out) does not work either... :( keith chapman wrote: Does it happen when you performSOAPEnvelope env = arg0.getEnvelope(); or env.toString(). Ithink it should be at the later cause env.toString() would cause the whole message to be read into memory. May be you can try env.serialize(out); instead of out.write(env.toString()); Thanks, Keith. On Tue, Sep 2, 2008 at 3:31 PM, StrongSteve [EMAIL PROTECTED] wrote: Hi Everybody! I have currently developed a simple Axis handler, that logs all incoming/outgoing messages to files on the local HDD. Here is my current code: @Override public InvocationResponse invoke(MessageContext arg0) throws AxisFault { logger.debug(entering invoke); SOAPEnvelope env = arg0.getEnvelope(); String fileName = this.MESSAGE_LOGGING_DIR + this.FILE_PRAEFIX + new Date().getTime() +.xml; try { File msgFile = new File(fileName); FileWriter out = new FileWriter(msgFile); out.write(env.toString()); out.close(); } catch (IOException ioex) { logger.error(ioex.getMessage()); } return InvocationResponse.CONTINUE; } Unfortunately this code fails as soon as I send attachments. In this case, the call SOAPEnvelope env = arg0.getEnvelope(); fails with an OutOfMemory Exception as not the whole SOAPEnvelope can be read into the memory. Does anyone have a solution or a hint on how to achive this goal with a Streaming approach? Thanks in Advance for both your time and your knowledge! Greetings Stefan -- View this message in context: http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org -- View this message in context: http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267813.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org -- Thilina Gunarathne - http://thilinag.blogspot.com -- View this message in context: http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19283273.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: workarounds for Issue 3340
You can give a shot by enablingMTOM completely using true instead of optional.. But I doubt it'll work.. May be you can start a thread in the dev list proposing to make Axis2 wrap the error messages with MIME when MTOM is enabled. Let's see the reaction of the community.. thanks, Thilina On Wed, Sep 3, 2008 at 10:59 AM, Mark Nüßler [EMAIL PROTECTED]wrote: hello list, i am using version 1.3 and want to know if others of you facing the same problem described in [1] ? On WSE/C# clientside there seems no way to process the error message. Any ideas how to configure axis2 to send MTOM when sending faults ? best regards derMark [1] http://issues.apache.org/jira/browse/AXIS2-3340 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Log Incoming/Outgoing SOAP Messages
Also do u really need to log all the large attachments in your log file... I would recommend logging only the SOAP part.. thanks, Thilina On Tue, Sep 2, 2008 at 7:07 AM, keith chapman [EMAIL PROTECTED]wrote: Oh this is because env.serialize will still build the axiom object model for you. env.serializeAndConsume can do the trick (serializes the message without building the object model) but the issue is that it will also consume the stream. May be you can try this as a workaround. Have you enabled file caching on the server? you can do this by setting the following properties in the axis2.xml parameter name=enableMTOMoptional/parameter parameter name=cacheAttachmentstrue/parameter parameter name=attachmentDIRwork/mtom/parameter parameter name=sizeThreshold4000/parameter This will write the attachments which are large in size to the file system. Thanks, Keith. On Tue, Sep 2, 2008 at 4:08 PM, StrongSteve [EMAIL PROTECTED] wrote: I am not quite sure where the exception occurs, but your approach with env.serialize(out) does not work either... :( keith chapman wrote: Does it happen when you performSOAPEnvelope env = arg0.getEnvelope(); or env.toString(). Ithink it should be at the later cause env.toString() would cause the whole message to be read into memory. May be you can try env.serialize(out); instead of out.write(env.toString()); Thanks, Keith. On Tue, Sep 2, 2008 at 3:31 PM, StrongSteve [EMAIL PROTECTED] wrote: Hi Everybody! I have currently developed a simple Axis handler, that logs all incoming/outgoing messages to files on the local HDD. Here is my current code: @Override public InvocationResponse invoke(MessageContext arg0) throws AxisFault { logger.debug(entering invoke); SOAPEnvelope env = arg0.getEnvelope(); String fileName = this.MESSAGE_LOGGING_DIR + this.FILE_PRAEFIX + new Date().getTime() +.xml; try { File msgFile = new File(fileName); FileWriter out = new FileWriter(msgFile); out.write(env.toString()); out.close(); } catch (IOException ioex) { logger.error(ioex.getMessage()); } return InvocationResponse.CONTINUE; } Unfortunately this code fails as soon as I send attachments. In this case, the call SOAPEnvelope env = arg0.getEnvelope(); fails with an OutOfMemory Exception as not the whole SOAPEnvelope can be read into the memory. Does anyone have a solution or a hint on how to achive this goal with a Streaming approach? Thanks in Advance for both your time and your knowledge! Greetings Stefan -- View this message in context: http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org -- View this message in context: http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267813.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: [Axis2]
Hi, You have to have either chunked or content-length... You cannot get rid of both... Does ZSI client with chunked encoding work with Axis2 server, when used without attachments.. Does it work with content-length header without attachments. Let's try getting the non chunked ZSI client sending an attachment to Axis2 server working first. If possible post the message stack traces captured using tcpmon ( http://ws.apache.org/commons/tcpmon).. The messages you posted does not contain some valuable information such as http headers.. thanks, Thilina On Fri, Aug 29, 2008 at 1:35 AM, SivaKrishna Kumar [EMAIL PROTECTED] wrote: Hi Gunarathne, If I remove 'Transfer-Encoding' and content length from headers, I am getting SOAP fault from the server. The error is java.net.SocketTimeoutException: Read timed out java.net.SocketTimeoutException: Read timed out I am trying to upload 1KB Zip file. Regards Siva On 8/29/08, SivaKrishna Kumar [EMAIL PROTECTED] wrote: Hi Gunarathne, Thanks for the reply. For disabling http chunking in ZSI, I am sending 'Transfer-Encoding' header as 'Chunked' while sening the Request. Do I need to stop doing that ? If you use any of IM, can you please add me as friend. I desperately looking for some help in this regard. My mail ids are [EMAIL PROTECTED], [EMAIL PROTECTED] Best Regards Siva On 8/29/08, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, Assuming that you are using ZSI for the client side, you need to disable http-chunking in ZSI... The error suggests that the chunked encoding sent by your client side is malformed.. The config option Martin suggested will only disable chunking for Axis2 clients. ~Thilina On Wed, Aug 27, 2008 at 10:21 PM, SivaKrishna Kumar [EMAIL PROTECTED]wrote: HI Martin, Mail to Axis user group bounced. I am sending this mail directly to you, as I am desperate to get resolution for this issue. Thanks Regards Siva On 8/28/08, SivaKrishna Kumar [EMAIL PROTECTED] wrote: Hi Martin, Thank you very much for the reply. Evenafter setting these, I am still seeing the same error. I am herewith attaching my axis2.xml. Can you please check the same. I am not able to understand, 1. Is it because of some configuration issue that I am seeing this error ? or 2. Am I doing something wrong while converting my normal SOAP message/headers to SOAP message/headers for MTOM 3. Or am I missing something that I need to send as a header along http request ? Regards, Siva On 8/28/08, Martin Gainty [EMAIL PROTECTED] wrote: in /WEB-INF/conf/axis2.xml Sender and Receiver check the 1.1 protocol and chunked encoding parms are set transportSender ... parameter name=PROTOCOL locked=falseHTTP/1.1/parameter parameter name=Transfer-Encoding locked=falsechunked/parameter transportReceiver ... parameter name=PROTOCOL locked=falseHTTP/1.1/parameter parameter name=Transfer-Encoding locked=falsechunked/parameter Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. -- Date: Wed, 27 Aug 2008 23:23:51 +0530 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: [Axis2] Hi, I am trying to add MTOM support to ZSI. When I send a request which is processed for MTOM, on the server side I am getting the below error. org.apache.http.MalformedChunkCodingException: Bad chunk header at org.apache.http.impl.io.ChunkedInputStream.getChunkSize(ChunkedInputStream.java:232) at org.apache.http.impl.io.ChunkedInputStream.nextChunk(ChunkedInputStream.java:183) at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:155) at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:175) at org.apache.http.impl.io.ChunkedInputStream.exhaustInputStream(ChunkedInputStream.java:289) at org.apache.http.impl.io.ChunkedInputStream.close(ChunkedInputStream.java:262) at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:192) at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:619) On the client side I am getting the below SOAP fault invalid literal for int() with base 16: '' Here are my headers and body sent
Re: [Axis2]
Hi, Assuming that you are using ZSI for the client side, you need to disable http-chunking in ZSI... The error suggests that the chunked encoding sent by your client side is malformed.. The config option Martin suggested will only disable chunking for Axis2 clients. ~Thilina On Wed, Aug 27, 2008 at 10:21 PM, SivaKrishna Kumar [EMAIL PROTECTED]wrote: HI Martin, Mail to Axis user group bounced. I am sending this mail directly to you, as I am desperate to get resolution for this issue. Thanks Regards Siva On 8/28/08, SivaKrishna Kumar [EMAIL PROTECTED] wrote: Hi Martin, Thank you very much for the reply. Evenafter setting these, I am still seeing the same error. I am herewith attaching my axis2.xml. Can you please check the same. I am not able to understand, 1. Is it because of some configuration issue that I am seeing this error ? or 2. Am I doing something wrong while converting my normal SOAP message/headers to SOAP message/headers for MTOM 3. Or am I missing something that I need to send as a header along http request ? Regards, Siva On 8/28/08, Martin Gainty [EMAIL PROTECTED] wrote: in /WEB-INF/conf/axis2.xml Sender and Receiver check the 1.1 protocol and chunked encoding parms are set transportSender ... parameter name=PROTOCOL locked=falseHTTP/1.1/parameter parameter name=Transfer-Encoding locked=falsechunked/parameter transportReceiver ... parameter name=PROTOCOL locked=falseHTTP/1.1/parameter parameter name=Transfer-Encoding locked=falsechunked/parameter Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. -- Date: Wed, 27 Aug 2008 23:23:51 +0530 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: [Axis2] Hi, I am trying to add MTOM support to ZSI. When I send a request which is processed for MTOM, on the server side I am getting the below error. org.apache.http.MalformedChunkCodingException: Bad chunk header at org.apache.http.impl.io.ChunkedInputStream.getChunkSize(ChunkedInputStream.java:232) at org.apache.http.impl.io.ChunkedInputStream.nextChunk(ChunkedInputStream.java:183) at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:155) at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:175) at org.apache.http.impl.io.ChunkedInputStream.exhaustInputStream(ChunkedInputStream.java:289) at org.apache.http.impl.io.ChunkedInputStream.close(ChunkedInputStream.java:262) at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:192) at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:619) On the client side I am getting the below SOAP fault invalid literal for int() with base 16: '' Here are my headers and body sent to Axis's MTOM Sample Service. Can some one point me where is the problem. ? Thanks Regards Siva [mtom:apply_mtom]: mtomheaders: {'SOAPAction': 'attachment', 'Content-Type': 'multipart/related; boundary===ZSI_MIME_BOUNDARY==; start-info=text/xml; start=soaplibEnvelope'} [mtom:apply_mtom]: mtombody: --==ZSI_MIME_BOUNDARY== Content-Transfer-Encoding: binary Content-ID: soaplibEnvelope Content-Type: text/xml; charset=utf-8 ns0:Envelope xmlns:ns0=http://schemas.xmlsoap.org/soap/envelope/;ns0:Header /ns0:Bodyns1:AttachmentRequest xmlns:ns1= http://ws.apache.org/axis2/mtom sample/ns1:fileNamec:\Sample_mtom.zip/ns1:fileNamens1:binaryDatans2:Include href=cid:ZSIAttachment_1 xmlns:ns2=http://www.w3.org/2004/08/xop/incl ude //ns1:binaryData/ns1:AttachmentRequest/ns0:Body/ns0:Envelope --==ZSI_MIME_BOUNDARY== Content-Type: application/octet-stream Content-Transfer-Encoding: binary Content-ID: ZSIAttachment_1 ìë7í3?9?»ñ(?┘►S‼K3É3 PK☺☻¶ ¶ ⌡h←93▬Wçh ╚ ← ☺ ╢ü Sample_txt_mtom_clieent.txtPK♣♠☺ ☺ I í --==ZSI_MIME_BOUNDARY==-- -- Talk to your Yahoo! Friends via Windows Live Messenger. Find Out Howhttp://www.windowslive.com/explore/messenger?ocid=TXT_TAGLM_WL_messenger_yahoo_082008 -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Can I transfer/response an JPG or PDF file from server to client via Spring WS?
No idea about Spring WS... But following articles will give u a general idea about MTOM SwA as well as how to use them in Axis2. MTOM SwA are two methods to send/receive binary data with web services.. http://ws.apache.org/axis2/1_4_1/mtom-guide.html http://wso2.org/library/1148 http://wso2.org/library/1675 thanks, Thilina On Tue, Aug 26, 2008 at 7:22 PM, Deepal jayasinghe [EMAIL PROTECTED]wrote: thomas2004 wrote: What I am going to do is: I get some datas from client and will return/transfer/response an JPG or PDF file to the client. Is it possible? You mean at the server side you receive a request from a client , that SOAP message contains binary data like JPG or PDF file. And you need to send that back to the client ? So far I understand, the WS can only transfer XML-file. Is that right? Any example or infos? Nope WS is to send and receive SOAP messages (most of the cases) , but one can send binary data with the message. And they use approaches like MTOM and base64 for that. If you can explain about your problem somewhat more , then I would be able to give you a better answer than this. Thank you! Deepal Regards Thomas -- Thanks, Deepal http://blogs.deepal.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: MTOM XMLBeans axis2 1.4
AFAIK MTOM support in Axis2 XMLBeans data binding is broken for some time (my apologies if somebody fixed it recently)... People are not much motivated for supporting XMLBeans as it does not have the native binary support as ADB+Axiom has. As a result all the binary data needs to be encoded back and forth to from base64 when supporting MTOM with XML beans giving many limitations and inefficiencies. thanks, Thilina On Sun, Aug 17, 2008 at 9:31 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi All, I have a web service which uses axis2 1.4 and uses ADB. But my client code is XMLBeans, Axis2 1.4. Does XMLBeans support MTOM? Can I send an attachment from my client using MTOM? Thanks. -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Binary Data, http and jms, WebSphere 6.x
AFAIK MTOM support in Axis2 XMLBeans data binding is broken for some time (my apologies if somebody fixed it recently)... People are not much motivated for supporting XMLBeans as it does not have the native binary support as ADB+Axiom has and all the binary data needs to be encoded back and forth to from base64 when supporting MTOM with XML beans. thanks, Thilina On Fri, Aug 15, 2008 at 7:45 AM, Damin [EMAIL PROTECTED] wrote: Currently using MTOM with ADB running through Axis2 http transport web service in WebSphere 6.x - works great! Thanks. Need to support MQ interface running same service, cannot use Axis2 JMS because running in J2EE WebSphere Container (the ole' setMessageListener() problem that app server vendors imposed on the J2EE specification). So, ADB and MTOM appear to be out for this interface. You guys got any idea how to do this? 1) Have done XMLBeans with XOP from MQ (in 2 passes) before without Axis2. Could do this, but the folks I work for want the same business code to be run for both http and mq transports - novel idea. 2) Cannot figure out how to get XMLBeans to do XOP running through Axis2, it keeps making the binary data Base64 encoded instead of XOP - anyone solved this. Looking for some directions/ideas at this point and thanks for your replies. Damin -- View this message in context: http://www.nabble.com/Binary-Data%2C-http-and-jms%2C-WebSphere-6.x-tp18997365p18997365.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: mtom file size
hmm... I don't know why they are providing it only for form posts... May be tomcat does not track the size of others.. I'm sorry.. I don't have any ideas... ~Thilina On Tue, Aug 12, 2008 at 9:58 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, The maxPostSize attribute is working in tomcat only for the Post requests coming via the Forms. I searched a lot in google to try to find a solution. But seems no solution. Thanks. Regards, Simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, 13 August 2008 2:46 PM *To:* axis-user@ws.apache.org *Subject:* Re: mtom file size Hi, There is a similar parameter setting in the tomcat service.xml as maxPostSize=in bytes , this will restrict the size of incoming POST request. But this does not work for axis web service requests, but that configuration is quite easier and no need to waste time on clustering and stuff. Restricting the message size using the app server (eg: tomcat) would be the approach most of the users might be using... I'm surprised to hear that Tomcat does not restrict the incoming POST request size for Axis2 web service requests.. For tomcat, it would be just another request.. Does this happen only with a particular scenerio (eg: with http chunking? ). thanks, Thilina Hope in future, we will be able to get such configurable solution. Thank you. Regards, Simen *From:* Martin Gainty [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, 13 August 2008 12:03 PM *To:* axis-user@ws.apache.org *Subject:* RE: mtom file size your SOAP response can be a URL to the file ..and hand the URL to FTP server for bulk of the heavy lifting another idea is to compress the file which will conserve bandwidth the question is which server has the necessary bandwidth to handle the transmission? if you're bogging down your webapp server you might want consider clustering http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html Most prod servers run with 4GB RAM so you'll want to increment your stack and heap params to accomodate more RAM http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/diag/appendixes/defaults.html heavy resource-intensive operations should be handled by threads to prevent bogging down the JVM proc you may also want to consider Chunked-encoding .. Anyone else? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. -- From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Date: Wed, 13 Aug 2008 09:12:40 +1000 Subject: RE: mtom file size Hi Thilina, It is a big threat to the web service. L I don't want to crash my web server by receiving large files. We cannot request from the clients to send small files and people are always willing to blame us by crashing the web server. There may be some settings in the tomcat configurations to limit the size of incoming request. Any suggestions? Thank you. Regards, simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, 13 August 2008 1:35 AM *To:* axis-user@ws.apache.org *Subject:* Re: mtom file size I would say it's possible.. thanks, Thilina On Tue, Aug 12, 2008 at 6:01 AM, Samisa Abeysinghe [EMAIL PROTECTED] wrote: Thilina Gunarathne wrote: I'm not sure whether Axis2 MTOM policy implementation supports such a scenerio.. Other than that, I cannot think of any.. Does this mean that someone can send several large attachments concurrently and take down the server by making it go out of resources? Thanks, Samisa... thanks, Thilina On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: Hi, I want to specify the maximum file size when using MTOM. The client should not send to the service files bigger than 5mb and I am using MTOM with axis2 1.4 (deployed in tomcat) How to restrict the file size? Please let me know. Thanks. -- Thilina Gunarathne - http://thilinag.blogspot.com -- Samisa Abeysinghe http://people.apache.org/~samisa/ http://people.apache.org/%7Esamisa/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com -- Get Windows Live and get whatever you need, wherever you are. Start here.http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008 -- Thilina Gunarathne - http
Re: MTOM Sample Error ?
Since you r getting a NPE, also check whether the file path you gave is correct... thanks, Thilina 2008/8/13 Charitha Kankanamge [EMAIL PROTECTED] Hi, Which Axis2 version are you using? regards Charitha Şükrü Uzel wrote: I have error when mtom run client in axis2 sample ( MTOM ). Error : Exception in thread main org.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:90) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at org.apache.ws.axis2.mtomsample.MTOMSampleMTOMSampleSOAP11Port_httpStub.attachment(Unknown Source) at sample.mtom.client.Client.transferFile(Unknown Source) at sample.mtom.client.Client.main(Unknown Source) Caused by: java.lang.NullPointerException at org.apache.axiom.attachments.Attachments.getSOAPPartContentType(Attachments.java:438) at org.apache.axis2.builder.MIMEBuilder.processDocument(MIMEBuilder.java:40) at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:164) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:112) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:88) what is problem ? Internal Virus Database is out-of-date. Checked by AVG. Version: 7.5.524 / Virus Database: 270.4.7/1543 - Release Date: 7/9/2008 6:32 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Out Of Memory issue in axis2 1.4
Nope... It's not due to Axis2.. It might be vulnerable due to your implementation.. For an example, you said you are writing the whole OMElement to a DataBase. In such a case if you just did OMElement.toString(), it'll cause the attachment to get loaded in to memory. This will eventually cause a OOM. In such a scenerio you can try streamingly writing it to the database (I don't know much about databases) by serialising the OMElement to a stream. Or you can seperately store the cached binary file in the database.. thanks, Thilina On Mon, Aug 11, 2008 at 8:27 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I will report the issue in JIRA. Why did you say that my server side is vulnerable for large attachments? Are there known bugs in mtom? Please advise me. Thank you. Regards, simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, 12 August 2008 12:49 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Glad to know it's working.. You can go to https://issues.apache.org/jira/browse/AXIS2 and create a new issues... You might need to create account... Also keep in mind that u'r service side logic may be vulnerable to fail when presented with a large attachment. thanks, Thilina On Mon, Aug 11, 2008 at 4:58 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, Yes it is working if I use xsd:base64Binary rather than a simple type. So this is an issue to fix. Sorry, I am not sure how to log it in JIRA. If it is easy, could you please log it or let me know how to do it. Thank you for your help so far. Otherwise I will be stuck here forever. Regards, simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 5:56 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, I'm not sure whether ADB will work for simple type restriction on ADB. Can you change it to simply a xsd:base64Binary element and see whether it'll work. You can have a look at the wsdl given in Axis2 MTOM guide to get an idea. If that works, please log a JIRA for the simple type restriction issue. thanks, Thilina On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I am using ADB. The client and server are generated using wsdl2java eclipse plugin. Both using ADB. This is the part related to my wsdl. *-* http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl xs:simpleType name=*FileRawDataType* *-* http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl xs:restriction base=*xs:base64Binary* * * xs:maxLength value=*5242880* / * * /xs:restriction * */xs:simpleType Can you figure out the issue? Thanks. Regards, ssimen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 3:35 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, Can u explain a bit about ur client side... Which data binding framework r u using?.. Does ur WSDL have any xsd:base64Binary elements. thanks, ~Thilina On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body. I followed the http://wso2.org/library/264 to send attachments using MTOM Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment. Much appreciate your help. Thank you. Regards, ssimen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 3:14 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment. (stub._getServiceClient().getOptions().setProperty( Constants.Configuration.*ENABLE_MTOM*, Constants.*VALUE_TRUE*);) Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message? It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead. Did you check the message using TCPMON or are you referring to the message you see in the database.. I am reading the whole request to the OMElement to save it in the database. Is that the problem? How can I fix it? Please help me. You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request
Re: mtom file size
I'm not sure whether Axis2 MTOM policy implementation supports such a scenerio.. Other than that, I cannot think of any.. thanks, Thilina On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi, I want to specify the maximum file size when using MTOM. The client should not send to the service files bigger than 5mb and I am using MTOM with axis2 1.4 (deployed in tomcat) How to restrict the file size? Please let me know. Thanks. -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Axis2 - Handler to log all messages without attachments
You can try traversing the whole envelope looking for xop:include elements and then detach those elements from the tree.. But doing this will cause the attachment information in the SOAP envelope to be lost and ur services may not function properly. One other thing you can try is to access the SOAP part data handler and log it's contents. You can do that by getting the soap part part content id using the Attachments.getSOAPPartContentID() and then using Attachments.getDataHandler(SOAPPartContentID) to get access to the SOAP part DataHandler. Then just write the contents of the DataHandler to the output stream. You can get access to the Attachments using msgCntx.getAttachmentMap() method. thanks, Thilina On Mon, Aug 11, 2008 at 10:51 PM, StrongSteve [EMAIL PROTECTED] wrote: Hi Everybody! I am currently developing an Axis2 Handler that logs all SOAP Messages targeted at my server into separate files. The problem is, that many of these SOAP Messages contain files (binary MTOM), which I do not want to log of course, as they just blow up the file size. (Instead of the binary attachment transmission I want to add a simple String like ATTACHMENT REMOVED or something like this. I already have everything working, except the attachment handling. Here is my code till now. (I have nothing with files or so on, I test it with plain System.out.printlns) public class LoggingHandler extends AbstractHandler { public InvocationResponse invoke(MessageContext msgCtx) throws AxisFault { SOAPEnvelope env = msgCtx.getEnvelope(); System.out.println(env.toString()); return InvocationResponse.CONTINUE; } } So can anyone please help me with extracting the attachments? I would be very glad! ;) (Removing the Attachments with msgCtx.removeAttachment(AttachmentID), does not work!!!) Thanks in Advance for both your time and your knowledge! Greeting Stefan -- View this message in context: http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18938449.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Axis2 - Handler to log all messages without attachments
Make sure you try the second method first :).. On Tue, Aug 12, 2008 at 12:01 AM, Thilina Gunarathne [EMAIL PROTECTED]wrote: You can try traversing the whole envelope looking for xop:include elements and then detach those elements from the tree.. But doing this will cause the attachment information in the SOAP envelope to be lost and ur services may not function properly. One other thing you can try is to access the SOAP part data handler and log it's contents. You can do that by getting the soap part part content id using the Attachments.getSOAPPartContentID() and then using Attachments.getDataHandler(SOAPPartContentID) to get access to the SOAP part DataHandler. Then just write the contents of the DataHandler to the output stream. You can get access to the Attachments using msgCntx.getAttachmentMap() method. thanks, Thilina On Mon, Aug 11, 2008 at 10:51 PM, StrongSteve [EMAIL PROTECTED]wrote: Hi Everybody! I am currently developing an Axis2 Handler that logs all SOAP Messages targeted at my server into separate files. The problem is, that many of these SOAP Messages contain files (binary MTOM), which I do not want to log of course, as they just blow up the file size. (Instead of the binary attachment transmission I want to add a simple String like ATTACHMENT REMOVED or something like this. I already have everything working, except the attachment handling. Here is my code till now. (I have nothing with files or so on, I test it with plain System.out.printlns) public class LoggingHandler extends AbstractHandler { public InvocationResponse invoke(MessageContext msgCtx) throws AxisFault { SOAPEnvelope env = msgCtx.getEnvelope(); System.out.println(env.toString()); return InvocationResponse.CONTINUE; } } So can anyone please help me with extracting the attachments? I would be very glad! ;) (Removing the Attachments with msgCtx.removeAttachment(AttachmentID), does not work!!!) Thanks in Advance for both your time and your knowledge! Greeting Stefan -- View this message in context: http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18938449.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Out Of Memory issue in axis2 1.4
But if I loaded the OmElement from the method, OmElement = request.getOMElement, does not it mean that the whole request (with the attachment) loaded to memory? Nope... Loading of the attachment happens only when you do a OmElement.toString()... If it is the case, then there is no point of doing streaming to the already loaded OmElement. Please let me know. Thank you. Regards, Simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, 12 August 2008 4:35 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Nope... It's not due to Axis2.. It might be vulnerable due to your implementation.. For an example, you said you are writing the whole OMElement to a DataBase. In such a case if you just did OMElement.toString(), it'll cause the attachment to get loaded in to memory. This will eventually cause a OOM. In such a scenerio you can try streamingly writing it to the database (I don't know much about databases) by serialising the OMElement to a stream. Or you can seperately store the cached binary file in the database.. thanks, Thilina On Mon, Aug 11, 2008 at 8:27 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I will report the issue in JIRA. Why did you say that my server side is vulnerable for large attachments? Are there known bugs in mtom? Please advise me. Thank you. Regards, simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, 12 August 2008 12:49 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Glad to know it's working.. You can go to https://issues.apache.org/jira/browse/AXIS2 and create a new issues... You might need to create account... Also keep in mind that u'r service side logic may be vulnerable to fail when presented with a large attachment. thanks, Thilina On Mon, Aug 11, 2008 at 4:58 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, Yes it is working if I use xsd:base64Binary rather than a simple type. So this is an issue to fix. Sorry, I am not sure how to log it in JIRA. If it is easy, could you please log it or let me know how to do it. Thank you for your help so far. Otherwise I will be stuck here forever. Regards, simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 5:56 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, I'm not sure whether ADB will work for simple type restriction on ADB. Can you change it to simply a xsd:base64Binary element and see whether it'll work. You can have a look at the wsdl given in Axis2 MTOM guide to get an idea. If that works, please log a JIRA for the simple type restriction issue. thanks, Thilina On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I am using ADB. The client and server are generated using wsdl2java eclipse plugin. Both using ADB. This is the part related to my wsdl. *-* http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl xs:simpleType name=*FileRawDataType* *-* http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl xs:restriction base=*xs:base64Binary* * * xs:maxLength value=*5242880* / * * /xs:restriction * */xs:simpleType Can you figure out the issue? Thanks. Regards, ssimen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 3:35 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, Can u explain a bit about ur client side... Which data binding framework r u using?.. Does ur WSDL have any xsd:base64Binary elements. thanks, ~Thilina On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body. I followed the http://wso2.org/library/264 to send attachments using MTOM Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment. Much appreciate your help. Thank you. Regards, ssimen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 3:14 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment. (stub._getServiceClient().getOptions().setProperty( Constants.Configuration.*ENABLE_MTOM*, Constants.*VALUE_TRUE*);) Next question is, eventhough it is sending inside
Re: Axis2 - Handler to log all messages without attachments
hmmm.. You need to read more carefully... One other thing you can try is to access the SOAP part data handler and log it's contents. You can do that by getting the soap part part content id using the Attachments.getSOAPPartContentID() and then using Attachments.getDataHandler(SOAPPartContentID) to get access to the SOAP part DataHandler. Then just write the contents of the DataHandler to the output stream. Writing SOAP part contents will give you wat u need... ~Thilina On Tue, Aug 12, 2008 at 3:23 AM, StrongSteve [EMAIL PROTECTED] wrote: Hi! Thanks for your quick reply. I already know how to get to the attachments, but what I want to do, is log everything EXCEPT the attachments! ;) Removing them from the message, does not work. I do not know why... :( And hints for me? Thanks in Advance! Greetings Stefan Thilina Gunarathne wrote: Make sure you try the second method first :).. On Tue, Aug 12, 2008 at 12:01 AM, Thilina Gunarathne [EMAIL PROTECTED]wrote: You can try traversing the whole envelope looking for xop:include elements and then detach those elements from the tree.. But doing this will cause the attachment information in the SOAP envelope to be lost and ur services may not function properly. One other thing you can try is to access the SOAP part data handler and log it's contents. You can do that by getting the soap part part content id using the Attachments.getSOAPPartContentID() and then using Attachments.getDataHandler(SOAPPartContentID) to get access to the SOAP part DataHandler. Then just write the contents of the DataHandler to the output stream. You can get access to the Attachments using msgCntx.getAttachmentMap() method. thanks, Thilina On Mon, Aug 11, 2008 at 10:51 PM, StrongSteve [EMAIL PROTECTED]wrote: Hi Everybody! I am currently developing an Axis2 Handler that logs all SOAP Messages targeted at my server into separate files. The problem is, that many of these SOAP Messages contain files (binary MTOM), which I do not want to log of course, as they just blow up the file size. (Instead of the binary attachment transmission I want to add a simple String like ATTACHMENT REMOVED or something like this. I already have everything working, except the attachment handling. Here is my code till now. (I have nothing with files or so on, I test it with plain System.out.printlns) public class LoggingHandler extends AbstractHandler { public InvocationResponse invoke(MessageContext msgCtx) throws AxisFault { SOAPEnvelope env = msgCtx.getEnvelope(); System.out.println(env.toString()); return InvocationResponse.CONTINUE; } } So can anyone please help me with extracting the attachments? I would be very glad! ;) (Removing the Attachments with msgCtx.removeAttachment(AttachmentID), does not work!!!) Thanks in Advance for both your time and your knowledge! Greeting Stefan -- View this message in context: http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18938449.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com -- View this message in context: http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18941523.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Axis2 - Handler to log all messages without attachments
You cannot remove MTOM attachments like that... They are more bound to the XML object model.. Following works only for the SwA and only for the attachments you added... Not to the one's that came in the request.. thanks, Thilina On Tue, Aug 12, 2008 at 7:23 AM, StrongSteve [EMAIL PROTECTED] wrote: Like this: Attachments attachments = arg0.getAttachmentMap(); String[] attachmentIds = attachments.getAllContentIDs(); for (int i = 0; i attachmentIds.length; i++) { arg0.removeAttachment(attachmentIds[i]); } SOAPEnvelope env = arg0.getEnvelope(); System.out.println(env.toString()); Samisa Abeysinghe-2 wrote: StrongSteve wrote: Hi! Thanks for your quick reply. I already know how to get to the attachments, but what I want to do, is log everything EXCEPT the attachments! ;) Removing them from the message, does not work. I do not know why... :( How did you remove them? Samisa... And hints for me? Thanks in Advance! Greetings Stefan Thilina Gunarathne wrote: Make sure you try the second method first :).. On Tue, Aug 12, 2008 at 12:01 AM, Thilina Gunarathne [EMAIL PROTECTED]wrote: You can try traversing the whole envelope looking for xop:include elements and then detach those elements from the tree.. But doing this will cause the attachment information in the SOAP envelope to be lost and ur services may not function properly. One other thing you can try is to access the SOAP part data handler and log it's contents. You can do that by getting the soap part part content id using the Attachments.getSOAPPartContentID() and then using Attachments.getDataHandler(SOAPPartContentID) to get access to the SOAP part DataHandler. Then just write the contents of the DataHandler to the output stream. You can get access to the Attachments using msgCntx.getAttachmentMap() method. thanks, Thilina On Mon, Aug 11, 2008 at 10:51 PM, StrongSteve [EMAIL PROTECTED]wrote: Hi Everybody! I am currently developing an Axis2 Handler that logs all SOAP Messages targeted at my server into separate files. The problem is, that many of these SOAP Messages contain files (binary MTOM), which I do not want to log of course, as they just blow up the file size. (Instead of the binary attachment transmission I want to add a simple String like ATTACHMENT REMOVED or something like this. I already have everything working, except the attachment handling. Here is my code till now. (I have nothing with files or so on, I test it with plain System.out.printlns) public class LoggingHandler extends AbstractHandler { public InvocationResponse invoke(MessageContext msgCtx) throws AxisFault { SOAPEnvelope env = msgCtx.getEnvelope(); System.out.println(env.toString()); return InvocationResponse.CONTINUE; } } So can anyone please help me with extracting the attachments? I would be very glad! ;) (Removing the Attachments with msgCtx.removeAttachment(AttachmentID), does not work!!!) Thanks in Advance for both your time and your knowledge! Greeting Stefan -- View this message in context: http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18938449.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com -- Samisa Abeysinghe http://people.apache.org/~samisa/ http://people.apache.org/%7Esamisa/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Axis2---Handler-to-log-all-messages-without-attachments-tp18938449p18945302.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: mtom file size
I would say it's possible.. thanks, Thilina On Tue, Aug 12, 2008 at 6:01 AM, Samisa Abeysinghe [EMAIL PROTECTED] wrote: Thilina Gunarathne wrote: I'm not sure whether Axis2 MTOM policy implementation supports such a scenerio.. Other than that, I cannot think of any.. Does this mean that someone can send several large attachments concurrently and take down the server by making it go out of resources? Thanks, Samisa... thanks, Thilina On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: Hi, I want to specify the maximum file size when using MTOM. The client should not send to the service files bigger than 5mb and I am using MTOM with axis2 1.4 (deployed in tomcat) How to restrict the file size? Please let me know. Thanks. -- Thilina Gunarathne - http://thilinag.blogspot.com -- Samisa Abeysinghe http://people.apache.org/~samisa/ http://people.apache.org/%7Esamisa/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: mtom file size
Hi, There is a similar parameter setting in the tomcat service.xml as maxPostSize=in bytes , this will restrict the size of incoming POST request. But this does not work for axis web service requests, but that configuration is quite easier and no need to waste time on clustering and stuff. Restricting the message size using the app server (eg: tomcat) would be the approach most of the users might be using... I'm surprised to hear that Tomcat does not restrict the incoming POST request size for Axis2 web service requests.. For tomcat, it would be just another request.. Does this happen only with a particular scenerio (eg: with http chunking? ). thanks, Thilina Hope in future, we will be able to get such configurable solution. Thank you. Regards, Simen *From:* Martin Gainty [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, 13 August 2008 12:03 PM *To:* axis-user@ws.apache.org *Subject:* RE: mtom file size your SOAP response can be a URL to the file ..and hand the URL to FTP server for bulk of the heavy lifting another idea is to compress the file which will conserve bandwidth the question is which server has the necessary bandwidth to handle the transmission? if you're bogging down your webapp server you might want consider clustering http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html Most prod servers run with 4GB RAM so you'll want to increment your stack and heap params to accomodate more RAM http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/diag/appendixes/defaults.html heavy resource-intensive operations should be handled by threads to prevent bogging down the JVM proc you may also want to consider Chunked-encoding .. Anyone else? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. -- From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Date: Wed, 13 Aug 2008 09:12:40 +1000 Subject: RE: mtom file size Hi Thilina, It is a big threat to the web service. L I don't want to crash my web server by receiving large files. We cannot request from the clients to send small files and people are always willing to blame us by crashing the web server. There may be some settings in the tomcat configurations to limit the size of incoming request. Any suggestions? Thank you. Regards, simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, 13 August 2008 1:35 AM *To:* axis-user@ws.apache.org *Subject:* Re: mtom file size I would say it's possible.. thanks, Thilina On Tue, Aug 12, 2008 at 6:01 AM, Samisa Abeysinghe [EMAIL PROTECTED] wrote: Thilina Gunarathne wrote: I'm not sure whether Axis2 MTOM policy implementation supports such a scenerio.. Other than that, I cannot think of any.. Does this mean that someone can send several large attachments concurrently and take down the server by making it go out of resources? Thanks, Samisa... thanks, Thilina On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: Hi, I want to specify the maximum file size when using MTOM. The client should not send to the service files bigger than 5mb and I am using MTOM with axis2 1.4 (deployed in tomcat) How to restrict the file size? Please let me know. Thanks. -- Thilina Gunarathne - http://thilinag.blogspot.com -- Samisa Abeysinghe http://people.apache.org/~samisa/ http://people.apache.org/%7Esamisa/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com -- Get Windows Live and get whatever you need, wherever you are. Start here.http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008 -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Out Of Memory issue in axis2 1.4
Hi, I'm not sure whether ADB will work for simple type restriction on ADB. Can you change it to simply a xsd:base64Binary element and see whether it'll work. You can have a look at the wsdl given in Axis2 MTOM guide to get an idea. If that works, please log a JIRA for the simple type restriction issue. thanks, Thilina On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I am using ADB. The client and server are generated using wsdl2java eclipse plugin. Both using ADB. This is the part related to my wsdl. *-* http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl xs:simpleType name=*FileRawDataType* *-* http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl xs:restriction base=*xs:base64Binary* * * xs:maxLength value=*5242880* / * * /xs:restriction * */xs:simpleType Can you figure out the issue? Thanks. Regards, ssimen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 3:35 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, Can u explain a bit about ur client side... Which data binding framework r u using?.. Does ur WSDL have any xsd:base64Binary elements. thanks, ~Thilina On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body. I followed the http://wso2.org/library/264 to send attachments using MTOM Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment. Much appreciate your help. Thank you. Regards, ssimen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 3:14 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment. (stub._getServiceClient().getOptions().setProperty( Constants.Configuration.*ENABLE_MTOM*, Constants.*VALUE_TRUE*);) Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message? It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead. Did you check the message using TCPMON or are you referring to the message you see in the database.. I am reading the whole request to the OMElement to save it in the database. Is that the problem? How can I fix it? Please help me. You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request to an OMElement and writing it to the database. You will need to specially handle the cached binary data file.. thanks, Thilina Thank you. Regards, Simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 2:01 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Can anyone please help me? Whats wrong with axis2? It can be two things... 1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.( http://ws.apache.org/commons/tcpmon) 2. Your service implementation might be loading the whole cached binary data to the memory.. thanks, Thilina Thank you. Regards -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Out Of Memory issue in axis2 1.4
Glad to know it's working.. You can go to https://issues.apache.org/jira/browse/AXIS2 and create a new issues... You might need to create account... Also keep in mind that u'r service side logic may be vulnerable to fail when presented with a large attachment. thanks, Thilina On Mon, Aug 11, 2008 at 4:58 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, Yes it is working if I use xsd:base64Binary rather than a simple type. So this is an issue to fix. Sorry, I am not sure how to log it in JIRA. If it is easy, could you please log it or let me know how to do it. Thank you for your help so far. Otherwise I will be stuck here forever. Regards, simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 5:56 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, I'm not sure whether ADB will work for simple type restriction on ADB. Can you change it to simply a xsd:base64Binary element and see whether it'll work. You can have a look at the wsdl given in Axis2 MTOM guide to get an idea. If that works, please log a JIRA for the simple type restriction issue. thanks, Thilina On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I am using ADB. The client and server are generated using wsdl2java eclipse plugin. Both using ADB. This is the part related to my wsdl. *-* http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl xs:simpleType name=*FileRawDataType* *-* http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl xs:restriction base=*xs:base64Binary* * * xs:maxLength value=*5242880* / * * /xs:restriction * */xs:simpleType Can you figure out the issue? Thanks. Regards, ssimen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 3:35 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, Can u explain a bit about ur client side... Which data binding framework r u using?.. Does ur WSDL have any xsd:base64Binary elements. thanks, ~Thilina On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body. I followed the http://wso2.org/library/264 to send attachments using MTOM Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment. Much appreciate your help. Thank you. Regards, ssimen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 3:14 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment. (stub._getServiceClient().getOptions().setProperty( Constants.Configuration.*ENABLE_MTOM*, Constants.*VALUE_TRUE*);) Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message? It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead. Did you check the message using TCPMON or are you referring to the message you see in the database.. I am reading the whole request to the OMElement to save it in the database. Is that the problem? How can I fix it? Please help me. You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request to an OMElement and writing it to the database. You will need to specially handle the cached binary data file.. thanks, Thilina Thank you. Regards, Simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 2:01 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Can anyone please help me? Whats wrong with axis2? It can be two things... 1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.( http://ws.apache.org/commons/tcpmon) 2. Your service implementation might be loading the whole cached binary data to the memory.. thanks, Thilina Thank you. Regards -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http
Re: Out Of Memory issue in axis2 1.4
Can anyone please help me? Whats wrong with axis2? It can be two things... 1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.( http://ws.apache.org/commons/tcpmon) 2. Your service implementation might be loading the whole cached binary data to the memory.. thanks, Thilina Thank you. Regards -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Out Of Memory issue in axis2 1.4
Hi, Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment. (stub._getServiceClient().getOptions().setProperty( Constants.Configuration.*ENABLE_MTOM*, Constants.*VALUE_TRUE*);) Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message? It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead. Did you check the message using TCPMON or are you referring to the message you see in the database.. I am reading the whole request to the OMElement to save it in the database. Is that the problem? How can I fix it? Please help me. You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request to an OMElement and writing it to the database. You will need to specially handle the cached binary data file.. thanks, Thilina Thank you. Regards, Simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 2:01 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Can anyone please help me? Whats wrong with axis2? It can be two things... 1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.( http://ws.apache.org/commons/tcpmon) 2. Your service implementation might be loading the whole cached binary data to the memory.. thanks, Thilina Thank you. Regards -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Out Of Memory issue in axis2 1.4
Hi, Can u explain a bit about ur client side... Which data binding framework r u using?.. Does ur WSDL have any xsd:base64Binary elements. thanks, ~Thilina On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body. I followed the http://wso2.org/library/264 to send attachments using MTOM Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment. Much appreciate your help. Thank you. Regards, ssimen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 3:14 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Hi, Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment. (stub._getServiceClient().getOptions().setProperty( Constants.Configuration.*ENABLE_MTOM*, Constants.*VALUE_TRUE*);) Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message? It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead. Did you check the message using TCPMON or are you referring to the message you see in the database.. I am reading the whole request to the OMElement to save it in the database. Is that the problem? How can I fix it? Please help me. You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request to an OMElement and writing it to the database. You will need to specially handle the cached binary data file.. thanks, Thilina Thank you. Regards, Simen *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Monday, 11 August 2008 2:01 PM *To:* axis-user@ws.apache.org *Subject:* Re: Out Of Memory issue in axis2 1.4 Can anyone please help me? Whats wrong with axis2? It can be two things... 1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.( http://ws.apache.org/commons/tcpmon) 2. Your service implementation might be loading the whole cached binary data to the memory.. thanks, Thilina Thank you. Regards -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: [Axis2] REST webservice that returns pdf/word document
Theoretically Axis2 MTOM implementation has support for POX+MTOM due to it's tight binding to the XML object model. But I have never tested it nor scene it used. If it works, the message will go inside a MIME package same as in SOAP+MTOM but without the SOAP envelope body elements. But I would recomend you to use full MTOM+SOAP if that is a possibility.. With file caching enabled, Axis2 can handle attachements of virtually any size (memory is not a limitation). thanks, Thilina On Mon, Aug 4, 2008 at 4:34 PM, Chris Richmond [EMAIL PROTECTED]wrote: If you are dealing with more binary than you'd like to load into memory at once, then I would return a url to a (temporary or otherwise depending on you security concerns) file on the server for standard http or ftp download and it is easy for a ws client implemented on any stack to get that. That's what I have done in the past. Sending files from within a ws without using attachments has always been a bit of a workaround from what I have found. If the files you are dealing with CAN be read into memory, then simply serialize to the bytes and send that in the proper field, you could send another response parameter within the complex type that indicates files types, names, etc if you wanted. Chris -- *From:* Pantvaidya, Vishwajit [mailto:[EMAIL PROTECTED] *Sent:* Monday, August 04, 2008 10:17 AM *To:* axis-user@ws.apache.org *Subject:* [Axis2] REST webservice that returns pdf/word document My Axis2 1.3 based webservice is working fine using MTOM attachments and everything else. The default REST (POX) support also works well for the existing webservices. Now I need to add a REST service that returns a pdf/word document. The Axis REST doc says that the GET based REST Web services support only simple types as arguments and it should adhere to the IRI stylehttp://www.w3.org/TR/2006/CR-wsdl20-adjuncts-20060327/#_operation_iri_style, which means I cannot have xsd:base64Binary types in my wsdl. Is there anyway I can add this webservice to return the word/pdf doc? - Vish. -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Outgoing SwA binary attachments: All 0xFF bytes are missing
Hi, We have not come across such an issue before..Can you describe youtr service implementation more.. Are you using a byte[] data source?.. What Axis2 does is just write the entire byte stream we get from data handler (==data source) to the output stream in the correct location(inside MIME boudaries). It would be really great if you can provide a test case for this so that we can see whether it's bug in Axis2. thanks, Thilina On Mon, Jul 28, 2008 at 7:41 AM, Nicolas Verbeke [EMAIL PROTECTED] wrote: Hello I have a web service that sends binary data as MIME attachments (SwA). I realized that the data received by the client was not exactly the same as the data given to the web service. More precisely, a dozen bytes are missing (out of 12,004). All the missing bytes should have had the value 0xFF (255) -- and all the 0xFF bytes from the original data are missing. The original data represents an array of 3001 float values. I'm suspecting a charset-related problem... Does anyone have any clue about what happens? Thanks a lot in advance. Hereafter: What was received by the client HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_DF83F3FB6FDDA694771217252895835; type=text/xml; start=0.urn:uuid:[EMAIL PROTECTED][EMAIL PROTECTED] Transfer-Encoding: chunked Date: Mon, 28 Jul 2008 13:48:15 GMT 243 --MIMEBoundaryurn_uuid_DF83F3FB6FDDA694771217252895835 Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: 0.urn:uuid:[EMAIL PROTECTED][EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ soapenv:Bodytns:getLcValuesResponse xmlns:tns=http://www.myplace.com/MyWebService/xsd tns:columntns:values tns:href=urn:uuid:DF83F3FB6FDDA694771217252894381 tns:count=3001 //tns:column/tns:getLcValuesResponse/soapenv:Body/soapenv:Envelope 38 --MIMEBoundaryurn_uuid_DF83F3FB6FDDA694771217252895835 2000 Content-Type: application/octet-stream Content-Transfer-Encoding: binary Content-ID: urn:uuid:DF83F3FB6FDDA694771217252894381 (... Binary data with missing bytes ...) 38 --MIMEBoundaryurn_uuid_DF83F3FB6FDDA694771217252895835 2 -- 0 Connection #0 to host localhost left intact -- View this message in context: http://www.nabble.com/Outgoing-SwA-binary-attachments%3A-All-0xFF-bytes-are-missing-tp18689243p18689243.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Memory issues with large dynamic generated stream payload -- MTOM with Axis2 1.2 issue
Hi, Make sure you are using HTTP 1.1 and that u have http-chunking enabled When chunking is enabled the internals will just get the stream from the data handler and then will stream it in to the message... Also in the past I have seen people running in to trouble due to issues with custom stream implementations. One test you can do to figure out that you are not hitting a Axis2 bug or an issue with ur impl is to observe the behaviour when by using a File instead of the stream to create the datahandler.. thanks, Thilina On Thu, Jul 24, 2008 at 3:45 PM, Shalab Goel [EMAIL PROTECTED] wrote: Please help. Any pointers will be appreciated. -Original Message- From: Shalab Goel [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2008 1:55 PM To: [EMAIL PROTECTED]; axis-user@ws.apache.org Subject: RE: Memory issues with large dynamic generated stream payload Sorry for the partially complete query below, I posted couple of minutes ago. The behavior noted below is seen in both cases -- inbound stream to Axis Stub layer, and outbound stream from Axis Stub layer. With Axis 1.3 and MTOM enabled streaming. Regards Shalab -Original Message- From: Shalab Goel [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2008 1:32 PM To: 'axis-user@ws.apache.org' Subject: Memory issues with large dynamic generated stream payload Hi, I am using Axis2 1.3 client to talk with a .NET service. The request from client layer hands over a stream (wrapped in DataHandler) to Axis stub layer. It seems to the case that when Axis client stub is generating SOAP message, the memory usage of my client code jumps from 80 MB to 450 MB (or more, proportional to stream's content size). Does Axis Stub layer cache the stream contents in memory before fully materializing SOAP request? Using Axis 1.3 with MTOM. Is this expected behavior? If so, is this behavior customizable (via some property) that this in memory caching of entire stream content not happen. If you noted similar issue and have been able to work around it, will look forward to hearing from you. Any suggestions or comments on this thread will be much appreciated. Thanks Shalab - 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
Re: wsdl2java not creating xmime:base64Binary type correctly?
Hi, Axis2 XMLBeans data binding no longer supports MTOM... Please refer to the latest doc[1].. Try code generating using ADB... wsdl2java.bat -d adb -uri TestService.wsdl thanks, Thilina [1] http://ws.apache.org/axis2/1_4/mtom-guide.html On Thu, Jul 24, 2008 at 12:30 PM, acm [EMAIL PROTECTED] wrote: I've been following this guide for MTOM in Axis2 (http://ws.apache.org/axis2/1_1/mtom-guide.html) and have been unable to get wsdl2java to create the Base64Binary class like is done in the example. In the example, the Base64Binary class has the method getBase64Binary(). Running wsdl2java I don't get that method. I've tried this with Axis2 1.1, 1.3, and 1.4. I've attached a sample wsdl. The wsdl can be converted to java using this command: wsdl2java.bat -d xmlbeans -uri TestService.wsdl (requires the attached xmlmime.xsd in the same directory) Any idea why src\org\w3\www\_2005\_05\xmlmime\Base64Binary.java doesn't have this method? Thanks, acm http://www.nabble.com/file/p18638961/TestService.wsdl TestService.wsdl http://www.nabble.com/file/p18638961/xmlmime.xsd xmlmime.xsd -- View this message in context: http://www.nabble.com/wsdl2java-not-creating-xmime%3Abase64Binary-type-correctly--tp18638961p18638961.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Axis2 with DIME
Samisa is correct... Axis2 does not support DIME... IIRC Axis1.x has DIME support. thanks, Thilina 2008/7/18 Samisa Abeysinghe [EMAIL PROTECTED]: yaojinhui wrote: Hi everyone, I am now building my WS client using Axis2, But unfortunately I need to use DIME for data encapsulation due to the requirement from the server side. Is there any way we could use DIME with axis instead of MTOM. (as the server only supports DIME) AFAIK, I do not think you can. Thanks, Samisa... Thx ahead Kim 奥运圣火到哪里了? 点击查看! http://msn.live.cn/ditu -- Samisa Abeysinghe http://people.apache.org/~samisa/ http://people.apache.org/%7Esamisa/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Enabling MTOM crashes Axis2.1.4
Did you try downloading Axis2 again and doing a clean installation... I know this a typical IT support response ;-) .. But there is a chance that your jar might be corrupt.. thanks, Thilina On Thu, Jul 17, 2008 at 6:05 AM, Pierre Muller [EMAIL PROTECTED] wrote: Hello, I'm getting an internal server error when trying to enable MTOM in Axis2.1.4. Here is what I did : - I installed Axis2.1.4 into Tomcat 5.5.26 (with JDK 1.5.0.15, on Windows) (I dropped the .war in tomcat's webapps folder - in webapps/axis2/WEB-INF/conf/axis2.xml , I changed the parameter enableMTOM to true (SwA is still disabled) - I restarted Tomcat Then : - Axis2 homepage displays correctly ; also List services and services WSDL dynamic generation are still working. - BUT when trying to execute any operation of any service from the browser (e.g http://localhost:8080/axis2/services/Version/getVersion) , I get an Internal server error, and Tomcat logs the following error for the servlet AxisServlet : java.lang.NoClassDefFoundError javax/activation/DataSource (see stack trace copied below). Same stack trace when executing the operation from an Axis2 client. I tried to move activation-1.1.jar from webapps/axis2/WEB-INF/lib to several other lib/ locations (jdk, jre, tomcat...), no success. No success either, when adding this jar to my CLASSPATH variable. Has someone any idea ? Thanks, Pierre Muller java.lang.NoClassDefFoundError: javax/activation/DataSource at org.apache.axiom.om.impl.MIMEOutputUtils.complete(MIMEOutputUtils.java:141) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:159) at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:472) at org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:143) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:330) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:213) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136) at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130) at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:824) at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:253) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) ** Si vous n'êtes pas le destinataire désigné de ce message ou une personne autorisée à l'utiliser, toute distribution, copie, publication ou usage à quelques fins que ce soit des informations dans ce message sont interdits. Merci d'informer immédiatement l'expéditeur par messagerie, et, de détruire ce message. This e-mail is confidential. If you are not the addressee or an authorized recipient of this message, any distribution, copying, publication or use of this information for any purpose is prohibited. Please notify the sender immediately by e-mail and then delete this message. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http
Re: MTOM axis1.4 OutOfMemory for large file transfer
hmmm... Interesting.. .How are you creating the attachment in the server side.. Are you using ADB code generation... Also is there any other modules engaged to the service (eg: rampart),,, thanks, Thilina On Wed, Jul 9, 2008 at 8:29 PM, Shehan Simen [EMAIL PROTECTED] wrote: Hi Thilina, Thank you for your reply. I have already enabled the mtom in server side and client side as mentioned. Here is my soap request. (using tcpmon): POST /Schemes_WSDL_v1/services/Schemes HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SOAPAction: getApplicationAttachment User-Agent: Axis2 Host: localhost:7000 Transfer-Encoding: chunked 28c ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyns1:getApplicationAttachmentRequest xmlns:ns1=http://www.itree.com.au/schemas/iroad/schemes/2008-03; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:type=ns1:GetApplicationAttachmentRequestTypens1:requestIdentifier0001/ns1:requestIdentifierns1:documentIdentifierDOC/ns1:documentIdentifierns1:requestTimestamp2008-07-10T13:22:17.651+10:00/ns1:requestTimestampns1:attachmentIdentifierfile01/ns1:attachmentIdentifier/ns1:getApplicationAttachmentRequest/soapenv:Body/soapenv:Envelope 0 And here is the response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_72BA218269813E64EB1215660138103; type=application/xop+xml; start= 0.urn:uuid:[EMAIL PROTECTED][EMAIL PROTECTED]; start-info=text/xml Transfer-Encoding: chunked Date: Thu, 10 Jul 2008 03:22:18 GMT 2000 --MIMEBoundaryurn_uuid_72BA218269813E64EB1215660138103 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED][EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyns1:getApplicationAttachmentResponse xmlns:ns1=http://www.itree.com.au/schemas/iroad/schemes/2008-03;ns1:operationResultSUCCESS/ns1:operationResultns1:responseTimestamp2008-07-10T13:22:18.041+10:00/ns1:responseTimestampns1:applicationAttachmentns1:fileNameMy Pic File/ns1:fileNamens1:fileDescriptionThis is my file/ns1:fileDescriptionns1:fileFormatGIF/ns1:fileFormatns1:fileRawData/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5Ojf/2wBDAQoKCg0MDRoPDxo3JR8lNzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzf/wAARCACEAH0DA…… /ns1:fileRawData/ns1:applicationAttachment/ns1:getApplicationAttachmentResponse/soapenv:Body/soapenv:Envelope 38 --MIMEBoundaryurn_uuid_72BA218269813E64EB1215660138103 2 -- 0 See, the binary data is still inside the soap envelop. It is not a real attachment, which should be outside the soap envelop. I am using axis2 1.4 and wsdl2java tools, deployed in tomcat. Is something wrong with the classes generated by wsdl2java? Why still the MTOM binary data inside the soap envelop? Hope you can help me. Thx, Regards, Shehan *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Thursday, 10 July 2008 1:29 AM *To:* axis-user@ws.apache.org *Subject:* Re: MTOM axis1.4 OutOfMemory for large file transfer Looks like you are trying to receive a file from a web service and that web service is sending the binary data inside the SOAP envelope as base64binary.. Get your web service to send binary data as an attachment by enabling MTOM at the server side for that service. Then you can enable filecaching at the client side, if you are thinking of receiving very large attachments. http://wso2.org/library/264 thanks, Thilina On Wed, Jul 9, 2008 at 12:18 AM, Shehan Simen [EMAIL PROTECTED] wrote: This is axis2 version1.4, if I confused you. Will be glad if someone can help me. *From:* Shehan Simen [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, 9 July 2008 5:07 PM *To:* axis-user@ws.apache.org *Subject:* MTOM axis1.4 OutOfMemory for large file transfer Hi, I have OutofMemory exception problem with axis1.4, when I try to receive files. Were you able to resolve it? It is working fine with small attachments around 2MB. I checked the soap message in tcpMon, but still I see the file binary data inside the soap message. (not out side envelope). I am using the datahandler type, which is used for base64binary attachment My client code is as follows. FileOutputStream os = *new* FileOutputStream(C:\\temp\\images\\iiad.zip ); FileRawDataType fileRawDataType = fileAttachmentType.getFileRawData(); DataHandler dataHandler = fileRawDataType.getFileRawDataType(); dataHandler.writeTo(os); os.flush(); os.close(); fileRawDataType is a class defined by me for dataHandler type. I enabled the file caching in the axis2.xml, also the MTOM. Do you have any idea? Thankx
Re: MTOM axis1.4 OutOfMemory for large file transfer
Looks like you are trying to receive a file from a web service and that web service is sending the binary data inside the SOAP envelope as base64binary.. Get your web service to send binary data as an attachment by enabling MTOM at the server side for that service. Then you can enable filecaching at the client side, if you are thinking of receiving very large attachments. http://wso2.org/library/264 thanks, Thilina On Wed, Jul 9, 2008 at 12:18 AM, Shehan Simen [EMAIL PROTECTED] wrote: This is axis2 version1.4, if I confused you. Will be glad if someone can help me. *From:* Shehan Simen [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, 9 July 2008 5:07 PM *To:* axis-user@ws.apache.org *Subject:* MTOM axis1.4 OutOfMemory for large file transfer Hi, I have OutofMemory exception problem with axis1.4, when I try to receive files. Were you able to resolve it? It is working fine with small attachments around 2MB. I checked the soap message in tcpMon, but still I see the file binary data inside the soap message. (not out side envelope). I am using the datahandler type, which is used for base64binary attachment My client code is as follows. FileOutputStream os = *new* FileOutputStream(C:\\temp\\images\\iiad.zip ); FileRawDataType fileRawDataType = fileAttachmentType.getFileRawData(); DataHandler dataHandler = fileRawDataType.getFileRawDataType(); dataHandler.writeTo(os); os.flush(); os.close(); fileRawDataType is a class defined by me for dataHandler type. I enabled the file caching in the axis2.xml, also the MTOM. Do you have any idea? Thankx. Regards, Shehan -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize
Will this method.addChild will not create the proper XML format when I send in the message? What I mean by proper XML format is the XMLSchema which your service mandates your request should adhere to.. Do you have a proper WSDL for the service.. Is the service under ur control or something external.. ~Thilina msgAttach.setUserId(Test); msgAttach.setPassword(test); msgAttach.setXMLMsg(test/test); msgAttach.setElement(method); myStub.processWithAttach(msgAttach); Thanks, Asmita -- *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Thursday, July 03, 2008 2:48 PM *To:* axis-user@ws.apache.org *Subject:* Re: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize Hi, I'm a bit confused... Why are you creating the XML using Axiom while you have stubs generated... It would have been better if you fixed your wsdl to reflect the correct XML elements and code generated.. Looks like you are getting the fault from the serverside. A message trace of the request and the WSDL of the service would help to figure out the problem clearly.. myStub._getServiceClient().getOptions() .setProperty(Constants.Configuration.*ENABLE_MTOM*, Constants.*VALUE_TRUE*); myStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1); File file = *new* File(*INPUT_FILE*); FileInputStream fis = *new* FileInputStream(file); String base64String = Base64.*encode*(*readFully*(fis)); //reads the file bitwise before encode is called on it. You can just create a DataHandler and create the OMText out of it... Trying to do the above will put in you in trouble if you are trying to send a larger attachment. OMText binaryNode =fac.createOMText(base64String,application/pdf,*true*); You can use the createOMText() with DataHandler.. Why do I get unknown type cannot serialize? Chances are that you are not sending the message in the correct (XML hierachy) format.. thanks, Thilina Thanks, Asmita -- *From:* Tony Dean [mailto:[EMAIL PROTECTED] *Sent:* Thursday, July 03, 2008 11:46 AM *To:* axis-user@ws.apache.org *Subject:* RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize don't know about your issue, but there are other issues fixed in 1.4 that were broke in 1.3 so I wouldn't go back there. *From:* Attharkar, Asmita [mailto:[EMAIL PROTECTED] *Sent:* Thursday, July 03, 2008 9:40 AM *To:* axis-user@ws.apache.org *Subject:* MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize All, I am trying to send a pdf attachment in the soap message but I get this: org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449) And the message doesn't come to web services server, it is failing in OperationClient.execute() method itself. The AxisFault message shows *Unknow type can not serialize*. What could be the possible reasons for this or is this a known issue with axis2 1.4 release? Should I use axis2 1.3 release if I need to send an attachment using MTOM? Thanks so much for you help! I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4 Thanks, Asmita -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: ADB and MIME attachments
Hi, ADB supports MTOM only.. ADB will help if the wsdl specifies the attachments as base64binary elements.. If the attachment is SwA (implies by your post), then you would need to use Axis2 lower level API's such as OperationClient to obtain the attachments. You may be able to access them by modifying the stub's, if you can access the incoming messagecontext by doing so.. You can access the attachments using messagecontext.getAttachments() when you have a pointer to the incoming message context.. Posting of the message traces and the wsdl would help us to figure out the issue more clearly.. thanks, Thilina On Tue, Jul 1, 2008 at 2:44 PM, Scott Waldner [EMAIL PROTECTED] wrote: I am writing a client connecting to a web service containing operations that return MIME attachments. I have no control over this web service -- I am simply trying to consume it (hence I cannot change it to use MTOM). I have been connecting to the web service and consuming these MIME attachments using Axis 1, so I know that the web service is functioning correctly. I would now like to upgrade to Axis2 1.4. I have generated ADB client bindings using wsdl2java. However, I have been unsuccessful in retrieving these MIME attachments. 1) Does anyone have an example of retrieving MIME attachments while using ADB? 2) Can anyone offer any advice on how best to go about this as every attempt I've made has been unsuccessful? I've been modifying the generated stubs just to see if I could get the attachment and while I see the attachment coming across the wire (using a TCP tunnel), I'm not sure that Axis2 is recognizing the MIME attachment. I can't find any references to it as I step through the debugger. Any advise would be greatly appreciated. Thanks, Scott -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: [AXIS2-1.4] Mime-Multipart Attachment help
Hi, I have a service I am trying to mimic and it requires a mime-multipart attachment in the soap message. I think this is called an in-line attachment. Not really.. In-line means you take the binary data, base64 encode it and put it inside the XML as a text value. How does this differ from SwA or MTOM? Most probably it would be either MTOM or SwA. If possible post a input message to this service together with the HTTP headers. You can use TCPMon ( ws.apache.org/commons/tcpmon) to capture it. Does Axis2 support this kind of attachment? Axis2 supports both MTOM as well as SwA attachments. Both the technologies are capable of delivering MIME attachments together with SOAP. Can JAVA2WSDL generate this within the WSDL? Yes if it's MTOM.. No if it's SwA.. Do you have the WSDL for the service?? How would the classes in POJO development be structured to generate this kind of output? We need to figure out whether it's MTOM or SwA or another beast before thinking of this step.. thanks, Thilina __ Marc Lefebvre, Principle Software Engineer Akimeka, 1305 N. Holopono Street, Kihei, HI 96753 Phone: (808)442-7168, Email: [EMAIL PROTECTED] echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: More SOAP Attachment Questions
Hi, I have the MTOM examples setup and working, uploading and downloading a binary file. All good on that. Thanks! Nice.. So, now, Im trying to get the SOAP w/ Attachments examples working. I have the UPLOAD example working, but cant get the DOWNLOAD version working. I have a couple questions: 1) I noticed you have a method signature like: public OMElement getFile(OMElement element) Why are you using OMElement as the argument and return value? Couldn't you just send a String to request a specific file and return a String with the ContentID specified for a reference to the attachment? Yes... It's possible.. But u need to make sure you return the correct content-id of the attachment you attached. String graphImageID = outMessageContext.addAttachment(graphImageDataHandler); Or even better use a SwA reference, something like this in the WSDL: AFAIK Axis2 does not support code generating to SwARef.. 2) I noticed you use in your services.xml file: messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ Is there a reason you chose this class to be your receiver instead of: messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ which is what the UPLOAD method uses in the SwA attachment method. You can use either of them. 3) I was under the impression that the main difference between MTOM and SwA methods of attachment is that in the MTOM method, the encoded binary file is INSIDE the envelope of the message instead of outside of the envelope, yet, when I look at what is being transmitted, it looks like the binary file is still being sent as an attachment outside of the envelope no matter which method is used. Why is this? Am I not understading the differences correctly? The wire level format is more or less that same for MTOM SwA.. It's the referencing mechanism that's different.. That small difference gives a lot of advantages at the XML level. Also when using MTOM, binary data can go in the envelope (base64 encoded) or can go as attachments without making any difference to the XML object models of the sending/receiving sides.. Have a look at http://ws.apache.org/axis2/1_4/mtom-guide.html.. Specifically at the message traces given at the http://ws.apache.org/axis2/1_3/mtom-guide.html#33 thanks, Thilina __ Marc Lefebvre, Principle Software Engineer Akimeka, 1305 N. Holopono Street, Kihei, HI 96753 Phone: (808)442-7168, Email: [EMAIL PROTECTED] echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: [Axis2] response content
Is it whether my following reply did not answer ur questions or whether you simply missed it.. http://markmail.org/message/lt65mrgnkr7egqjk The earlier mails in axis-dev related to this... http://markmail.org/message/rrtsu7x22pkwya2e IMHO I do not think this as a much of a limitation given that users can enable MTOM per operation wise and also they can use optional for enableMTOM.. thanks, Thilina On Wed, Jun 4, 2008 at 10:28 PM, Tony Dean [EMAIL PROTECTED] wrote: Anyone have any answers to the question below. Thanks. -Original Message- From: Tony Dean [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2008 4:41 PM To: [EMAIL PROTECTED] Subject: [Axis2] response content Hi, I have a web service that is returning XML... it's schema type is xsd:any. I would expect the content to be returned as follows: HTTP/1.0 200 OK Content-Type: text/xml ?xml version='1.0' encoding='UTF-8'? soapenv:Envelope soapenv:Body ... /soapenv:Body /soapenv:Envelope I would expect this to be returned whether MTOM is enabled or not. Wouldn't you? Here's the response from Axis2 service when MTOM is disabled in the Axis2.conf server config file: HTTP/1.0 200 OK Proxy-Connection: close X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)/Tomcat-5.5 X-Cache-Lookup: MISS from inetgw04.unx.sas.com:80 Date: Tue, 03 Jun 2008 20:10:23 GMT X-Cache: MISS from inetgw04.unx.sas.com Content-Type: text/xml;charset=UTF-8 Server: Apache-Coyote/1.1 ?xml version='1.0' encoding='UTF-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Body . /soapenv:Body /soapenv:Envelope Looks correct. --- - Here's the response from Axis2 service when MTOM is enabled in the Axis2.conf server config file: HTTP/1.0 200 OK Proxy-Connection: close X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)/Tomcat-5.5 X-Cache-Lookup: MISS from inetgw04.unx.sas.com:80 Date: Tue, 03 Jun 2008 20:27:29 GMT X-Cache: MISS from inetgw04.unx.sas.com Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_93D2E13819F92A45691212524849948; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED][EMAIL PROTECTED]; start- info=text/xml Server: Apache-Coyote/1.1 --MIMEBoundaryurn_uuid_93D2E13819F92A45691212524849948 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED][EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Body /soapenv:Body /soapenv:Envelope Why use multipart/related content type when there are no attachments? That is, why make an attachment out of the SOAP envelope itself when there are no real attachments? Is this correct behavior? I'd like to hear your comments. Thanks. Tony Dean SAS Institute Inc. 919.531.6704 [EMAIL PROTECTED] SAS... The Power to Know http://www.sas.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
Re: [Axis2] response content
Hi, I have a Flash/Flex consumer that is not working properly because it cannot handle multipart/related content type. It is treating the post response, mime boundary and all, as the soap envelope. It seems that enableMTOM=optional is not fail proof since a client can be optimized not to send MTOM if there are no outgoing attachements. Yeah... I know it's not ideal, but I think above is a good compromise for both the scenerio's.. Ideal way would be to use MTOM policy if somebody needs this much of precision... I guess my best solution is to enable MTOM at the service operation level only when I know that a particular operation will return an attachment. I assume you do this as follows: service name=? description…/description operation name=… messageReceiver class=…/ parameter name=enableMTOMtrue/parameter /operation … /service Above is the correct way to enable/disable MTOM per operation wise. This way I will return MTOM only if attachments are in the response; otherwise, contentType=text/xml will be returned when no attachments are present. Does this sound right? Nope... MIME envelope will be there in the respose message irrespective of whether there is an attachment or not :(.. thanks, Thilina Thanks. *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Thursday, June 05, 2008 2:58 AM *To:* axis-user@ws.apache.org *Cc:* [EMAIL PROTECTED] *Subject:* Re: [Axis2] response content Is it whether my following reply did not answer ur questions or whether you simply missed it.. http://markmail.org/message/lt65mrgnkr7egqjk The earlier mails in axis-dev related to this... http://markmail.org/message/rrtsu7x22pkwya2e IMHO I do not think this as a much of a limitation given that users can enable MTOM per operation wise and also they can use optional for enableMTOM.. thanks, Thilina On Wed, Jun 4, 2008 at 10:28 PM, Tony Dean [EMAIL PROTECTED] wrote: Anyone have any answers to the question below. Thanks. -Original Message- From: Tony Dean [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2008 4:41 PM To: [EMAIL PROTECTED] Subject: [Axis2] response content Hi, I have a web service that is returning XML... it's schema type is xsd:any. I would expect the content to be returned as follows: HTTP/1.0 200 OK Content-Type: text/xml ?xml version='1.0' encoding='UTF-8'? soapenv:Envelope soapenv:Body ... /soapenv:Body /soapenv:Envelope I would expect this to be returned whether MTOM is enabled or not. Wouldn't you? Here's the response from Axis2 service when MTOM is disabled in the Axis2.conf server config file: HTTP/1.0 200 OK Proxy-Connection: close X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA http://jboss-4.2.1.ga/(build: SVNTag=JBoss_4_2_1_GA date=200707131605)/Tomcat-5.5 X-Cache-Lookup: MISS from inetgw04.unx.sas.com:80http://inetgw04.unx.sas.com/ Date: Tue, 03 Jun 2008 20:10:23 GMT X-Cache: MISS from inetgw04.unx.sas.com Content-Type: text/xml;charset=UTF-8 Server: Apache-Coyote/1.1 ?xml version='1.0' encoding='UTF-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Body . /soapenv:Body /soapenv:Envelope Looks correct. --- - Here's the response from Axis2 service when MTOM is enabled in the Axis2.conf server config file: HTTP/1.0 200 OK Proxy-Connection: close X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA http://jboss-4.2.1.ga/(build: SVNTag=JBoss_4_2_1_GA date=200707131605)/Tomcat-5.5 X-Cache-Lookup: MISS from inetgw04.unx.sas.com:80http://inetgw04.unx.sas.com/ Date: Tue, 03 Jun 2008 20:27:29 GMT X-Cache: MISS from inetgw04.unx.sas.com Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_93D2E13819F92A45691212524849948; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED][EMAIL PROTECTED]; start- info=text/xml Server: Apache-Coyote/1.1 --MIMEBoundaryurn_uuid_93D2E13819F92A45691212524849948 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED][EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Body /soapenv:Body /soapenv:Envelope Why use multipart/related content type when there are no attachments? That is, why make an attachment out of the SOAP envelope itself when there are no real attachments? Is this correct behavior? I'd like to hear your comments. Thanks. Tony Dean SAS Institute Inc. 919.531.6704 [EMAIL PROTECTED] SAS... The Power to Know http://www.sas.com
Re: AXis2-1.4 xmlbeans MTOM
ADB supports MTOM and does some schema validation... You can try code generating to your WSDL using ADB.. ~Thilina On Thu, Jun 5, 2008 at 7:28 AM, Karunanidhi, Meena [EMAIL PROTECTED] wrote: Apologies for annoyed you with the previous mail. -Original Message- From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: 05 June 2008 15:21 To: axis-user@ws.apache.org Subject: Re: AXis2-1.4 xmlbeans MTOM On Thu, Jun 5, 2008 at 11:14 AM, Karunanidhi, Meena [EMAIL PROTECTED] wrote: Anyone looking into this... I recommend you read this over and over again until its memorized word for word. http://www.catb.org/~esr/faqs/smart-questions.html Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This is a confidential communication and is intended only for the addressee indicated in the message (or duly authorised to be responsible for the delivery of the message to such person). You are specifically prohibited from copying this message or delivering the same, or any part thereof, to any other person, whomsoever or howsoever, unless you receive written authorisation from us to do. If you are anyone other than the intended addressee, or person duly authorised and responsible for the delivery of this message to the intended addressee, you should destroy this message and notify us immediately. Please note that we accept no responsibility whatsoever in the event that this message or any other email message or any part thereof becomes known or is communicated to anyone other than the intended recipient or other person authorised in writing by us to receive it, howsoever arising and disclaim all liability for any losses or damage which may be sustained by any person as a result thereof. permanent tsb is a trading name of Irish Life Permanent plc which is regulated by the Financial Regulator and is a tied insurance agent for Irish Life Assurance plc. Irish Life Permanent plc is a limited liability company registered in Dublin under No. 222332. The company's registered office is: Irish Life Centre, Lower Abbey Street, Dublin 1. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: How to prevent that a handler is invoked for all services ?
Module is the deployment package/configuration point of handlers. It can also be used to group and apply rules to a set of related handlers. I would suggest creating modules for all the handler engagements. It's just a package with a module.xml file. ~Thilina On Thu, May 22, 2008 at 5:45 AM, stlecho [EMAIL PROTECTED] wrote: Hi, Does this mean that we have to create a module and that we can not just add the custom handler to the InFlow ? Regards, Stefan Lecho. Michele Mazzucco-2 wrote: http://ws.apache.org/axis2/1_4/modules.html On 22 May 2008, at 09:04, stlecho wrote: Hi, We have developed and deployed 2 webservices in the same Tomcat server. For one of these webservices, a custom handler should be invoked. When adding the handler to the PRE-DISPATCH or DISPATCH phase, results in the same behaviour: the handler is invoked for both webservices :o(. Is there a way to specify a Handler that is only applied to a specific Service and/or Operation ? Adding the handler to the DISPATCH phase is done like this: ArrayList phases = service.getAxisConfiguration().getInFlowPhases(); for (int i = 0; i phases.size(); i++) { Phase phase = (Phase)phases.get(i); if (!phase.getName().equalsIgnoreCase(PhaseMetadata.PHASE_DISPATCH)) continue; phase.addHandler(new MustUnderstandHandler()); phase.addHandler(new SchemaValidationHandler()); break; } Regards, Stefan Lecho. -- View this message in context: http://www.nabble.com/How-to-prevent- that-a-handler-is-invoked-for-all-services---tp17399366p17399366.html Sent from the Axis - User mailing list archive at Nabble.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] -- View this message in context: http://www.nabble.com/How-to-prevent-that-a-handler-is-invoked-for-all-services---tp17399366p17401691.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: SOAP Attachment Questions
You may want to look at the latest http://ws.apache.org/axis2/1_4/mtom-guide.html ~Thilina On Thu, May 22, 2008 at 3:43 PM, Virtual Light [EMAIL PROTECTED] wrote: Take a look at this: http://ws.apache.org/axis2/1_1/mtom-guide.html Regards, Bill -- Subject: SOAP Attachment Questions Date: Thu, 22 May 2008 10:13:33 -1000 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org 1) Is there an example on how to send a soap message with a binary attachment using MOTM in java for client and server side using Axis2? I found the one in the samples directory using SoapwithAttachments, but Im looking for same example but using MOTM. 2) Are there any examples using SwA and MOTM that gets a file from a web service, instead of sending a file to a webservice. (something similar to #1) The file must pass through contained within the soap response message. Sending a weblink is not appropriate for this application because of security constraints. Thanks! __ Marc Lefebvre, Principle Software Engineer Akimeka, 1305 N. Holopono Street, Kihei, HI 96753 Phone: (808)442-7168, Email: [EMAIL PROTECTED] echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: [Axis2] v1.4 - UnsupportedOperationException OMElementStreamWriter
) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.getProperty(MTOMXMLStreamWriter.java:265) at org.apache.axiom.om.impl.util.OMSerializerUtil.isSetPrefixBeforeStartElement(OMSerializerUtil.java:172) at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSerializerUtil.java:243) at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSerializerUtil.java:197) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:913) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947) at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:388) at com.xyz.framework.webServices.CalculationEngineWebService$ResultsOMDataSource.serialize(CalculationEngineWebService.java:341) ... 40 more -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Access denied message in Axis2
It seems like this is something specific to a eclipse plugin.. Try installing Axis2 in a separate servlet container like Tomcat and deploying your web services in there.. thanks, Thilina On Thu, May 15, 2008 at 5:21 AM, sandeep_khurana [EMAIL PROTECTED] wrote: I have made a webservice using Axis2 1.3 and the latest Axis2 1.4 and in both the cases I am running into some serious access denied exceptions. Description: I have made a simple webservice which has API's capable of accepting and returning byte arrays. I am using gSoapClient in c++ which communicates by sending xml soap messages. Basically I have to give some security permissions to this web application. Even after giving those permissions it is still throwing an exception saying: access: access denied (java.io.FilePermission C:\ \Java\workspace \.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyWebService\WEB-INF\services read) this log has been created on Eclipse by specifying enabling the debug option in tomcat 4.1. Sometimes it is also seen that it gives me the same exception for \WEB-INF\scriptServices read Please help me as I am unable to figure out this error even after googling it. Regards, Sandeep Singh. -- View this message in context: http://www.nabble.com/Access-denied-message-in-Axis2-tp17250115p17250115.html Sent from the Axis - User mailing list archive at Nabble.com. - 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: Problem in deploying .aar file
) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) 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:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: org.apache.axis2.deployment.DeploymentException: Processing Operations Modules ClassNotFoundException Error in loading message receiver samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: java.lang.ClassNotFoundException: samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: org.apache.axis2.deployment.DeploymentException: ClassNotFoundException Error in loading message receiver samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: java.lang.ClassNotFoundException: samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: org.apache.axis2.deployment.DeploymentException: Processing Operations Modules ClassNotFoundException Error in loading message receiver samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: java.lang.ClassNotFoundException: samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: org.apache.axis2.deployment.DeploymentException: ClassNotFoundException Error in loading message receiver samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: java.lang.ClassNotFoundException: samples.databinding.StockQuoteServiceMessageReceiverInOut at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:99) at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:133) ... 35 more Caused by: org.apache.axis2.deployment.DeploymentException: Processing Operations Modules ClassNotFoundException Error in loading message receiver samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: java.lang.ClassNotFoundException: samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: org.apache.axis2.deployment.DeploymentException: ClassNotFoundException Error in loading message receiver samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: java.lang.ClassNotFoundException: samples.databinding.StockQuoteServiceMessageReceiverInOut at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:332) at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:96) ... 37 more Caused by: org.apache.axis2.deployment.DeploymentException: ClassNotFoundException Error in loading message receiver samples.databinding.StockQuoteServiceMessageReceiverInOut; nested exception is: java.lang.ClassNotFoundException: samples.databinding.StockQuoteServiceMessageReceiverInOut at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:179) at org.apache.axis2.deployment.DescriptionBuilder.processMessageReceivers(DescriptionBuilder.java:155) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:200) ... 38 more Caused by: java.lang.ClassNotFoundException: samples.databinding.StockQuoteServiceMessageReceiverInOut at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.apache.axis2.util.Loader.loadClass(Loader.java:158) at org.apache.axis2.util.Loader.loadClass(Loader.java:130) at org.apache.axis2.deployment.DescriptionBuilder.loadMessageReceiver(DescriptionBuilder.java:175) ... 40 more -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe
Re: WSDL2Java
May be your wsdl file is malformed. Please validate your wsdl using a tool like eclipse wsdl validator. If possible post your wsdl file... thanks, Thilina On Mon, May 19, 2008 at 1:32 PM, skpathi [EMAIL PROTECTED] wrote: hi i am getting following exception while to generate a stub using WSDL2Java org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for WebServiceException! Any help is very much appreciated. Thanks Regards skpathi the command is java -cp C:\ccss\WA_PA_ST3\ProvOne\ProvOneComp\WAMMIS\JavaSource\LIB\axis-lib.jar org.apache.axis2.wsdl.WSDL2Java -d xmlbeans -o C:\TTMP\WS_CLIENTS\PA_SXC -p com.ecams.priorauth.handler.stub -uri C:\TTMP\WS_CLIENTS\PA_SXC\PARequestCreate.wsdl here is the stack trace C:\TTMP\WS_CLIENTS\PA_SXCjava -cp C:\ccss\WA_PA_ST3\ProvOne\ProvOneComp\WAMMIS\JavaSource\LIB\axis-lib.jar org.apache.axis2.wsdl.WSDL2Java -d xmlbeans -p com.ecams.priorauth.handler.stub -uri PARequestCreate.wsdl Retrieving document at 'exception.wsdl', relative to 'file:/C:/TTMP/WS_CLIENTS/PA_SXC/'. Retrieving schema at 'user_common.xsd', relative to 'file:/C:/TTMP/WS_CLIENTS/PA_SXC/'. Retrieving schema at 'sxc_common.xsd', relative to 'file:/C:/TTMP/WS_CLIENTS/PA_SXC/'. May 19, 2008 2:30:23 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity INFO: Resolving schema with publicId [http://common.webservice.sxc.com] and systemId [sxc_common.xsd] May 19, 2008 2:30:23 PM org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity INFO: Resolving schema with publicId [http://common.user.webservice.sxc.com] and systemId [user_common.xsd] Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for WebServiceException! at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for WebServiceException! at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:295) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:213) ... 2 more Caused by: java.lang.RuntimeException: Element QName is null for WebServiceException! at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultParamElements(AxisServiceBasedMultiLanguageEmitter.java:1864) at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultElement(AxisServiceBasedMultiLanguageEmitter.java:1795) at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:1546) at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:1463) at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForCallbackHandler(AxisServiceBasedMultiLanguageEmitter.java:688) at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeCallBackHandlers(AxisServiceBasedMultiLanguageEmitter.java:663) at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:270) ... 3 more C:\TTMP\WS_CLIENTS\PA_SXC -- View this message in context: http://www.nabble.com/WSDL2Java-tp17325168p17325168.html Sent from the Axis - User mailing list archive at Nabble.com. - 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: REST with Axis 2
Are you trying this by typing http://yourmachine:port/axis2/services/customerservice/getCustomer?id=foo in the browser or programatically... If it's the later, what do you get when you type that in the browser? Normally I experience this working directly from the browser without doing any configuration changes. Can you see the service wsdl in the following location.. http://yourmachine:port/axis2/services/customerservice?wsdl thanks, Thilina On Sun, May 18, 2008 at 2:04 PM, [EMAIL PROTECTED] wrote: Hello together, I have the problem, that I can not send HTTP requests without SOAP to my Axis2 Server. Im my axis2.xml I have configured the following: parameter name=enableRESTInAxis2MainServlet true/parameter parameter name=disableSeparateEndpointForRESTtrue/parameter parameter name=disableRESTfalse/parameter It's for getting REST and SOAP at the same Endpoint. Now I have a simple method like this : public String getCustomer(String id){ return id; } And this is the error returning from from the server: What does that means? org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) /axis2/services/customerservice/getCustomer at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:62) at org.apache.axis2.engine.Phase.invoke(Phase.java:308) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:125) at org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest(RESTUtil.java:78) at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processXMLRequest(AxisServlet.java:788) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:193) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Please, help me . It is very urgent for me to get started with REST ... Thanks a lot. Jörn -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using W3C DOM with Axis2
So, my question is, is it really true that W3C DOM-compliant factories are not completely implemented? These are mainly used by the Rampart module.. Looking at the TODO comment I think it's safe to assume that it's not fully completed. I wish this code returned an empty iterator rather than null.. If they are not implemented, I can try finishing them and submit a patch to JIRA, but I want to know if anyone is already working on this and what other pieces of functionality are not finished? Please open a Jira in Axiom component of the ws-commons and submit your patch.. ~Thilina -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error while invoking service method..
Please check the differences in the constructors (visibility public/private/protected... ? ) of your two web services. Make sure it's possible to create an object of the second web service class from out side the package and the inheritance hierarchy.. ~Thilina On Fri, May 16, 2008 at 2:01 PM, Minal Satpute [EMAIL PROTECTED] wrote: Hello All, I have build a two web services very similar to each other. First one is working ok but the second one giving an error. The stack trace is like following. Help will be really appreciated. [ERROR] Exception occurred while trying to invoke service method processCdr org.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.engine.DefaultObjectSupplier.getObject(DefaultObject Supplier.java:29) at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java :345) at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.ja va:655) at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.j ava:603) at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java :535) at org.apache.axis2.rpc.receivers.RPCUtil.processRequest(RPCUtil.java:15 3) at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.jav a:188) at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic (RPCMessageReceiver.java:98) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusines sLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMe ssageReceiver.java:96) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq uest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1 20) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p rocessConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo int.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol lowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ool.java:689) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.InstantiationException at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance (InstantiationExceptionConstructorAccessorImpl.java:30) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at org.apache.axis2.engine.DefaultObjectSupplier.getObject(DefaultObject Supplier.java:27) ... 28 more Regards, Minal Keep your kids safer online with Windows Live Family Safety. Help protect your kids. -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 webservice using MTOM/.NET client
Hi Andreas, I'm thinking of doing a simple test and figure out if there are any issues.. thanks, Thilina On Mon, May 5, 2008 at 2:37 AM, Roeder, Andreas [EMAIL PROTECTED] wrote: Dear Thilina, Do you have any other idea what could be the problem? It is also strange for me, that the SwA still appears. Best Regards, Andreas -Ursprüngliche Nachricht- Von: Roeder, Andreas Gesendet: Freitag, 2. Mai 2008 14:22 An: axis-user@ws.apache.org Betreff: AW: Axis2 webservice using MTOM/.NET client Yes, I do. -Ursprüngliche Nachricht- Von: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 2. Mai 2008 14:19 An: axis-user@ws.apache.org Betreff: Re: Axis2 webservice using MTOM/.NET client Are you using Axis2 1.3... thanks, Thilina On Fri, May 2, 2008 at 7:12 AM, Roeder, Andreas [EMAIL PROTECTED] wrote: Dear Thilina, The return type is a DataHandler. Basicly I do that at the end of the method: FileDataSource dataSource = new FileDataSource(saveFilename); DataHandler fileDataHandler = new DataHandler(dataSource); return fileDataHandler; So nothing special. Best Regards, Andreas -Ursprüngliche Nachricht- Von: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 2. Mai 2008 14:06 An: axis-user@ws.apache.org Betreff: Re: Axis2 webservice using MTOM/.NET client If possible can you post your service impl class... Does the retriveDocument has a return type of DataHandler or a class with a data handler variable with getter/setter... Wonder how SwA got in to the picture... swa:graph xmlns:swa=http://connector.centera.firstdata.de/xsd; swa:href=cid:urn:uuid:A55EF59 3CFE18862FB1209709362025 / thanks, Thilina On Fri, May 2, 2008 at 1:56 AM, Roeder, Andreas [EMAIL PROTECTED] wrote: Dear Thilina, Another thing I recognized is, that I don't have this line in my wsdl: xs:element minoccurs=0 name=return nillable=true type=xs:base64Binary Instead of this I got: xs:element name=return nillable=true type=xs:anyType / So, there might be something wrong I guess. Best Regards, Andreas -Ursprüngliche Nachricht- Von: Roeder, Andreas Gesendet: Freitag, 2. Mai 2008 08:28 An: 'axis-user@ws.apache.org' Betreff: AW: Axis2 webservice using MTOM/.NET client Dear Thilina, I was able to fix the SoapException. I just changed the services.xml file to: service name=CenteraWS parameter name=ServiceClassde.firstdata.centera.connector.Connector/parameter operation name=storeDocument messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ actionMappingurn:storeDocument/actionMapping /operation operation name=retrieveDocument messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ actionMappingurn:retrieveDocument/actionMapping /operation parameter name=enableMTOMtrue/parameter /service But now the only thing I receive on the .NET client side is the following XML string: swa:graph xmlns:swa=http://connector.centera.firstdata.de/xsd; swa:href=cid:urn:uuid:A55EF593CFE18862FB1209709362025 / How am I able to receive the File or byte stream? Best Regards, Andreas -Ursprüngliche Nachricht- Von: Roeder, Andreas Gesendet: Freitag, 2. Mai 2008 07:56 An: 'axis-user@ws.apache.org' Betreff: AW: Axis2 webservice using MTOM/.NET client Dear Thilina, Thank you very much for your response. I just tried the quick dirty way (my method name is retrieveDocument) and I got a SoapException on the .NET client side: Message Receiver not found for AxisOperation: retrieveDocument Do I need a axis2 library on the client side? Best Regards, Andreas -Ursprüngliche Nachricht- Von: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 1. Mai 2008 02:22 An: axis-user@ws.apache.org Betreff: Re: Axis2 webservice using MTOM/.NET client Hi, Axis2 release contains a MTOM sample web service and a client which sends files to the service. Download the binary distribution and you can find it in the samples folder.. You can try creating a client for that using the given wsdl.. Let us know if you need anything more.. thanks, Thilina PS: If you need to do it in quick dirty way, check http://thilinag.blogspot.com/2008/04/download-file-from-axis2-web-service.html On Wed, Apr 30, 2008 at 4:26 AM, Roeder, Andreas [EMAIL PROTECTED] wrote: Hi everybody, I'm just started to use Axis2 for developing a webservice. So I'm just a bloody beginner ;-) I want to send and receive files via an Axis2 webservice to/from a .NET client written in C#. Now I red serveral times that the Web Service Enhancements (WSE) 3.0 of .NET and Axis2 both support MTOM. Unfortunately I cannot find samples how get it implemented. Could someone provide me some code for doing that? Thank you in advance. Best Regards, Andreas
Re: Axis2 webservice using MTOM/.NET client
If possible can you post your service impl class... Does the retriveDocument has a return type of DataHandler or a class with a data handler variable with getter/setter... Wonder how SwA got in to the picture... swa:graph xmlns:swa=http://connector.centera.firstdata.de/xsd; swa:href=cid:urn:uuid:A55EF593CFE18862FB1209709362025 / thanks, Thilina On Fri, May 2, 2008 at 1:56 AM, Roeder, Andreas [EMAIL PROTECTED] wrote: Dear Thilina, Another thing I recognized is, that I don't have this line in my wsdl: xs:element minoccurs=0 name=return nillable=true type=xs:base64Binary Instead of this I got: xs:element name=return nillable=true type=xs:anyType / So, there might be something wrong I guess. Best Regards, Andreas -Ursprüngliche Nachricht- Von: Roeder, Andreas Gesendet: Freitag, 2. Mai 2008 08:28 An: 'axis-user@ws.apache.org' Betreff: AW: Axis2 webservice using MTOM/.NET client Dear Thilina, I was able to fix the SoapException. I just changed the services.xml file to: service name=CenteraWS parameter name=ServiceClassde.firstdata.centera.connector.Connector/parameter operation name=storeDocument messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ actionMappingurn:storeDocument/actionMapping /operation operation name=retrieveDocument messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ actionMappingurn:retrieveDocument/actionMapping /operation parameter name=enableMTOMtrue/parameter /service But now the only thing I receive on the .NET client side is the following XML string: swa:graph xmlns:swa=http://connector.centera.firstdata.de/xsd; swa:href=cid:urn:uuid:A55EF593CFE18862FB1209709362025 / How am I able to receive the File or byte stream? Best Regards, Andreas -Ursprüngliche Nachricht- Von: Roeder, Andreas Gesendet: Freitag, 2. Mai 2008 07:56 An: 'axis-user@ws.apache.org' Betreff: AW: Axis2 webservice using MTOM/.NET client Dear Thilina, Thank you very much for your response. I just tried the quick dirty way (my method name is retrieveDocument) and I got a SoapException on the .NET client side: Message Receiver not found for AxisOperation: retrieveDocument Do I need a axis2 library on the client side? Best Regards, Andreas -Ursprüngliche Nachricht- Von: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 1. Mai 2008 02:22 An: axis-user@ws.apache.org Betreff: Re: Axis2 webservice using MTOM/.NET client Hi, Axis2 release contains a MTOM sample web service and a client which sends files to the service. Download the binary distribution and you can find it in the samples folder.. You can try creating a client for that using the given wsdl.. Let us know if you need anything more.. thanks, Thilina PS: If you need to do it in quick dirty way, check http://thilinag.blogspot.com/2008/04/download-file-from-axis2-web-service.html On Wed, Apr 30, 2008 at 4:26 AM, Roeder, Andreas [EMAIL PROTECTED] wrote: Hi everybody, I'm just started to use Axis2 for developing a webservice. So I'm just a bloody beginner ;-) I want to send and receive files via an Axis2 webservice to/from a .NET client written in C#. Now I red serveral times that the Web Service Enhancements (WSE) 3.0 of .NET and Axis2 both support MTOM. Unfortunately I cannot find samples how get it implemented. Could someone provide me some code for doing that? Thank you in advance. Best Regards, Andreas -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Axis2 webservice using MTOM/.NET client
Are you using Axis2 1.3... thanks, Thilina On Fri, May 2, 2008 at 7:12 AM, Roeder, Andreas [EMAIL PROTECTED] wrote: Dear Thilina, The return type is a DataHandler. Basicly I do that at the end of the method: FileDataSource dataSource = new FileDataSource(saveFilename); DataHandler fileDataHandler = new DataHandler(dataSource); return fileDataHandler; So nothing special. Best Regards, Andreas -Ursprüngliche Nachricht- Von: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 2. Mai 2008 14:06 An: axis-user@ws.apache.org Betreff: Re: Axis2 webservice using MTOM/.NET client If possible can you post your service impl class... Does the retriveDocument has a return type of DataHandler or a class with a data handler variable with getter/setter... Wonder how SwA got in to the picture... swa:graph xmlns:swa=http://connector.centera.firstdata.de/xsd; swa:href=cid:urn:uuid:A55EF59 3CFE18862FB1209709362025 / thanks, Thilina On Fri, May 2, 2008 at 1:56 AM, Roeder, Andreas [EMAIL PROTECTED] wrote: Dear Thilina, Another thing I recognized is, that I don't have this line in my wsdl: xs:element minoccurs=0 name=return nillable=true type=xs:base64Binary Instead of this I got: xs:element name=return nillable=true type=xs:anyType / So, there might be something wrong I guess. Best Regards, Andreas -Ursprüngliche Nachricht- Von: Roeder, Andreas Gesendet: Freitag, 2. Mai 2008 08:28 An: 'axis-user@ws.apache.org' Betreff: AW: Axis2 webservice using MTOM/.NET client Dear Thilina, I was able to fix the SoapException. I just changed the services.xml file to: service name=CenteraWS parameter name=ServiceClassde.firstdata.centera.connector.Connector/parameter operation name=storeDocument messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ actionMappingurn:storeDocument/actionMapping /operation operation name=retrieveDocument messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ actionMappingurn:retrieveDocument/actionMapping /operation parameter name=enableMTOMtrue/parameter /service But now the only thing I receive on the .NET client side is the following XML string: swa:graph xmlns:swa=http://connector.centera.firstdata.de/xsd; swa:href=cid:urn:uuid:A55EF593CFE18862FB1209709362025 / How am I able to receive the File or byte stream? Best Regards, Andreas -Ursprüngliche Nachricht- Von: Roeder, Andreas Gesendet: Freitag, 2. Mai 2008 07:56 An: 'axis-user@ws.apache.org' Betreff: AW: Axis2 webservice using MTOM/.NET client Dear Thilina, Thank you very much for your response. I just tried the quick dirty way (my method name is retrieveDocument) and I got a SoapException on the .NET client side: Message Receiver not found for AxisOperation: retrieveDocument Do I need a axis2 library on the client side? Best Regards, Andreas -Ursprüngliche Nachricht- Von: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 1. Mai 2008 02:22 An: axis-user@ws.apache.org Betreff: Re: Axis2 webservice using MTOM/.NET client Hi, Axis2 release contains a MTOM sample web service and a client which sends files to the service. Download the binary distribution and you can find it in the samples folder.. You can try creating a client for that using the given wsdl.. Let us know if you need anything more.. thanks, Thilina PS: If you need to do it in quick dirty way, check http://thilinag.blogspot.com/2008/04/download-file-from-axis2-web-service.html On Wed, Apr 30, 2008 at 4:26 AM, Roeder, Andreas [EMAIL PROTECTED] wrote: Hi everybody, I'm just started to use Axis2 for developing a webservice. So I'm just a bloody beginner ;-) I want to send and receive files via an Axis2 webservice to/from a .NET client written in C#. Now I red serveral times that the Web Service Enhancements (WSE) 3.0 of .NET and Axis2 both support MTOM. Unfortunately I cannot find samples how get it implemented. Could someone provide me some code for doing that? Thank you in advance. Best Regards, Andreas -- Thilina Gunarathne - http://thilinag.blogspot.com - 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] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Axis2 - MTOM Sample error
Did you try the generate.client target in the build.. It is suppose to generate the client stubs.. Please log a jira if generate.client is not generating the client stubs.. thanks, Thilina On Fri, May 2, 2008 at 11:29 AM, PR, Rajesh (GE Infra, Energy, Non-GE) [EMAIL PROTECTED] wrote: One small feedback. The Mtom sample build file doesnt generate the client stubs. i had to add -g option to build file to get the stubs Thanks Rajesh -- *From:* PR, Rajesh (GE Infra, Energy, Non-GE) *Sent:* Friday, May 02, 2008 11:52 AM *To:* axis-user@ws.apache.org *Subject:* RE: Axis2 - MTOM Sample error Thanks a lot. i made a clean build from scratch again. i dont know what was causing the issue. Downloaded ant, axis2 1.3 fresh and set it up. am able to build now. Thanks a lot for the support - Rajesh -- *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Thursday, May 01, 2008 11:52 PM *To:* axis-user@ws.apache.org *Subject:* Re: Axis2 - MTOM Sample error That ant build uses wsdl2java... I'm not sure why it prints out wsdl2code options... Can you confirm that your are using axis2-1.3 binary distribution without any changes to the build script or the directory hierarchy of the extracted dist... See the following and check whether your build file have any other modifications.. http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/mtom/build.xml?view=markup Also check the following build script from another sample... It has the -d adb option in it.. http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/quickstartadb/build.xml?view=markup ~Thilina On Thu, May 1, 2008 at 9:30 PM, PR, Rajesh (GE Infra, Energy, Non-GE) [EMAIL PROTECTED] wrote: Hi, am using the ant build thats provided with the sample. i added the option -d adb. But the WSDl2Java am using doesnt have this option. am using Axis2 1.3. Following are the only options i have *generate.service*: [*java*] Usage WSDL2Code -uri Location of WSDL :WSDL file location [*java*] -o output Location : output file location [*java*] -a : Generate async style code only. Default if off [*java*] -s : Generate sync style code only. Default if off. takes precedence over -a [*java*] -p package name : set custom package name [*java*] -l language : valid languages are java and csharp. Default is java [*java*] -t : Generate TestCase to test the generated code [*java*] -ss : Generate server side code (i.e. skeletons).Default is off [*java*] -sd : Generate service descriptor (i.e. axis2.xml).Default is off.Valid with -ss Requesting Help me with this issue. Am trying to use Axis2 for file transfer using MTOM Thanks Rajesh -- *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Thursday, May 01, 2008 10:06 PM *To:* axis-user@ws.apache.org *Subject:* Re: Axis2 - MTOM Sample error Hi, MTOM sample comes with XMIME.xsd and has a schema import to that from the wsdl... Are you using the standard ant build provided with the sample... The sample is supposed to be code generated using ADB as XMLBeans does not have full support for MTOM... The ant build is written to use the Axis2's default data binding, which is ADB... Try adding a the following line to the generate.service generate.client targets in the ant build.. java classname=org.apache.axis2.wsdl.WSDL2Java . *arg line=-d adb/* /java thanks, Thilina am getting the following error, when i try to build the mtom sample which comes with Axis2 - Version 1.3 Exception in thread main java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Could not load resource xmime.xsd (network downloads disabled). at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:103) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:79) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22) Caused by: org.apache.xmlbeans.XmlException: error: Could not load resource xmime.xsd (network downloads disabled). at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225) 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:324) at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667) at org.apache.axis2
Re: Axis2 - MTOM Sample error
Hi, MTOM sample comes with XMIME.xsd and has a schema import to that from the wsdl... Are you using the standard ant build provided with the sample... The sample is supposed to be code generated using ADB as XMLBeans does not have full support for MTOM... The ant build is written to use the Axis2's default data binding, which is ADB... Try adding a the following line to the generate.service generate.client targets in the ant build.. java classname=org.apache.axis2.wsdl.WSDL2Java . *arg line=-d adb/* /java thanks, Thilina am getting the following error, when i try to build the mtom sample which comes with Axis2 - Version 1.3 Exception in thread main java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Could not load resource xmime.xsd (network downloads disabled). at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:103) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:79) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22) Caused by: org.apache.xmlbeans.XmlException: error: Could not load resource xmime.xsd (network downloads disabled). at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225) 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:324) at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667) at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:69) ... 3 more Please help me. This is the base for a new project am building Thanks *Rajesh* * == This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that you have received this transmittal and any attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank (USA), Mizuho Securities USA Inc. or any other affiliates of Mizuho Financial Group (Mizuho). Mizuho accepts no responsibility for the accuracy or completeness of any information herein contained. E-Mail received by or sent from officer of Mizuho Securities USA Inc. (which is a registered U.S. broker-dealer and the entity through which Mizuho generally conducts its investment banking, capital markets, and securities business in the United States) is electronically archived and recorded and is subject to review and monitoring by and/or disclosure to persons other than the recipient, including (but not limited to) Mizuho Securities USA Inc. supervisory personnel. Such communications may be produced to regulatory authorities or others with legal rights to the information.* - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Axis2 - MTOM Sample error
I suggested the following as your stacktrace shows it's using XMLBeans for data binding.. On Thu, May 1, 2008 at 9:05 PM, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, MTOM sample comes with XMIME.xsd and has a schema import to that from the wsdl... Are you using the standard ant build provided with the sample... The sample is supposed to be code generated using ADB as XMLBeans does not have full support for MTOM... The ant build is written to use the Axis2's default data binding, which is ADB... Try adding a the following line to the generate.service generate.client targets in the ant build.. java classname=org.apache.axis2.wsdl.WSDL2Java . *arg line=-d adb/* /java thanks, Thilina am getting the following error, when i try to build the mtom sample which comes with Axis2 - Version 1.3 Exception in thread main java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Could not load resource xmime.xsd (network downloads disabled). at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:103) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:79) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22) Caused by: org.apache.xmlbeans.XmlException: error: Could not load resource xmime.xsd (network downloads disabled). at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225) 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:324) at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667) at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:69) ... 3 more Please help me. This is the base for a new project am building Thanks *Rajesh* * == This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that you have received this transmittal and any attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank (USA), Mizuho Securities USA Inc. or any other affiliates of Mizuho Financial Group (Mizuho). Mizuho accepts no responsibility for the accuracy or completeness of any information herein contained. E-Mail received by or sent from officer of Mizuho Securities USA Inc. (which is a registered U.S. broker-dealer and the entity through which Mizuho generally conducts its investment banking, capital markets, and securities business in the United States) is electronically archived and recorded and is subject to review and monitoring by and/or disclosure to persons other than the recipient, including (but not limited to) Mizuho Securities USA Inc. supervisory personnel. Such communications may be produced to regulatory authorities or others with legal rights to the information.* - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Axis2 webservice using MTOM/.NET client
Hi, Axis2 release contains a MTOM sample web service and a client which sends files to the service. Download the binary distribution and you can find it in the samples folder.. You can try creating a client for that using the given wsdl.. Let us know if you need anything more.. thanks, Thilina PS: If you need to do it in quick dirty way, check http://thilinag.blogspot.com/2008/04/download-file-from-axis2-web-service.html On Wed, Apr 30, 2008 at 4:26 AM, Roeder, Andreas [EMAIL PROTECTED] wrote: Hi everybody, I'm just started to use Axis2 for developing a webservice. So I'm just a bloody beginner ;-) I want to send and receive files via an Axis2 webservice to/from a .NET client written in C#. Now I red serveral times that the Web Service Enhancements (WSE) 3.0 of .NET and Axis2 both support MTOM. Unfortunately I cannot find samples how get it implemented. Could someone provide me some code for doing that? Thank you in advance. Best Regards, Andreas -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Swa webservice behave different in tomcat web app and axis2 standalone server.
Oh..Yeah... SOAPMonitor eats up the attachments.. It's always good to use the TCPmon when testing attachments.. But even tcpmon chokes when using large attachments, so make sure to use smaller attachments for testing... ~Thilina On Fri, Apr 18, 2008 at 1:08 PM, Jinyuan Zhou [EMAIL PROTECTED] wrote: Thanks Thilina, I used a new axi2-war. It worked. The only differences I can remember for myprevious aix2 web app is that I configured the soap mionitor on and enabled the SwA in the axis2.xml. With TCPMon, I don't need SOAPMonitor. My be thats the reason axis2 1.3 does not contain a soapmonitor jar file. Regards, Jack On Wed, Apr 16, 2008 at 10:45 PM, Jinyuan Zhou [EMAIL PROTECTED] wrote: Thanks for you time, I will try to that again and post my result when i am done. Jack On Wed, Apr 16, 2008 at 1:15 PM, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, IIRC I tested that tutorial code with tomcat... I'm guessing something is going wrong in your system... Let's try to figure it out exactly.. The client side was't able to find the attachment althought the correct envelop was arrived.. Did you mean you got the correct soap message together with the attachment from the server?? Can you capture a message snapshot using tcpmon (http://ws.apache.org/commons/tcpmon) and see whether you have the MIME part for the attachment.. It would be great if you can post it here.. thanks, Thilina I am using axis 2-1.3. My own arr has the similar behavior. It seems that the all samples and tutorial sare based on Stand alone server, I just want see any one had the simliar experiences to deploy an aar into tomcat and was able to include an attachment in the response message to client. Thanks, Jack On Wed, Apr 16, 2008 at 7:39 AM, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, Just a quick reply... The sample used in the following tutorial is based on Tomcat deployment.. Downloading a Binary File from a Web Service using Axis2 and SOAP with Attachments - http://wso2.org/library/1675 Also are you using the same axis2 version in both cases.. thanks, Thilina On 4/16/08, Jinyuan Zhou [EMAIL PROTECTED] wrote: Thank Thilina, There are no error message. The usual soap request/response goes well. I also tried to deploy the one arr file from a tutorial. Same thing happend. I just don't get it. I have build aar file using the standalone server's lib. I'll try to build uisng the jar in WEB_INF/lib. See it will work. I wonder if DataHandler classes are different? It looks like all examples and tutorials are based on stand alone server. Regards, Jack On Tue, Apr 15, 2008 at 8:20 PM, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, Can you let us know more information, like any error messages, message traces... thanks, Thilina On Tue, Apr 15, 2008 at 8:58 PM, Jinyuan Zhou [EMAIL PROTECTED] wrote: Hi, I have developed a websevice that will include an attachment to the client. It worked in the standalone server not inside tomcat's webapp. I have parameter name=enableSwAtrue/parameter in the service.xml inside arr file. Inside tomcat server, I also have this line in the ${CATLINA_HOME}/webapps/myapp/WEB-INF/conf/axis2.xml. What I am missing? Thanks for you time, Jack -- Thilina Gunarathne - http://thilinag.blogspot.com -- Some people lived like they will never die and died like they have never lived -- Thilina Gunarathne - http://thilinag.blogspot.com -- Some people lived like they will never die and died like they have never lived -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Some people lived like they will never die and died like they have never lived -- Some people lived like they will never die and died like they have never lived -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Swa webservice behave different in tomcat web app and axis2 standalone server.
Hi, Just a quick reply... The sample used in the following tutorial is based on Tomcat deployment.. Downloading a Binary File from a Web Service using Axis2 and SOAP with Attachments - http://wso2.org/library/1675 Also are you using the same axis2 version in both cases.. thanks, Thilina On 4/16/08, Jinyuan Zhou [EMAIL PROTECTED] wrote: Thank Thilina, There are no error message. The usual soap request/response goes well. I also tried to deploy the one arr file from a tutorial. Same thing happend. I just don't get it. I have build aar file using the standalone server's lib. I'll try to build uisng the jar in WEB_INF/lib. See it will work. I wonder if DataHandler classes are different? It looks like all examples and tutorials are based on stand alone server. Regards, Jack On Tue, Apr 15, 2008 at 8:20 PM, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, Can you let us know more information, like any error messages, message traces... thanks, Thilina On Tue, Apr 15, 2008 at 8:58 PM, Jinyuan Zhou [EMAIL PROTECTED] wrote: Hi, I have developed a websevice that will include an attachment to the client. It worked in the standalone server not inside tomcat's webapp. I have parameter name=enableSwAtrue/parameter in the service.xml inside arr file. Inside tomcat server, I also have this line in the ${CATLINA_HOME}/webapps/myapp/WEB-INF/conf/axis2.xml. What I am missing? Thanks for you time, Jack -- Thilina Gunarathne - http://thilinag.blogspot.com -- Some people lived like they will never die and died like they have never lived -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Swa webservice behave different in tomcat web app and axis2 standalone server.
Hi, IIRC I tested that tutorial code with tomcat... I'm guessing something is going wrong in your system... Let's try to figure it out exactly.. The client side was't able to find the attachment althought the correct envelop was arrived.. Did you mean you got the correct soap message together with the attachment from the server?? Can you capture a message snapshot using tcpmon (http://ws.apache.org/commons/tcpmon) and see whether you have the MIME part for the attachment.. It would be great if you can post it here.. thanks, Thilina I am using axis 2-1.3. My own arr has the similar behavior. It seems that the all samples and tutorial sare based on Stand alone server, I just want see any one had the simliar experiences to deploy an aar into tomcat and was able to include an attachment in the response message to client. Thanks, Jack On Wed, Apr 16, 2008 at 7:39 AM, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, Just a quick reply... The sample used in the following tutorial is based on Tomcat deployment.. Downloading a Binary File from a Web Service using Axis2 and SOAP with Attachments - http://wso2.org/library/1675 Also are you using the same axis2 version in both cases.. thanks, Thilina On 4/16/08, Jinyuan Zhou [EMAIL PROTECTED] wrote: Thank Thilina, There are no error message. The usual soap request/response goes well. I also tried to deploy the one arr file from a tutorial. Same thing happend. I just don't get it. I have build aar file using the standalone server's lib. I'll try to build uisng the jar in WEB_INF/lib. See it will work. I wonder if DataHandler classes are different? It looks like all examples and tutorials are based on stand alone server. Regards, Jack On Tue, Apr 15, 2008 at 8:20 PM, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, Can you let us know more information, like any error messages, message traces... thanks, Thilina On Tue, Apr 15, 2008 at 8:58 PM, Jinyuan Zhou [EMAIL PROTECTED] wrote: Hi, I have developed a websevice that will include an attachment to the client. It worked in the standalone server not inside tomcat's webapp. I have parameter name=enableSwAtrue/parameter in the service.xml inside arr file. Inside tomcat server, I also have this line in the ${CATLINA_HOME}/webapps/myapp/WEB-INF/conf/axis2.xml. What I am missing? Thanks for you time, Jack -- Thilina Gunarathne - http://thilinag.blogspot.com -- Some people lived like they will never die and died like they have never lived -- Thilina Gunarathne - http://thilinag.blogspot.com -- Some people lived like they will never die and died like they have never lived -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Swa webservice behave different in tomcat web app and axis2 standalone server.
Hi, Can you let us know more information, like any error messages, message traces... thanks, Thilina On Tue, Apr 15, 2008 at 8:58 PM, Jinyuan Zhou [EMAIL PROTECTED] wrote: Hi, I have developed a websevice that will include an attachment to the client. It worked in the standalone server not inside tomcat's webapp. I have parameter name=enableSwAtrue/parameter in the service.xml inside arr file. Inside tomcat server, I also have this line in the ${CATLINA_HOME}/webapps/myapp/WEB-INF/conf/axis2.xml. What I am missing? Thanks for you time, Jack -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: service.xml and mtom
xs:element name=uploadMarketplace xs:complexType xs:sequence xs:element minOccurs=0 name=dh nillable=true type=xs:base64Binary/ Since you have base64Binary in your request message, this WSDL should generated clients with MTOM support... ~Thilina xs:element minOccurs=0 name=Marketplace nillable=true type=xs:string/ /xs:sequence /xs:complexType /xs:element wsdl:message name=uploadMarketplaceRequest wsdl:part name=parameters element=ns0:uploadMarketplace/ /wsdl:message wsdl:message name=uploadMarketplaceResponse wsdl:part name=parameters element=ns0:uploadMarketplaceResponse/ /wsdl:message ... ... wsdl:operation name=uploadMarketplace wsdl:input message=ns0:uploadMarketplaceRequest wsaw:Action=urn:uploadMarketplace/ wsdl:output message=ns0:uploadMarketplaceResponse wsaw:Action=urn:uploadMarketplaceResponse/ wsdl:fault message=ns0:Exception name=Exception wsaw:Action=urn:uploadMarketplaceException/ /wsdl:operation ... ... wsdl:operation name=uploadMarketplace soap:operation soapAction=urn:uploadMarketplace style=document/ wsdl:input soap:body use=literal/ /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output wsdl:fault name=Exception soap:fault use=literal name=Exception/ /wsdl:fault /wsdl:operation ... ... wsdl:operation name=uploadMarketplace soap12:operation soapAction=urn:uploadMarketplace style=document/ wsdl:input soap12:body use=literal/ /wsdl:input wsdl:output soap12:body use=literal/ /wsdl:output wsdl:fault name=Exception soap12:fault use=literal name=Exception/ /wsdl:fault /wsdl:operation ... ... wsdl:operation name=uploadMarketplace http:operation location=MarketplaceService/uploadMarketplace/ wsdl:input mime:content type=text/xml part=uploadMarketplace/ /wsdl:input wsdl:output mime:content type=text/xml part=uploadMarketplace/ /wsdl:output /wsdl:operation Thank you. Mikelantonio 2008/4/11, Thilina Gunarathne [EMAIL PROTECTED]: Here you go... http://ws.apache.org/axis2/1_3/pojoguide.html Just change one method in the service as follows... public float getTemperature(DataHandler dataHandler){ ~Thilina On Fri, Apr 11, 2008 at 12:21 PM, Michelantonio Trizio [EMAIL PROTECTED] wrote: No. It doesn't contain base64binary. I'd like to know, if exists, a method to generate the right wsdl from the service class and service.xml file. You had said this: then you would need to deploy a pojo service using the RPCMessageReceiver with methods having DataHandlers as the parameters or the return values Can you give me an exampe of one RPCMessageReceiver done as you said. Thank you. Mikelantonio 2008/4/11, Thilina Gunarathne [EMAIL PROTECTED]: Can you post your generated WSDL... Does it contain a base64Binary field... ~Thilina On Fri, Apr 11, 2008 at 11:50 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: Hi, I know that my wsdl doesn't work. I write the service in bottom up way. First I write the service class and the service.xml. Than I deploy the service to tomcat and get the self generated wsdl. From this wdsl I create the service stub. Do I need to use another process? Thank you. Mikelantonio p.s. I've seen this link www.apache.org/axis2/1_3/mtom-guide.html#31 but I don't understand what I shall to do 2008/4/11, Thilina Gunarathne [EMAIL PROTECTED]: Can you post the wsdl... It the service also authored by you.. thanks, Thilina On Fri, Apr 11, 2008 at 10:00 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: thank you, I'm using eclipse to generate the stubs. I want obtain this classes: AttachmentRequest attachmentRequest = new AttachmentRequest(); AttachmentType attachmentType = new AttachmentType(); Base64Binary base64Binary = new Base64Binary(); How can I do? Thank you. Mikelantonio 2008/4/11, Thilina Gunarathne [EMAIL PROTECTED]: Hi, Are you looking for a way to enable MTOM in a per service basis... For that you can add the following to your services.xml under the service element.. parameter name=enableMTOM locked=falsetrue/parameter If you are looking for a way to generate a WSDL with base64Binary fields (MTOM equivalent), then you would need to deploy a pojo service using the RPCMessageReceiver with methods having DataHandlers as the parameters or the return values. Nothing special is needed in the services.xml... thanks, Thilina
Re: service.xml and mtom
Hi, Are you looking for a way to enable MTOM in a per service basis... For that you can add the following to your services.xml under the service element.. parameter name=enableMTOM locked=falsetrue/parameter If you are looking for a way to generate a WSDL with base64Binary fields (MTOM equivalent), then you would need to deploy a pojo service using the RPCMessageReceiver with methods having DataHandlers as the parameters or the return values. Nothing special is needed in the services.xml... thanks, Thilina On Fri, Apr 11, 2008 at 6:58 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: Hi, I'd like to know what I should write in the service.xml for having the right wsdl with MTOM parameter. Thank you. Mikelantonio -- It's creepy, but here we are, the Pilgrims, the crackpots of our time, trying to establish our own alternate reality. To build a world out of rocks and chaos. What it's going to be, I don't know. Even after all that rushing around, where we've ended up is the middle of nowhere in the middle of the night. And maybe knowing isn't the point. Where we're standing right now, in the ruins in the dark, what we build could be anything. [Choke - Chuck Palahniuk] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: service.xml and mtom
Can you post the wsdl... It the service also authored by you.. thanks, Thilina On Fri, Apr 11, 2008 at 10:00 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: thank you, I'm using eclipse to generate the stubs. I want obtain this classes: AttachmentRequest attachmentRequest = new AttachmentRequest(); AttachmentType attachmentType = new AttachmentType(); Base64Binary base64Binary = new Base64Binary(); How can I do? Thank you. Mikelantonio 2008/4/11, Thilina Gunarathne [EMAIL PROTECTED]: Hi, Are you looking for a way to enable MTOM in a per service basis... For that you can add the following to your services.xml under the service element.. parameter name=enableMTOM locked=falsetrue/parameter If you are looking for a way to generate a WSDL with base64Binary fields (MTOM equivalent), then you would need to deploy a pojo service using the RPCMessageReceiver with methods having DataHandlers as the parameters or the return values. Nothing special is needed in the services.xml... thanks, Thilina On Fri, Apr 11, 2008 at 6:58 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: Hi, I'd like to know what I should write in the service.xml for having the right wsdl with MTOM parameter. Thank you. Mikelantonio -- It's creepy, but here we are, the Pilgrims, the crackpots of our time, trying to establish our own alternate reality. To build a world out of rocks and chaos. What it's going to be, I don't know. Even after all that rushing around, where we've ended up is the middle of nowhere in the middle of the night. And maybe knowing isn't the point. Where we're standing right now, in the ruins in the dark, what we build could be anything. [Choke - Chuck Palahniuk] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- It's creepy, but here we are, the Pilgrims, the crackpots of our time, trying to establish our own alternate reality. To build a world out of rocks and chaos. What it's going to be, I don't know. Even after all that rushing around, where we've ended up is the middle of nowhere in the middle of the night. And maybe knowing isn't the point. Where we're standing right now, in the ruins in the dark, what we build could be anything. [Choke - Chuck Palahniuk] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: service.xml and mtom
Can you post your generated WSDL... Does it contain a base64Binary field... ~Thilina On Fri, Apr 11, 2008 at 11:50 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: Hi, I know that my wsdl doesn't work. I write the service in bottom up way. First I write the service class and the service.xml. Than I deploy the service to tomcat and get the self generated wsdl. From this wdsl I create the service stub. Do I need to use another process? Thank you. Mikelantonio p.s. I've seen this link www.apache.org/axis2/1_3/mtom-guide.html#31 but I don't understand what I shall to do 2008/4/11, Thilina Gunarathne [EMAIL PROTECTED]: Can you post the wsdl... It the service also authored by you.. thanks, Thilina On Fri, Apr 11, 2008 at 10:00 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: thank you, I'm using eclipse to generate the stubs. I want obtain this classes: AttachmentRequest attachmentRequest = new AttachmentRequest(); AttachmentType attachmentType = new AttachmentType(); Base64Binary base64Binary = new Base64Binary(); How can I do? Thank you. Mikelantonio 2008/4/11, Thilina Gunarathne [EMAIL PROTECTED]: Hi, Are you looking for a way to enable MTOM in a per service basis... For that you can add the following to your services.xml under the service element.. parameter name=enableMTOM locked=falsetrue/parameter If you are looking for a way to generate a WSDL with base64Binary fields (MTOM equivalent), then you would need to deploy a pojo service using the RPCMessageReceiver with methods having DataHandlers as the parameters or the return values. Nothing special is needed in the services.xml... thanks, Thilina On Fri, Apr 11, 2008 at 6:58 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: Hi, I'd like to know what I should write in the service.xml for having the right wsdl with MTOM parameter. Thank you. Mikelantonio -- It's creepy, but here we are, the Pilgrims, the crackpots of our time, trying to establish our own alternate reality. To build a world out of rocks and chaos. What it's going to be, I don't know. Even after all that rushing around, where we've ended up is the middle of nowhere in the middle of the night. And maybe knowing isn't the point. Where we're standing right now, in the ruins in the dark, what we build could be anything. [Choke - Chuck Palahniuk] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- It's creepy, but here we are, the Pilgrims, the crackpots of our time, trying to establish our own alternate reality. To build a world out of rocks and chaos. What it's going to be, I don't know. Even after all that rushing around, where we've ended up is the middle of nowhere in the middle of the night. And maybe knowing isn't the point. Where we're standing right now, in the ruins in the dark, what we build could be anything. [Choke - Chuck Palahniuk] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- It's creepy, but here we are, the Pilgrims, the crackpots of our time, trying to establish our own alternate reality. To build a world out of rocks and chaos. What it's going to be, I don't know. Even after all that rushing around, where we've ended up is the middle of nowhere in the middle of the night. And maybe knowing isn't the point. Where we're standing right now, in the ruins in the dark, what we build could be anything. [Choke - Chuck Palahniuk] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: service.xml and mtom
Here you go... http://ws.apache.org/axis2/1_3/pojoguide.html Just change one method in the service as follows... public float getTemperature(DataHandler dataHandler){ ~Thilina On Fri, Apr 11, 2008 at 12:21 PM, Michelantonio Trizio [EMAIL PROTECTED] wrote: No. It doesn't contain base64binary. I'd like to know, if exists, a method to generate the right wsdl from the service class and service.xml file. You had said this: then you would need to deploy a pojo service using the RPCMessageReceiver with methods having DataHandlers as the parameters or the return values Can you give me an exampe of one RPCMessageReceiver done as you said. Thank you. Mikelantonio 2008/4/11, Thilina Gunarathne [EMAIL PROTECTED]: Can you post your generated WSDL... Does it contain a base64Binary field... ~Thilina On Fri, Apr 11, 2008 at 11:50 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: Hi, I know that my wsdl doesn't work. I write the service in bottom up way. First I write the service class and the service.xml. Than I deploy the service to tomcat and get the self generated wsdl. From this wdsl I create the service stub. Do I need to use another process? Thank you. Mikelantonio p.s. I've seen this link www.apache.org/axis2/1_3/mtom-guide.html#31 but I don't understand what I shall to do 2008/4/11, Thilina Gunarathne [EMAIL PROTECTED]: Can you post the wsdl... It the service also authored by you.. thanks, Thilina On Fri, Apr 11, 2008 at 10:00 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: thank you, I'm using eclipse to generate the stubs. I want obtain this classes: AttachmentRequest attachmentRequest = new AttachmentRequest(); AttachmentType attachmentType = new AttachmentType(); Base64Binary base64Binary = new Base64Binary(); How can I do? Thank you. Mikelantonio 2008/4/11, Thilina Gunarathne [EMAIL PROTECTED]: Hi, Are you looking for a way to enable MTOM in a per service basis... For that you can add the following to your services.xml under the service element.. parameter name=enableMTOM locked=falsetrue/parameter If you are looking for a way to generate a WSDL with base64Binary fields (MTOM equivalent), then you would need to deploy a pojo service using the RPCMessageReceiver with methods having DataHandlers as the parameters or the return values. Nothing special is needed in the services.xml... thanks, Thilina On Fri, Apr 11, 2008 at 6:58 AM, Michelantonio Trizio [EMAIL PROTECTED] wrote: Hi, I'd like to know what I should write in the service.xml for having the right wsdl with MTOM parameter. Thank you. Mikelantonio -- It's creepy, but here we are, the Pilgrims, the crackpots of our time, trying to establish our own alternate reality. To build a world out of rocks and chaos. What it's going to be, I don't know. Even after all that rushing around, where we've ended up is the middle of nowhere in the middle of the night. And maybe knowing isn't the point. Where we're standing right now, in the ruins in the dark, what we build could be anything. [Choke - Chuck Palahniuk] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- It's creepy, but here we are, the Pilgrims, the crackpots of our time, trying to establish our own alternate reality. To build a world out of rocks and chaos. What it's going to be, I don't know. Even after all that rushing around, where we've ended up is the middle of nowhere in the middle of the night. And maybe knowing isn't the point. Where we're standing right now, in the ruins in the dark, what we build could be anything. [Choke - Chuck Palahniuk] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- It's creepy, but here we are, the Pilgrims, the crackpots of our time, trying to establish our own alternate reality. To build a world out of rocks and chaos. What it's going to be, I don't know. Even after all that rushing around, where we've ended up is the middle of nowhere
Re: Axis2 1.3 - ENABLE_MTOM
=application/soap+xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;soapenv:Bodyns:translateStringResponse xmlns:ns=http://ws.apache.org/axis2;return [...base64 encoded DATA...] /return/ns:translateStringResponse/soapenv:Body/soapenv:Envelope --MIMEBoundaryurn_uuid_D2ADB7746CB22F21961207583018160-- 0 Any clue? Thanks! -- Gabriel [EMAIL PROTECTED] http://www.codelutin.com tel : 02 40 50 29 28 / fax : 09 59 92 29 28 - 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: Using SWA with ADB in axis2
Detelin, Good observation... I was lost in this question :).. ndthuy, Try inserting the following line before the call to cleanup(_messageContext) in the stub... _messageContext.getEnvelope().buildWithAttachments(); thanks, Thilina On Wed, Apr 2, 2008 at 10:04 AM, ndthuy [EMAIL PROTECTED] wrote: I were trying the same method call when I tried to download the file then I received the exception. I was able to see the attachment but I couldn't retrieve it. Thanks. ndthuy wrote: Hi Thilina, After taking a look at those articles, I am able to upload the file without any problem. But when I download the file, I received this error: Exception in thread main org.apache.axiom.om.OMException: javax.mail.MessagingException: Error in input stream; nested exception is: java.io.IOException: Attempted read on closed stream. at org.apache.axiom.attachments.Attachments.getPart(Attachments.java:602) at org.apache.axiom.attachments.Attachments.getNextPartDataHandler(Attachments.java:462) at org.apache.axiom.attachments.Attachments.getDataHandler(Attachments.java:278) at org.apache.axis2.context.MessageContext.getAttachment(MessageContext.java:1623) at com.cvg.ap.service.publicservices.impl.APContentManagementServicesStub.fetchContentFile(APContentManagementServicesStub.java:810) at com.cvg.ap.service.publicservices.impl.APContentManagementServicesImpl.fetchContentFile(APContentManagementServicesImpl.java:256) at com.cvg.ap.service.publicservices.impl.APContentManagementServicesImpl.main(APContentManagementServicesImpl.java:463) Caused by: javax.mail.MessagingException: Error in input stream; nested exception is: java.io.IOException: Attempted read on closed stream. at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:142) at javax.mail.internet.InternetHeaders.init(InternetHeaders.java:93) at javax.mail.internet.MimeBodyPart.init(MimeBodyPart.java:124) at org.apache.axiom.attachments.PartOnMemory.init(PartOnMemory.java:34) at org.apache.axiom.attachments.Attachments.getPart(Attachments.java:598) ... 6 more This is the soap message when I upload and download: /soapenv:Envelope--MIMEBoundaryurn_uuid_1ADD9EC725995A3FD11206998815387Content-Type: application/octet-streamContent-Transfer-Encoding: binaryContent-ID: urn:uuid:1ADD9EC725995A3FD11206998814743/*Pogue.cs - Custom Rogue class3a--MIMEBoundaryurn_uuid_1ADD9EC725995A3FD11206998815387--0 This is soap message when I download: --MIMEBoundaryurn_uuid_5042108D598DCCE8AE1206999131913 7e8 Content-Type: application/octet-stream Content-Transfer-Encoding: binary Content-ID: urn:uuid:5042108D598DCCE8AE1206999117974/*Pogue.cs - Custom Rogue class 38 --MIMEBoundaryurn_uuid_5042108D598DCCE8AE1206999131913 2 -- 0 Do you think it is because the way it prepares the SOAP message on server side ? Thanks for your help. Thanks. Thilina Gunarathne wrote: Hi, I would have a WSDL with a string return field (or a complex type containing a string element) and would assign the content-id to that string. You can have a look at the following articles to figure out how to add the attachment in the service implementation class.. http://wso2.org/library/1675 http://wso2.org/library/1148 String contentId = messageContext.addAttachment(dataHandler); thanks, Thilina On Mon, Mar 31, 2008 at 11:14 AM, ndthuy [EMAIL PROTECTED] wrote: Thanks Thilina, I was able to modify according to your suggestion to upload the file using ADB with SwA. But for the dowload using ADB with SwA, how do we modify the SOAP message to attach the binary data ? Do we have to modify in invokeBusinessLogic(...) function ? Thanks. Thilina Gunarathne wrote: Hi, You cannot generate WSDL with the knowledge of SwA in them.. AFAIK there isn't a standard way to mention SwA attachments in WSDL.. ADB does not support SwA directly.. What you can do in the server side is to have your method signature take in an String which will be the content-id of the attachment, then retrieve your attachment from the messageContext manually using it... Have a look at [1] [2].. Your following method will result in an MTOM WSDL, where dataHandler will get bound to an base64Binary element. addContentFile(String userID, String password, String serviceID, DataHandler dataHandler, String relAddFilepathName, String contentType, String source) thanks, Thilina [1] Using SOAP with Attachments in Apache Axis2 - http
Re: MTOM attachments larger than 2.1GB (Integer.MAX_VALUE?)
Hi Paul, I don't think this is possible, cause looking at the following exception the failure is happening at the parser level.. It never returns a DataHandler... org.apache.axis2.AxisFault: Referenced Attachment not found in the MIME Message. ContentID:1.urn:uuid:[EMAIL PROTECTED] thanks, Thilina On Tue, Apr 1, 2008 at 3:33 AM, Paul Fremantle [EMAIL PROTECTED] wrote: I believe if the file is cached correctly you can work around this by not accessing the file via Axiom but simply casting the DataSource as a FileDataSource and then working on the file directly. Of course we still need to fix Axiom! DataHandler dataHandler = (DataHandler)omText.getDataHandler(); FileDataSource fileDataSource = (FileDataSource)dataHandler.getDataSource(); File file = fileDataSource.getFile(); file.renameTo(new File(MyFile.bin)); Paul On Tue, Apr 1, 2008 at 9:08 AM, Roy Willy Haug [EMAIL PROTECTED] wrote: I have created an issue for this in Jira: https://issues.apache.org/jira/browse/AXIS2-3686 (I set fix version to 1.4, although I realize it might be too late. :-) ) Regards Roy Willy Haug -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 1. april 2008 00:29 To: axis-user@ws.apache.org Subject: Re: MTOM attachments larger than 2.1GB (Integer.MAX_VALUE?) Please log a Jira with all these details... I think the fix needs start from the FileAccessor getSize() onwards.. thanks, Thilina On Mon, Mar 31, 2008 at 12:01 PM, Andreas Veithen [EMAIL PROTECTED] wrote: Roy, This seems to be a limitation of AXIOM that uses the int type for all length variables in the org.apache.axiom.attachments.Attachments class and various other classes it depends on. Regards, Andreas Quoting Roy Willy Haug [EMAIL PROTECTED]: Hi, We have a well working file transfer service that works with files up to approximately 2.1 GB (probably Integer.MAX_VALUE: 2147483647 bytes?). When transferring even larger files, Axis2 fails with the following message: org.apache.axis2.AxisFault: Referenced Attachment not found in the MIME Message. ContentID:1.urn:uuid:[EMAIL PROTECTED] What happens is: The client transfers the complete file to the server. The server correctly caches the file in the attachmentDIR folder. The AxisFault is thrown. The server-side cached file have the exact same byte-length as the file the client sent, so every byte has been transferred. I am currently using Windows XP with NTFS and support for files much larger than 2.1 GB on both sides, Axis2 1.3, document-literal style, ADB, MTOM and caching to disk. Any ideas? The DataHandler that is supplied to the client stub is generated like this: FileDataSource datasource = new FileDataSource(localFile); dh = new DataHandler(datasource); Parts of my Axis2.xml file: parameter name=enableMTOMtrue/parameter parameter name=enableSwAfalse/parameter parameter name=cacheAttachmentstrue/parameter parameter name=attachmentDIRC:/TEMP/da_server_temp//parameter parameter name=sizeThreshold5/parameter Regards, Roy Willy Haug - 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] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 Apache Synapse PMC Chair OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com
Re: Using MTOM to send a wave file ?
The file format won't matter for MTOM. It just operates on the byte level. May be your file size is larger, so that TCPMon (or whatever the tool you use to capture the message) is failing.. thanks, Thilina On Tue, Apr 1, 2008 at 3:27 PM, ndthuy [EMAIL PROTECTED] wrote: Are we able to use MTOM to send a wave file ? The reason I ask because when I send a wav file using MTOM, I couldn't see an end tag for MIME data as I usually see with other format. Thanks -- View this message in context: http://www.nabble.com/Using-MTOM-to-send-a-wave-file---tp16420007p16420007.html Sent from the Axis - User mailing list archive at Nabble.com. - 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: Using SWA with ADB in axis2
Hi, I would have a WSDL with a string return field (or a complex type containing a string element) and would assign the content-id to that string. You can have a look at the following articles to figure out how to add the attachment in the service implementation class.. http://wso2.org/library/1675 http://wso2.org/library/1148 String contentId = messageContext.addAttachment(dataHandler); thanks, Thilina On Mon, Mar 31, 2008 at 11:14 AM, ndthuy [EMAIL PROTECTED] wrote: Thanks Thilina, I was able to modify according to your suggestion to upload the file using ADB with SwA. But for the dowload using ADB with SwA, how do we modify the SOAP message to attach the binary data ? Do we have to modify in invokeBusinessLogic(...) function ? Thanks. Thilina Gunarathne wrote: Hi, You cannot generate WSDL with the knowledge of SwA in them.. AFAIK there isn't a standard way to mention SwA attachments in WSDL.. ADB does not support SwA directly.. What you can do in the server side is to have your method signature take in an String which will be the content-id of the attachment, then retrieve your attachment from the messageContext manually using it... Have a look at [1] [2].. Your following method will result in an MTOM WSDL, where dataHandler will get bound to an base64Binary element. addContentFile(String userID, String password, String serviceID, DataHandler dataHandler, String relAddFilepathName, String contentType, String source) thanks, Thilina [1] Using SOAP with Attachments in Apache Axis2 - http://wso2.org/library/1148 [2] Downloading a Binary File from a Web Service using Axis2 and SOAP with Attachments - http://wso2.org/library/1675 How do I write a wsdl for it so I can generate the client and server using ADB. Thanks -- View this message in context: http://www.nabble.com/Using-SWA-with-ADB-in-axis2-tp16335414p16335414.html Sent from the Axis - User mailing list archive at Nabble.com. - 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] -- View this message in context: http://www.nabble.com/Using-SWA-with-ADB-in-axis2-tp16335414p16396897.html Sent from the Axis - User mailing list archive at Nabble.com. - 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: Using SWA with ADB in axis2
Thanks for the info Anne.. At the moment Axis2 does not support it.. Thilina. On Sat, Mar 29, 2008 at 8:11 AM, Anne Thomas Manes [EMAIL PROTECTED] wrote: Thilina, The WS-I Attachments Profile [1] defines the standard WSDL description for SwA. [1] http://www.ws-i.org/Profiles/AttachmentsProfile-1.0.html Anne On Fri, Mar 28, 2008 at 10:39 AM, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, You cannot generate WSDL with the knowledge of SwA in them.. AFAIK there isn't a standard way to mention SwA attachments in WSDL.. ADB does not support SwA directly.. What you can do in the server side is to have your method signature take in an String which will be the content-id of the attachment, then retrieve your attachment from the messageContext manually using it... Have a look at [1] [2].. Your following method will result in an MTOM WSDL, where dataHandler will get bound to an base64Binary element. addContentFile(String userID, String password, String serviceID, DataHandler dataHandler, String relAddFilepathName, String contentType, String source) thanks, Thilina [1] Using SOAP with Attachments in Apache Axis2 - http://wso2.org/library/1148 [2] Downloading a Binary File from a Web Service using Axis2 and SOAP with Attachments - http://wso2.org/library/1675 How do I write a wsdl for it so I can generate the client and server using ADB. Thanks -- View this message in context: http://www.nabble.com/Using-SWA-with-ADB-in-axis2-tp16335414p16335414.html Sent from the Axis - User mailing list archive at Nabble.com. - 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: MTOM attachments larger than 2.1GB (Integer.MAX_VALUE?)
Please log a Jira with all these details... I think the fix needs start from the FileAccessor getSize() onwards.. thanks, Thilina On Mon, Mar 31, 2008 at 12:01 PM, Andreas Veithen [EMAIL PROTECTED] wrote: Roy, This seems to be a limitation of AXIOM that uses the int type for all length variables in the org.apache.axiom.attachments.Attachments class and various other classes it depends on. Regards, Andreas Quoting Roy Willy Haug [EMAIL PROTECTED]: Hi, We have a well working file transfer service that works with files up to approximately 2.1 GB (probably Integer.MAX_VALUE: 2147483647 bytes?). When transferring even larger files, Axis2 fails with the following message: org.apache.axis2.AxisFault: Referenced Attachment not found in the MIME Message. ContentID:1.urn:uuid:[EMAIL PROTECTED] What happens is: The client transfers the complete file to the server. The server correctly caches the file in the attachmentDIR folder. The AxisFault is thrown. The server-side cached file have the exact same byte-length as the file the client sent, so every byte has been transferred. I am currently using Windows XP with NTFS and support for files much larger than 2.1 GB on both sides, Axis2 1.3, document-literal style, ADB, MTOM and caching to disk. Any ideas? The DataHandler that is supplied to the client stub is generated like this: FileDataSource datasource = new FileDataSource(localFile); dh = new DataHandler(datasource); Parts of my Axis2.xml file: parameter name=enableMTOMtrue/parameter parameter name=enableSwAfalse/parameter parameter name=cacheAttachmentstrue/parameter parameter name=attachmentDIRC:/TEMP/da_server_temp//parameter parameter name=sizeThreshold5/parameter Regards, Roy Willy Haug - 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: Interop WCF Service/Axis2 Client and Stream
Hi, It looks like a bug in Axis2 Data binding, in the simple type restriction... Please log a JIRA[1] with your wsdl's and the message traces.. thanks, Thilina [1]https://issues.apache.org/jira/browse/AXIS2 On Fri, Mar 28, 2008 at 8:31 AM, Andreas Necker [EMAIL PROTECTED] wrote: Hi, 2008/3/19, Thilina Gunarathne [EMAIL PROTECTED]: Hi, Looks like a data binding issue.. If possible please post a message stack trace of the response. I've captured the messages with Microsofts netmon: Client Request: --- - HTTP: Request, POST /DmsBatch/FileTransfer/ - Request: Command: POST + URI: /DmsBatch/FileTransfer/ ProtocolVersion: HTTP/1.1 ContentType: text/xml; charset=UTF-8 SOAPAction: http://www.dummy.de/DmsService/IFileTransfer/CheckOutDocument; UserAgent: Axis2 Host: ntfe:8013 ContentLength: 427 HeaderEnd: CRLF - payload: HttpContentType = text/xml; charset=UTF-8 - XmlPayload: ?xml version=1.0 encoding=UTF-8? - soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; - soapenv:Header - axis2ns2:DmsUserID xmlns:axis2ns2=Dummy.Profile.DmsService aeacd9ad-52c6-42fe-b546-1a7959da606b /axis2ns2:DmsUserID /soapenv:Header - soapenv:Body - ns2:CheckOutDocument xmlns:ns2=http://www.dummy.de/DmsService; - ns2:id 408848 /ns2:id /ns2:CheckOutDocument /soapenv:Body /soapenv:Envelope --- Service Response 1: --- - HTTP: Response, HTTP/1.1, Status Code = 200 - Response: ProtocolVersion: HTTP/1.1 StatusCode: 200, Ok Reason: OK TransferEncoding: chunked ContentType: multipart/related; type=application/xop+xml;start=http://tempuri.org/0;boundary=uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9;start-info=text/xml Server: Microsoft-HTTPAPI/1.0 MIME-Version: 1.0 Date: Fri, 28 Mar 2008 08:50:13 GMT HeaderEnd: CRLF - payload: HttpContentType = multipart/related; type=application/xop+xml;start=http://tempuri.org/0;boundary=uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9;start-info=text/xml - XmlPayload: 225 --uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9 Content-ID: - http://tempuri.org/0 Content-Transfer-Encoding: 8bit Content-Type: application/xop+xml;charset=utf-8;type=text/xml - s:Envelope xmlns:s=http://schemas.xmlsoap.org/soap/envelope/; - s:Body - CheckOutDocumentResponse xmlns=http://www.dummy.de/DmsService; - CheckOutDocumentResult xop:Include href=cid:http%3A%2F%2Ftempuri.org%2F1%2F633422946136935910 xmlns:xop=http://www.w3.org/2004/08/xop/include/ /CheckOutDocumentResult /CheckOutDocumentResponse /s:Body /s:Envelope --- Service Response 2: --- - HTTP: HTTP Payload - payload: HttpContentType = Body: 4000 Body: Body: --uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9 Body: Content-ID: http://tempuri.org/1/633422946136935910 Body: Content-Transfer-Encoding: binary Body: Content-Type: application/octet-stream ... --- Also what's the Axis2 version you are using.. Axis2 1.3 has the following known bug, which is fixed in the head.. https://issues.apache.org/jira/browse/AXIS2-3196 Axis2 supports MTOM and it has proven interoperability with .net except for the above mentioned bug which appeared in Axis2 1.3 as a result of a optimization.. I'm on Axis2 version 1.3. Thanks Andreas - 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: Using SWA with ADB in axis2
Hi, You cannot generate WSDL with the knowledge of SwA in them.. AFAIK there isn't a standard way to mention SwA attachments in WSDL.. ADB does not support SwA directly.. What you can do in the server side is to have your method signature take in an String which will be the content-id of the attachment, then retrieve your attachment from the messageContext manually using it... Have a look at [1] [2].. Your following method will result in an MTOM WSDL, where dataHandler will get bound to an base64Binary element. addContentFile(String userID, String password, String serviceID, DataHandler dataHandler, String relAddFilepathName, String contentType, String source) thanks, Thilina [1] Using SOAP with Attachments in Apache Axis2 - http://wso2.org/library/1148 [2] Downloading a Binary File from a Web Service using Axis2 and SOAP with Attachments - http://wso2.org/library/1675 How do I write a wsdl for it so I can generate the client and server using ADB. Thanks -- View this message in context: http://www.nabble.com/Using-SWA-with-ADB-in-axis2-tp16335414p16335414.html Sent from the Axis - User mailing list archive at Nabble.com. - 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: Interop problems with .Net and Axis 2 using MTOM
of Technical Sales, WSO2 Apache Synapse PMC Chair OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Interop problems with .Net and Axis 2 using MTOM
Hi, I'm a little bit confused.. Can you clarify a bit more.. Please have a look at the inlined questions.. I used Axis 2 to create an MTOM enabled client and a service that sends a PDF as a byte[]. Did you use an already existing WSDL or did you deploy your service as a POJO? I then took the clients C# WSDL and generated the necessary files using WSDL2Java and created a client just like i did in Java. Did you mean you took the wsdl of the Axis2 service you wrote?.. But looking at the stack trace you seems have used a Axis2 client... I keep getting the following error. In what combinations you get the error?.. Axis2 client .net service?? The client code has been added after the error. Can someone point out what im doing wrong here or guide me as to what i have to do ? It will be easier to help you if you tell what you are trying to do... thanks, Thilina Thanks, ___ Exception in thread main org.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.TransportUtils.createSOAPMessage( TransportUtils.java:89) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse( OutInAxisOperation.java:326) at org.apache.axis2.description.OutInAxisOperationClient.send( OutInAxisOperation.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl( OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.myceridianprototype.StorePDFforArchivingStub.UploadDocument( StorePDFforArchivingStub.java:196) at com.myceridianprototype.LocalClient.main(LocalClient.java:47) Caused by: java.lang.NullPointerException at org.apache.axis2.transport.TransportUtils.createDocumentElement( TransportUtils.java:156) at org.apache.axis2.transport.TransportUtils.createSOAPMessage( TransportUtils.java:111) at org.apache.axis2.transport.TransportUtils.createSOAPMessage( TransportUtils.java:87) ... 6 more import javax.activation.FileDataSource; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; import org.apache.axis2.Constants; import com.amo.service.TestServiceStub; import com.amo.service.TestServiceStub.WritetoFileSystem; public class ExihibitAClient { private static final String EPR = http://localhost/services/TestService/Test.asmx;; private static final String INPUT_FILE = C:\\HOLD\\small.pdf; public static void main(String[] args) throws Exception { System.out.println(In the TestClient Main Method); System.out.println(EPR: +EPR); System.out.println(Input File Name: +INPUT_FILE); TestServiceStub stub = new TestServiceStub(EPR); stub._getServiceClient().getOptions().setProperty( Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1); javax.activation.DataHandler dataHandler = new javax.activation.DataHandler(new FileDataSource(INPUT_FILE)); WritetoFileSystem write = new WritetoFileSystem(); write.setFilename(outputfile.pdf); write.setArray(dataHandler); stub.writetoFileSystem(write); System.out.println(done calling service...); } } ___ -- View this message in context: http://www.nabble.com/Interop-problems-with-.Net-and-Axis-2-using-MTOM-tp16097043p16097043.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Interop WCF Service/Axis2 Client and Stream
Hi, Looks like a data binding issue.. If possible please post a message stack trace of the response. Also what's the Axis2 version you are using.. Axis2 1.3 has the following known bug, which is fixed in the head.. https://issues.apache.org/jira/browse/AXIS2-3196 Axis2 supports MTOM and it has proven interoperability with .net except for the above mentioned bug which appeared in Axis2 1.3 as a result of a optimization.. But I also suspect about the Data Binding capability of the simple type restriction of Base64Binary given in the xsd4.. xs:simpleType name=StreamBody xs:restriction base=xs:base64Binary / /xs:simpleType thanks, Thilina On Mon, Mar 17, 2008 at 5:14 AM, Andreas Necker [EMAIL PROTECTED] wrote: Hi, 2008/3/14, Thilina Gunarathne [EMAIL PROTECTED]: Yes.. Please post the other WSDL and specially the schema part (may be it's a separate .xsd file).. here are the the WSDLs and XSDs. What exactly did you mean by streaming.. Is it MTOM??.. Are you trying to send back a binary file data to the client.. Yes, the CheckOutDocument Methods sends back a (File)Stream. The message encoding is MTOM (- Service configuration in my first Mail). I think the interesting parts are the CheckOutDocumentResult @xsd0 and the StreamBody definition @xsd4. Thanks Andreas FileTransfer.WSDL ?xml version=1.0 encoding=utf-8? wsdl:definitions name=FileTransfer targetNamespace=http://tempuri.org/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsu= http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsam=http://www.w3.org/2007/05/addressing/metadata; xmlns:tns=http://tempuri.org/; xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing; xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:i0=http://www.dummy.de/DmsService; xmlns:wsap=http://schemas.xmlsoap.org/ws/2004/08/addressing/policy; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:msc=http://schemas.microsoft.com/ws/2005/12/wsdl/contract; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:wsa10=http://www.w3.org/2005/08/addressing; xmlns:wsx=http://schemas.xmlsoap.org/ws/2004/09/mex; wsp:Policy wsu:Id=BasicHttpFileTransfer_policy wsp:ExactlyOne wsp:All wsoma:OptimizedMimeSerialization xmlns:wsoma= http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization; / /wsp:All /wsp:ExactlyOne /wsp:Policy wsdl:import namespace=http://www.dummy.de/DmsService; location=http://ntfe:8013/DmsBatch/FileTransfer/?wsdl=wsdl0; / wsdl:types / wsdl:binding name=BasicHttpFileTransfer type=i0:IFileTransfer wsp:PolicyReference URI=#BasicHttpFileTransfer_policy / soap:binding transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=CheckOutDocument soap:operation soapAction=http://www.dummy.de/DmsService/IFileTransfer/CheckOutDocument; style=document / wsdl:input soap:body use=literal / /wsdl:input wsdl:output soap:body use=literal / /wsdl:output wsdl:fault name=ServiceOperationFailedExceptionFault soap:fault name=ServiceOperationFailedExceptionFault use=literal / /wsdl:fault wsdl:fault name=ServiceOperationFailedRetryExceptionFault soap:fault name=ServiceOperationFailedRetryExceptionFault use=literal / /wsdl:fault wsdl:fault name=AuthenticationExceptionFault soap:fault name=AuthenticationExceptionFault use=literal / /wsdl:fault /wsdl:operation /wsdl:binding wsdl:service name=FileTransfer wsdl:port name=BasicHttpFileTransfer binding=tns:BasicHttpFileTransfer soap:address location=http://ntfe:8013/DmsBatch/FileTransfer/; / /wsdl:port /wsdl:service /wsdl:definitions http://ntfe:8013/DmsBatch/FileTransfer/?wsdl=wsdl0 ?xml version=1.0 encoding=utf-8? wsdl:definitions targetNamespace=http://www.dummy.de/DmsService; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsu= http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsam=http://www.w3.org/2007/05/addressing/metadata; xmlns:tns=http://www.dummy.de/DmsService; xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing; xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:wsap=http://schemas.xmlsoap.org/ws/2004/08/addressing/policy; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:msc=http://schemas.microsoft.com/ws/2005/12/wsdl/contract; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:wsa10=http://www.w3.org/2005/08/addressing; xmlns:wsx=http
Re: Interop WCF Service/Axis2 Client and Stream
Yes.. Please post the other WSDL and specially the schema part (may be it's a separate .xsd file).. What exactly did you mean by streaming.. Is it MTOM??.. Are you trying to send back a binary file data to the client.. thanks, Thilina On Thu, Mar 13, 2008 at 11:49 AM, Dan Christopherson [EMAIL PROTECTED] wrote: In your first message, you copied the WSDL that WCF was generating, but it imported a second wsdl. I suspect that the problem might be more in that. From what I've seen of WCF generated stuff, that might in turn include a couple of xsds. (what I've seen generated one wsdl and 2 xsds, so this is already a bit different. I'd suspect that the types WCF declares for the stream returned might use some microsoft specific namespaces that 'magically' work in the WCF-WCF case, but aren't interoperable. - Original Message - From: Andreas Necker [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, March 13, 2008 10:37:40 AM (GMT-0600) America/Chicago Subject: Interop WCF Service/Axis2 Client and Stream Hi, I'm trying to call an .Net WCF Service from an Axis2 java client on Windows. Simple calls to the service are working, but I have problems with a stream returned by one of the methods (see Exception below). The client stub was created with Axis' wsdl2java tool. Is it possible to handle a stream returned from a WCF service at all? TIA Andreas Exception: org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,288] Message: elementGetText() function expects text only elment but START_ELEMENT was encountered. at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.tempuri.FileTransferStub.fromOM(FileTransferStub.java:1377) at org.tempuri.FileTransferStub.CheckOutDocument(FileTransferStub.java:874) at DmsClient.DmsClient.buttonDownloadMouseClicked(DmsClient.java:525) ... Service interface: [ServiceContract( Namespace = http://www.dummy.de/DmsService; )] public interface IFileTransfer { [OperationContract] [FaultContract( typeof( ServiceOperationFailedException ) )] Stream CheckOutDocument( string id ); } Service configuration: binding name=BasicHttpStreaming maxBufferSize=100 maxReceivedMessageSize=5 messageEncoding=Mtom transferMode=StreamedResponse readerQuotas maxArrayLength=5 / /binding service name=DmsBatchFileTransfer.FileTransfer behaviorConfiguration=DmsDocumentServiceBehavior endpoint address= binding=basicHttpBinding bindingConfiguration=BasicHttpStreaming contract=dummy.Profile.DmsService.IFileTransfer name=BasicHttpFileTransfer /endpoint host baseAddresses add baseAddress=http://ntfe:8013/DmsBatch/FileTransfer/; / /baseAddresses /host /service - 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: How to get the MessageContext of my application?
You can use the following inside your service implementation.. MessageContext incomingContext = MessageContext.getCurrentMessageContext(); thanks, Thilina On Tue, Mar 11, 2008 at 10:43 AM, Moley Harey [EMAIL PROTECTED] wrote: Hi, I have stored some parameters in my Axis2 application services.xml file and I would like to retrieve them, for that I use: = org.apache.axis2.context.MessageContext msgCtx = new org.apache.axis2.context.MessageContext(); Parameter parameter = msgCtx.getParameter(myParameter); = The problem is that I get a NullPointerException because msgCtx is null... How can I get the correct value of msgCtx for my application? Thanks in advance! -- ~~~ Para atras, solo para tomar impulso! http://chromewaves.blogspot.com/ -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: images over SOAP
Hi, Is the best way to transport the image data as a byte[]? You can transport them as byte[] using either base64 encoding, MTOM or SwA... MTOM would be the best one among those 3 options, as it transports the image data as it is without encoding and it is the new standard. Is there a large overhead from the SOAP protocol which makes the service a bit slow or do you think it will work fine? IMHO it will work fine.. Anyway the file needs to be transferred.. SOAP overhead would not be a huge compared to the time it takes to transport. thanks, Thilina Any other suggestions? /Pär Express yourself instantly with MSN Messenger! MSN Messenger -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 Sockets
oh.. Sorry for the confusion.. That's exactly what I meant. .Using the same socket is the default.. ~Thilina On Fri, Mar 7, 2008 at 11:34 AM, Michele Mazzucco [EMAIL PROTECTED] wrote: Why? If the MEP is in/out with no complications (i.e. synchronous and with no redirections) you should be able to use the same socket. Michele On 7 Mar 2008, at 16:11, Thilina Gunarathne wrote: AFAIK it's the default behavior in case of request/response interaction - 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: How to enable CommonsHTTPTransportSender for client?
Hi, You can use the following constructor to create your service client.. ServiceClient(ConfigurationContext configContext,AxisService axisService) ConfigurationContext can be created as follows by pointing to your axis2.xml and the axis2 repository.. ConfigurationContextFactory.createConfigurationContextFromFileSystem(path,axis2xml); If you are using a generated stub, then it has a constructor which takes in the axis2.xml location and the axis2 repo location. thanks, Thilina On Fri, Mar 7, 2008 at 10:01 AM, westpine [EMAIL PROTECTED] wrote: Hello. I need to enable CommonsHTTPTransportSender for my web services client that built with axis2 libs. In documentation there is following info: transportSender name=http class=org.apache.axis2.transport.http.CommonsHTTPTransportSender parameter name=PROTOCOL locked=falseHTTP/1.1/parameter parameter name=Transfer-Encodingchunked/parameter /transportSender has to be added to axis2.xml So, I have 2 questions. Where to look or where to create this axis2.xml? And may be it could be done right in code? How to do it? Thanks! -- View this message in context: http://www.nabble.com/How-to-enable-CommonsHTTPTransportSender-for-client--tp15893501p15893501.html Sent from the Axis - User mailing list archive at Nabble.com. - 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 Sockets
AFAIK it's the default behavior in case of request/response interaction, unless the incoming message had a ws-addressing reply-to EPR pointing to another listener.. May be I'm missing something.. Can you explain your issue more.. thanks, Thilina On Fri, Mar 7, 2008 at 5:44 AM, Daniel Silva [EMAIL PROTECTED] wrote: Hi, I have a web service based on axis2. I need to send the response over the same socket of the request. It seems this is not happening using newMsgContext.setEnvelope(envelope) method. However the Service_MessageReceiverInOut class extends AbstractInOutSyncMessageReceiver. Shouldn't this be synchronized over the same socket? Is there any Option/Property/Configuration to set this? Thanks in advance. Best regards, Daniel Silva Software Developer [EMAIL PROTECTED] www.alert-online.com ALERT Life Sciences Computing, S.A. Edifício Lake Towers Rua Daciano Baptista Marques, n.º 245, Bloco D 4400-617 Vila Nova de Gaia Tel.: +351 22 832 89 80/1 Fax: +351 22 832 89 82 [EMAIL PROTECTED] This e-mail is privileged, confidential and contains private information. Any reading, retention, distribution or copying of this communication by any person other than its intended recipient is prohibited. -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the correct way to instantiate a Axis2 client stub class?
BTW you can find a axis2.xml and a repository inside the axis2 standard binary distribution.. On Mon, Mar 3, 2008 at 8:31 PM, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, According to what I know when you instantiate a stub in the normal way as you have done, Axis2 uses the default Axis2.xml which is in the axis2-kernel.jar... May be your environment is preventing your stub from accessing it.. Try pointing to an external axis2.xml file and an Axis2 repository.. IIRC the stub contains a constructor which takes in the location of axis2.xml file and the axis2 repository path.. thanks, Thilina On Mon, Mar 3, 2008 at 4:22 PM, Paul Peterson [EMAIL PROTECTED] wrote: I added the following main method to test the wrapper class as a java application and it worked as expected. Still can't get it to work from CF. Any ideas? public static void main(java.lang.String args[]) { try{ java.lang.String symbol = args[0]; java.lang.String strQuote = null; StockQuoteStub wsStockQuote = new StockQuoteStub(); GetQuote objGetQuote = new GetQuote(); objGetQuote.setSymbol(symbol); strQuote = wsStockQuote.GetQuote(objGetQuote).getGetQuoteResult(); System.out.println(\n + strQuote + \n); } catch(Exception e){ e.printStackTrace(); System.out.println(\n\n\n); } } -- View this message in context: http://www.nabble.com/What-is-the-correct-way-to-instantiate-a-Axis2-client-stub-class--tp15809428p15814281.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MTOM with HTTP??
name=uploadFile soap12:operation soapAction=urn:uploadFile style=document/ wsdl:input soap12:body use=literal/ /wsdl:input wsdl:output soap12:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:binding name=DocProdServicesSOAP11Binding type=operationtypes:DocProdServicesPortType soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=uploadFile soap:operation soapAction=urn:uploadFile style=document/ wsdl:input soap:body use=literal/ /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:binding name=DocProdServicesHttpBinding type=operationtypes:DocProdServicesPortType http:binding verb=POST/ wsdl:operation name=uploadFile http:operation location=DocProdServices/uploadFile/ wsdl:input mime:content part=uploadFile type=text/xml/ /wsdl:input wsdl:output mime:content part=uploadFile type=text/xml/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=DocProdServices wsdl:port name=DocProdServicesSOAP11port_http binding=operationtypes:DocProdServicesSOAP11Binding soap:address location=http://localhost:8080/axis2/service/DocProdServices/ /wsdl:port wsdl:port name=DocProdServicesSOAP12port_http binding=operationtypes:DocProdServicesSOAP12Binding soap12:address location=http://localhost:8080/axis2/service/DocProdServices/ /wsdl:port wsdl:port name=DocProdServicesHttpport binding=operationtypes:DocProdServicesHttpBinding http:address location=http://localhost:8080/axis2/service/DocProdServices/ /wsdl:port /wsdl:service /wsdl:definitions -- View this message in context: http://www.nabble.com/MTOM-with-HTTP---tp15756660p15756660.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - 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: MTOM with HTTP??
BTW are you using Rampart... I'm not sure about the MTOM behavior with Rampart. There were known issues with MTOM+Rampart, which I'm not aware anybody fixing them:(.. Please test without WSSec and report a JIRA to Rampart if it works without security.. Thilina On Fri, Feb 29, 2008 at 10:52 AM, Thilina Gunarathne [EMAIL PROTECTED] wrote: Hi, Try using the xmime schema as mentioned in http://ws.apache.org/axis2/1_3/mtom-guide.html#25.. thanks, Thilina On Fri, Feb 29, 2008 at 6:51 AM, Paul Fremantle [EMAIL PROTECTED] wrote: I'm guessing that when the data is being set into the OMText element its not set as optimize=true. Paul On Fri, Feb 29, 2008 at 11:27 AM, callagc4 [EMAIL PROTECTED] wrote: Hi, I have created a sample service for uploading a binary document. This is defined using the appropriate xsd:base64Binary type. I am using Axis2 version 1.3. I am using ADB data binding. I have enabled MTOM on the client by setting the Constants.Configuration.ENABLE_MTOM property to true. When the request is sent the mime boundaries and content type are present but the binary data is sent in the soap envolope instead of ouside as an attachment. Why is this happening? has anyone seen this behaviour? Example output and WSDL is below. Thanks, Cathal Request output: POST /axis2/services/DocProdServices HTTP/1.1 Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_4FD166D21C85599ED51204282413559; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=application/soap+xml; action=urn:uploadFile User-Agent: Axis2 Host: 127.0.0.1:8087 Transfer-Encoding: chunked 20f1 --MIMEBoundaryurn_uuid_4FD166D21C85599ED51204282413559 Content-Type: application/xop+xml; charset=UTF-8; type=application/soap+xml Content-Transfer-Encoding: binary Content-ID: 0.urn:uuid:[EMAIL PROTECTED] ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;soapenv:Header wsse:Security xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd; soapenv:mustUnderstand=truewsse:UsernameToken xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd; wsu:Id=UsernameToken-22589165wsse:UsernameOASIS/wsse:Usernamewsse:Password Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText;OASIS/wsse:Password/wsse:UsernameToken/wsse:Security/soapenv:Headersoapenv:Bodyns1:uploadFile xmlns:ns1=http://www.fineos.com/frontoffice/documentproduction/operationtypes;encodedFile0M8R4KGxGuEAPgADAP7/CQAGAAABIgAAEAAAJAEAAAD+ACEAAAD/encodedFile/ns1:uploadFile/soapenv:Body/soapenv:Envelope 3a --MIMEBoundaryurn_uuid_4FD166D21C85599ED51204282413559-- 0 Example WSDL: ?xml version=1.0 encoding=UTF-8? wsdl:definitions targetNamespace=http://www.fineos.com/frontoffice/documentproduction/operationtypes; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:operationtypes=http://www.fineos.com/frontoffice/documentproduction/operationtypes; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; wsdl:types xs:schema targetNamespace=http://www.fineos.com/frontoffice/documentproduction/operationtypes; xs:element name=uploadFile xs:complexType xs:sequence xs:element minOccurs=0 name=encodedFile nillable=true type=xs:base64Binary/ xs:element minOccurs=0 name=parentDirName nillable=true type=xs:string/ /xs:sequence /xs:complexType /xs:element xs:element name=uploadFileResponse xs:complexType xs:sequence xs:element minOccurs=0 name=return nillable=true type=xs:string/ /xs:sequence /xs:complexType /xs:element /xs:schema /wsdl:types wsdl:message name=uploadFileRequest wsdl:part name=parameters element=operationtypes:uploadFile /wsdl:part /wsdl:message wsdl:message name=uploadFileResponse wsdl:part name=parameters
Re: Problem with xs:base64Binary
First of all I wonder why do you want to send a plain string using base64Binary.. Is it a huge string and do you want to send it as an attachement?.. Use org.apache.axiom.attachments.ByteArrayDataSource.. String test = test; ByteArrayDataSource dataSource = new ByteArrayDataSource(test.getBytes()); DataHandler dataHandler = new DataHandler(dataSource); Other way round, InputStream inputStream = dataHandler.getInputStream(); Read the content to a byte[].. Create the string from that byte[]... thanks, Thilina public DataHandler convertStringToBase64Binary (String myString) { // Example myString value = 0 23 532 12; DataHandler myBase64BinaryField; // Constructor for DataHandler... // Insert miracle here, where myString data is sent // to the dataHandler object and turned into // base64 data. return myBase64BinaryField; } It would be interesting to see the other direction (i.e. DataHandler to String) as well. * As I mentioned in my previous message, the easy solution is to just send the data as an xs:string, which works for me since I'm creating both the client- and the server-sides of the web service. That said, I am still interested in understanding the mechanics of DataHandler. Thanks again, Matt Fadoul My3D, LLC -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 9:45 AM To: axis-user@ws.apache.org Subject: Re: Problem with xs:base64Binary Hi, 2) The code examples that I found for DataHandler generally involve things like files, etc. Yep... It can even be a byte[].. base64Binary data type stands for base64 encoded binary data.. Hence everything that involves Datahandlers work in binary(byte) level.. For example: http://ws.apache.org/axis2/1_2/mtom-guide.html#21 (Note: It seems that the lines of code with OMText aren't complete). ouch... Please use the newest version.. It seems to be complete.. http://ws.apache.org/axis2/1_3/mtom-guide.html#21 3) In my case, my data is much simpler. For example, if I could populate the field with a string (e.g. 0 23 532 12), that would be sufficient. What's your exact use case.. What are you trying to send in that field.. Do you already have a base64 encoded string with you?? My quick solution is to just change this field's type to xs:string. The reason I'd like to keep it xs:base64binary is because it's someone else's schema, so I wanted to stay faithful to their data types. Please find out what kind of data (semantics) is he expecting, whether it's image or a signature etc... It's ok to change it to string.. But you would need to make sure to set the content to a base64 encoded string of the expected type.. thanks, Thilina Thanks! Matt Fadoul My3D, LLC - 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: MTOM defintition in wsdl
Hi Cathal, I'm not sure whether jaxbri data binding supports MTOM.. Is the JMS use case you are talking about is a different one.. For a fact I know that there are systems like Apache Synapse which uses JMS with MTOM. But again I don't know how whether it'll couple with DataBinding.. Sorry for not being able to provide any useful feedback.. I think its better to send two mails with different subjects like MTOM with JaxBRI?? and MTOM with JMS. I'm sure people with experience in those areas will step in to give you some help.. thanks, Thilina On Wed, Feb 27, 2008 at 2:30 AM, callagc4 [EMAIL PROTECTED] wrote: Hi Thilina, Thanks for your reply. Just to give you some more details on what binding i am using etc. I am using jaxbri data-binding. Testing has shown that when sending a message with binary information (denoted in my wsdl as xsd:base64Binary) via the http protocol, the message contains the correct xop headers but the binary data is stored by value inside the soap envolope. Also when sending a message via the jms protocol, which is our primary interest, i found that after i had explicitly set the following on the msgContext before the JMSSender creates the JMSMessage that the message is send with the corrrect Mime boundary but the soap message again contains the binary information by value inside the envolope. msgContext.setDoingMTOM(true); options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); options.setProperty(JMSConstants.JMS_MESSAGE_TYPE, JMSConstants.JMS_BYTE_MESSAGE); Can you advise on what may be the cause of this issue, and what potential workaround could be tried. Have the data binding guys come up with any possible causes for this given the wsdl and xsd i posted prievously? Thanks for your help, Cathal Thilina Gunarathne wrote: Hi, Is this an issue with the generator? Why does it not add the qname of my binary element to the opNameArray? Sounds like it should work.. I'll let our data binding guys to give the an answer... If nothing works out, report a JIRA with your WSDL and if possible with a test case.. 2) the second approach outlined in the documentation states: Going a little further, you can use the xmime schema (http://www.w3.org/2005/05/xmlmime) to describe the binary content more precisely Save the xmlmime.xsd file locally in your system and add the following to your XSD.. xsd:import namespace=http://www.w3.org/2005/05/xmlmime; schemaLocation=xmlmime.xsd / thanks, Thilina However this requires import the http://www.w3.org/2005/05/xmlmime namespace which fails inside our firewall with the following exception: Retrieving schema at 'http://www.w3.org/2005/05/xmlmime', relative to 'file:/E:/Sandboxes/ProductServices-220208/src/com/fineos/frontoffice/documentproduction/DocumentProductionOperationsXSD/DocumentProductionOperations.xsd'. Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(CodeGenerationEngine.java:150) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused by: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema/xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'http://www.w3.org/2005/05/xmlmime', relative to 'file:/E:/Sandboxes/ProductServices-220208/src/com/fineos/frontoffice/documentproduction/DocumentProductionOperationsXSD/DocumentProductionOperations.xsd'.: java.net.NoRouteToHostException: No route to host: connect at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:286) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(CodeGenerationEngine.java:105) ... 2 more Caused by: java.net.NoRouteToHostException: No route to host: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195
Re: Problem with xs:base64Binary
Hi, 2) The code examples that I found for DataHandler generally involve things like files, etc. Yep... It can even be a byte[].. base64Binary data type stands for base64 encoded binary data.. Hence everything that involves Datahandlers work in binary(byte) level.. For example: http://ws.apache.org/axis2/1_2/mtom-guide.html#21 (Note: It seems that the lines of code with OMText aren't complete). ouch... Please use the newest version.. It seems to be complete.. http://ws.apache.org/axis2/1_3/mtom-guide.html#21 3) In my case, my data is much simpler. For example, if I could populate the field with a string (e.g. 0 23 532 12), that would be sufficient. What's your exact use case.. What are you trying to send in that field.. Do you already have a base64 encoded string with you?? My quick solution is to just change this field's type to xs:string. The reason I'd like to keep it xs:base64binary is because it's someone else's schema, so I wanted to stay faithful to their data types. Please find out what kind of data (semantics) is he expecting, whether it's image or a signature etc... It's ok to change it to string.. But you would need to make sure to set the content to a base64 encoded string of the expected type.. thanks, Thilina Thanks! Matt Fadoul My3D, LLC -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]