Re: Help: Exception when i use 2 level
Hallo Anne, Also, an element's local name cannot contain spaces:project1:user field That is it! thanks a lot! Do U know, is there some validate tools for SOAP message? it is realy tiring when the message getting bigger.
Re: [Axis 2] MTOM Response is missing MIMEBoundary
imagexop:Include xmlns:xop=http://www.w3.org/2004/08/xop/include; href=cid:1.urn:uuid:[EMAIL PROTECTED] //image This means your client is correctly receiving a MTOM optimised message. Now I wonderhow you got the message snapshot you posted in your first message. What is the mechanism you used for message sniffing. Try using TCPMON and send the on the wire message snapshots. Also if possible post your client code. Problem seems to be with your client code. ~Thilina If that can help you diagnose the problem any better. Thanks! Thilina, Thanks for the quick response. I do have MTOM enabled in axis2.xml as you mentioned below. And on the server side, I construct the OMText this way. OMText textData = factory.createOMText(dh, true); which means should it should be optimized. And I am pretty sure I have followed all other steps as outlined in the MTOM guide. Can't figure out what else might be wrong. Here's my server code (almost an exact replica of what's in mtom guide). public OMElement getReport(String devName) { OMElement imageElement = null; String inputImageFileName = Blue_hills.jpg; try { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace ns = factory.createOMNamespace(, getReport); imageElement = factory.createOMElement(image, ns); Image image; image = new ImageIO().loadImage(new FileInputStream(inputImageFileName)); ImageDataSource ds = new ImageDataSource(Blue_hills.jpg, image); DataHandler dh = new DataHandler(ds); OMText textData = factory.createOMText(dh, true); imageElement.addChild(textData); } catch (Exception e) { e.printStackTrace(); } return imageElement; } Thanks, Sathija. Hi, First of all your message does not contain any MTOM Optimised parts. Binary attachment has been sent inline with XML payload by base64 encoding. Enable MTOM in the server by adding follwing to the axis2.xml. parameter name=enableMTOM locked=falsetrue/parameter ~Thilina On 8/10/06, Sathija Pavuluri [EMAIL PROTECTED] wrote: Hi, I am implementing an Axis service to send binary attachments from the server to an axis client. I've enabled MTOM and optimized the data as described in the MTOM Guide. When I try to retrieve the OMText at the client side, I get a class cast exception, since the response is returning an OMElement. Here's what the TCPMon response shows: ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header / soapenv:Body ns:getDiscrepancyReportResponse xmlns:ns=http://service.ws.ena.emprisa.com/xsd; ns:return/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAJYAyADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3TNGaj3Ck3fnW9jz+YlzRmosilzRYOYkzRmo80ZosHMSZozTM0ZpWDmHc0uajzRmnYOYkzRmmZozSsFx+aM0zNGaLBzD80ZpuaM0DuPzRmmZozRYXMPzRTM0ZosFx+aM0zNGaLDuPzRmmZ o! z! RY L! j80ZpM0Uiri0ZpuaM0WDmJM03NNzRmiwc47NFJmjNAXFozSU3NAXH5ozTM0Zp2DmH0ZpuaM0rBcdmjNMzS5FFg5iTNFR5pc0WC4/NGaZmjNIdx9GaZmjNAXH0ZpmaM0BcfmjNMzS0BcdmjNMzRmgLj80ZpmaM0BcdmkpM0Ux8w7NGabRRYOYdmjNNzRmiwcQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAJYAyADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3TNGaj3Ck3fnW9jz +! Y! lz R!
Re: [Axis2]How to invoke a webservice built by Axis2 in PHP?
Hi Chinthaka, How could I use the stub code in PHP? Thanks, Jiang 2006/8/10, Eran Chinthaka [EMAIL PROTECTED]: The easiest way is to write your implement the contract first approach,which I always encourage.Write your own wsdl, use wsdl2java to generate clients and/or server side code and use them. Its the best way.-- Chinthakazhu jiang wrote: I cannot use document/literal style message because the operation I wrote has two parameters, and by now only rpcmessage receiver supports for this in Axis2. What should I do? 2006/8/10, Eran Chinthaka [EMAIL PROTECTED] mailto: [EMAIL PROTECTED]: Is your SoapClient supports document/literal style messages? zhu jiang wrote: Hi All, I made a webservice by Axis2 v1.0 using RPCMessageReceiver,but I can't use the SoapClient class in PHP to invoke the webservice. For example: $soapclient=new SoapClient( http://127.0.0.1:8080/axis2/services/version?wsdl); ... But the SoapClient could invoke webservices built by Axis 1.3 . Does Axis2 not support this? What should I do? Thanks, Jiang
Re: [Axis2]How to invoke a webservice built by Axis2 in PHP?
I think there would be two ways of accessing a web service from PHP:1 - use the java stub via PHP's Java integration - http://uk.php.net/java2 - POST a SOAP message to the service's REST endpoint without using the stub. Just create the SOAP message in PHP - http://uk2.php.net/soapI've never had to use Java from PHP so I'd probably try the REST approach. You'll need PHP 5 though.AlistairOn 11 Aug 2006, at 08:06, zhu jiang wrote:Hi Chinthaka, How could I use the stub code in PHP? Thanks, Jiang 2006/8/10, Eran Chinthaka [EMAIL PROTECTED]: The easiest way is to write your implement the contract first approach,which I always encourage.Write your own wsdl, use wsdl2java to generate clients and/or server side code and use them. Its the best way.-- Chinthakazhu jiang wrote: I cannot use document/literal style message because the operation I wrote has two parameters, and by now only rpcmessage receiver supports for this in Axis2. What should I do? 2006/8/10, Eran Chinthaka [EMAIL PROTECTED] mailto: [EMAIL PROTECTED]: Is your SoapClient supports document/literal style messages? zhu jiang wrote: Hi All, I made a webservice by Axis2 v1.0 using RPCMessageReceiver, but I can't use the SoapClient class in PHP to invoke the webservice. For example: $soapclient=new SoapClient(" http://127.0.0.1:8080/axis2/services/version?wsdl"); ... But the SoapClient could invoke webservices built by Axis 1.3 . Does Axis2 not support this? What should I do? Thanks, Jiang
Re: User Guide: Code generation for client
Guys, This issue being discussed seems to be against Axis2, I'd suggest that you append a prefix [Axis2] (without quotes) to your messages and post so that your mail lands up in the filters of the saviours :) cheers Jaya On 8/10/06, Deepak Sharma [EMAIL PROTECTED] wrote: Thanks a lot Marcel for your findings. -Deepak On 8/8/06, Marcel Frehner [EMAIL PROTECTED] wrote: According to http://www.mail-archive.com/axis-user@ws.apache.org/msg16725.html , which Ihad overlooked before, we need to use the nightly snapshots. I still couldnot get it working. Now I definitely give up and wait for the next Release or at least for the next complete nightly build. Good luck for the rest or you!MarcelAt 18:01 07.08.2006 +0200, you wrote:Hey DeepakBy now I used to run the wsdl2java from Eclipse. Desperate as I am I tried the command line version and got correct stub and skeleton code with the following command:wsdl2java -uri Axis2SampleDocLitService.wsdl -ss -sd -d xmlbeanswsdl2java -uri Axis2SampleDocLitService.wsdl -d xmlbeansThis will also generate a TypeSystemHolder.class which needs to be copiedto the IDE project manually( http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html).The next error I get is the following:org.apache.axis2.AxisFault: Data binding erroratorg.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287)at org.apache.axis2.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServiceStub.java:481)at org.Client.main(Client.java:25)No idea where that comes from:-( Maybe it's just the AXIS_HOME Good luck!MarcelMy client looks like this:package org;import org.apache.axis2.Axis2SampleDocLitServiceStub;import org.apache.axis2.userguide.xsd.EchoStringParamDocument ;import org.apache.axis2.userguide.xsd.EchoStringReturnDocument;public class Client {public static void main(String[] args){ try {//Create the stub by passing the AXIS_HOME and target EPR. //We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOMEAxis2SampleDocLitServiceStub stub= new Axis2SampleDocLitServiceStub(null, http://localhost:8080/axis2/services/Axis2SampleDocLitService );//Create the request document to be sent. EchoStringParamDocumentreqDoc= EchoStringParamDocument.Factory.newInstance();reqDoc.setEchoStringParam (Axis2 Echo);//invokes the Web service. EchoStringReturnDocument resDoc=stub.echoString(reqDoc);System.out.println(resDoc.getEchoStringReturn()); } catch (Exception e) { e.printStackTrace(); }}}At 11:28 07.08.2006 +0530, you wrote:I would really appreciate if Deepal, Derek or any active member can shed some light on this problem. Thanks,DeepakOn 8/4/06, Marcel Frehnermailto: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:I gave it another try. But I could not get any further this time. I've stillgot the following client, where stub.echoString() expects anEchoStringParam, which I don't have... package org;import org.apache.axis2.userguide.* ;import org.apache.axis2.userguide.xsd.EchoStringParamDocument;import org.apache.axis2.userguide.xsd.EchoStringReturnDocument ;public class Client {public static void main(String[] args) { try {Axis2SampleDocLitServiceStub stub = new Axis2SampleDocLitServiceStub(null, http://localhost:8080/axis2/services/Axis2SampleDocLitService);EchoStringParamDocument reqDoc = EchoStringParamDocument.Factory .newInstance();reqDoc.setEchoStringParam (Axis2 Echo);EchoStringReturnDocument resDoc = stub.echoString(reqDoc);System.out.println(resDoc.getEchoStringReturn ());} catch (Exception e) {e.printStackTrace ();}}}I would very much appreciate some help!Marcel At 22:21 03.08.2006 +0530, you wrote: Thanks Marcel for the inputs. As I am new to this Axis, so would not be able to comment. I would really appreciate if anyone give us the right direction to resolve this problem. Thanks, Deepak On 8/3/06, Marcel Frehner mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Deepak I've got the same problem and can't find a solution. Following up your thread about the EchoStringParam I would suggest something like the code below. But what ist the XMLStreamReader supposed to be? I mean, how can I create an EchoStringParam? Marcel *** import org.apache.axis2.userguide.Axis2SampleDocLitServiceStub; import org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.EchoStringParam ; import org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.EchoStringReturn ; import javax.xml.stream.XMLStreamReader; public class Client { public static void main(String[] args) { try { Axis2SampleDocLitServiceStub stub = new Axis2SampleDocLitServiceStub( null, http://localhost:8080/axis2/services/Axis2SampleDocLitPortType http:/ / localhost:8080/axis2/services/Axis2SampleDocLitPortType http://localhost : 8080/axis2/services/Axis2SampleDocLitPortType ); XMLStreamReader r=null; //of course this must not be null!!! EchoStringParam p= EchoStringParam.Factory.parse (r); p.setEchoStringParam(Axis2 Echo);
[Axis2] User Guide: Code generation for client
Thanks Jaya! Changed the Subject accordingly. I have cut and paste the problem again: This question has already been asked in the forum and I suppose I am the third person to ask this question. But no response has come so far to rectify this problem. Following is the problem: I am facing someproblem creating client for the example mentioned in the user guide. http://ws.apache.org/axis2/1_0/userguide3.html#Writing_Web_Service_Clients_using_Code_Generation_with_Data_Binding_Support WSDL2Java is not generating Axis2SampleDocLitPortTypeStub.java instead it is generating Axis2SampleDocLitServiceStub.java and it's Callback Handler. Following is the client which I have written but it is not getting compiled as echoString method expects EchoStringParam not EchoStringParamDocument. EchoStringReturnDocument resDoc = stub.echoString(reqDoc); publicclass Client { public static void main(String[] args) { try { Axis2SampleDocLitServiceStub stub = new Axis2SampleDocLitServiceStub( null, http://localhost:8080/axis2/services/Axis2SampleDocLitPortType ); EchoStringParamDocument reqDoc = EchoStringParamDocument.Factory .newInstance(); reqDoc.setEchoStringParam(Axis2 Echo); EchoStringReturnDocument resDoc = stub.echoString(reqDoc); System.out.println(resDoc.getEchoStringReturn()); } catch (Exception e) { e.printStackTrace(); } } Looking forward for your response. ## Regards, Deepak On 8/11/06, jayachandra [EMAIL PROTECTED] wrote: Guys, This issue being discussed seems to be against Axis2, I'd suggest that you append a prefix [Axis2] (without quotes) to your messages and post so that your mail lands up in the filters of the saviours :) cheers Jaya On 8/10/06, Deepak Sharma [EMAIL PROTECTED] wrote: Thanks a lot Marcel for your findings. -Deepak On 8/8/06, Marcel Frehner [EMAIL PROTECTED] wrote: According to http://www.mail-archive.com/axis-user@ws.apache.org/msg16725.html , which Ihad overlooked before, we need to use the nightly snapshots. I still couldnot get it working. Now I definitely give up and wait for the next Release or at least for the next complete nightly build. Good luck for the rest or you!MarcelAt 18:01 07.08.2006 +0200, you wrote:Hey DeepakBy now I used to run the wsdl2java from Eclipse. Desperate as I am I tried the command line version and got correct stub and skeleton code with the following command:wsdl2java -uri Axis2SampleDocLitService.wsdl -ss -sd -d xmlbeanswsdl2java -uri Axis2SampleDocLitService.wsdl -d xmlbeansThis will also generate a TypeSystemHolder.class which needs to be copiedto the IDE project manually( http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html).The next error I get is the following:org.apache.axis2.AxisFault: Data binding erroratorg.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287)at org.apache.axis2.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServiceStub.java:481)at org.Client.main(Client.java:25)No idea where that comes from:-( Maybe it's just the AXIS_HOME Good luck!MarcelMy client looks like this:package org;import org.apache.axis2.Axis2SampleDocLitServiceStub;import org.apache.axis2.userguide.xsd.EchoStringParamDocument ;import org.apache.axis2.userguide.xsd.EchoStringReturnDocument;public class Client {public static void main(String[] args){ try {//Create the stub by passing the AXIS_HOME and target EPR. //We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOMEAxis2SampleDocLitServiceStub stub= new Axis2SampleDocLitServiceStub(null, http://localhost:8080/axis2/services/Axis2SampleDocLitService );//Create the request document to be sent. EchoStringParamDocumentreqDoc= EchoStringParamDocument.Factory.newInstance();reqDoc.setEchoStringParam (Axis2 Echo);//invokes the Web service. EchoStringReturnDocument resDoc=stub.echoString(reqDoc);System.out.println(resDoc.getEchoStringReturn()); } catch (Exception e) { e.printStackTrace(); }}}At 11:28 07.08.2006 +0530, you wrote:I would really appreciate if Deepal, Derek or any active member can shed some light on this problem. Thanks,DeepakOn 8/4/06, Marcel Frehnermailto: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:I gave it another try. But I could not get any further this time. I've stillgot the following client, where stub.echoString() expects anEchoStringParam, which I don't have... package org;import org.apache.axis2.userguide.* ;import org.apache.axis2.userguide.xsd.EchoStringParamDocument;import org.apache.axis2.userguide.xsd.EchoStringReturnDocument ;public class Client {public static void main(String[] args) { try {Axis2SampleDocLitServiceStub stub = new Axis2SampleDocLitServiceStub(null, http://localhost:8080/axis2/services/Axis2SampleDocLitService);EchoStringParamDocument reqDoc = EchoStringParamDocument.Factory .newInstance();reqDoc.setEchoStringParam (Axis2 Echo);EchoStringReturnDocument resDoc =
[Axis2] Bizarre chunked thing
Hi, when using Axis-1.0, I had to put (CHUNKED = true) to call the Google Webservice client.getOptions().setProperty(MessageContextConstants.CHUNKED, new Boolean(true)); otherwise I'd get a java.net.SocketException: Software caused connection abort: recv failed; Now I'm using the snapshot (aug 10) and MessageContextConstants.CHUNKED is deprecated, so I use HttpConstants.CHUNKED. client.getOptions().setProperty(HTTPConstants.CHUNKED, new Boolean(false)); The bizarre thing is, now I have to set it to false otherwise I get the same exception... It's not really a problem ofcourse, but I thought I'd mention it. Brecht Invenso - The Integration Software specialists. _ Brecht Yperman Development team Direct: +32 (0)3 780 30 05 Email: [EMAIL PROTECTED] INVENSO bvba Industriepark-West 75 9100 Sint-Niklaas Belgium - Europe Phone: +32 (0)3 780 30 02 Fax: +32 (0)3 780 30 03 Email: [EMAIL PROTECTED] Website: www.invenso.com E-mail disclaimer: This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Webservice deployment in Axis/AppServer
Hello, I have a question about web-service deployment: Introduction: My project has 3 tiers - View tier (struts(jsp) / servlets / webService) - Service tier (the business services) - Data tier (data access with hibernate / DAO...) My business processes can be called from different ways: - By an Http request to a servlet - By jsps with struts - By a webservice I have a JAR called : businessServices.jar that embedded the business services. I also have 3 different JARs that embedded the facades (servlet/jsps/webService) My question is: What is the best practice about deployment with AXIS 2. If I use JBOSS with Axis2 (please do not ask me: Why are you using JBOSS ;-), where would you deploy the WebService ? - Into the web-inf dir of the AXIS WebApp ? In this case, the businessService JAR will be duplicated (in the AXIS lib directory, and in the lib directory of the struts webApp)... Or is it better to build a webapp that embeddeds the WS and the AXIS lib and specifies that I use the embedded AXIS for SOAP request, in this case I will not be able to manage my WS by the AXIS admin page (WSDL, exposed services, ...) What is your advice about that ? Thanks a lot, John -- View this message in context: http://www.nabble.com/Webservice-deployment-in-Axis-AppServer-tf2089193.html#a5758173 Sent from the Axis - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Disappearing SOAP header when using MIME attachments
Hi there! I encountered a very strange behavior while using Axis with several handlers and MIME attachments. I tried a bunch of different Axis versions including 1.2, 1.3 and 1.4. The problem occurs in all of them. At the client-side I have two handlers in the global chain. The first one encrypts the SOAP body as well as MIME attachments (if present) and the second one signs the SOAP body. The encryption handler is an own development and for signing I use the WSS4J handler. Without attachments everything works fine. The encrypted and signed SOAP request will be constructed and send via CommonsHTTPSender to the server. When an MIME attachment is present, though, the security header included by WSS4J disappears. I did some debugging (essentially some more than only some ;-) and saw, that the SOAP request is full-fledge when leaving the global chain. On the wire the WSS4J header is not present. It gets lost somewhere in between. I debugged further and have the impression that something goes wrong when transforming the SOAP envelope to the bytes that are then passed to the OutputStream towards the server. Might it be the case, that the class holding the MIME multipart encoded bytes, doesn't get refreshed, when the WSS4J handler adds his security header? Again, the correct message can be retrieved from the MessageContext, but is not complete within the CommonsHTTPSender. Any ideas regarding this...!? Cheers, Luigi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Base64
Thanks Anne, We have a service returning a string as XML. Following is the sample out-put of the service. ?xml version=”1.0” encoding=”UTF-8”? person firstnameNirmish/firstname lastnameDholakia/lastname age25/age /person So in the WSDL the type of the output is defined as “type=soapenc:string”. Now The requirement is like .. we want to append two images in the current websevice response. So the response would be like below. ?xml version=”1.0” encoding=”UTF-8”? person headerimage/headerimage firstnameNirmish/firstname lastnameDholakia/lastname age25/age footerimage /footerimage /person For producing above out put. Can I encode the image file using Base64 and pass this base64 string as element’s(headerimage and footerimage) value. If yes then will the .Net client able to decode the same? Or is there any other way? Please give your inputs/comments. Thanks You Nirmish -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 10, 2006 8:36 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: Base64 Yes. Define it as type=xsd:base64binary. Anne On 8/10/06, Nirmish Dholakia [EMAIL PROTECTED] wrote: Hi All, I have a web services written in Java. and the client for this webservice is in .Net environment. I am passing an image file in this webservice using Base64 encoding. Now the question is will the .Net client able to decode the same? Please provide your views/inputs. Thank You Nirmish -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2]How to invoke a webservice built by Axis2 in PHP?
Well you can also use the PHP Axis2 extention built on top of Axis2/C. It is here: http://pecl.php.net/package/axis2 Samisa... Alistair Young wrote: I think there would be two ways of accessing a web service from PHP: 1 - use the java stub via PHP's Java integration - http://uk.php.net/java 2 - POST a SOAP message to the service's REST endpoint without using the stub. Just create the SOAP message in PHP - http://uk2.php.net/soap I've never had to use Java from PHP so I'd probably try the REST approach. You'll need PHP 5 though. Alistair On 11 Aug 2006, at 08:06, zhu jiang wrote: Hi Chinthaka, How could I use the stub code in PHP? Thanks, Jiang 2006/8/10, Eran Chinthaka [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: The easiest way is to write your implement the contract first approach, which I always encourage. Write your own wsdl, use wsdl2java to generate clients and/or server side code and use them. Its the best way. -- Chinthaka zhu jiang wrote: I cannot use document/literal style message because the operation I wrote has two parameters, and by now only rpcmessage receiver supports for this in Axis2. What should I do? 2006/8/10, Eran Chinthaka [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Is your SoapClient supports document/literal style messages? zhu jiang wrote: Hi All, I made a webservice by Axis2 v1.0 using RPCMessageReceiver, but I can't use the SoapClient class in PHP to invoke the webservice. For example: $soapclient=new SoapClient( http://127.0.0.1:8080/axis2/services/version?wsdl;); ... But the SoapClient could invoke webservices built by Axis 1.3 . Does Axis2 not support this? What should I do? Thanks, Jiang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Installation problem with Tomcat 5.5
Hello, I've deployed the axis2.war in Tomcat 5.5 on Windows XP. Everything seems fine (validate, etc..). When I test the default version service, the WSDL is available but the service invocation fails with Resource not found!. I've tried the same thing with the latest nightly build (http://people.apache.org/dist/axis2/nightly/axis2.war). I've seen much noise about on the web about this, but no concrete answer. BTW, the Tomcat logs show nothing. Thank you in advance, Regards, Patrice Aubry Senior Architect Tel: +33 (0) 6 6894 1343 [EMAIL PROTECTED] This e-mail contains information which is SITA - Company Confidential
[AXIS2] Integration with SPRING
Hi all, Actually, I'm implementing a protocol using the AXIS2, HIBERNATE and SPRING architecture. I have an application which use HIBERNATE and SPRING to do the Data Object Access. And I want to use this code to ensure the persistence in Axis2. Actually, I was wondering how I should integrate SPRING and AXIS2. Can you describe me how to do that orgive me a link which describe this integration?? Thanks so much for any help you cuold provide!! Fabien This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
RE: Apache Conference Asia
http://www.asia.apachecon.com/ Google is your friend. Brecht From: Senaka Suriyaarachchi [mailto:[EMAIL PROTECTED] Sent: vrijdag 11 augustus 2006 12:33 To: axis-user@ws.apache.org Subject: Apache Conference Asia Hi, I heard that there is an Apache Conference in August. Please give more details. BR Senaka Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] Integration with SPRING
Spring support is in the nightlies: http://people.apache.org/dist/axis2/nightly/ Its documented here: http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/xdocs/latest/spring.html HTH, Robert http://www.braziloutsource.com/On 8/11/06, Fabien Couble [EMAIL PROTECTED] wrote: Hi all, Actually, I'm implementing a protocol using the AXIS2, HIBERNATE and SPRING architecture. I have an application which use HIBERNATE and SPRING to do the Data Object Access. And I want to use this code to ensure the persistence in Axis2. Actually, I was wondering how I should integrate SPRING and AXIS2. Can you describe me how to do that orgive me a link which describe this integration?? Thanks so much for any help you cuold provide!! Fabien This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
request always calls the first operation defined in server-config.wsdd
Hi Folks, I am starting to really get to grips with my web services now, with much thanks to Axis. This morning, though, I have encountered a problem which I can't work out whether is my fault (likely) or a potential problem. I have two requests defined (in the scope of this problem): public void requestFileDetails(String guid) throws ServiceException, RemoteException { // make the request SpiralTestSoapService service = getService(); SingleGUID sguid = new SingleGUID(guid); RequestFileDetailsResponse response = service.requestFileDetails(sguid); } public void articleUpdateNotification(String guid) throws ServiceException, RemoteException { // make the request SpiralTestSoapService service = getService(); SingleGUID sguid = new SingleGUID(guid); service.articleUpdateNotification(sguid); } these in turn call the relevant operations on the port type (The xxx_BindingImpl class). When either of the above methods are called in the client, the server /always/ processes the request to requestFileDetails. I discovered that I could fix this so that it always processed the request to articleUpdateNotification by reversing the order that these two operations are specified in the server-config.wsdd: operation name=articleUpdateNotification qname=ArticleUpdateNotification mep=oneway parameter qname=pns:SingleGUID xmlns:pns=http://[...]/SpiralWebService/; type=tns:SingleGUID xmlns:tns=http://[...]/SpiralWebService// /operation operation name=requestFileDetails qname=RequestFileDetails returnQName=retNS:RequestFileDetailsResponse xmlns:retNS=http://[...]/SpiralWebService/; returnType=rtns:RequestFileDetailsResponse xmlns:rtns=http://[...]/SpiralWebService/; parameter qname=pns:SingleGUID xmlns:pns=http://[...]/SpiralWebService/; type=tns:SingleGUID xmlns:tns=http://[...]/SpiralWebService// /operation I upped log4j to DEBUG, and observed that the body of the request seems only to contain the data type, not the operation name: 2006-08-11 12:39:00,795 DEBUG org.apache.axis.providers.java.RPCProvider @ body is SingleGUID xmlns=http://[...]/SpiralWebService/;guid xmlns=1234567890/guid/SingleGUID The two above methods both take the SingleGUID data type as an argument, so I defined this type in the WSDL and re-used it all over the place. My current guess (and it is only a guess) is that Axis is just looking for the first operation that takes this data type, and executing it, no matter which operation it was intended for. Can anyone see what I might have done wrong? Am I misappropriating the data types and the way that axis uses them, or have I missed something in the way to call the web service, or is there something else? Any help much appreciated, Cheers -- Richard --- Richard Jones Web and Database Technology Specialist Imperial College London t: +44 (0)20 759 41815 e: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] OutflowSecurity config
Is it possible to configure OutflowSecurity in the single global axis2.xml file (axis2/WEB-INF/conf/axis2.xml) for many services that are in the axis2/WEB-INF/services directory (for when they act as clients, sending requests to any of the other services)? --amj
Re: [Axis 2] MTOM Response is missing MIMEBoundary
Thilina, Here is the client code. DeviceServiceStub.GetReportResponse repResponse = stub.getReport(rep); OMElement reportElement = null; reportElement = repResponse.get_return(); System.out.println(First child: + reportElement.getFirstOMChild().getClass().toString()); Iterator repChildren = reportElement.getChildren(); while (repChildren.hasNext()) { OMNode omNode = (OMNode) repChildren.next(); System.out.println(\n); System.out.println(OM child class: + omNode.getClass().toString()); System.out.println(\n); System.out.println(Data: \n); omNode.serialize(System.out); System.out.println(); } The line omNode.serialize(System.out); prints imagexop:Include xmlns:xop=http://www.w3.org/2004/08/xop/include; href=cid:1.urn:uuid:[EMAIL PROTECTED] //image There is one child as I expect but the child/omNode is always of type OMElement while I am expecting it to be OMText. The other soap message snapshot I posted earlier was from the SOAP Monitor. I had set it up as described here: http://ws.apache.org/axis2/1_0/soapmonitor-module.html Thanks, Sathija. imagexop:Include xmlns:xop=http://www.w3.org/2004/08/xop/include; href=cid:1.urn:uuid:[EMAIL PROTECTED] //image This means your client is correctly receiving a MTOM optimised message. Now I wonderhow you got the message snapshot you posted in your first message. What is the mechanism you used for message sniffing. Try using TCPMON and send the on the wire message snapshots. Also if possible post your client code. Problem seems to be with your client code. ~Thilina If that can help you diagnose the problem any better. Thanks! Thilina, Thanks for the quick response. I do have MTOM enabled in axis2.xml as you mentioned below. And on the server side, I construct the OMText this way. OMText textData = factory.createOMText(dh, true); which means should it should be optimized. And I am pretty sure I have followed all other steps as outlined in the MTOM guide. Can't figure out what else might be wrong. Here's my server code (almost an exact replica of what's in mtom guide). public OMElement getReport(String devName) { OMElement imageElement = null; String inputImageFileName = Blue_hills.jpg; try { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace ns = factory.createOMNamespace(, getReport); imageElement = factory.createOMElement(image, ns); Image image; image = new ImageIO().loadImage(new FileInputStream(inputImageFileName)); ImageDataSource ds = new ImageDataSource(Blue_hills.jpg, image); DataHandler dh = new DataHandler(ds); OMText textData = factory.createOMText(dh, true); imageElement.addChild(textData); } catch (Exception e) { e.printStackTrace(); } return imageElement; } Thanks, Sathija. Hi, First of all your message does not contain any MTOM Optimised parts. Binary attachment has been sent inline with XML payload by base64 encoding. Enable MTOM in the server by adding follwing to the axis2.xml. parameter name=enableMTOM locked=falsetrue/parameter ~Thilina On 8/10/06, Sathija Pavuluri [EMAIL PROTECTED] wrote: Hi, I am implementing an Axis service to send binary attachments from the server to an axis client. I've enabled MTOM and optimized the data as described in the MTOM Guide. When I try to retrieve the OMText at the client side, I get a class cast exception, since the response is returning an OMElement. Here's what the TCPMon response shows: ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header / soapenv:Body ns:getDiscrepancyReportResponse xmlns:ns=http://service.ws.ena.emprisa.com/xsd;
complextype problem
Hi to all, I have implemented a complete web services framework with a UDDI registry in Axis enviroment.In this context I am not able to map a complextype from wsdl document to java: schema elements are always null. Does anyone know a mode to resolve this my problem? I am programming in axis_1.3 wsd4j_1.5 wsif_2.x and uddi library are juddi and uddi4j. I hope in your help bacuse i am in stand-by with my degree thesis. Thanks. ;-) Luca Un oceano di silenzio scorre lento senza centro nè principio... (F. Battiato). Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: request always calls the first operation defined in server-config.wsdd
Each operation must have a unique signature, i.e., you must specify a different qname for your two input parameters. (They can be the same type, but they must have different names.) Anne On 8/11/06, Richard Jones [EMAIL PROTECTED] wrote: Hi Folks, I am starting to really get to grips with my web services now, with much thanks to Axis. This morning, though, I have encountered a problem which I can't work out whether is my fault (likely) or a potential problem. I have two requests defined (in the scope of this problem): public void requestFileDetails(String guid) throws ServiceException, RemoteException { // make the request SpiralTestSoapService service = getService(); SingleGUID sguid = new SingleGUID(guid); RequestFileDetailsResponse response = service.requestFileDetails(sguid); } public void articleUpdateNotification(String guid) throws ServiceException, RemoteException { // make the request SpiralTestSoapService service = getService(); SingleGUID sguid = new SingleGUID(guid); service.articleUpdateNotification(sguid); } these in turn call the relevant operations on the port type (The xxx_BindingImpl class). When either of the above methods are called in the client, the server /always/ processes the request to requestFileDetails. I discovered that I could fix this so that it always processed the request to articleUpdateNotification by reversing the order that these two operations are specified in the server-config.wsdd: operation name=articleUpdateNotification qname=ArticleUpdateNotification mep=oneway parameter qname=pns:SingleGUID xmlns:pns=http://[...]/SpiralWebService/; type=tns:SingleGUID xmlns:tns=http://[...]/SpiralWebService// /operation operation name=requestFileDetails qname=RequestFileDetails returnQName=retNS:RequestFileDetailsResponse xmlns:retNS=http://[...]/SpiralWebService/; returnType=rtns:RequestFileDetailsResponse xmlns:rtns=http://[...]/SpiralWebService/; parameter qname=pns:SingleGUID xmlns:pns=http://[...]/SpiralWebService/; type=tns:SingleGUID xmlns:tns=http://[...]/SpiralWebService// /operation I upped log4j to DEBUG, and observed that the body of the request seems only to contain the data type, not the operation name: 2006-08-11 12:39:00,795 DEBUG org.apache.axis.providers.java.RPCProvider @ body is SingleGUID xmlns=http://[...]/SpiralWebService/;guid xmlns=1234567890/guid/SingleGUID The two above methods both take the SingleGUID data type as an argument, so I defined this type in the WSDL and re-used it all over the place. My current guess (and it is only a guess) is that Axis is just looking for the first operation that takes this data type, and executing it, no matter which operation it was intended for. Can anyone see what I might have done wrong? Am I misappropriating the data types and the way that axis uses them, or have I missed something in the way to call the web service, or is there something else? Any help much appreciated, Cheers -- Richard --- Richard Jones Web and Database Technology Specialist Imperial College London t: +44 (0)20 759 41815 e: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: Base64
Don't use SOAP Encoding. Define the service as style=wrapped (in either java2wsdl or WSDD). You may need to edit the generated WSDL file and specify the type of the image as xsd:base64binary. On 8/11/06, Nirmish Dholakia [EMAIL PROTECTED] wrote: Thanks Anne, We have a service returning a string as XML. Following is the sample out-put of the service. ?xml version=1.0 encoding=UTF-8? person firstnameNirmish/firstname lastnameDholakia/lastname age25/age /person So in the WSDL the type of the output is defined as type=soapenc:string. Now The requirement is like .. we want to append two images in the current websevice response. So the response would be like below. ?xml version=1.0 encoding=UTF-8? person headerimage/headerimage firstnameNirmish/firstname lastnameDholakia/lastname age25/age footerimage /footerimage /person For producing above out put. Can I encode the image file using Base64 and pass this base64 string as element's(headerimage and footerimage) value. If yes then will the .Net client able to decode the same? Or is there any other way? Please give your inputs/comments. Thanks You Nirmish -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 10, 2006 8:36 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: Base64 Yes. Define it as type=xsd:base64binary. Anne On 8/10/06, Nirmish Dholakia [EMAIL PROTECTED] wrote: Hi All, I have a web services written in Java. and the client for this webservice is in .Net environment. I am passing an image file in this webservice using Base64 encoding. Now the question is will the .Net client able to decode the same? Please provide your views/inputs. Thank You Nirmish -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: request always calls the first operation defined in server-config.wsdd
Hi Anne, Each operation must have a unique signature, i.e., you must specify a different qname for your two input parameters. (They can be the same type, but they must have different names.) I'm not sure I understand, sorry. Each operation in my WSDL has a different name, but some of them take the same argument (I didn't see a reason to define a bunch of different data types to encapsulate the same information). According to my WSDD file, the operations do have unique signatures/qnames: operation name=articleUpdateNotification qname=ArticleUpdateNotification mep=oneway operation name=requestFileDetails qname=RequestFileDetails ... Likewise, the server implementation has fully unique methods implementing each of these operations. I think the confusion is something to do with actually sending the request, rather than the server end. So for some reason the client code is not making it clear what the operation being requested is. Unfortunately, I don't understand the way that Axis produces the request in the first place, and none of the tools that should help me monitor it seem to work at my end (e.g. SOAPMonitor). Cheers, Richard Hi Folks, I am starting to really get to grips with my web services now, with much thanks to Axis. This morning, though, I have encountered a problem which I can't work out whether is my fault (likely) or a potential problem. I have two requests defined (in the scope of this problem): public void requestFileDetails(String guid) throws ServiceException, RemoteException { // make the request SpiralTestSoapService service = getService(); SingleGUID sguid = new SingleGUID(guid); RequestFileDetailsResponse response = service.requestFileDetails(sguid); } public void articleUpdateNotification(String guid) throws ServiceException, RemoteException { // make the request SpiralTestSoapService service = getService(); SingleGUID sguid = new SingleGUID(guid); service.articleUpdateNotification(sguid); } these in turn call the relevant operations on the port type (The xxx_BindingImpl class). When either of the above methods are called in the client, the server /always/ processes the request to requestFileDetails. I discovered that I could fix this so that it always processed the request to articleUpdateNotification by reversing the order that these two operations are specified in the server-config.wsdd: operation name=articleUpdateNotification qname=ArticleUpdateNotification mep=oneway parameter qname=pns:SingleGUID xmlns:pns=http://[...]/SpiralWebService/; type=tns:SingleGUID xmlns:tns=http://[...]/SpiralWebService// /operation operation name=requestFileDetails qname=RequestFileDetails returnQName=retNS:RequestFileDetailsResponse xmlns:retNS=http://[...]/SpiralWebService/; returnType=rtns:RequestFileDetailsResponse xmlns:rtns=http://[...]/SpiralWebService/; parameter qname=pns:SingleGUID xmlns:pns=http://[...]/SpiralWebService/; type=tns:SingleGUID xmlns:tns=http://[...]/SpiralWebService// /operation I upped log4j to DEBUG, and observed that the body of the request seems only to contain the data type, not the operation name: 2006-08-11 12:39:00,795 DEBUG org.apache.axis.providers.java.RPCProvider @ body is SingleGUID xmlns=http://[...]/SpiralWebService/;guid xmlns=1234567890/guid/SingleGUID The two above methods both take the SingleGUID data type as an argument, so I defined this type in the WSDL and re-used it all over the place. My current guess (and it is only a guess) is that Axis is just looking for the first operation that takes this data type, and executing it, no matter which operation it was intended for. Can anyone see what I might have done wrong? Am I misappropriating the data types and the way that axis uses them, or have I missed something in the way to call the web service, or is there something else? Any help much appreciated, Cheers -- Richard --- Richard Jones Web and Database Technology Specialist Imperial College London t: +44 (0)20 759 41815 e: [EMAIL PROTECTED] -- Richard --- Richard Jones Web and Database Technology Specialist Imperial College London t: +44 (0)20 759 41815 e: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] OutflowSecurity config
Hi, The best way to do this would be to dynamically configure the clients as mentioned here [1] Thanks, Ruchith [1] http://marc.theaimsgroup.com/?l=axis-userm=115517624610919w=2 On 8/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to configure OutflowSecurity in the single global axis2.xml file (axis2/WEB-INF/conf/axis2.xml) for many services that are in the axis2/WEB-INF/services directory (for when they act as clients, sending requests to any of the other services)? --amj -- www.ruchith.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] User Guide: Code generation for client
Hi, Are you guys using the -d xmlbeans option while code generating ? On 8/11/06, Deepak Sharma [EMAIL PROTECTED] wrote: Thanks Jaya! Changed the Subject accordingly. I have cut and paste the problem again: This question has already been asked in the forum and I suppose I am the third person to ask this question. But no response has come so far to rectify this problem. Following is the problem: I am facing some problem creating client for the example mentioned in the user guide. http://ws.apache.org/axis2/1_0/userguide3.html#Writing_Web_Service_Clients_using_Code_Generation_with_Data_Binding_Support WSDL2Java is not generating Axis2SampleDocLitPortTypeStub.java instead it is generating Axis2SampleDocLitServiceStub.java and it's Callback Handler. Following is the client which I have written but it is not getting compiled as echoString method expects EchoStringParam not EchoStringParamDocument. EchoStringReturnDocument resDoc = stub.echoString(reqDoc); publicclass Client { public static void main(String[] args) { try { Axis2SampleDocLitServiceStub stub = new Axis2SampleDocLitServiceStub( null, http://localhost:8080/axis2/services/Axis2SampleDocLitPortType ); EchoStringParamDocument reqDoc = EchoStringParamDocument.Factory .newInstance(); reqDoc.setEchoStringParam(Axis2 Echo); EchoStringReturnDocument resDoc = stub.echoString(reqDoc); System.out.println(resDoc.getEchoStringReturn()); } catch (Exception e) { e.printStackTrace(); } } Looking forward for your response. ## Regards, Deepak On 8/11/06, jayachandra [EMAIL PROTECTED] wrote: Guys, This issue being discussed seems to be against Axis2, I'd suggest that you append a prefix [Axis2] (without quotes) to your messages and post so that your mail lands up in the filters of the saviours :) cheers Jaya On 8/10/06, Deepak Sharma [EMAIL PROTECTED] wrote: Thanks a lot Marcel for your findings. -Deepak On 8/8/06, Marcel Frehner [EMAIL PROTECTED] wrote: According to http://www.mail-archive.com/axis-user@ws.apache.org/msg16725.html , which I had overlooked before, we need to use the nightly snapshots. I still could not get it working. Now I definitely give up and wait for the next Release or at least for the next complete nightly build. Good luck for the rest or you! Marcel At 18:01 07.08.2006 +0200, you wrote: Hey Deepak By now I used to run the wsdl2java from Eclipse. Desperate as I am I tried the command line version and got correct stub and skeleton code with the following command: wsdl2java -uri Axis2SampleDocLitService.wsdl -ss -sd -d xmlbeans wsdl2java -uri Axis2SampleDocLitService.wsdl -d xmlbeans This will also generate a TypeSystemHolder.class which needs to be copied to the IDE project manually ( http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html). The next error I get is the following: org.apache.axis2.AxisFault: Data binding error at org.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287) at org.apache.axis2.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServiceStub.java:481) at org.Client.main(Client.java:25) No idea where that comes from:-( Maybe it's just the AXIS_HOME Good luck! Marcel My client looks like this: package org; import org.apache.axis2.Axis2SampleDocLitServiceStub; import org.apache.axis2.userguide.xsd.EchoStringParamDocument ; import org.apache.axis2.userguide.xsd.EchoStringReturnDocument; public class Client { public static void main(String[] args){ try { //Create the stub by passing the AXIS_HOME and target EPR. //We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOME Axis2SampleDocLitServiceStub stub= new Axis2SampleDocLitServiceStub(null, http://localhost:8080/axis2/services/Axis2SampleDocLitService ); //Create the request document to be sent. EchoStringParamDocument reqDoc= EchoStringParamDocument.Factory.newInstance(); reqDoc.setEchoStringParam (Axis2 Echo); //invokes the Web service. EchoStringReturnDocument resDoc=stub.echoString(reqDoc); System.out.println(resDoc.getEchoStringReturn()); } catch (Exception e) { e.printStackTrace(); } } } At 11:28 07.08.2006 +0530, you wrote: I would really appreciate if Deepal, Derek or any active member can shed some light on this problem. Thanks, Deepak On 8/4/06, Marcel Frehner mailto: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I gave it another try. But I could not get any further this time. I've still got the
Re: [Axis2] OutflowSecurity config
Okay, thank you. --amj -- Original message -- From: "Ruchith Fernando" [EMAIL PROTECTED] Hi, The best way to do this would be to dynamically configure the clients as mentioned here [1] Thanks, Ruchith [1] http://marc.theaimsgroup.com/?l=axis-userm=115517624610919w=2 On 8/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: Is it possible to configure OutflowSecurity in the single global axis2.xml file (axis2/WEB-INF/conf/axis2.xml) for many services that are in the axis2/WEB-INF/services directory (for when they act as clients, sending requests to any of the other services)? --amj-- & gt; ww w.ruchith.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where did org.apache.axis.encoding.ser.xbeans.* go?
Title: Where did org.apache.axis.encoding.ser.xbeans.* go? Hello, I'm trying to use Axis 1.4 with XMLBeans. I notice that the 1.2 JavaDoc (http://ws.apache.org/axis/java/apiDocs) documents the package mentioned in the subject with a Serializer and Deserializer for XMLBeans, but these classes -- in fact the whole package -- are missing from the 1.4 binary distribution. Were these classes intentionally removed? Are they available somewhere else? Unfortunately upgrading to Axis 2 is not an option at this time. -- Michael J Kolb MCA Solutions
Re: [Axis2] OutflowSecurity config
I do not see any downloadable jar containing"org.apache.axis2.security.config", from the web site... where do I get this, please? Thank you amj -- Original message -- From: "Ruchith Fernando" [EMAIL PROTECTED] Hi, The best way to do this would be to dynamically configure the clients as mentioned here [1] Thanks, Ruchith [1] http://marc.theaimsgroup.com/?l=axis-userm=115517624610919w=2 On 8/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: Is it possible to configure OutflowSecurity in the single global axis2.xml file (axis2/WEB-INF/conf/axis2.xml) for many services that are in the axis2/WEB-INF/services directory (for when they act as clients, sending requests to any of the other services)? --amj-- & gt; ww w.ruchith.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] missing features when converting from Axis1 to Axis2
Implement org.apache.axis2.Service interface to your service implementation. init method will be called when your service gets deployed. setOperationContext method will be called, whenever your service is invoked, by which you can access the config context. -- Chinthaka Johan Lundberg wrote: two questions: 1. Is there any way to get a signal when axis2 deploys my web service? In axis1, my app was part of the web app and I could do the following: /** receiving Signal when web application starts **/ public class InfoHandler implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { this.timer.schedule(new ScheduledAction(sce), 0, 60); // 10 minutes } } 2. Is there any way to get the ConfigurationContext from my web service app? I need it in order to get the real path before writing a file in the web container. /*** Getting the real path ***/ Axis1 specific way of getting servletcontext HttpServlet srv = (HttpServlet) MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET); this.srvCtx = srv.getServletContext(); String path = this.srvCtx.getRealPath(/); Any advice is welcome. /johan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] signature.asc Description: OpenPGP digital signature
Re: [AXIS2]NewBie: obtain Parameter from a custom service
Use init method. See org.apache.axis2.Service interface. Chuan Guo wrote: Hi, i'd like get some customed configuration informations for my service from the axis2.xml or services.xml. e.g. using Parameters. Then I need get the AxisConfiguration or the AxisService, right? (use getParameter(paramName)) my question is, how can i obtain AxisConfiguration or the AxisService at Construct/Loading time of my service? What I only know to obtain this is inserting of this method in my service: setOperationContext(OperationContext opContext) using OperationContext i can get all this. But it seems that it is called only at the time the operation called, it's too late. and it seems that this method is called every time when operation is called. Any Tips? Thank you very much! does anyone knows, can I access the web.xml for axis2 (in webapps/axis2/WEB-INF/) in own service? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] signature.asc Description: OpenPGP digital signature
Re: [Axis2] User Guide: Code generation for client
Hi Ajith, In the generation of client code, we are not using -d option. We have followed the steps mentioned in the following site: http://ws.apache.org/axis2/1_0/userguide3.html#Writing_Web_Service_Clients_using_Code_Generation_with_Data_Binding_Support Just reiterating the problem (Downloaded version 1.0 of Axis2): WSDL2Java is not generating Axis2SampleDocLitPortTypeStub.java instead it is generating Axis2SampleDocLitServiceStub.java and it's Callback Handler. It seems to be as if the site is not updated with the new changes. I would really appreciate if you could help us on this issue. Thanks, Deepak On 8/11/06, Ajith Ranabahu [EMAIL PROTECTED] wrote: Hi,Are you guys using the -d xmlbeans option while code generating ?On 8/11/06, Deepak Sharma [EMAIL PROTECTED] wrote: Thanks Jaya! Changed the Subject accordingly. I have cut and paste the problem again: This question has already been asked in the forum and I suppose I am the third person to ask this question. But no response has come so far to rectify this problem. Following is the problem: I am facing some problem creating client for the example mentioned in the user guide. http://ws.apache.org/axis2/1_0/userguide3.html#Writing_Web_Service_Clients_using_Code_Generation_with_Data_Binding_Support WSDL2Java is not generating Axis2SampleDocLitPortTypeStub.java instead it is generating Axis2SampleDocLitServiceStub.java and it's Callback Handler. Following is the client which I have written but it is not getting compiled as echoString method expects EchoStringParam not EchoStringParamDocument. EchoStringReturnDocument resDoc = stub.echoString(reqDoc); publicclass Client { public static void main(String[] args) { try { Axis2SampleDocLitServiceStub stub = new Axis2SampleDocLitServiceStub( null, http://localhost:8080/axis2/services/Axis2SampleDocLitPortType ); EchoStringParamDocument reqDoc = EchoStringParamDocument.Factory .newInstance(); reqDoc.setEchoStringParam(Axis2 Echo); EchoStringReturnDocument resDoc = stub.echoString(reqDoc); System.out.println(resDoc.getEchoStringReturn()); } catch (Exception e) { e.printStackTrace(); } } Looking forward for your response. ## Regards, Deepak On 8/11/06, jayachandra [EMAIL PROTECTED] wrote:Guys, This issue being discussed seems to be against Axis2, I'd suggest that you append a prefix [Axis2] (without quotes) to your messages and post so that your mail lands up in the filters of the saviours :) cheers JayaOn 8/10/06, Deepak Sharma [EMAIL PROTECTED] wrote: Thanks a lot Marcel for your findings. -Deepak On 8/8/06, Marcel Frehner [EMAIL PROTECTED] wrote:According to http://www.mail-archive.com/axis-user@ws.apache.org/msg16725.html , which Ihad overlooked before, we need to use the nightly snapshots. I still couldnot get it working. Now I definitely give up and wait for the next Releaseor at least for the next complete nightly build. Good luck for the rest or you!Marcel At 18:01 07.08.2006 +0200, you wrote:Hey DeepakBy now I used to run the wsdl2java from Eclipse. Desperate as I am I triedthe command line version and got correct stub and skeleton code with thefollowing command:wsdl2java -uri Axis2SampleDocLitService.wsdl -ss -sd -d xmlbeanswsdl2java -uri Axis2SampleDocLitService.wsdl -d xmlbeansThis will also generate a TypeSystemHolder.class which needs to be copiedto the IDE project manually( http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html ).The next error I get is the following:org.apache.axis2.AxisFault: Data binding errorat org.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287)at org.apache.axis2.Axis2SampleDocLitServiceStub.echoString (Axis2SampleDocLitServiceStub.java:481)at org.Client.main(Client.java:25)No idea where that comes from:-( Maybe it's just the AXIS_HOME Good luck!MarcelMy client looks like this: package org;import org.apache.axis2.Axis2SampleDocLitServiceStub;import org.apache.axis2.userguide.xsd.EchoStringParamDocument ;import org.apache.axis2.userguide.xsd.EchoStringReturnDocument;public class Client { public static void main(String[] args){ try {//Create the stub by passing the AXIS_HOME and target EPR. //We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOMEAxis2SampleDocLitServiceStub stub= new Axis2SampleDocLitServiceStub(null,http://localhost:8080/axis2/services/Axis2SampleDocLitService );//Create the request document to be sent.EchoStringParamDocumentreqDoc= EchoStringParamDocument.Factory.newInstance ();reqDoc.setEchoStringParam (Axis2 Echo);//invokes the Web service.EchoStringReturnDocument resDoc=stub.echoString(reqDoc);
Axis2: Code Generator - Create list of objects
All I need an object which contains a member variable, which is list of another object. Class A { //list of object B private java.util.List bList; } Class B { private String str; } How do I represent this in WSDL. I am using WSDL2Java commandline. Since I am using the tool I expect to get a java.util.List This is how my current wsdl looks... xsd:element name=bList type=B minOccurs=1 maxOccurs=unbounded/ xsd:element name=B xsd:complexType xsd:sequence xsd:element name=str type=xsd:string/ /xsd:sequence /xsd:complexType /xsd:element But when I generate the code inside class A, I get protected org.apache.axiom.om.OMElement[] localBList ; why an array, and why OMElement? Can you tell me what I am missing. ___ Debasish Dutta Roy NITAS Ph: 617-871-3033 _ CONFIDENTIALITY NOTICE The information contained in this e-mail message is intended only for the exclusive use of the individual or entity named above and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivery of the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by e-mail and delete the material from any computer. Thank you.
Re: [Axis2] NoSuchMethodError in a generated type class
Dave, Please log a bug report and upload the wsdl as well. -- dims On 8/11/06, Dave Andreasen [EMAIL PROTECTED] wrote: Sorry for the repost. I forgot to put Axis2 in the subject line. I am using the August 10th nightly build and I am getting a NoSuchMethod error in one of my classes. Here is what I am seeing in the log file. I regenerated all of my class files and replaced the libraries with the jars from the nightly build. 2006-08-10 13:18:07,418 ERROR [org.apache.axis2.transport.http.AxisServlet] java.lang.NoSuchMethodError: com.kg.webservice.types.CloseSessionResponse.getOMElement(Ljavax/xml/namespa ce/QName;Lorg/apache/axiom/om/OMFactory;)Lorg/apache/axiom/om/OMElement; The method getOMElement exists in the CloseSessionResponse class and it has the same parameters and return types. Any ideas? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: incorrect code generated for custom exception by Axis2 WSDL2JAVA using Jibx mapping
Hi, Can you attach the generated code please ? Ajith On 8/11/06, Z Chen [EMAIL PROTECTED] wrote: I defined a fault in my wsdl file for a custom exception. I also use Jibx for the mapping. When I use wsdl2java to generate the code, it doesn't care about the mapping and the custom exception. It always generates an exception class from the wsdl file. Anybody experienced the same problem ? Thanks John My wsdl file, ?xml version=1.0 encoding=UTF-8? wsdl:definitions name=telecom targetNamespace=http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tcom=http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsd1=http://www.crsoftwareinc.com/xml/ns/telecom/common_types; wsdl:documentation This document describes the telecom control service for agents. /wsdl:documentation wsdl:types xsd:schema xmlns:xsd=http://www.w3.org/2001/XMLSchema; elementFormDefault=qualified targetNamespace=http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0; xmlns:com=http://www.crsoftwareinc.com/xml/ns/telecom/common_types; xsd:import namespace=http://www.crsoftwareinc.com/xml/ns/telecom/common_types; schemaLocation=telecom.xsd / xsd:element name=AgentLoginRequestWrap type=com:agentLoginType / xsd:element name=AgentLoginResponse type=com:loginResponseType / xsd:element name=DialerFault type=com:dialerFaultType / /xsd:schema /wsdl:types wsdl:message name=agentLoginRequest wsdl:part name=agentLoginRequest element=tcom:AgentLoginRequestWrap / /wsdl:message wsdl:message name=agentLoginResponse wsdl:part name=agentLoginResponse element=tcom:AgentLoginResponse / /wsdl:message wsdl:message name=dialerFaultMessage wsdl:part name=fault element=tcom:DialerFault/ /wsdl:message wsdl:portType name=telecom wsdl:operation name=agentLogin wsdl:input message=tcom:agentLoginRequest / wsdl:output message=tcom:agentLoginResponse / wsdl:fault name=fault message=tcom:dialerFaultMessage / /wsdl:operation /wsdl:portType binding file binding namespace uri=http://www.crsoftwareinc.com/xml/ns/telecom/common_types; prefix=q0 default=elements / namespace uri=http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0; prefix=q1 / mapping name=AgentLoginRequestWrap class=com.crsoftwareinc.crs.dialer.dto.AgentLoginRequestDTO ns=http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0; value name=system field=system / value name=campaign field=campaign / value name=extension field=extension / value name=mode field=mode serializer=com.crsoftwareinc.crs.dialer.dto.DialerUsageReference.toString deserializer=com.crsoftwareinc.crs.dialer.dto.DialerUsageReference.fromString / value name=station field=station / /mapping mapping name=AgentLoginResponse class=com.crsoftwareinc.crs.dialer.dto.AgentLoginResponseDTO ns=http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0; value name=station field=station / value name=agentNumber field=agentNumber / value name=error usage=optional field=error / /mapping mapping name=DialerFault class=com.crsoftwareinc.crs.dialer.exception.DialerException ns=http://www.crsoftwareinc.com/xml/ns/telecom/agent_request_v1_0; value name=reason field=reason / /mapping /binding __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] User Guide: Code generation for client
Hi, The problem seems to be the databinding as I thought. If you want to follow the exact steps of tyhe userguide you have to add the -d xmlbeans option to the set of commandline arguments. In the mean time I'll see whether the documentation can be improved! Ajith On 8/11/06, Deepak Sharma [EMAIL PROTECTED] wrote: Hi Ajith, In the generation of client code, we are not using -d option. We have followed the steps mentioned in the following site: http://ws.apache.org/axis2/1_0/userguide3.html#Writing_Web_Service_Clients_using_Code_Generation_with_Data_Binding_Support Just reiterating the problem (Downloaded version 1.0 of Axis2): WSDL2Java is not generating Axis2SampleDocLitPortTypeStub.java instead it is generating Axis2SampleDocLitServiceStub.java and it's Callback Handler. It seems to be as if the site is not updated with the new changes. I would really appreciate if you could help us on this issue. Thanks, Deepak On 8/11/06, Ajith Ranabahu [EMAIL PROTECTED] wrote: Hi, Are you guys using the -d xmlbeans option while code generating ? On 8/11/06, Deepak Sharma [EMAIL PROTECTED] wrote: Thanks Jaya! Changed the Subject accordingly. I have cut and paste the problem again: This question has already been asked in the forum and I suppose I am the third person to ask this question. But no response has come so far to rectify this problem. Following is the problem: I am facing some problem creating client for the example mentioned in the user guide. http://ws.apache.org/axis2/1_0/userguide3.html#Writing_Web_Service_Clients_using_Code_Generation_with_Data_Binding_Support WSDL2Java is not generating Axis2SampleDocLitPortTypeStub.java instead it is generating Axis2SampleDocLitServiceStub.java and it's Callback Handler. Following is the client which I have written but it is not getting compiled as echoString method expects EchoStringParam not EchoStringParamDocument. EchoStringReturnDocument resDoc = stub.echoString(reqDoc); publicclass Client { public static void main(String[] args) { try { Axis2SampleDocLitServiceStub stub = new Axis2SampleDocLitServiceStub( null, http://localhost:8080/axis2/services/Axis2SampleDocLitPortType ); EchoStringParamDocument reqDoc = EchoStringParamDocument.Factory .newInstance(); reqDoc.setEchoStringParam(Axis2 Echo); EchoStringReturnDocument resDoc = stub.echoString(reqDoc); System.out.println(resDoc.getEchoStringReturn()); } catch (Exception e) { e.printStackTrace(); } } Looking forward for your response. ## Regards, Deepak On 8/11/06, jayachandra [EMAIL PROTECTED] wrote: Guys, This issue being discussed seems to be against Axis2, I'd suggest that you append a prefix [Axis2] (without quotes) to your messages and post so that your mail lands up in the filters of the saviours :) cheers Jaya On 8/10/06, Deepak Sharma [EMAIL PROTECTED] wrote: Thanks a lot Marcel for your findings. -Deepak On 8/8/06, Marcel Frehner [EMAIL PROTECTED] wrote: According to http://www.mail-archive.com/axis-user@ws.apache.org/msg16725.html , which I had overlooked before, we need to use the nightly snapshots. I still could not get it working. Now I definitely give up and wait for the next Release or at least for the next complete nightly build. Good luck for the rest or you! Marcel At 18:01 07.08.2006 +0200, you wrote: Hey Deepak By now I used to run the wsdl2java from Eclipse. Desperate as I am I tried the command line version and got correct stub and skeleton code with the following command: wsdl2java -uri Axis2SampleDocLitService.wsdl -ss -sd -d xmlbeans wsdl2java -uri Axis2SampleDocLitService.wsdl -d xmlbeans This will also generate a TypeSystemHolder.class which needs to be copied to the IDE project manually ( http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html ). The next error I get is the following: org.apache.axis2.AxisFault: Data binding error at org.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287) at org.apache.axis2.Axis2SampleDocLitServiceStub.echoString (Axis2SampleDocLitServiceStub.java:481) at org.Client.main(Client.java:25) No idea where that comes from:-( Maybe it's just the AXIS_HOME Good luck! Marcel My client looks like this: package org; import org.apache.axis2.Axis2SampleDocLitServiceStub; import org.apache.axis2.userguide.xsd.EchoStringParamDocument ; import org.apache.axis2.userguide.xsd.EchoStringReturnDocument; public class Client { public static void main(String[] args){ try { //Create the stub by passing the AXIS_HOME and target EPR. //We pass null to the AXIS_HOME
Re: [Axis2] NoSuchMethodError in a generated type class
Hi, Are you having older classes/jars in the classpath ? Ajith On 8/11/06, Davanum Srinivas [EMAIL PROTECTED] wrote: Dave, Please log a bug report and upload the wsdl as well. -- dims On 8/11/06, Dave Andreasen [EMAIL PROTECTED] wrote: Sorry for the repost. I forgot to put Axis2 in the subject line. I am using the August 10th nightly build and I am getting a NoSuchMethod error in one of my classes. Here is what I am seeing in the log file. I regenerated all of my class files and replaced the libraries with the jars from the nightly build. 2006-08-10 13:18:07,418 ERROR [org.apache.axis2.transport.http.AxisServlet] java.lang.NoSuchMethodError: com.kg.webservice.types.CloseSessionResponse.getOMElement(Ljavax/xml/namespa ce/QName;Lorg/apache/axiom/om/OMFactory;)Lorg/apache/axiom/om/OMElement; The method getOMElement exists in the CloseSessionResponse class and it has the same parameters and return types. Any ideas? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2] NoSuchMethodError in a generated type class
I thought of that. I did pull down the axis2.war at the same time as I pulled down the snapshot. I also checked the jar files in the war with the jar files from the snapshot. One of them did not match so I updated the axis2.war with the snapshot jar file. Dave -Original Message- From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] Sent: Friday, August 11, 2006 4:10 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: [Axis2] NoSuchMethodError in a generated type class Hi, Are you having older classes/jars in the classpath ? Ajith On 8/11/06, Davanum Srinivas [EMAIL PROTECTED] wrote: Dave, Please log a bug report and upload the wsdl as well. -- dims On 8/11/06, Dave Andreasen [EMAIL PROTECTED] wrote: Sorry for the repost. I forgot to put Axis2 in the subject line. I am using the August 10th nightly build and I am getting a NoSuchMethod error in one of my classes. Here is what I am seeing in the log file. I regenerated all of my class files and replaced the libraries with the jars from the nightly build. 2006-08-10 13:18:07,418 ERROR [org.apache.axis2.transport.http.AxisServlet] java.lang.NoSuchMethodError: com.kg.webservice.types.CloseSessionResponse.getOMElement(Ljavax/xml/namespa ce/QName;Lorg/apache/axiom/om/OMFactory;)Lorg/apache/axiom/om/OMElement; The method getOMElement exists in the CloseSessionResponse class and it has the same parameters and return types. Any ideas? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ajith Ranabahu - 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]
[Axis2] Error loading sec.properties
Hi Ruchith, Is there any reason why the sec.properties file is not being loaded at at the service side: - From TCPMON on response side: java.lang.RuntimeException: CryptoFactory: Cannot load properties: sec.properties org.apache.ws.security.components.crypto.CryptoFactory.getProperties(Cry ptoFactory.java:185 -- From Tomcat log: INFO: ContextListener: contextInitialized() Aug 11, 2006 4:00:53 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Aug 11, 2006 4:01:25 PM org.apache.catalina.core.StandardHostValve custom SEVERE: Exception Processing ErrorPage[errorCode=500, location=/axis2-web/Error/error500.jsp] org.apache.jasper.JasperException: getOutputStream() has already been called for this response at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle tWrapper.java:510) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:387) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio nDispatcher.java:465) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:301) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java :363) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java :284) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.j ava:228) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :134) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 48) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86 9) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc essConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint .java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow erWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:684) at java.lang.Thread.run(Thread.java:595) -- My .aar file: PWCallbackHandler.class sec.properties services.jks com\test\testservice1\TestService1.class meta-inf\Manifest.mf meta-inf\services.wsdl meta-inf\services.xml -- My services.xml file: serviceGroup service name=TestService1 descriptionTestService 1 - For testing web services/description parameter name=ServiceClasscom.test.testservice1.TestService1/parameter operation name=provideService messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver / /operation parameter name=InflowSecurity action itemsSignature/items passwordCallbackClassPWCallbackHandler/passwordCallbackClass signaturePropFilesec.properties/signaturePropFile /action /parameter /service /serviceGroup Appreciate any insight! Thanks, Alan J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2 v1.0: Namespace prefix error
Hello everyone:Axis2 v1.0CF 7.0I'm attempting to send the following SOAP message through cold fusion to a service I've written. SOAP message: ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/soapenv:Headerns1:credential xmlns:ns1=http://webservices.company.com/credential xmlns=http://webservices.company.com/credential soapenv:mustUnderstand=0 soapenv:actor=token872)(@nNjDU{/token/ns1:credential/soapenv:Headersoapenv:Bodyns2:notifyOfErrorOptions xmlns:ns2= http://webservices.company.com/notification/dateTime2006-08-09T11:09:29.809Z/dateTimeserverNameServer Name: testStartnotifyOfError()/serverNameoperationDescOperation Description: testStartnotifyOfError()/operationDescmessageHere is a message: testStartnotifyOfError()/message/ns2:notifyOfErrorOptions/soapenv:Body/soapenv:Envelope When axis2 attempts to parse the credential element into an object, I get the following error:com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix soapenv (for attribute actor) The problem goes away when I add the soapenv namespace declaration on the credential element. I don't understand why I need to, since I thought the actor attribute would inherit its namespace from the soapenv namespace declared on the soap:Envelope element. Can someone please explain, as I feel I'm missing something here? TIA.
Re: request always calls the first operation defined in server-config.wsdd
Please post the WSDL. On 8/11/06, Richard Jones [EMAIL PROTECTED] wrote: Hi Folks, I am starting to really get to grips with my web services now, with much thanks to Axis. This morning, though, I have encountered a problem which I can't work out whether is my fault (likely) or a potential problem. I have two requests defined (in the scope of this problem): public void requestFileDetails(String guid) throws ServiceException, RemoteException { // make the request SpiralTestSoapService service = getService(); SingleGUID sguid = new SingleGUID(guid); RequestFileDetailsResponse response = service.requestFileDetails(sguid); } public void articleUpdateNotification(String guid) throws ServiceException, RemoteException { // make the request SpiralTestSoapService service = getService(); SingleGUID sguid = new SingleGUID(guid); service.articleUpdateNotification(sguid); } these in turn call the relevant operations on the port type (The xxx_BindingImpl class). When either of the above methods are called in the client, the server /always/ processes the request to requestFileDetails. I discovered that I could fix this so that it always processed the request to articleUpdateNotification by reversing the order that these two operations are specified in the server-config.wsdd: operation name=articleUpdateNotification qname=ArticleUpdateNotification mep=oneway parameter qname=pns:SingleGUID xmlns:pns=http://[...]/SpiralWebService/; type=tns:SingleGUID xmlns:tns=http://[...]/SpiralWebService// /operation operation name=requestFileDetails qname=RequestFileDetails returnQName=retNS:RequestFileDetailsResponse xmlns:retNS=http://[...]/SpiralWebService/; returnType=rtns:RequestFileDetailsResponse xmlns:rtns=http://[...]/SpiralWebService/; parameter qname=pns:SingleGUID xmlns:pns=http://[...]/SpiralWebService/; type=tns:SingleGUID xmlns:tns=http://[...]/SpiralWebService// /operation I upped log4j to DEBUG, and observed that the body of the request seems only to contain the data type, not the operation name: 2006-08-11 12:39:00,795 DEBUG org.apache.axis.providers.java.RPCProvider @ body is SingleGUID xmlns=http://[...]/SpiralWebService/;guid xmlns=1234567890/guid/SingleGUID The two above methods both take the SingleGUID data type as an argument, so I defined this type in the WSDL and re-used it all over the place. My current guess (and it is only a guess) is that Axis is just looking for the first operation that takes this data type, and executing it, no matter which operation it was intended for. Can anyone see what I might have done wrong? Am I misappropriating the data types and the way that axis uses them, or have I missed something in the way to call the web service, or is there something else? Any help much appreciated, Cheers -- Richard --- Richard Jones Web and Database Technology Specialist Imperial College London t: +44 (0)20 759 41815 e: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] missing features when converting from Axis1 to Axis2
Tank you very much for your help. /johan Eran Chinthaka wrote: Implement org.apache.axis2.Service interface to your service implementation. init method will be called when your service gets deployed. setOperationContext method will be called, whenever your service is invoked, by which you can access the config context. -- Chinthaka Johan Lundberg wrote: two questions: 1. Is there any way to get a signal when axis2 deploys my web service? In axis1, my app was part of the web app and I could do the following: /** receiving Signal when web application starts **/ public class InfoHandler implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { this.timer.schedule(new ScheduledAction(sce), 0, 60); // 10 minutes } } 2. Is there any way to get the ConfigurationContext from my web service app? I need it in order to get the real path before writing a file in the web container. /*** Getting the real path ***/ Axis1 specific way of getting servletcontext HttpServlet srv = (HttpServlet) MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET); this.srvCtx = srv.getServletContext(); String path = this.srvCtx.getRealPath(/); Any advice is welcome. /johan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to compress message with GZIP in Axis 1.4
Hello Damian, Did you enable http compression on your server ? Usually, it is done in the http server layer. In Websphere world ; it is usually done in Ibm Http Server (aka IHS) layer with mod_deflate. Here is a doc of mod_deflate : http://www.howtoforge.com/apache2_mod_deflate Hope this helps, Cyrille -- Cyrille Le Clerc [EMAIL PROTECTED] [EMAIL PROTECTED] On 8/10/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I am trying to use the out of the box axis compression to send a gzipped message with using Axis 1.4 as per the instructions outlined in http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression, however the messages are being sent to the endpoint uncompressed. I am using Axis 1.4 with J2SE 5.0 and commons-httpclient 3.1.0 with eclipse 3.2 and websphere 6.1 all on my local dev machine. I have set up a servlet filter to intercept and log the incoming web service calls at the endpoint *prior* to the axis listener (which it does according to my stacktrace), hence prior to any decompression. The extracted InputStream message is the readable (hence uncompressed) SOAP XML that I sent through. Is this a known issue of sorts,or perhaps a library version interoperability problem, or am I just missing something? Are there any known issues such as this in using Axis 1.4 with J2SE 5.0? Any help would be greatly appeciated Damian Phillips - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis 2] MTOM Response is missing MIMEBoundary
Sithija, Looking at your ealier posted message snapshot, your client need to dig one more level in to the OM. /image /ns:return /ns:getDiscrepancyReportResponse /soapenv:Body Now it seems your only looking at the children of the return element. Also it would have been easier to use the getFirstChildWithQname() method rather than taking out the iterator. Also as a favour, if possible please capture the messages using both tcpmon SOAPMonitor and send me the snapshots. I need to figure out whether there is a bug in SOAPMonitor. Regards, Thilina On 8/11/06, Sathija Pavuluri [EMAIL PROTECTED] wrote: Thilina, Here is the client code. DeviceServiceStub.GetReportResponse repResponse = stub.getReport(rep); OMElement reportElement = null; reportElement = repResponse.get_return(); System.out.println(First child: + reportElement.getFirstOMChild().getClass().toString()); Iterator repChildren = reportElement.getChildren(); while (repChildren.hasNext()) { OMNode omNode = (OMNode) repChildren.next(); System.out.println(\n); System.out.println(OM child class: + omNode.getClass().toString()); System.out.println(\n); System.out.println(Data: \n); omNode.serialize(System.out); System.out.println(); } The line omNode.serialize(System.out); prints imagexop:Include xmlns:xop=http://www.w3.org/2004/08/xop/include; href=cid:1.urn:uuid:[EMAIL PROTECTED] //image There is one child as I expect but the child/omNode is always of type OMElement while I am expecting it to be OMText. The other soap message snapshot I posted earlier was from the SOAP Monitor. I had set it up as described here: http://ws.apache.org/axis2/1_0/soapmonitor-module.html Thanks, Sathija. imagexop:Include xmlns:xop=http://www.w3.org/2004/08/xop/include; href=cid:1.urn:uuid:[EMAIL PROTECTED] //image This means your client is correctly receiving a MTOM optimised message. Now I wonderhow you got the message snapshot you posted in your first message. What is the mechanism you used for message sniffing. Try using TCPMON and send the on the wire message snapshots. Also if possible post your client code. Problem seems to be with your client code. ~Thilina If that can help you diagnose the problem any better. Thanks! Thilina, Thanks for the quick response. I do have MTOM enabled in axis2.xml as you mentioned below. And on the server side, I construct the OMText this way. OMText textData = factory.createOMText(dh, true); which means should it should be optimized. And I am pretty sure I have followed all other steps as outlined in the MTOM guide. Can't figure out what else might be wrong. Here's my server code (almost an exact replica of what's in mtom guide). public OMElement getReport(String devName) { OMElement imageElement = null; String inputImageFileName = Blue_hills.jpg; try { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace ns = factory.createOMNamespace(, getReport); imageElement = factory.createOMElement(image, ns); Image image; image = new ImageIO().loadImage(new FileInputStream(inputImageFileName)); ImageDataSource ds = new ImageDataSource(Blue_hills.jpg, image); DataHandler dh = new DataHandler(ds); OMText textData = factory.createOMText(dh, true); imageElement.addChild(textData); } catch (Exception e) { e.printStackTrace(); } return imageElement; } Thanks, Sathija. Hi, First of all your message does not contain any MTOM Optimised parts. Binary attachment has been sent inline with XML payload by base64 encoding. Enable MTOM in the server by adding follwing to the axis2.xml. parameter name=enableMTOM locked=falsetrue/parameter ~Thilina On 8/10/06, Sathija Pavuluri [EMAIL PROTECTED] wrote: Hi, I am implementing an Axis service to send binary attachments from the server to an axis client. I've enabled MTOM and optimized the data as described in the MTOM Guide. When I try to retrieve the OMText at the client side, I get a class cast exception, since the response is returning an OMElement. Here's what the TCPMon response shows: ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header / soapenv:Body ns:getDiscrepancyReportResponse xmlns:ns=http://service.ws.ena.emprisa.com/xsd;
Re: [Axis2] OutflowSecurity config
there it is! Thanks! amj -- Original message -- From: "Ruchith Fernando" [EMAIL PROTECTED] Please try here: http://people.apache.org/repository/axis2/jars/axis2-security-1.0.jar Thanks, Ruchith On 8/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: I do not see any downloadable jar containing "org.apache.axis2.security.config", from the web site... where do I get this, please? Thank you amj -- Original message -- From: "Ruchith Fernando" <[EMAIL PROTECTED]> Hi, The best way to do this would be to dynamically config ure the clientsas mentioned here [1] Thanks,Ruchith [1] http://marc.theaimsgroup.com/?l=axis-userm=115517624610919w=2 On 8/11/06, [EMAIL PROTECTED] wrote: Is it possible to configure OutflowSecurity in the single global axis2.xml file (axis2/WEB-INF/conf/axis2.xml) for many services that are in the axis2/WEB-INF/services directory (for when they act as clients, sending requests to any of the other services)? --amj --gt; ww w.ruchith.org ; -To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] -- www.ruchith.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]