Re: Axis WS on mobile devices
Hi Demetris, Part of the problem is that J2ME compatibility is not the easiest thing to determine - it's not like you can just set a compiler option and have any compatibility problems reported during the build. JiBX used to work on mobile devices, though I think the J2ME compatibility for the runtime has been lost over the last year or two. If you'd like to give it a try, I'll look into fixing whatever needs to be changed (some uses of ArrayList and HashMap, from what I remember, along with some java.sql class references). You could then use the JiBX/WS web services support for your J2ME platform: http://jibx.sourceforge.net/jibxws/ JiBX/WS is significantly faster than Axis2 when used for plain text web services, and if we decided to implement XBIS and TCP/IP support for J2ME as well it'd be several times faster. - Dennis Dennis M. Sosnoski XML and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Demetris G wrote: Hi all, I asked this question before (twice) but I didn't get a single response, interestingly enough. I am assuming by now that there is no mobile version of Axis/Axis2 and all the stories I hear about people getting Web services to work on mobiles is a fiction ... Has anyone managed to run Web Services (servers primarily) on mobile devices (either CDC, CLDC, scripting, Web Runtime etc.)? I will appreciate any feedback on something like this. Thanks very much
Re: Axiom JVW compatability
You need the StAX API and a StAX implementation. This is already included in Java 6. For Java 1.4 and 5, you can take the corresponding JARs from the Axiom binary distribution. Andreas On Wed, Jun 24, 2009 at 18:45, Chris Mannionchris.mann...@nonstopgov.com wrote: Maybe I've misunderstood then but I'm using an Axiom StAXOMBuilder object to build a document from a string or stream of XML and the StAXOMBuilder relies on the javax.xml.stream which doesn't exist in the 1.5.0 JRE I have but is in the 1.6.0 JRE. Perhaps I just need another jar file added to my 1.5 environment? 2009/6/24 Andreas Veithen andreas.veit...@gmail.com: Axiom doesn't require Java 6. It should work on 1.4.2. Andreas On Wed, Jun 24, 2009 at 12:14, Chris Mannionchris.mann...@nonstopgov.com wrote: Hi all I've noticed that despite Axis2 only requiring Java 1.5, it relies on Axiom. However the later releases of Axiom seem to require Java 6, so I'm just wondering if anyone knows which, if any, earlier releases of Axiom are still usable but compatible with Java 1.5? -- Chris Mannion iCasework and LocalAlert implementation team 0208 144 4416 -- Chris Mannion iCasework and LocalAlert implementation team 0208 144 4416
AW: Error while uploading File using DataHandler
Good morning, the Problem is, that i need to get the content-type from the DataHandler-Object, as the method should be an image-upload that should support various image-types like gif, png, jpeg and so on. The next idea I have, is rerender the image on the server to jpeg using ImageMagicks convert and delete the source image afterwards. But I think it must be possible to get the content-type or at least the original filename from the DataHandler-Object. Maybe you can tell me, how to get the ByteArrayDataSource out of the DataHander-Object? Thanks a lot!
Re: Axiom JVW compatability
Got it, thanks. 2009/6/25 Andreas Veithen andreas.veit...@gmail.com: You need the StAX API and a StAX implementation. This is already included in Java 6. For Java 1.4 and 5, you can take the corresponding JARs from the Axiom binary distribution. Andreas On Wed, Jun 24, 2009 at 18:45, Chris Mannionchris.mann...@nonstopgov.com wrote: Maybe I've misunderstood then but I'm using an Axiom StAXOMBuilder object to build a document from a string or stream of XML and the StAXOMBuilder relies on the javax.xml.stream which doesn't exist in the 1.5.0 JRE I have but is in the 1.6.0 JRE. Perhaps I just need another jar file added to my 1.5 environment? 2009/6/24 Andreas Veithen andreas.veit...@gmail.com: Axiom doesn't require Java 6. It should work on 1.4.2. Andreas On Wed, Jun 24, 2009 at 12:14, Chris Mannionchris.mann...@nonstopgov.com wrote: Hi all I've noticed that despite Axis2 only requiring Java 1.5, it relies on Axiom. However the later releases of Axiom seem to require Java 6, so I'm just wondering if anyone knows which, if any, earlier releases of Axiom are still usable but compatible with Java 1.5? -- Chris Mannion iCasework and LocalAlert implementation team 0208 144 4416 -- Chris Mannion iCasework and LocalAlert implementation team 0208 144 4416 -- Chris Mannion iCasework and LocalAlert implementation team 0208 144 4416
Re: problem with wsdl2java in 1.5
It looks like your Java runtime environment (GCJ/GNU classpath?) is incomplete. I would recommend to install Sun's JRE for Linux. Andreas On Thu, Jun 25, 2009 at 02:12, Vadim Letitchevskivletitchev...@teledyne.com wrote: wsdl2java in axis2-1.5 did not work for me reporting exceptions like these: Exception in thread main java.lang.NoClassDefFoundError: org.apache.axis2.description.AxisDescription at java.lang.Class.initializeClass(libgcj.so.7rh) at java.lang.Class.initializeClass(libgcj.so.7rh) at org.apache.axis2.description.WSDLToAxisServiceBuilder.init(WSDLToAxisServiceBuilder.java:101) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.init(WSDL11ToAxisServiceBuilder.java:215) at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.init(WSDL11ToAllAxisServicesBuilder.java:63) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(CodeGenerationEngine.java:144) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused by: java.lang.ClassNotFoundException: java.util.concurrent.ConcurrentHashMap not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:NED615Soap.wsdl,file:/home/Ned/axis2-1.5/,file:./,file:/home/Ned/axis2-1.5//lib/activation-1.1.jar,file:/home/Ned/axis2-1.5//lib/axiom-api-1.2.8.jar,file:/home/Ned/axis2-1.5//lib/axiom-dom-1.2.8.jar,file:/home/Ned/axis2-1.5//lib/axiom-impl-1.2.8.jar,file:/home/Ned/axis2-1.5//lib/axis2-adb-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-adb-codegen-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-ant-plugin-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-clustering-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-codegen-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-corba-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-fastinfoset-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-java2wsdl-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-jaxbri-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-jaxws-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-jibx-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-json-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-kernel-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-metadata-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-mtompolicy-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-saaj-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-spring-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-transport-http-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-transport-local-1.5.jar,file:/home/Ned/axis2-1.5//lib/axis2-xmlbeans-1.5.jar,file:/home/Ned/axis2-1.5//lib/bcel-5.1.jar,file:/home/Ned/axis2-1.5//lib/commons-codec-1.3.jar,file:/home/Ned/axis2-1.5//lib/commons-fileupload-1.2.jar,file:/home/Ned/axis2-1.5//lib/commons-httpclient-3.1.jar,file:/home/Ned/axis2-1.5//lib/commons-io-1.4.jar,file:/home/Ned/axis2-1.5//lib/commons-lang-2.3.jar,file:/home/Ned/axis2-1.5//lib/commons-logging-1.1.1.jar,file:/home/Ned/axis2-1.5//lib/geronimo-annotation_1.0_spec-1.1.jar,file:/home/Ned/axis2-1.5//lib/geronimo-jaxws_2.1_spec-1.0.jar,file:/home/Ned/axis2-1.5//lib/geronimo-saaj_1.3_spec-1.0.1.jar,file:/home/Ned/axis2-1.5//lib/geronimo-stax-api_1.0_spec-1.0.1.jar,file:/home/Ned/axis2-1.5//lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar,file:/home/Ned/axis2-1.5//lib/httpcore-4.0.jar,file:/home/Ned/axis2-1.5//lib/jalopy-1.5rc3.jar,file:/home/Ned/axis2-1.5//lib/jaxb-api-2.1.jar,file:/home/Ned/axis2-1.5//lib/jaxb-impl-2.1.7.jar,file:/home/Ned/axis2-1.5//lib/jaxb-xjc-2.1.7.jar,file:/home/Ned/axis2-1.5//lib/jaxen-1.1.1.jar,file:/home/Ned/axis2-1.5//lib/jettison-1.0-RC2.jar,file:/home/Ned/axis2-1.5//lib/jibx-bind-1.2.1.jar,file:/home/Ned/axis2-1.5//lib/jibx-run-1.2.1.jar,file:/home/Ned/axis2-1.5//lib/log4j-1.2.15.jar,file:/home/Ned/axis2-1.5//lib/mail-1.4.jar,file:/home/Ned/axis2-1.5//lib/mex-1.5.jar,file:/home/Ned/axis2-1.5//lib/neethi-2.0.4.jar,file:/home/Ned/axis2-1.5//lib/smack-3.0.4.jar,file:/home/Ned/axis2-1.5//lib/smackx-3.0.4.jar,file:/home/Ned/axis2-1.5//lib/soapmonitor-1.5.jar,file:/home/Ned/axis2-1.5//lib/woden-api-1.0M8.jar,file:/home/Ned/axis2-1.5//lib/woden-impl-dom-1.0M8.jar,file:/home/Ned/axis2-1.5//lib/wsdl4j-1.6.2.jar,file:/home/Ned/axis2-1.5//lib/wstx-asl-3.2.4.jar,file:/home/Ned/axis2-1.5//lib/xalan-2.7.0.jar,file:/home/Ned/axis2-1.5//lib/xercesImpl-2.6.2.jar,file:/home/Ned/axis2-1.5//lib/xml-apis-1.3.02.jar,file:/home/Ned/axis2-1.5//lib/xmlbeans-2.3.0.jar,file:/home/Ned/axis2-1.5//lib/xml-resolver-1.2.jar,file:/home/Ned/axis2-1.5//lib/XmlSchema-1.4.3.jar,file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(libgcj.so.7rh) at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh) at java.lang.ClassLoader.loadClass(libgcj.so.7rh) at java.lang.ClassLoader.loadClass(libgcj.so.7rh) at java.lang.Class.forName(libgcj.so.7rh) at java.lang.Class.initializeClass(libgcj.so.7rh) ...7 more QUESTIONS: When I did all the same but with axis2-1.4 it seems to generate the code. I don't know if it is working
Re: Error while uploading File using DataHandler
Please note that Axis2 (as well as other Web service frameworks) use the DataHandler class as a convenient way of representing data of type base64binary. DataHandler is an existing class from the Java Activation Framework and indeed has properties for content type and (file) name. However, this information is not sent as part of the SOAP message and will be lost. You should do the following: - If you use contract first, you may use the XMIME schema [1], which extends the base64binary type to include content type information. - If you use code first, simply add an explicit argument for the content type to your service. Andreas [1] http://www.w3.org/2005/05/xmlmime On Thu, Jun 25, 2009 at 09:15, Moritz Maedlerm...@moritz-maedler.de wrote: Good morning, the Problem is, that i need to get the content-type from the DataHandler-Object, as the method should be an image-upload that should support various image-types like gif, png, jpeg and so on. The next idea I have, is rerender the image on the server to jpeg using ImageMagicks convert and delete the source image afterwards. But I think it must be possible to get the content-type or at least the original filename from the DataHandler-Object. Maybe you can tell me, how to get the ByteArrayDataSource out of the DataHander-Object? Thanks a lot!
Re: Error while uploading File using DataHandler
Could you share your code-snippet? Chinmoy On Thu, Jun 25, 2009 at 12:45 PM, Moritz Maedler m...@moritz-maedler.dewrote: Good morning, the Problem is, that i need to get the content-type from the DataHandler-Object, as the method should be an image-upload that should support various image-types like gif, png, jpeg and so on. The next idea I have, is rerender the image on the server to jpeg using ImageMagicks convert and delete the source image afterwards. But I think it must be possible to get the content-type or at least the original filename from the DataHandler-Object. Maybe you can tell me, how to get the ByteArrayDataSource out of the DataHander-Object? Thanks a lot!
Re: Error while uploading File using DataHandler
Hello! i posted the code snippet in my first post. If this isn't enough, pls tell me which part you need. Greetings!
Re: Error while uploading File using DataHandler
Andreas, I noticed the content-type info is preserved for SwA but MTOM does not preserve the info you mentioned. I guess the file can be sent as an attachment? Whats your opinion on this? Chinmoy On Thu, Jun 25, 2009 at 2:28 PM, Chinmoy Chakraborty cch...@gmail.comwrote: Could you share your code-snippet? Chinmoy On Thu, Jun 25, 2009 at 12:45 PM, Moritz Maedler m...@moritz-maedler.dewrote: Good morning, the Problem is, that i need to get the content-type from the DataHandler-Object, as the method should be an image-upload that should support various image-types like gif, png, jpeg and so on. The next idea I have, is rerender the image on the server to jpeg using ImageMagicks convert and delete the source image afterwards. But I think it must be possible to get the content-type or at least the original filename from the DataHandler-Object. Maybe you can tell me, how to get the ByteArrayDataSource out of the DataHander-Object? Thanks a lot!
Re: Error while uploading File using DataHandler
Indeed. Since SwA uses MIME, the content type is sent over the wire in a well defined way and Axis2/Axiom should be able to preserve it. Not sure though for the (file) name. MTOM also uses MIME and a content type is sent over the wire, but since MTOM is defined as an alternative representation of an XML message containing elements of type base64binary, one should not rely on this. Andreas On Thu, Jun 25, 2009 at 11:05, Chinmoy Chakrabortycch...@gmail.com wrote: Andreas, I noticed the content-type info is preserved for SwA but MTOM does not preserve the info you mentioned. I guess the file can be sent as an attachment? Whats your opinion on this? Chinmoy On Thu, Jun 25, 2009 at 2:28 PM, Chinmoy Chakraborty cch...@gmail.com wrote: Could you share your code-snippet? Chinmoy On Thu, Jun 25, 2009 at 12:45 PM, Moritz Maedler m...@moritz-maedler.de wrote: Good morning, the Problem is, that i need to get the content-type from the DataHandler-Object, as the method should be an image-upload that should support various image-types like gif, png, jpeg and so on. The next idea I have, is rerender the image on the server to jpeg using ImageMagicks convert and delete the source image afterwards. But I think it must be possible to get the content-type or at least the original filename from the DataHandler-Object. Maybe you can tell me, how to get the ByteArrayDataSource out of the DataHander-Object? Thanks a lot!
POJO deployment and faults
Hi all, currently I'm using POJO deployment with a single service class. I'd like the generated WSDL to contain proper fault definitions, but when I'm using classes like the following then the WSDL contains far too much type definitions for all sort of Axis-internal classes. Service class: public class WSTest { public void moveFile(String src, String dst) throws IOFault { throw new IOFault(Error occurred when moving file.); } } IOFault class: public class IOFault extends org.apache.axis2.AxisFault { public IOFault(String message) { super(message); super.setFaultCode(Fault code); // for testing super.setFaultType(15); } } service.xml: service name=Test-WS messageReceiver=org.apache.axis2.rpc.receivers.RPCMessageReceiver descriptionTest-WS/description parameter name=ServiceClass locked=false test.WSTest /parameter operation name=moveFile messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver / /operation /service The generated class now contains a *lot* of schema types for ContextManager, TransactionConfiguration, ThreadFactory and other axis classes. Is it possible to use faults like in the faulthandling sample but with pojo deployment and a bottom-up approach (i.e. manually created fault classes and auto-generated WSDL)? Or would the proper approach be top-down in this case? I.e. create the WSDL with at least the faults and then create Java classes of those using wsdl2java. Best regards, Jens
NoSuchElementException - only on Dev server (windows 2003)
Hello, My Axis2 1.4.1 web service throws a NoSuchElementException only on the Test Server (windows 2003) box. The same aar works perfectly fine on my local machne(XP machine). Looking at the stack trace, it complains about MessageContextgetEnvelope() But the wierdness is that this is fine on my machine(XP). Has anybody had similar issues. Any ideas on what might be wrong - or is Axis2 not compatible on a windows2003 machine. But that cannot be true either - coz the other service that I deployed on the Test machine works fine. The difference between the two is that in the non-working service: 1. There are Soap Header definitions in the WSDL (indicating that the incoming message will have a specific tag in the soap header that needs to be processed) 2. In the Skeleton of the non-working service, I'm trying to access the soap header from the MessageContext...getEnvelope, reconstructing the response soap header and adding it to the response soap envelope. All this is not there in the working service. The working service doesnt deal with any soap header or envelope either in the wsdl or in the skeleton. SOAPEnvelope envelope = MessageContext.getCurrentMessageContext().getEnvelope(); MessageContext.getCurrentMessageContext().getEnvelope().serialize(System.out); System.out.println(envelope); SOAPHeader header = envelope.getHeader(); if (header != null) myContextElem = header.getFirstChildWithName(MyService2007Stub.MYContext.MY_QNAME); MessageContext inMsgContext = MessageContext.getCurrentMessageContext(); OperationContext operationContext = inMsgContext.getOperationContext(); MessageContext outMessageContext = operationContext.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); outMessageContext.setEnvelope(createSOAPEnvelope()); System.out.println(outenv in outcontext=+outMessageContext.getEnvelope()); response = ServiceDAO.getResponse(...); OMElement omElement = response.getOMElement(GetBankerNotesResponse.MY_QNAME,OMAbstractFactory.getOMFactory()); String omElementString = omElement.getBuilder().getDocumentElement().toStringWithConsume(); System.out.println(Response xml in skeleton=+omElementString); private SOAPEnvelope createSOAPEnvelope() { SOAPFactory fac = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope envelope = fac.getDefaultEnvelope(); OMNamespace xsi = fac.createOMNamespace( http://www.w3.org/2001/XMLSchema-instance;, xsi); envelope.declareNamespace(xsi); return envelope; } For troubleshooting purpose I commented out all the message context stuff mentioned above, just leaving the part of getting the data from the database (ServiceDAO) Even then I still get the same NoSuchElementException. Now that is leading me to think that it doesnt like the the soap header definitions in the WSDL. But I need that to be in the WSDL and wouldnt know why that would cause an exception like this. Any help is highly appreciated as this is a Blocker and we are not able to proceed further.
Re: Unable to build client side message with document style
j...@ersl.ie writes: Hi I am developing an AXIS 1.4 client for a remote server (AXIS 1.3). The axis guide: http://ws.apache.org/axis/java/user-guide.html#ServiceStylesRPCDocumentWra pp edAndMessage details a message structure (which is similar to what I want): soap:Body myNS:PurchaseOrder xmlns:myNS=http://commerce.com/PO; itemSK001/item quantity1/quantity descriptionSushi Knife/description /myNS:PurchaseOrder /soap:Body The guide says: For a document style service, this would map to a method like this: public void method(PurchaseOrder po) However using the stub generated by wsdl2java I am getting a message structure like: soap:Body method myNS:PurchaseOrder xmlns:myNS=http://commerce.com/PO; itemSK001/item quantity1/quantity descriptionSushi Knife/description /myNS:PurchaseOrder /method /soap:Body where I have populated the part passed to the invoke method with an org.w3c.dom.Element containing an xml fragment: myNS:PurchaseOrder xmlns:myNS=http://commerce.com/PO; itemSK001/item quantity1/quantity descriptionSushi Knife/description /myNS:PurchaseOrder wsdl binding is: wsdl:binding name=. type=impl: wsdlsoap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=process wsdlsoap:operation soapAction=/ wsdl:input name=processRequest wsdlsoap:body use=literal/ /wsdl:input wsdl types: wsdl:types schema targetNamespace=.. import namespace=/ element name=process type=xsd:anyType/ /schema So in my case I am getting a message on the wire like: soap:Body process myNS:PurchaseOrder xmlns:myNS=http://commerce.com/PO; itemSK001/item quantity1/quantity descriptionSushi Knife/description /myNS:PurchaseOrder /process /soap:Body Where I don't want the process elements Thanks John Ok I have had a further look at this and my understanding is now that the wsdl has a wrapped document style - I.e. that is where the operation name is also included as a top level element in the input message (see wsdl below), and this is why the operation name (process) is being put into the input message. Could someone confirm this from the wdsl below (sensitive stuff replaced with ellipses)? Thanks John wsdl:definitions targetNamespace=. !--WSDL created by Apache Axis version: 1.3 Built on Oct 05, 2005 (05:23:37 EDT)-- wsdl:types schema targetNamespace= import namespace=/ element name=process type=xsd:anyType/ /schema schema targetNamespace= element name=processReturn type=xsd:anyType/ element name=fault type=xsd:anyType/ /schema /wsdl:types wsdl:message name=processResponse wsdl:part element=impl:processReturn name=processReturn/ /wsdl:message wsdl:message name=processRequest wsdl:part element=tns1:process name=part/ /wsdl:message wsdl:message name=WebServicesRuntimeException wsdl:part element=impl:fault name=fault/ /wsdl:message wsdl:portType name=WebServiceExceptionLoggingAdapter wsdl:operation name=process wsdl:input message=impl:processRequest name=processRequest/ wsdl:output message=impl:processResponse name=processResponse/ wsdl:fault message=impl:WebServicesRuntimeException name=WebServicesRuntimeException/ /wsdl:operation /wsdl:portType wsdl:binding name= type=impl:WebServiceExceptionLoggingAdapter wsdlsoap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=process wsdlsoap:operation soapAction=/ wsdl:input name=processRequest wsdlsoap:body use=literal/ /wsdl:input wsdl:output name=processResponse wsdlsoap:body use=literal/ /wsdl:output wsdl:fault name=WebServicesRuntimeException wsdlsoap:fault name=WebServicesRuntimeException use=literal/
Error while using the axis client
Hi, I am trying to call a web service that was written using some Oracle Framework. I am using axis 1.4.1 with ADB binding and Java 1.4 When I call the service from my client I am getting below exception message from the other side ?xml version = '1.0' encoding = 'UTF-8'? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; SOAP-ENV:Body SOAP-ENV:Fault faultcodeSOAP-ENV:Client/faultcode faultstringNo Deserializer found to deserialize a 'CcVaultPort:VaultId' using encoding style 'null'. [java.lang.IllegalArgumentException]/faultstring faultactor/Operajserv/CcVault/MHotelVaultApp/faultactor /SOAP-ENV:Fault /SOAP-ENV:Body /SOAP-ENV:Envelope And the request message is as below ?xml version = '1.0' encoding = 'UTF-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Body ns1:processCcMsg xmlns:ns1=CcVaultPort VaultId1/VaultId VendorUrl/ ActionGetCC/Action Originatoroo/Originator Requestrr/Request /ns1:processCcMsg /soapenv:Body /soapenv:Envelope When we call the same service with a C# client that sends a request as below and it works. How can we achieve the same with axis? ?xml version = '1.0' encoding = 'UTF-8'? env:Envelope xmlns:env=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:ns0=CcVault xmlns:ns1=http://ccVault/CcVault.xsd; env:Body ns0:processCcMsg env:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; VaultId xsi:type=xsd:string1/VaultId VendorUrl xsi:type=xsd:string/ Action xsi:type=xsd:stringGetID/Action Originator xsi:type=xsd:stringoo/Originator Request xsi:type=xsd:stringrr/Request /ns0:processCcMsg /env:Body /env:Envelope
asynchron requests with axis2 1.5
Hi there, I hope I am right here. I´ve got a problem with client-server communication. I want to send more than one requests to a server (WPS) which should be handled in an asynchronized way. With axis2-1.4.1 I was able to send more requests to the server, where the requests were handled and then, only the first response was sent via callback... I did not find any mistakes in my code so I thought that there is a bug in the axis2-1.4.1 api.. I tried the same with version axis2-1.5 but got other mistakes.. Can you help me by telling me, if that what I want to do is possible? This are the warnings that were served at the server-side.. 1965512 [http-8080-Processor24] WARN org.apache.axis2.deployment.util.Utils - [JAXWS] - unable to load org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher 1965541 [http-8080-Processor24] WARN org.apache.axis2.deployment.util.Utils - [JAXWS] - unable to load org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher 1965568 [http-8080-Processor24] WARN org.apache.axis2.deployment.util.Utils - [JAXWS] - unable to load org.apache.axis2.jaxws.dispatchers.MustUnderstandChecker 1965594 [http-8080-Processor24] WARN org.apache.axis2.deployment.util.Utils - [JAXWS] - unable to load org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher 1965614 [http-8080-Processor24] WARN org.apache.axis2.deployment.util.Utils - [JAXWS] - unable to load org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher 1965616 [http-8080-Processor24] INFO org.apache.axis2.deployment.ClusterBuilder - Clustering has been disabled on client side, I just get an Transport error: 500.. Thanks for your help Kristof Lange
RE: Problem upgrading from 1.3 to 1.5
Just to complete this thread here is how this problem was solved. Our aar file used to contain the wsdls for the services and apparently this is a problem with axis1.5. Note however that axis1.3 was fine with the wsdls being part of the aar file. This is perhaps a bug in axis1.5 ? When the wsdls are not part of the aar file, the strings were reaching the implementation class just as expected. We found this out while trying to get a stripped down version of our aar file, so thanks to Andreas for the idea. -Suma -Original Message- From: Andreas Veithen [mailto:andreas.veit...@gmail.com] Sent: Wednesday, June 17, 2009 5:42 PM To: axis-user@ws.apache.org Subject: Re: Problem upgrading from 1.3 to 1.5 Can you provide a stripped down AAR file that reproduces this issue? Andreas On Wed, Jun 17, 2009 at 22:39, Bhat, Sumasuma_b...@bmc.com wrote: I am testing the services with soapui at the moment and I am sending the username/password in a simple soap request. soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ser=http://service.xx.yy.bmc.com; soapenv:Header/ soapenv:Body ser:doLogin !--Optional:-- ser:usernamesysadmin/ser:username !--Optional:-- ser:passwordsysadmin2/ser:password /ser:doLogin /soapenv:Body /soapenv:Envelope As you will see from the stack trace the service implementation is complaining that the username is empty, when it clearly is not empty in the request. The response to this is: soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Body soapenv:Fault faultcodesoapenv:Server/faultcode faultstringUser name should not be empty/faultstring detail Exceptionorg.apache.axis2.AxisFault: User name should not be empty at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:158) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:142) 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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) 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) Caused by: java.lang.reflect.InvocationTargetException 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:597) at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194) at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102) ... 20 more Caused by: java.lang.IllegalArgumentException: User name should not be empty at com.bmc.bcan.ws.shared.ValidationUtils.validateAsNonEmpty(ValidationUtils.java:33) at com.bmc.bcan.ws.shared.AuthenticationService.validateDoLoginParams(AuthenticationService.java:104) at com.bmc.bcan.ws.service.AuthenticationServiceImpl.doLogin(AuthenticationServiceImpl.java:49) ... 26 more/Exception /detail /soapenv:Fault /soapenv:Body /soapenv:Envelope -Original Message- From: Andreas Veithen
Re: Axis WS on mobile devices
Hi Dennis, finally a good response - I appreciate it. I concur with you on the J2ME compatibility issues, in fact I did experience that first hand in my current implementations. I am looking into JiBX now, I knew a few things about it but not at the level that I can comfortably say that this could be a good solution for what I am after. But from what you are saying below, this is a very promising direction and it would be good to give it a shot. This is open-source code right? Thanks Dennis Sosnoski wrote: Hi Demetris, Part of the problem is that J2ME compatibility is not the easiest thing to determine - it's not like you can just set a compiler option and have any compatibility problems reported during the build. JiBX used to work on mobile devices, though I think the J2ME compatibility for the runtime has been lost over the last year or two. If you'd like to give it a try, I'll look into fixing whatever needs to be changed (some uses of ArrayList and HashMap, from what I remember, along with some java.sql class references). You could then use the JiBX/WS web services support for your J2ME platform: http://jibx.sourceforge.net/jibxws/ JiBX/WS is significantly faster than Axis2 when used for plain text web services, and if we decided to implement XBIS and TCP/IP support for J2ME as well it'd be several times faster. - Dennis Dennis M. Sosnoski XML and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Demetris G wrote: Hi all, I asked this question before (twice) but I didn't get a single response, interestingly enough. I am assuming by now that there is no mobile version of Axis/Axis2 and all the stories I hear about people getting Web services to work on mobiles is a fiction ... Has anyone managed to run Web Services (servers primarily) on mobile devices (either CDC, CLDC, scripting, Web Runtime etc.)? I will appreciate any feedback on something like this. Thanks very much
Re: Axis WS on mobile devices
One more note - I was able to get Axis 1.4 to run on a CDC device using Jalimo and Knopflerfish OSGi as the container but as expected it is fairly slow ... So yes, such options are out of the question. Dennis Sosnoski wrote: Hi Demetris, Part of the problem is that J2ME compatibility is not the easiest thing to determine - it's not like you can just set a compiler option and have any compatibility problems reported during the build. JiBX used to work on mobile devices, though I think the J2ME compatibility for the runtime has been lost over the last year or two. If you'd like to give it a try, I'll look into fixing whatever needs to be changed (some uses of ArrayList and HashMap, from what I remember, along with some java.sql class references). You could then use the JiBX/WS web services support for your J2ME platform: http://jibx.sourceforge.net/jibxws/ JiBX/WS is significantly faster than Axis2 when used for plain text web services, and if we decided to implement XBIS and TCP/IP support for J2ME as well it'd be several times faster. - Dennis Dennis M. Sosnoski XML and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Demetris G wrote: Hi all, I asked this question before (twice) but I didn't get a single response, interestingly enough. I am assuming by now that there is no mobile version of Axis/Axis2 and all the stories I hear about people getting Web services to work on mobiles is a fiction ... Has anyone managed to run Web Services (servers primarily) on mobile devices (either CDC, CLDC, scripting, Web Runtime etc.)? I will appreciate any feedback on something like this. Thanks very much
Re: Axis WS on mobile devices
Dennis - sorry for the multiple postings - do you have any experience with kSOAP/kSOAP2 and do you think that could also be a viable solution for hosting WS on J2ME devices? Thanks Dennis Sosnoski wrote: Hi Demetris, Part of the problem is that J2ME compatibility is not the easiest thing to determine - it's not like you can just set a compiler option and have any compatibility problems reported during the build. JiBX used to work on mobile devices, though I think the J2ME compatibility for the runtime has been lost over the last year or two. If you'd like to give it a try, I'll look into fixing whatever needs to be changed (some uses of ArrayList and HashMap, from what I remember, along with some java.sql class references). You could then use the JiBX/WS web services support for your J2ME platform: http://jibx.sourceforge.net/jibxws/ JiBX/WS is significantly faster than Axis2 when used for plain text web services, and if we decided to implement XBIS and TCP/IP support for J2ME as well it'd be several times faster. - Dennis Dennis M. Sosnoski XML and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Demetris G wrote: Hi all, I asked this question before (twice) but I didn't get a single response, interestingly enough. I am assuming by now that there is no mobile version of Axis/Axis2 and all the stories I hear about people getting Web services to work on mobiles is a fiction ... Has anyone managed to run Web Services (servers primarily) on mobile devices (either CDC, CLDC, scripting, Web Runtime etc.)? I will appreciate any feedback on something like this. Thanks very much
dynamic wsdl address location (end point)
hi, i would like to ask you a question about the wsdl. when i devloped a (java) web service in .aar data, the address location in wsdl ist something like http://localhost.;. then i copied this .aar file to three different Host, each Host has different IP Address. in each Host, the .aar file will be deployed by Tomcat. then i used the fourth PC as PHP Client to call these three Web Services. on the PHP Client, i can define the end point of the web service, because i know which IP the web service has. but the soap:address location in each WSDL refers to http://localhost.;, it is not dynamic. can anyone give me somt tips: what should be changed, so that the soap:address location in each WSDL refers to http://Host IP...? as i know, the wsdl file is contained in .aar file, when the web service project be cleaned and builded. as i copied the .aar to different PC/Host (each Host has different IP). how could the soap:address location in wsdl be changed automatic/dynamic, thanks. for example: Now: service name=StockQuoteService documentationMy first service/documentation port name=StockQuotePort binding=tns:StockQuoteBinding soap:address location=http://localhost/stockquote/ /port /service when .aar Data is deployed in Host, the address location in wsdl should be changed into: http://192.168.100.12/stockquote for example, 192.168.100.12 is the IP Address of this Host. -- View this message in context: http://www.nabble.com/dynamic-wsdl-address-location-%28end-point%29-tp24212134p24212134.html Sent from the Axis - User mailing list archive at Nabble.com.