MTOM - duplicate message on queue
Hi, We have been deploying Axis2 1.3 on WAS 6.1.0.9. We are using SOAP over JMS and are using Websphere MQ 6.0. This deployment has worked fine for us. However, we have recently upgraded to Axis2 1.4. The same deployment is now behaving unusually. When sending a message which contains a binary attachment using MTOM the client places two identical messages on the queue instead of the expected one message. Our test cases have narrowed this down to the MQ Queue object being used and more importantly how that object is obtained. When the MQ Queue object is obtained by performing a JNDI lookup on WAS the unusal behaviour of two messages is the result. When the MQ Queue object is obtained by performing a JNDI lookup of an alternative JNDI server (e.g a file system context) the behaviour is as expected i.e one message is placed on the queue. Question: Why is the MQ Queue object returned via a WAS JNDI lookup causing two messages to be placed on the queue? Thanks, Cathal -- View this message in context: http://www.nabble.com/MTOM---duplicate-message-on-queue-tp17804361p17804361.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]
WSDL2JAVA options (-nv) ?
Hi, We have recently come across the following senario with our xsd schema: File 1 has namespace A File 2 has namespace B File 3 has namespace A File 1 imports File 2 imports File 3 This causes a validation exception. When using the com.sun.tools.xjc.XJCFacade directly this senarion fails generation. When using the com.sun.tools.xjc.XJCFacade directly and specifying the -nv option it generates successfully. Question1: What is the equivalent parameter for -nv when using Axis2's wsdl2java? Question2: What is the significance of specifying the -nv option. I have read the jaxb resource on the xjc at http://java.sun.com/webservices/docs/2.0/jaxb/xjc.html which details the -nc option but i would like to now just exactly how "un-strict" the validation becomes. Thanks, Cathal -- View this message in context: http://www.nabble.com/WSDL2JAVA-options-%28-nv%29---tp18130698p18130698.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]
Adding Custom elements to an AxisFault's detail
Hi, I am trying to add a custom element to the detail of an AxisFault. I simply want to append another element to the detail of the fault. The code snippet below is my attempt. It works to a point but i am having sporadic issues with it. For example when i debug the code and in doing so slow things down all is well and the element is added and seen in the resulting SOAP envelope. However when i let it run at execution speed the added element is not seen in the SOAP envelope. Does anyone has any insite as to why this may be the case? Has anyone successfully added a custom element to an AxisFaults detail. Thanks, Cathal = Code Snippet == catch (AxisFault e) { OMFactory fac = e.getDetail().getOMFactory(); OMElement jmsMessageElement = fac.createOMElement(new QName("errorMessage2"), null); jmsMessageElement.setText(message.toString()); e.getDetail().addChild(jmsMessageElement); MessageContext faultContext = MessageContextBuilder.createFaultMessageContext(msgCtx, e); engine.sendFault(faultContext); } = Code Snippet == -- View this message in context: http://www.nabble.com/Adding-Custom-elements-to-an-AxisFault%27s-detail-tp21077286p21077286.html Sent from the Axis - User mailing list archive at Nabble.com.
Axis2 run on Java 6
Hi, Is anyone currently running Axis2 on Java 6? About to upgrade to Java 6 soon and i would like to know if anyone has come across any reason why this would be an issue when using Axis2 1.4. Thanks, Cathal -- View this message in context: http://www.nabble.com/Axis2-run-on-Java-6-tp22584084p22584084.html Sent from the Axis - User mailing list archive at Nabble.com.
SAXParseException on Linux
Hi, We have been running our web services for quite some time now using Axis2 on a Windows OS. Recently we attempted to run the services on a Linux OS and have been receiving a very generic error. An exception is being thrown during the creation of an XML Schema object. I have been unable to setup debugging for xerces correctly and as a result i am none the wiser as to why this exception is being thrown. Has anyone seen any problems like this on a Linux OS, which run fine on Windows? Thanks, Cathal p.s also any pointers on why my eclipse debugger is not picking up any line information when debugging xerces would be helpful aswell. The stack trace received is as follows: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'commontypes:FineosMoney' to a(n) 'type definition' component. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseLocal(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseLocalElements(Unknown Source) at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source) at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source) at javax.xml.validation.SchemaFactory.newSchema(Unknown Source) at javax.xml.validation.SchemaFactory.newSchema(Unknown Source) at com.fineos.ta.services2.validation.TaValidationHandler.getSchema(TaValidationHandler.java:227) at com.fineos.ta.services2.validation.TaValidationHandler.updateUnmarshallerWithSchemaForValidation(TaValidationHandler.java:156) -- View this message in context: http://www.nabble.com/SAXParseException-on-Linux-tp24150497p24150497.html Sent from the Axis - User mailing list archive at Nabble.com.
Axis2 JMS Transport to WebSphere MQ
Hi, We are currently using axis2 in a standalone server. I have been trying to configure axis2 to hook up with websphereMQ. However i am unsure of how to configure axis2 for this as all the examples i have found are for activeMQ. Could anyone tell me how this can be done? My main area of concern is the definition of a jms transportReciever for websphereMQ. Any advice would be much appriciated. My attempts so far have left me here, using the definition below. However this currently does not work. The first issue is that the initial context factory being used is based in websphere not websphereMQ. Secondly how do i configure this jndi resource in websphereMQ, i.e configure jms/QueueConnectionFactory com.ibm.mq.jms.context.WMQInitialContextFactory localhost:1414 jms/QueueConnectionFactory Thanks, Cathal -- View this message in context: http://www.nabble.com/Axis2-JMS-Transport-to-WebSphere-MQ-tp14738492p14738492.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]
Axis2 deployment on Websphere 6.1
Hi, I having an issue when deploying a JMS axis2 service in Websphere 6.1. We have a custom war file which contains all the axis2 jars. We have defined our service.aar file and also placed the appropriate services.list file with it. When starting up Websphere the application starts up fine. The log files show "[AxisServlet]: Initialization successfull" which leads me to believe that all is well during start up. However the service is only available over HTTP. The JMS Listener does not initialize. Axis2 is definitly finding my ConnectionFactory in jndi as when i change the name i get an exception. Can anyone tell me why axis is not initializing the JMSListener? Here is my definition of the JMSListerner in the axis2.xml: com.ibm.websphere.naming.WsnInitialContextFactory corbaloc::localhost:2810 jms/QueueConnectionFactory Here is my service definition in services.xml: http://www.w3.org/ns/wsdl/in-out"; class="com.fineos.ta.test.garageservices.soap.GarageServicesMessageReceiverInOut"/> com.fineos.ta.test.garageservices.soap.GarageServicesSkeleton jms/C1_TestService1_GARAGE true true http://www.w3.org/ns/wsdl/in-out";> urn:createGarageCompany createGarageCompanyResponse Cheers, Cathal -- View this message in context: http://www.nabble.com/Axis2-deployment-on-Websphere-6.1-tp15089580p15089580.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]
Axis2 JMS configuration
Hi, Is there a way to define a default QueueConnectionFactory in configuration without using an initial context factory? i am currently creating a fscontext and using this to lookup an MQQueueConnectionFactory. I am having trouble accessing Tomcats initial context from my axis2.xml file and i was wondering if there may be a way to by-pass the initial context altogther? Thanks, Cathal -- View this message in context: http://www.nabble.com/Axis2-JMS-configuration-tp15224180p15224180.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]
setMessageListener not permitted in Websphere
Hi, We are currently deploying axis2 in Websphere 6.1. We wish to use the jms transport. However axis2 fails to start because it uses forbidden api's. On startup axis2's JMSConnectionFactory class calls the listenOnDestination(String destinationJndi) method. Here it creates a MessageConsumer and calls the MessageConsumer.setMessageListener(MessageListener listener) method. This causes failure and the exception thrown is as follows: javax.jms.IllegalStateException: Method setMessageListener not permitted On looking through docs online it is clear that IBM have stuck to the J2EE 1.4 specification. This states that the MessageConsumer.setMessageListener(MessageListener listener) method can not be called in a Web or EJB container. See http://www.ibm.com/developerworks/library/j-getmess/ for details. My question is that why is axis2 not compliant with this specification? Also what options do i have for using the jms transport with axis2 in WAS. Initial research shows the following possibilities: 1) Use MDB's (not ideal) 2) Change the axis2 code itself and make a synchronous MessageConsumer.receive call and poll for messages Can anyone advice on the best approach here? And also will axis2 become compliant with the J2EE 1.4 spec in the future? Thanks, Cathal -- View this message in context: http://www.nabble.com/setMessageListener-not-permitted-in-Websphere-tp15306749p15306749.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]
MTOM defintition in wsdl
Hi, I am trying to define a simple service which will simply send binary data. I will to use MTOM with Axis2. I have read the documentation at http://ws.apache.org/axis2/1_3/mtom-guide.html. This states two approaches to defining the xsd schema type for an MTOM element: 1) Quote from documentation : You can define a binary element in the schema using the schema type="xsd:base64Binary". Having an element with the type "xsd:base64Binary" is enough for the Axis2 code generators to identify possible MTOM attachments, and to generate code accordingly. I have defined this in my schema but when i have generated the code Axis2 does not seem to have generated appropriate code for the type. I have set the enableMTOM property on the client but when the message is sent it is sent as a standard soap message with the base64binary information sent within the message instead of as an MTOM attachment. On debugging the client send, when i create the envelope and add the binary element it calls the optimizeContent() method to check if the type should be sent at optimized content, however the opNameArray on the stub is null and so it is not flagged for optimization. Is this an issue with the generator? Why does it not add the qname of my binary element to the opNameArray? 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 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.(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.(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) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at sun.net.NetworkClient.doConnect(NetworkClient.java:157) at sun.net.www.http.HttpClient.openServer(HttpClient.java:382) at sun.net.www.http.HttpClient.openServer(HttpClient.java:509) at sun.net.www.http.HttpClient.(HttpClient.java:231) at sun.net.www.http.HttpClient.New(HttpClient.java:304) at sun.net.www.http.HttpClient.New(HttpClient.java:316) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:817) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:769) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938) at java.net.URL.openStream(URL.java:1007) at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source) ... 12 more wsdl def: http://schemas.xmlsoap.org/wsdl/"; xmlns:operationtypes="http://www.fineos.com/frontoffice/documentproduction/operationtypes"; xmlns:mime="http://schemas.xmlsoap.org/wsdl
Re: MTOM defintition in wsdl
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.. > > 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.(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.(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) >> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) >> at java.net.Socket.connect(Socket.java:519) >> at java.net.Socket.connect(Socket.java:469) >> at sun.net.NetworkClient.doConnect(NetworkClient.java:157) >> at sun.net.www.http.HttpClient.openServer(HttpClient.java:382) >> at sun.net.www.http.HttpClient.openServer(HttpClient.java:509) >> at sun.net.www.http.HttpClient.(HttpClient.java:231) >> at sun.net.www.http.HttpClient.New(HttpClient.java:304) >> at sun.net.www.http.HttpClient.New(HttpClient.java:316) >> at >> >> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:81
MTOM with JMS??
Hi, I am having a problem using MTOM with JMS. I am using Axis2 version 1.3. I have tried both jaxbri data binding and adb data binding. Example wsdl and xsd are outlined below. JaxBRI data binding: The generated code after JaxBRI does not seem to have the appropriate MTOM awareness. Does JaxBRi support MTOM? When a message is sent it does not contain any MIME boundaries, nor any attachments, it just a regular soap message with binary information in its envelope. ADB data binding: The generated code from adb data binding does seem to be MTOM aware. When the message is sent the Mime boundaries are present, the content type is application/xop+xml as expected BUT the binary data is sent inside the soap envelope and not as an attachment. Does anyone know why this is happening? Just to clarify, idealy i would like to be able to use JaxBRI data binding but if this is not possible i would like to be able to use ADB. Example WSDL: http://schemas.xmlsoap.org/wsdl/"; xmlns:operationtypes="http://www.fineos.com/frontoffice/documentproduction/operationtypes"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; targetNamespace="http://www.fineos.com/frontoffice/documentproduction/operationtypes";> http://www.fineos.com/frontoffice/documentproduction/operationtypes";> http://schemas.xmlsoap.org/soap/http"; style="document"/> http://localhost:8080/axis2/service/DocProdServices"/> http://localhost:8080/axis2/service/DocProdServices"/> http://localhost:8080/axis2/service/DocProdServices"/> Example XSD: http://www.w3.org/2001/XMLSchema"; attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://www.fineos.com/frontoffice/documentproduction/operationtypes";> Any information on the problems oulined above would be very helpfull. Thanks, Cathal -- View this message in context: http://www.nabble.com/MTOM-with-JMS---tp15755158p15755158.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]
MTOM with HTTP??
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]> http://www.w3.org/2003/05/soap-envelope";> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; soapenv:mustUnderstand="true">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; wsu:Id="UsernameToken-22589165">OASIShttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText";>OASIShttp://www.fineos.com/frontoffice/documentproduction/operationtypes";>0M8R4KGxGuEAPgADAP7/CQAGAAABIgAAEAAAJAEAAAD+ACEAAAD 3a --MIMEBoundaryurn_uuid_4FD166D21C85599ED51204282413559-- 0 Example WSDL: 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/";> http://www.fineos.com/frontoffice/documentproduction/operationtypes";> http://schemas.xmlsoap.org/soap/http"/> http://localhost:8080/axis2/service/DocProdServices"/> http://localhost:8080/axis2/service/DocProdServices"/> http://localhost:8080/axis2/service/DocProdServices"/> -- 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]
Re: MTOM with HTTP??
Hi Paul, At what point is the OMText node created? I have debugged the code to the oint where the toEnvelope() method is called on the stub, the optimizeContent() method does return true. Should this not mean that the attachment is sent outside of the envelope? Thanks, Cathal pzfreo 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]> >> >> > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";> >> > >> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; >> soapenv:mustUnderstand="true">> >> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; >> >> wsu:Id="UsernameToken-22589165">OASIS> >> Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText";>OASIS> >> xmlns:ns1="http://www.fineos.com/frontoffice/documentproduction/operationtypes";>0M8R4KGxGuEAPgADAP7/CQAGAAABIgAAEAAAJAEAAAD+ACEAAAD >> 3a >> >> --MIMEBoundaryurn_uuid_4FD166D21C85599ED51204282413559-- >> 0 >> >> Example WSDL: >> >> >> > >> 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/";> >> >> > >> targetNamespace="http://www.fineos.com/frontoffice/documentproduction/operationtypes";> >> >> >> >> > nillable="true" type="xs:base64Binary"/> >> > nillable="true" type="xs:string"/> >> >> >> >> >> >> >> > nillable="true" >> type="xs:string"/> >> >> >> >> >> >> >> >> >> >> >> >> > element="operationtypes:uploadFileResponse"> >> >> >> >> >> >> > wsaw:Action="urn:uploadFile"> >> >> > wsaw:Action="urn:uploadFileResponse">
RE: MTOM with HTTP??
Hi Narayan, Thanks a million fro your help, setting this property worked for me and it is now sending the data correctly, i.e via reference. Agains thanks to all for your replys Cathal Narayan Dhillon wrote: > > Try following in your client to force MTOM with WS-Securty... > stub._getServiceClient().getOptions().setProperty(WSSHandlerConstants.US > E_DOOM, Constants.VALUE_TRUE); > > -Original Message- > From: callagc4 [mailto:[EMAIL PROTECTED] > Sent: 29 February 2008 11:27 > To: axis-user@ws.apache.org > Subject: MTOM with HTTP?? > > > > 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]> > > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";> > xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse > curity-secext-1.0.xsd" > soapenv:mustUnderstand="true"> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec > urity-utility-1.0.xsd" > wsu:Id="UsernameToken-22589165">OASIS e:Password > Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-t > oken-profile-1.0#PasswordText">OASIS> xmlns:ns1="http://www.fineos.com/frontoffice/documentproduction/operatio > ntypes">0M8R4KGxGuEAPgADAP7/CQAGAAA > BIgAAEAAAJAEAAAD+ACEAAAD ns1:uploadFile> > 3a > > --MIMEBoundaryurn_uuid_4FD166D21C85599ED51204282413559-- > 0 > > Example WSDL: > > > targetNamespace="http://www.fineos.com/frontoffice/documentproduction/op > erationtypes" > 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/documentproducti > on/operationtypes" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";> > > targetNamespace="http://www.fineos.com/frontoffice/documentproduction/op > erationtypes"> > > > > nillable="true" type="xs:base64Binary"/> > nillable="true" type="xs:string"/> > > > > > > > nillable="true" > type="xs:string"/> > > > > > > > > > > > > element="operationtypes:uploadFileResponse"> > > > > > >wsaw:Action="urn:uploadFile"> > >wsaw:Action="urn:uploadFileResponse"> > > > > >type="operationtypes:DocProdServicesPortType"> > > > > > > > > > > >type="operationtypes:DocProdServicesPortType"> > transport="http://schemas.xmlsoap.org/soap/http"/> > > > >
MTOM with JAXBri??
Hi, Has anyone been able to use MTOM with JAXBri? From what i have seen JAXBri does not support MTOM. The message sent contains the correct mime boundaries etc but the actual binary information is sent inside the soap envelope. I have been successful in using ADB data binding but we are using JAXBri for numerous uther services and i would like to be able to use it with MTOM also. Thanks,m Cathal -- View this message in context: http://www.nabble.com/MTOM-with-JAXBri---tp15805478p15805478.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]
MTOM with ADB binding over JMS
Hi, Has anyone been succesfull using MTOM with ADB data binding over JMS. My configuration works fine when sent over HTTP but over JMS the message is sent as standard with no attachment and no MIME boundaries. Thanks, Cathal -- View this message in context: http://www.nabble.com/MTOM-with-ADB-binding-over-JMS-tp15822158p15822158.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]
JMS_BYTE_MESSAGE doesnt support custom headers
Hi, I am using MTOM with JMS. i have been sucessful in getting the client to place an MTOM jms message on a queue. Axis2 requires you to use a JMS_MESSAGE_TYPE of JMS_BYTE_MESSAGE when performing MTOM. When the server receives this message it: 1) Requires me to have specified the property: transport.jms.Operation 2) Requires me to have specified the property: transport.jms.Wrapper 3) Creates a new soap envelope and places the entire contents of the JMS message in it. This does not seem correct as the JMS message was a complete soap envelope to begin with. This also means that all custom headers are now lost. Has anyone used MTOM over JMS, and if so how did you overcome this issue? Thanks, Cathal -- View this message in context: http://www.nabble.com/JMS_BYTE_MESSAGE-doesnt-support-custom-headers-tp15829600p15829600.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]
RE: setMessageListener not permitted in Websphere
Hi George, Yes we are currently using JMS in WAS 6.1. We chose to go with the MDB approach. It seems that this is IBM's recommended approach to take. What this entailed for us was to basically rewrite the axis2 JMSMessageReceiver class. We deploy an MDB per service. This MDB then forwards the message request into our version of the JMSMessagereciever which looks after passing the message into the AxisEngine. Hope this helps, Cathal Marrows, George A (GE Infra, Energy) wrote: > > Hi Cathal -- > > I see from your more recent mails that you are up and running with Axis2 > on JMS. Is that still under WAS 6.1? If so, I'm curious what deployment > approach you took in the end - was it 1) MDBs or 2) changing the Axis2 > code to not use setMessageListener or 3) something else? > > > Hi Axis2 team -- > > Given Cathal's problem below (which I see also), what is the correct way > to deploy Axis2 with JMS transport in in an app server that complies > with the J2EE 1.4 spec? https://issues.apache.org/jira/browse/AXIS2-1069 > (Message Driven Bean as JMS listener) was closed recently as won't fix, > which suggest you don't want to support the MDB approach. Is that > correct? > > Thanks all! > > -- George > > >> -Original Message- >> From: callagc4 [mailto:[EMAIL PROTECTED] >> Sent: 06 February 2008 16:00 >> To: axis-user@ws.apache.org >> Subject: setMessageListener not permitted in Websphere >> >> >> Hi, >> >> We are currently deploying axis2 in Websphere 6.1. We wish to >> use the jms transport. However axis2 fails to start because >> it uses forbidden api's. >> >> On startup axis2's JMSConnectionFactory class calls the >> listenOnDestination(String destinationJndi) method. Here it >> creates a MessageConsumer and calls the >> MessageConsumer.setMessageListener(MessageListener listener) >> method. This causes failure and the exception thrown is as follows: >> javax.jms.IllegalStateException: Method setMessageListener >> not permitted >> >> On looking through docs online it is clear that IBM have >> stuck to the J2EE >> 1.4 specification. This states that the >> MessageConsumer.setMessageListener(MessageListener listener) >> method can not be called in a Web or EJB container. See >> http://www.ibm.com/developerworks/library/j-getmess/ for details. >> >> My question is that why is axis2 not compliant with this >> specification? Also what options do i have for using the jms >> transport with axis2 in WAS. >> >> Initial research shows the following possibilities: >> 1) Use MDB's (not ideal) >> 2) Change the axis2 code itself and make a synchronous >> MessageConsumer.receive call and poll for messages >> >> Can anyone advice on the best approach here? And also will >> axis2 become compliant with the J2EE 1.4 spec in the future? >> >> Thanks, >> Cathal >> -- >> View this message in context: >> http://www.nabble.com/setMessageListener-not-permitted-in-Webs >> phere-tp15306749p15306749.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/setMessageListener-not-permitted-in-Websphere-tp15306749p16281501.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]
Re: setMessageListener not permitted in Websphere
Hi Asankha, We definitely would be interested in contributing this code. Currently we are tying up some loose ends with our solution and once this is completed i will submit it immediately. Our solution does not support service deployment/undeployment but this can be controlled through Websphere by stopping the ListenerPort for a particular services MDB. Cathal asankha wrote: > > Hi Cathal > > Would you be interested in contributing this code? Does your solution > support service deployment/undeployment? > > asankha > > > asankha > > callagc4 wrote: >> Hi George, >> >> Yes we are currently using JMS in WAS 6.1. We chose to go with the MDB >> approach. It seems that this is IBM's recommended approach to take. What >> this entailed for us was to basically rewrite the axis2 >> JMSMessageReceiver >> class. We deploy an MDB per service. This MDB then forwards the message >> request into our version of the JMSMessagereciever which looks after >> passing >> the message into the AxisEngine. >> >> Hope this helps, >> Cathal >> >> >> Marrows, George A (GE Infra, Energy) wrote: >> >>> Hi Cathal -- >>> >>> I see from your more recent mails that you are up and running with Axis2 >>> on JMS. Is that still under WAS 6.1? If so, I'm curious what deployment >>> approach you took in the end - was it 1) MDBs or 2) changing the Axis2 >>> code to not use setMessageListener or 3) something else? >>> >>> >>> Hi Axis2 team -- >>> >>> Given Cathal's problem below (which I see also), what is the correct way >>> to deploy Axis2 with JMS transport in in an app server that complies >>> with the J2EE 1.4 spec? https://issues.apache.org/jira/browse/AXIS2-1069 >>> (Message Driven Bean as JMS listener) was closed recently as won't fix, >>> which suggest you don't want to support the MDB approach. Is that >>> correct? >>> >>> Thanks all! >>> >>> -- George >>> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/setMessageListener-not-permitted-in-Websphere-tp15306749p16417746.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]
Re: MTOM with ADB binding over JMS
Hi Asankha, Thanks for reply, i recently submitted a bug fix to Axis2 for this issue and it has been submitted into head revision. For details see https://issues.apache.org/jira/browse/AXIS2-3591 Thanks, Cathal asankha wrote: > > Cathal > > An updated version of the JMS transport is available under the Apache > Synapse project (and you can actually just get the > synapse-transports.jar (even from maven) and use it with Axis2), and > this supports MTOM (See > http://synapse.apache.org/Synapse_Samples.html#Sample252) > > asankha > > callagc4 wrote: >> Hi, >> >> Has anyone been succesfull using MTOM with ADB data binding over JMS. My >> configuration works fine when sent over HTTP but over JMS the message is >> sent as standard with no attachment and no MIME boundaries. >> >> Thanks, >> Cathal >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/MTOM-with-ADB-binding-over-JMS-tp15822158p16467335.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]