using Axis2 library to directly invoke a method
I am getting a REST URL of format http://localhost:8080/quoteService/quote/NYSE/IBM . I have a mapping from URL to function name and I can translate this to AXIS REST URL like http://localhost:8080/quoteService/getQuote?symbol=IBM&exchange=NYSE Redirecting the original request to AXIS URL goes over the Network stack and I want to avoid it. Is there a way I can use AXIS2 library to directly invoke necessary function. The reason I don't want to directly call getQuote("IBM", "NYSE") is that it requires me parsing the request objects and mapping the function parameters in right order. URL manipulation is trivial and I want to use AXIS library for the remaining work. -- View this message in context: http://www.nabble.com/using-Axis2-library-to-directly-invoke-a-method-tp19458112p19458112.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]
Connection timed out in little slow webservice
Hello, My problem concerns some timeouts which are made by long time running process inside soap method. Fault looks like: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.net.ConnectException: Connection timed out: connect faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection timed out: 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.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:516) ... java.net.ConnectException: Connection timed out: connect at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) ... My webservice is doing some indexing job with Lucene search engine, I implemented method addDocument(some args here), and send via Internet SOAP requests. Everything looks great for time when Lucene needs some more time to merge index, at that time it takes some more time about (5-10sec), and I get this exception. I don't understand why AXIS client can't connect, I thought that AXIS webservice would take a request I wait until Lucene job is done (it have to wait anyway because all document additions are synchronized). So why this timeout happens, why can't wait for job done? I try also to longer a bit timeout with http://ws.apache.org/axis/java/apiDocs/org/apache/axis/client/Call.html#setTimeout(java.lang.Integer) but it seems to not work in my client, anybody knows why - maybe is other way to do this? Best regards, Adrian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reading properties files from AXIS
Hello, I never do it before but I need to read properties file from an application deployed as a service of AXIS. My first unsuccessful attempt was: Properties props = new Properties(); URL url = ClassLoader.getSystemResource("lucene.properties"); props.load(url.openStream()); System.out.println("Using index: " + props.getProperty("index.location")); this.indexLocation = props.getProperty("index.location"); File lucene.properties I put in ${tomcatDir}/webapps/axis/WEB-INF/classes/lucene.properties, so I thought I could read it as resource in non-web application using classpath load, but it won't work - I think that in web servers must be another way to read properties, maybe some dedicated for AXIS. Maybe there is another option to provide variables to AXIS without hardcoding them into Java classes you could share? Best regards, Adr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
could not find deserializer for type (in client)
Hello, I have problem with deserializing response from my application, it seems that the problem lays on client side because returned XML seems alright in SOAP Monitor. Part of my client where this problem appears looks like: private final String endpoint = "http://127.0.0.1:8081/axis/services/AdvertisementManager";; private AdvertisementDummy getAdverisement(int i) { AdvertisementDummy dummy = null; try { Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setOperationName(new QName("http://soapinterop.org/";, "getAdvertisement")); dummy = (AdvertisementDummy) call.invoke(new Object[] { i }); call.getResponseMessage().getSOAPPartAsString(); System.out.println("Got '" + dummy + "'"); } catch (Exception e) { e.printStackTrace(); } return dummy; } I can provide WSDL, response and request messages, but they are quite large, and maybe solution of my problem doesn't need them. Exception thrown by AXIS: 2006-10-30 11:57:45,171 ERROR [org.apache.axis.client.Call] - org.xml.sax.SAXException: Deserializing parameter 'getAdvertisementReturn': could not find deserializer for type {urn:soap.advertisement}AdvertisementDummy at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.client.Call.invoke(Call.java:2467) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at ogloszenia.test.SOAPTest.getAdverisement(SOAPTest.java:114) at ogloszenia.test.SOAPTest.main(SOAPTest.java:35) AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: Deserializing parameter 'getAdvertisementReturn': could not find deserializer for type {urn:soap.advertisement}AdvertisementDummy faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Deserializing parameter 'getAdvertisementReturn': could not find deserializer for type {urn:soap.advertisement}AdvertisementDummy at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.client.Call.invoke(Call.java:2467) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at ogloszenia.test.SOAPTest.getAdverisement(SOAPTest.java:114) at ogloszenia.test.SOAPTest.main(SOAPTest.java:35) {http://xml.apache.org/axis/}hostname:Hostname Anybody has idea what could be wrong? Response seems to be alright, but in client I cannot get it deserialized (in other way it works good I mean when I send serialized object AdvertisementDummy to server). Thx in advance for help, Adrian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]