Re: MTOM Attachments and PushbackInputStream
Hi Davanum Unfortunately, the server is in .NET so I would only be able to provide the client and some other sample data which alone might not be useful. However, I did some research in to the Axis2 and Axiom source using a client that was trying to read a ~1.8M binary attachment (XOP/MTOM). It was taking just over 3 seconds to read in and save the file. I finally tracked down that 98% of the time involved was occuring in the Class: org.apache.axiom.attachments.MIMEBodyPartInputStream specifically in the read() method at the line: // read the next value from stream int value = inStream.read(); The inStream is a PushbackInputStream. On a simple isolated test (i.e. plain old java reading from the file system) I tested reading in the file using a BufferedInputStream vs a PushbackInputStream. It took 31 ms for the BufferedInputStream and a whopping 1047 ms for the PushbackInputStream. (I know there are reasons for the use of PushbackInputStream) I thought I had found the reason why it was slow and even in the Axiom source just before it creates the PushbackInputStream it states in the Class org.apache.axiom.attachments.Attachments: // do we need to wrap InputStream from a BufferedInputStream before // wrapping from PushbackStream So I changed the source to first wrap in a BufferedInputStream however there was no change in performance. The immediate Underlying InputStream is a org.apache.commons.httpclient.AutoCloseInputStream and whatever it might wrap (etc) I'm not sure. So basically I'm still not sure about what's going on. PushbackInputStream is definitely a lot slower because it does not do any buffered reads. However, I don't know why the performance wasn't improved when I wrapped it in a BufferedInputStream. I was unable in my investigative time to find out any other InputStreams that might have ultimately been wrapped by the PushbackInputStream. Derek From: Davanum Srinivas [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: Re: MOTM and Encoding/Decoding Date: Thu, 1 Mar 2007 14:07:25 -0500 Derek, Could you please log a JIRA bug and upload the sample code? Let's try to create the scenario on our boxes... thanks, dims On 3/1/07, Derek Clayton [EMAIL PROTECTED] wrote: Thank you for the very fast response. If possible please post us some numbers of the time comparison. Make sure to avoid the System.out part when doing the comparison (this encoding takes time :( )... First let me explain the setup. The two machines are identical hardware...Pentium 4 2.8GHz with 1Gig memory. Software differs since these are two different developer machines. Machine 1 acts as the client and is written in Java using Axis2. It sends an Excel file to Machine 2. When it receives the XML file back (see next paragraph) is simply saves it as a file. Machine 2 acts as the server and is using .NET. It receives an Excel file as binary, saves that file, uses an ActiveX control to read in the file and parse it to generate an XML representation of the data. It then sends that XML back to the Machine 1 in the SOAP response. I haven't written an isolated test but this setup would favor Java/Axis2 anyway since Machine 2 is having to do actual work in addition to reading the binary file. For smaller Excel files the times are quite reasonable. Test 1 -- For a 302K send and a 922K response. Time to send and receive response: 1.6 secs. Time to read response: 6 secs. It is taking about 3 times longer which is reasonable since the file size is 3x as large even though the server is doing a lot more work than the client. However, as the files get large the performance begins to break down. Test 2 -- For a 1.4M send and a 5.4M response. Time to send and receive response: 3 secs. Time to read response: 37 secs. 37 seconds to read the 5.4M binary file seems like a long time. As well you can see that the server processed a larger file (1.4M) in half the time as did the client in Test 1. For even larger files the difference becomes greater. Test 3 -- For a 8.5M and a 32M response. Time to send and receive response: 18 secs. Time to read response: 220 secs. Here you can see the .NET is reading the 8.5M (along with parsing it and generating XML) in 18 secs compared to where Java/Axis2 took 37 secs to simply read and save a 5.4M file in Test 2. I know this is an informal test case. But is 37 seconds to read a 5.4M binary attachment with no decoding similar to the experience of others? Thanks! Derek _ Don't waste time standing in linetry shopping online. Visit Sympatico / MSN Shopping today! http://shopping.sympatico.msn.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail
Re: MOTM and Encoding/Decoding
Thank you for the very fast response. If possible please post us some numbers of the time comparison. Make sure to avoid the System.out part when doing the comparison (this encoding takes time :( )... First let me explain the setup. The two machines are identical hardware...Pentium 4 2.8GHz with 1Gig memory. Software differs since these are two different developer machines. Machine 1 acts as the client and is written in Java using Axis2. It sends an Excel file to Machine 2. When it receives the XML file back (see next paragraph) is simply saves it as a file. Machine 2 acts as the server and is using .NET. It receives an Excel file as binary, saves that file, uses an ActiveX control to read in the file and parse it to generate an XML representation of the data. It then sends that XML back to the Machine 1 in the SOAP response. I haven't written an isolated test but this setup would favor Java/Axis2 anyway since Machine 2 is having to do actual work in addition to reading the binary file. For smaller Excel files the times are quite reasonable. Test 1 -- For a 302K send and a 922K response. Time to send and receive response: 1.6 secs. Time to read response: 6 secs. It is taking about 3 times longer which is reasonable since the file size is 3x as large even though the server is doing a lot more work than the client. However, as the files get large the performance begins to break down. Test 2 -- For a 1.4M send and a 5.4M response. Time to send and receive response: 3 secs. Time to read response: 37 secs. 37 seconds to read the 5.4M binary file seems like a long time. As well you can see that the server processed a larger file (1.4M) in half the time as did the client in Test 1. For even larger files the difference becomes greater. Test 3 -- For a 8.5M and a 32M response. Time to send and receive response: 18 secs. Time to read response: 220 secs. Here you can see the .NET is reading the 8.5M (along with parsing it and generating XML) in 18 secs compared to where Java/Axis2 took 37 secs to simply read and save a 5.4M file in Test 2. I know this is an informal test case. But is 37 seconds to read a 5.4M binary attachment with no decoding similar to the experience of others? Thanks! Derek _ Dont waste time standing in linetry shopping online. Visit Sympatico / MSN Shopping today! http://shopping.sympatico.msn.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MOTM and Encoding/Decoding
Hello all, I have written a SOAP client using Axis2 which receives a binary file in the response. The binary file is attached using MOTM XOP. When I use an http sniffer to look at the response everything looks good...the response contains an XOP:Include reference to the attached content. The attached content in this case is sent as binary but it's just an XML file which I can visually inspect. However, when I print out the respsonse with the following code: OMElement result = servClient.sendReceive(method); System.out.println(result); I get this body: soap:Body/soap:Envelope PassExcelBinaryResponse xmlns=http:///soap/WebServices.asp;PassExcelBinaryResultPD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJ5ZXMiPz4NCjxOZXdEYXRhU2V0Pg0KICA8eHM6c2NoZW1hIGlkPSJOZXdEYXRhU2V0IiB4bWxucz0iIiB4bWxuczp4cz0iaHR0cDovL3d3dLOTS AND LOTS MORE The size of the attached binary file is 900K. The size of the content in PassExcelBinaryResult is suspiciously around 30% larger...it looks like Axis2 (Axiom?) has encoded the attached file. For reference here is my code to write the attached binary: OMText binaryNode = (OMText)xmlElement.getFirstOMChild(); DataHandler dh = (DataHandler)binaryNode.getDataHandler(); FileOutputStream out = new FileOutputStream(../../test/data/temp.xml); dh.writeTo(out); out.close(); So my question: Is Axis2 encoding the binary attachment merely for display purposes? Or will it try to encode the binary attachment and then have to decode it when I write the file. As mentioned using the above code is working however it is very slow..it is about 4x slower to read the attachment than an equivalent client written for .NET. This is what led me to start wondering why it was so slow and seeing that the content seemed to be encoded after I receive the response. Thanks, Derek _ Find out the restaurants participating in Winterlicious http://local.live.com/default.aspx?v=2cp=43.658648~-79.383962style=rlvl=15tilt=-90dir=0alt=-1000scene=3702663cid=7ABE80D1746919B4!1329 From January 26 to February 8, 2007 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Web service client authentication
Thanks Jarek, The key line I was missing was: auth.setPreemptiveAuthentication(true); It wasn't necessary for me to use auth.setAuthSchemes() because Axis determined that it needed to use basic authentication on its own. Thanks for your help, Derek On 16/02/07, Jarek Kucypera [EMAIL PROTECTED] wrote: Derek Weeks wrote: This constant does not appear to exist in Axis2 version 1.1 or 1.1.1. Should the constant be one of these? Following is how it works for me with axis2 1.1.1 HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setPreemptiveAuthentication(true); auth.setAuthSchemes(Arrays.asList(new String[]{HttpTransportProperties.Authenticator.BASIC})); auth.setUsername(test_user); auth.setPassword(test_password); stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,auth); J.K. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Web service client authentication
Hi Axis2 users, I'm writing a web service client that needs to authenticate against the HTTP server. The example of how to do this in the Transports section of the documentation says to add an HttpTransportProperties.Authenticator object to the Options object using the key org.apache.axis2.transport.http.HTTPConstants.BASIC_AUTHENTICATE. This constant does not appear to exist in Axis2 version 1.1 or 1.1.1. Should the constant be one of these? HTTPConstants.AUTHENTICATE HttpTransportProperties.Authenticator.BASIC Cheers, Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis documentation
Erik: If you can identify specific deficiencies in the Axis2 documentation, I suggest that you add them to the list in the following JIRA entry: http://issues.apache.org/jira/browse/AXIS2-1076 which is currently a catchall for documentation problems. Derek -Original Message- From: Erik Norgaard [mailto:[EMAIL PROTECTED] Sent: Friday, September 22, 2006 9:51 AM To: axis-user@ws.apache.org Subject: Re: Axis documentation Davanum Srinivas wrote: How does this sample look? works with latest nightly. Thanks, this makes more sense to me... Do you know of any documentation that can help me beyond tweaking examples? Thanks, Erik -- Ph: +34.666334818 web: http://www.locolomo.org X.509 Certificate: http://www.locolomo.org/crt/8D03551FFCE04F0C.crt Key ID: 69:79:B8:2C:E3:8F:E7:BE:5D:C3:C3:B1:74:62:B8:3F:9F:1F:69:B9 - 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] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies
Ok, I was able to finally test this. It works great! Thanks for all the help. -Original Message- From: VanKooten, Derek [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 3:32 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies I wont be able to try it out till Monday when I get back to work. I'll try it out then. Thanks. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 3:01 PM To: axis-user@ws.apache.org Subject: Re: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Nevermind. Fixed. Please pick up a nightly in another hour or so. On 9/15/06, Davanum Srinivas [EMAIL PROTECTED] wrote: Please log a bug report in JIRA. thanks, dims On 9/15/06, VanKooten, Derek [EMAIL PROTECTED] wrote: Ok, its working in websphere 6 now with this build. I'm able to call my service again. Thanks! :) Btw, I was also finally able to get the eager inintialization to work as well. Seems like the actual method signature to use for the init or startup methods were not the same as what I read in the forums or in the JIRA. When I implemented the Service interface and used those methods it worked correctly. public void startUp(ConfigurationContext configurationContext, AxisService axisService); public void init(ServiceContext serviceContext); and I had to put the load-on-startup parameter into the services.xml. parameter name=load-on-startup locked=falsetrue/parameter I am now getting another error when I try http://localhost:9080/PersonalizationEngine/services/PersonalizationServ ices?wsdl I get this: Error page exception The server cannot use the error page specified for your application to handle the Original Exception printed below. Please see the Error Page Exception below for a description of the problem with the specified error page. Original Exception: Error Message: String index out of range: 14 Error Code: 500 Target Servlet: AxisServlet Error Stack: java.lang.StringIndexOutOfBoundsException: String index out of range: 14 at java.lang.String.substring(String.java(Compiled Code)) at org.apache.axis2.transport.http.ListingAgent.extractHostAndPort(ListingA gent.java:126) at org.apache.axis2.transport.http.ListingAgent.processListService(ListingA gent.java:166) at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:165) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:1282) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap per.java:673) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheS ervletWrapper.java:89) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:187 8) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:8 4) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio n(HttpInboundLink.java:472) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio n(HttpInboundLink.java:411) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpIC LReadCallback.java:101) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueMa nager.java:566) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager. java:619) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager. java:952) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager .java:1039) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1462) Error Page Exception: Error Message: SRVE0199E: OutputStream already obtained Error Code: 0 Target Servlet: null Error Stack: java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletRespo nse.java:467) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:170) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1 63) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:2 17) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:149) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:117) at com.ibm._jsp._error500._jspService(_error500.java:79) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88
RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies
I'll try it today. I've got to completely rebuild my Rational development environment first. Just found a stupid issue with Rational and a 259 character limit with windows. Why oh why must ibm think it's a good idea to make directory structures with such long names Sheesh. So, its going to take me 4-5 hours before I can get to it. Thanks. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 12:15 AM To: axis-user@ws.apache.org; Charak, Vikas; VanKooten, Derek Subject: Re: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Vikas, Derek, Please try the nightly build in a couple of hours. I checked in fixes to get it working under websphere 6.1 thanks, dims On 9/14/06, VanKooten, Derek [EMAIL PROTECTED] wrote: I also just got done rolling back to the 1.0 version of axis, and all of my services are working fine now too. I am running the same version numbers of websphere and jdk as well. Would love to be able to use the eager initialization stuff that's supposed to be in the nightly builds, but alas, doesn't seem to work for me. I can switch back to the nightly version if you need me to test something. -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:23 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Websphere6.1 with JDK 1.4.2. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:19 PM To: axis-user@ws.apache.org Subject: Re: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Which version of websphere? jdk? On 9/14/06, Charak, Vikas [EMAIL PROTECTED] wrote: .aar format works fine. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:07 PM To: axis-user@ws.apache.org Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies So you have the release version of Axis2 deployed to WebSphere and it works with the version service in aar format or is it unpacked? Dave -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 10:41 AM To: axis-user@ws.apache.org Subject: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Okay! Atlast I was able to invoke the version service on websphere. Issue is it works with Axis2 release1.0 but not with any of the nightly builds. Possible bug in nightilies. -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 9:56 AM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: NoSuchMethodError while deploying aar file on WebSphere Hi Dave/ Dims, I tried almost everything still same issue. REST version works but not SOAP version. I will write a separate email to Axis2 Designers for assistance. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 1:35 PM To: axis-user@ws.apache.org Subject: Re: NoSuchMethodError while deploying aar file on WebSphere Derek, Did you set the soap action to getMemoryStatus? try that, the alternative is to specify the method name in the EPR itself like you did for REST. thanks, dims On 9/13/06, VanKooten, Derek [EMAIL PROTECTED] wrote: I seem to be having the same problem. I wrote a service that worked fine on the 1.0 release. I then read that the nightly builds had a eager initialization feature. So, I tried getting a nightly build and using the same aar file from before. I get the error Sep 13, 2006 11:20:52 AM org.apache.axis2.engine.AxisEngine receiveFault INFO: Received Error Message with id urn:uuid:9EF9037ADD59CB7B7D11581608519631 org.apache.axis2.AxisFault: Service not found operation terminated !! at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:298) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:539 ) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:473 ) at com.bealls.services.personalization.PersonalizationService.main(Personal izationService.java:53) I have tried replacing the wsdl4j.jar in lib of webshpere 6.0 with the one that comes with axis2 nightly build. I have created a shared lib, added it to the class loader for the app server, and set the class loader to have Parent Last The class path for my
RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies
I'm reinstalling Rational because there is a 259 limit on the length of paths in windows, and the default install directory is c:\program files\ibm\RAD\sdp\6.0. So, when I am evaluating IBM's version of webservices, IBM creates these ungodly long paths under its install directory and hits that windows limit. So, this reinstall isnt because of AXIS2 its because of a stupid thing IBM did with their RATIONAL product. So, I'm reinstalling RAD under a directory of c:\rad6 instead and saving some space hoping to be able to continue evaluating IBM's web services at the same time evaluating AXIS2. BTW, I really like AXIS2 better so far. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 9:28 AM To: axis-user@ws.apache.org Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies WAIT! That's not it! You don't need to rebuild you env! I had the same issue. Deploy Axis2, then use the axis 2 manager interface to deploy your service. Dave -Original Message- From: VanKooten, Derek [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 8:20 AM To: axis-user@ws.apache.org Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies I'll try it today. I've got to completely rebuild my Rational development environment first. Just found a stupid issue with Rational and a 259 character limit with windows. Why oh why must ibm think it's a good idea to make directory structures with such long names Sheesh. So, its going to take me 4-5 hours before I can get to it. Thanks. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 12:15 AM To: axis-user@ws.apache.org; Charak, Vikas; VanKooten, Derek Subject: Re: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Vikas, Derek, Please try the nightly build in a couple of hours. I checked in fixes to get it working under websphere 6.1 thanks, dims On 9/14/06, VanKooten, Derek [EMAIL PROTECTED] wrote: I also just got done rolling back to the 1.0 version of axis, and all of my services are working fine now too. I am running the same version numbers of websphere and jdk as well. Would love to be able to use the eager initialization stuff that's supposed to be in the nightly builds, but alas, doesn't seem to work for me. I can switch back to the nightly version if you need me to test something. -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:23 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Websphere6.1 with JDK 1.4.2. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:19 PM To: axis-user@ws.apache.org Subject: Re: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Which version of websphere? jdk? On 9/14/06, Charak, Vikas [EMAIL PROTECTED] wrote: .aar format works fine. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:07 PM To: axis-user@ws.apache.org Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies So you have the release version of Axis2 deployed to WebSphere and it works with the version service in aar format or is it unpacked? Dave -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 10:41 AM To: axis-user@ws.apache.org Subject: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Okay! Atlast I was able to invoke the version service on websphere. Issue is it works with Axis2 release1.0 but not with any of the nightly builds. Possible bug in nightilies. -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 9:56 AM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: NoSuchMethodError while deploying aar file on WebSphere Hi Dave/ Dims, I tried almost everything still same issue. REST version works but not SOAP version. I will write a separate email to Axis2 Designers for assistance. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 1:35 PM To: axis-user@ws.apache.org Subject: Re: NoSuchMethodError while deploying aar file on WebSphere Derek, Did you set the soap action to getMemoryStatus? try that, the alternative is to specify the method name in the EPR itself like you did for REST. thanks, dims On 9/13/06, VanKooten, Derek [EMAIL PROTECTED] wrote: I seem
RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies
) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio n(HttpInboundLink.java:411) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpIC LReadCallback.java:101) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueMa nager.java:566) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager. java:619) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager. java:952) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager .java:1039) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1462) -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 12:15 AM To: axis-user@ws.apache.org; Charak, Vikas; VanKooten, Derek Subject: Re: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Vikas, Derek, Please try the nightly build in a couple of hours. I checked in fixes to get it working under websphere 6.1 thanks, dims On 9/14/06, VanKooten, Derek [EMAIL PROTECTED] wrote: I also just got done rolling back to the 1.0 version of axis, and all of my services are working fine now too. I am running the same version numbers of websphere and jdk as well. Would love to be able to use the eager initialization stuff that's supposed to be in the nightly builds, but alas, doesn't seem to work for me. I can switch back to the nightly version if you need me to test something. -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:23 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Websphere6.1 with JDK 1.4.2. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:19 PM To: axis-user@ws.apache.org Subject: Re: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Which version of websphere? jdk? On 9/14/06, Charak, Vikas [EMAIL PROTECTED] wrote: .aar format works fine. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:07 PM To: axis-user@ws.apache.org Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies So you have the release version of Axis2 deployed to WebSphere and it works with the version service in aar format or is it unpacked? Dave -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 10:41 AM To: axis-user@ws.apache.org Subject: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Okay! Atlast I was able to invoke the version service on websphere. Issue is it works with Axis2 release1.0 but not with any of the nightly builds. Possible bug in nightilies. -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 9:56 AM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: NoSuchMethodError while deploying aar file on WebSphere Hi Dave/ Dims, I tried almost everything still same issue. REST version works but not SOAP version. I will write a separate email to Axis2 Designers for assistance. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 1:35 PM To: axis-user@ws.apache.org Subject: Re: NoSuchMethodError while deploying aar file on WebSphere Derek, Did you set the soap action to getMemoryStatus? try that, the alternative is to specify the method name in the EPR itself like you did for REST. thanks, dims On 9/13/06, VanKooten, Derek [EMAIL PROTECTED] wrote: I seem to be having the same problem. I wrote a service that worked fine on the 1.0 release. I then read that the nightly builds had a eager initialization feature. So, I tried getting a nightly build and using the same aar file from before. I get the error Sep 13, 2006 11:20:52 AM org.apache.axis2.engine.AxisEngine receiveFault INFO: Received Error Message with id urn:uuid:9EF9037ADD59CB7B7D11581608519631 org.apache.axis2.AxisFault: Service not found operation terminated !! at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:298) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:539 ) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:473 ) at com.bealls.services.personalization.PersonalizationService.main(Personal izationService.java:53) I have tried replacing
RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies
I wont be able to try it out till Monday when I get back to work. I'll try it out then. Thanks. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 3:01 PM To: axis-user@ws.apache.org Subject: Re: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Nevermind. Fixed. Please pick up a nightly in another hour or so. On 9/15/06, Davanum Srinivas [EMAIL PROTECTED] wrote: Please log a bug report in JIRA. thanks, dims On 9/15/06, VanKooten, Derek [EMAIL PROTECTED] wrote: Ok, its working in websphere 6 now with this build. I'm able to call my service again. Thanks! :) Btw, I was also finally able to get the eager inintialization to work as well. Seems like the actual method signature to use for the init or startup methods were not the same as what I read in the forums or in the JIRA. When I implemented the Service interface and used those methods it worked correctly. public void startUp(ConfigurationContext configurationContext, AxisService axisService); public void init(ServiceContext serviceContext); and I had to put the load-on-startup parameter into the services.xml. parameter name=load-on-startup locked=falsetrue/parameter I am now getting another error when I try http://localhost:9080/PersonalizationEngine/services/PersonalizationServ ices?wsdl I get this: Error page exception The server cannot use the error page specified for your application to handle the Original Exception printed below. Please see the Error Page Exception below for a description of the problem with the specified error page. Original Exception: Error Message: String index out of range: 14 Error Code: 500 Target Servlet: AxisServlet Error Stack: java.lang.StringIndexOutOfBoundsException: String index out of range: 14 at java.lang.String.substring(String.java(Compiled Code)) at org.apache.axis2.transport.http.ListingAgent.extractHostAndPort(ListingA gent.java:126) at org.apache.axis2.transport.http.ListingAgent.processListService(ListingA gent.java:166) at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:165) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:1282) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap per.java:673) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheS ervletWrapper.java:89) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:187 8) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:8 4) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio n(HttpInboundLink.java:472) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio n(HttpInboundLink.java:411) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpIC LReadCallback.java:101) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueMa nager.java:566) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager. java:619) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager. java:952) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager .java:1039) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1462) Error Page Exception: Error Message: SRVE0199E: OutputStream already obtained Error Code: 0 Target Servlet: null Error Stack: java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletRespo nse.java:467) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:170) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:1 63) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:2 17) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspF actoryImpl.java:149) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryIm pl.java:117) at com.ibm._jsp._error500._jspService(_error500.java:79) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:1282) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap per.java:673) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(G
RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies
I also just got done rolling back to the 1.0 version of axis, and all of my services are working fine now too. I am running the same version numbers of websphere and jdk as well. Would love to be able to use the eager initialization stuff that's supposed to be in the nightly builds, but alas, doesn't seem to work for me. I can switch back to the nightly version if you need me to test something. -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:23 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Websphere6.1 with JDK 1.4.2. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:19 PM To: axis-user@ws.apache.org Subject: Re: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Which version of websphere? jdk? On 9/14/06, Charak, Vikas [EMAIL PROTECTED] wrote: .aar format works fine. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 12:07 PM To: axis-user@ws.apache.org Subject: RE: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies So you have the release version of Axis2 deployed to WebSphere and it works with the version service in aar format or is it unpacked? Dave -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 10:41 AM To: axis-user@ws.apache.org Subject: [AXIS2] Calling SOAP version on WebSphere works with Release1; Possible bug in nightilies Okay! Atlast I was able to invoke the version service on websphere. Issue is it works with Axis2 release1.0 but not with any of the nightly builds. Possible bug in nightilies. -Original Message- From: Charak, Vikas [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 9:56 AM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: NoSuchMethodError while deploying aar file on WebSphere Hi Dave/ Dims, I tried almost everything still same issue. REST version works but not SOAP version. I will write a separate email to Axis2 Designers for assistance. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 2006 1:35 PM To: axis-user@ws.apache.org Subject: Re: NoSuchMethodError while deploying aar file on WebSphere Derek, Did you set the soap action to getMemoryStatus? try that, the alternative is to specify the method name in the EPR itself like you did for REST. thanks, dims On 9/13/06, VanKooten, Derek [EMAIL PROTECTED] wrote: I seem to be having the same problem. I wrote a service that worked fine on the 1.0 release. I then read that the nightly builds had a eager initialization feature. So, I tried getting a nightly build and using the same aar file from before. I get the error Sep 13, 2006 11:20:52 AM org.apache.axis2.engine.AxisEngine receiveFault INFO: Received Error Message with id urn:uuid:9EF9037ADD59CB7B7D11581608519631 org.apache.axis2.AxisFault: Service not found operation terminated !! at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:298) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:539 ) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:473 ) at com.bealls.services.personalization.PersonalizationService.main(Personal izationService.java:53) I have tried replacing the wsdl4j.jar in lib of webshpere 6.0 with the one that comes with axis2 nightly build. I have created a shared lib, added it to the class loader for the app server, and set the class loader to have Parent Last The class path for my shared lib is: C:\Projects\axis2\WEB-INF\lib\activation-1.1.jar;C:\Projects\axis2\WEB-I NF\lib\annogen-0.1.0.jar;C:\Projects\axis2\WEB-INF\lib\axiom-api-SNAPSHO T.jar;C:\Projects\axis2\WEB-INF\lib\axiom-dom-SNAPSHOT.jar;C:\Projects\a xis2\WEB-INF\lib\axiom-impl-SNAPSHOT.jar;C:\Projects\axis2\WEB-INF\lib\a xis2-adb-codegen-SNAPSHOT.jar;C:\Projects\axis2\WEB-INF\lib\axis2-adb-SN APSHOT.jar;C:\Projects\axis2\WEB-INF\lib\axis2-codegen-SNAPSHOT.jar;C:\P rojects\axis2\WEB-INF\lib\axis2-java2wsdl-SNAPSHOT.jar;C:\Projects\axis2 \WEB-INF\lib\axis2-jaxbri-SNAPSHOT.jar;C:\Projects\axis2\WEB-INF\lib\axi s2-jibx-SNAPSHOT.jar;C:\Projects\axis2\WEB-INF\lib\axis2-kernel-SNAPSHOT .jar;C:\Projects\axis2\WEB-INF\lib\axis2-soapmonitor-SNAPSHOT.jar;C:\Pro jects\axis2\WEB-INF\lib\axis2-xmlbeans-SNAPSHOT.jar;C:\Projects\axis2\WE B-INF\lib\backport-util-concurrent-2.1.jar;C:\Projects\axis2\WEB-INF\lib \commons-codec-1.3.jar;C:\Projects\axis2\WEB-INF\lib\commons
RE: wsdl stub generation(element without name attribute allowed!!!??!!?!?!)
If WSDL2Java is not rejecting this input (an element declared without a name) as it should, with an informative error message, then there is a bug in WSDL2Java as well. please file a JIRA. Thanks. Derek -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 05, 2006 5:20 PM To: axis-user@ws.apache.org Subject: Re: wsdl stub generation(element without name attribute allowed!!!??!!?!?!) It is not valid. (Therefore it is a bug in NetBeans.) All elements must have a name except the xsd:any element. i.e., this would be valid: xsd:element name=createFromUrl xsd:complexType xsd:sequence xsd:any/ /xsd:sequence /xsd:complexType /xsd:element But you could not specify that the any element is if type xsd:anyURI. Anne On 9/5/06, Christian Kloner [EMAIL PROTECTED] wrote: hi, A friend of mine has written a wsdl file which has in the schema part elements like this: xsd:element name=createFromUrl xsd:complexType xsd:sequence xsd:element type=xsd:anyURI/ /xsd:sequence /xsd:complexType /xsd:element as you can see, the element tag xsd:element type=xsd:anyURI/ contains no attribute name which is not valid if you validate against the schema. but in netbeans 5.5 with the enterprise pack, you can validate whole wsdl files, and there it is completely valid to have such an element tag in it. so i am just wondering if it is valid or not (bug of netbeans???). the stubs generated from the above code fragement produce the following output: createFromUrl xmlns=http://aurigafactory.gridminer.org; null xmlns= http://www.localhost:8080/auriga/FactoryInstanceWorkflowEPRSecond.xml /null /createFromUrl So is this allowed/valid? thanks in advance. chris - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java classes generated by wsdl2java don't compile
WSDL2Java should either detect errors in the files, or it should produce valid code. Clearly in this case it is doing neither. Please file a JIRA at http://issues.apache.org/jira/browse/AXIS2, and include your WSDL and XSDs, as well as the command line that you are using to invoke WSDL2Java. Thanks. Derek -Original Message- From: Jose Manuel Valladares Pernas [mailto:[EMAIL PROTECTED] Sent: Friday, August 25, 2006 9:15 AM To: axis-user@ws.apache.org Subject: Java classes generated by wsdl2java don't compile Hello, I have an wsdl that imports several xsd schemas and I used an ant task with WSDL2Java to produce the corresponding java clases. I am working with axis 1.4 and java jsdk 1.5.0_06. WSDL2Java produces the classes and no errors. But some of the generated classes don't compile. One of the classes has 2 constructor methods that are the same. Other classes that inherite from some parent classes have the constructor parameters in the wrong order. If you want I can send you the wsdl and the xsd files. They seem to be correct as they come from the OTA pecification. Have you seen this happening before? Any hint? If you need more information, please, let me know. Thank you very much for your help, Manuel Valladares - - Jose Manuel Valladares Pernas - [EMAIL PROTECTED] - [EMAIL PROTECTED] - __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java classes generated by wsdl2java don't compile
Oops. Thanks for catching that! Derek -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Friday, August 25, 2006 11:53 AM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: Java classes generated by wsdl2java don't compile Because this is an Axis 1.x issue, please file the bug in the Axis 1 system: https://issues.apache.org/jira/browse/axis Anne On 8/25/06, Derek [EMAIL PROTECTED] wrote: WSDL2Java should either detect errors in the files, or it should produce valid code. Clearly in this case it is doing neither. Please file a JIRA at http://issues.apache.org/jira/browse/AXIS2, and include your WSDL and XSDs, as well as the command line that you are using to invoke WSDL2Java. Thanks. Derek -Original Message- From: Jose Manuel Valladares Pernas [mailto:[EMAIL PROTECTED] Sent: Friday, August 25, 2006 9:15 AM To: axis-user@ws.apache.org Subject: Java classes generated by wsdl2java don't compile Hello, I have an wsdl that imports several xsd schemas and I used an ant task with WSDL2Java to produce the corresponding java clases. I am working with axis 1.4 and java jsdk 1.5.0_06. WSDL2Java produces the classes and no errors. But some of the generated classes don't compile. One of the classes has 2 constructor methods that are the same. Other classes that inherite from some parent classes have the constructor parameters in the wrong order. If you want I can send you the wsdl and the xsd files. They seem to be correct as they come from the OTA pecification. Have you seen this happening before? Any hint? If you need more information, please, let me know. Thank you very much for your help, Manuel Valladares - - Jose Manuel Valladares Pernas - [EMAIL PROTECTED] - [EMAIL PROTECTED] - __ 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] - 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]
Axis vs. Axis2 handling of operation name and top level element (bugs?)
be one? As far as I can tell, my WSDL specifies just one. If I remove the top-level 'full' from the getSituation() method, the 'parse' method throws an exception, so it seems that I am passing in the XML that Axis2 expects. Axis 1.4 seems to generate just one level of 'full', but Axis2 seems to generate two, one inside the other. Is this a bug? If so, again, why haven't I heard people mentioning it? (It seems to be a pretty blatant error which would affect almost all use of XMLBeans binding). Any insight on the above problems would be appreciated. My company is under some time pressure to answer these questions. Note that I am about to go on vacation for the next week, but a coworker of mine will be monitoring the list for any answers to these issues that listmembers can provide. Thanks in advance! Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis vs. Axis2 handling of operation name and top level element (bugs?)
be one? As far as I can tell, my WSDL specifies just one. If I remove the top-level 'full' from the getSituation() method, the 'parse' method throws an exception, so it seems that I am passing in the XML that Axis2 expects. Axis 1.4 seems to generate just one level of 'full', but Axis2 seems to generate two, one inside the other. Is this a bug? If so, again, why haven't I heard people mentioning it? (It seems to be a pretty blatant error which would affect almost all use of XMLBeans binding). Any insight on the above problems would be appreciated. My company is under some time pressure to answer these questions. Note that I am about to go on vacation for the next week, but a coworker of mine will be monitoring the list for any answers to these issues that listmembers can provide. Thanks in advance! Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Element Default values
Hmm. Personally, I think that using default values and referential integrity constraints are a *good* thing, although I think that it's unfortunate that more tools don't support them. I wouldn't refuse to use them just because Axis2 ignores them, though. They are still useful as documentation, and if you have an XML validator, the referential integrity checking can be invaluable as to figuring out how an incoming message is broken. You can always supply the default values yourself if you know that your tool (Axis) doesn't implement them. (Personally, I think that it should support them, although I also think that there are much higher priority problems to fix at the moment.) Derek -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 15, 2006 6:06 PM To: axis-user@ws.apache.org Subject: Re: Element Default values It's always a bad idea to assume that a processing engine will in fact honor default values. As a general rule, avoid using default values and referential integrity constraints in a schema. Anne On 8/15/06, Vinh Tran [EMAIL PROTECTED] wrote: Are default values supported in Axis2. I have client stubs created from wsdl2java but it doesn't appear to honor the default values on XSD elements. Thanks - 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: Applets--Could not get it working
It seems to me that at the very least, information on how to do this should be in the user guide. Also, it seems that the error message that Kaylan got was not particularly understandable, to say the least, and did not help much in diagnosing the problem. I would request that Kaylan please file a JIRA for one or both of the above issues. Derek -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 4:13 AM To: KALYAN Cc: axis-user@ws.apache.org Subject: Re: Applets--Could not get it working There you go! :) On 8/16/06, KALYAN [EMAIL PROTECTED] wrote: OK GOT IT. I BIG TIME GOT IT WORKING. People you got two options. You don't have to take the pain of second option.. but I am just telling. 1.) Copy latest axis and commons-discovery snapshot jar files from http://people.apache.org/repository/axis/jars/axis-1.4-SNAPSHOT.jar http://people.apache.org/repository/commons-discovery/jars/com mons-discovery-SNAPSHOT.jar rename them to remove SNAPSHOT text if you want to. 2.) a.)Checkout latest build using svn co http://svn.apache.org/repos/asf/webservices/axis/trunk/java axis b.)Build it using ant. c.) Copy the built commons-discovery and axis jars to wherever you need it. Place them where your applets suck them in... thats it. Thats it...no signing of jars, no changing java.policy file ... I am relieved. Thanks very much dims. May be if a new release of axis is done people would not come accross this issue anymore. Kalyan Davanum Srinivas [EMAIL PROTECTED] wrote: Please see the following threads: http://marc.theaimsgroup.com/?l=axis-userw=2r=1s=applet+discoveryq =b On 8/15/06, KALYAN wrote: Its not a secure site. I had accepted the certificate that I created. But the applet works only if I modify the java.policy file. Let me know if I should give more info. Here is the error message I get. Exception in thread Thread-7 java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient(Service.java:110) at org.apache.axis.client.Service.(Service.java:119) at unitconverter.webserviceclient.UnitConverterServiceClient.getCategoryL ist(UnitConverterServiceClient.java:32) at unitconverter.panels.UnitConvertorPanel$2.run(UnitConvertorPanel.java: 164) Exception in thread Thread-8 java.lang.ExceptionInInitializerError at org.apache.commons.discovery.jdk.JDKHooks.(JDKHooks.java:75) at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSing leton.java:412) at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSing leton.java:378) at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45) at java.security.AccessController.doPrivileged(Native Method) at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory. java:41) at org.apache.axis.components.logger.LogFactory.(LogFactory.java:33) at org.apache.axis.handlers.BasicHandler.(BasicHandler.java:43) at org.apache.axis.client.Service.getAxisClient(Service.java:110) at org.apache.axis.client.Service.(Service.java:119) at unitconverter.webserviceclient.UnitConverterServiceClient.getUnitList( UnitConverterServiceClient.java:52) at unitconverter.panels.UnitConvertorPanel.updateUnit1and2Lists(UnitConve rtorPanel.java:211) at unitconverter.panels.UnitConvertorPanel$3.run(UnitConvertorPanel.java: 166) Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkCreateClassLoader(Unknown Source) at java.lang.ClassLoader.(Unknown Source) at org.apache.commons.discovery.jdk.PsuedoSystemClassLoader.(PsuedoSystem ClassLoader.java:73) at org.apache.commons.discovery.jdk.JDK12Hooks.findSystemClassLoader(JDK1 2Hooks.java:215) at org.apache.commons.discovery.jdk.JDK12Hooks.(JDK12Hooks.java:73) ... 13 more Kalyan Larry Lemons wrote: What error message are you getting? Is the site at which the web service is hosted a secure site? If the certificate for which the applet was signed is a trusted certificate or is allowed to run by the client, i.e. the client clicks on the run or allow, or OK button that would enable the applet to run, then it should run, unless there are other certificates involved in the process, i.e. one installed on the web services server. Thank you, Larry M. Lemons (304
RE: Applets--Could not get it working
It seems to me that at the very least, information on how to do this should be in the user guide. Also, it seems that the error message that Kaylan got was not particularly understandable, to say the least, and did not help much in diagnosing the problem. I would request that Kaylan please file a JIRA for one or both of the above issues. Derek -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 4:13 AM To: KALYAN Cc: axis-user@ws.apache.org Subject: Re: Applets--Could not get it working There you go! :) On 8/16/06, KALYAN [EMAIL PROTECTED] wrote: OK GOT IT. I BIG TIME GOT IT WORKING. People you got two options. You don't have to take the pain of second option.. but I am just telling. 1.) Copy latest axis and commons-discovery snapshot jar files from http://people.apache.org/repository/axis/jars/axis-1.4-SNAPSHOT.jar http://people.apache.org/repository/commons-discovery/jars/com mons-discovery-SNAPSHOT.jar rename them to remove SNAPSHOT text if you want to. 2.) a.)Checkout latest build using svn co http://svn.apache.org/repos/asf/webservices/axis/trunk/java axis b.)Build it using ant. c.) Copy the built commons-discovery and axis jars to wherever you need it. Place them where your applets suck them in... thats it. Thats it...no signing of jars, no changing java.policy file ... I am relieved. Thanks very much dims. May be if a new release of axis is done people would not come accross this issue anymore. Kalyan Davanum Srinivas [EMAIL PROTECTED] wrote: Please see the following threads: http://marc.theaimsgroup.com/?l=axis-userw=2r=1s=applet+discoveryq =b On 8/15/06, KALYAN wrote: Its not a secure site. I had accepted the certificate that I created. But the applet works only if I modify the java.policy file. Let me know if I should give more info. Here is the error message I get. Exception in thread Thread-7 java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient(Service.java:110) at org.apache.axis.client.Service.(Service.java:119) at unitconverter.webserviceclient.UnitConverterServiceClient.getCategoryL ist(UnitConverterServiceClient.java:32) at unitconverter.panels.UnitConvertorPanel$2.run(UnitConvertorPanel.java: 164) Exception in thread Thread-8 java.lang.ExceptionInInitializerError at org.apache.commons.discovery.jdk.JDKHooks.(JDKHooks.java:75) at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSing leton.java:412) at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSing leton.java:378) at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45) at java.security.AccessController.doPrivileged(Native Method) at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory. java:41) at org.apache.axis.components.logger.LogFactory.(LogFactory.java:33) at org.apache.axis.handlers.BasicHandler.(BasicHandler.java:43) at org.apache.axis.client.Service.getAxisClient(Service.java:110) at org.apache.axis.client.Service.(Service.java:119) at unitconverter.webserviceclient.UnitConverterServiceClient.getUnitList( UnitConverterServiceClient.java:52) at unitconverter.panels.UnitConvertorPanel.updateUnit1and2Lists(UnitConve rtorPanel.java:211) at unitconverter.panels.UnitConvertorPanel$3.run(UnitConvertorPanel.java: 166) Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkCreateClassLoader(Unknown Source) at java.lang.ClassLoader.(Unknown Source) at org.apache.commons.discovery.jdk.PsuedoSystemClassLoader.(PsuedoSystem ClassLoader.java:73) at org.apache.commons.discovery.jdk.JDK12Hooks.findSystemClassLoader(JDK1 2Hooks.java:215) at org.apache.commons.discovery.jdk.JDK12Hooks.(JDK12Hooks.java:73) ... 13 more Kalyan Larry Lemons wrote: What error message are you getting? Is the site at which the web service is hosted a secure site? If the certificate for which the applet was signed is a trusted certificate or is allowed to run by the client, i.e. the client clicks on the run or allow, or OK button that would enable the applet to run, then it should run, unless there are other certificates involved in the process, i.e. one installed on the web services server. Thank you, Larry M. Lemons (304
RE: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANT
Title: Message Debasish: Having WSDL2Java simply produce incorrect code when errors like this happen is not really acceptable. If something is wrong, WSDL2Java should tell the user so, not just go blindly forward making unjustified assumptions about what the user really meant ("He didn't tell me what he wanted, so he must have just wanted an OMElement!") or otherwise trying unsuccessfully to fix the user's mistakes. Please file a JIRA for this issue, providing your WSDL and schemas, and stating that WSDL2Java did not detect that you referenced a nonexistent schema component, and did not reject your WSDL byproviding a reasonableerror message telling you of your problem and what to do about it, as it should have. Note that thisbug seems quite reminiscent of https://issues.apache.org/jira/browse/AXIS2-845, and may be related. Thanks. Derek -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 15, 2006 10:55 AMTo: axis-user@ws.apache.orgCc: axis-user@ws.apache.orgSubject: Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANTPerfect!!! Thanks a lot.___Debasish Dutta RoyNITASPh: 617-871-3033 "Anne Thomas Manes" [EMAIL PROTECTED] 08/15/2006 01:33 PM Please respond to axis-user To: axis-user@ws.apache.org cc:(bcc: Debasish DuttaRoy/X/PH/Novartis) Subject: Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANTValidation of your WSDL produces this warning:There is no schema component of the name [requestRA] defined in the WSDL either via imported or embedded schema.This error is caused by the definition of the "ralist" element, which is the last child element of the "requestDetails" element. It is defined as: xsd:element maxOccurs="unbounded" minOccurs="0" name="raList" type="requestRA"/ Two problems:1. you must namespace qualify the referenced type. 2. "requestRA" must be defined as a type rather than an element.The "raList" definition should be:xsd:element maxOccurs="unbounded" minOccurs="0" name="raList" type="ns0:requestRA"/ And the "requestRA" definition should be:xsd:complexType name="requestRA" xsd:sequence xsd:element .../ ... /xsd:sequence/xsd:complexTypeAnne On 8/15/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Ajith I also believe the same. There is something wrong in the schema part of the wsdl file. I am attaching the wsdl file for your reference. There is a requestDetails object and as a member variable of the request details object I want an array of RequestRA object. At line 84 I have defined the element of raList, which I want as an array/List of RequestRA/Object and then at line 90 is the requestRA definition. Right now the RequestRA class is getting created but inside requestDetails raList is an array of OMElement. ___Debasish Dutta RoyNITASPh: 617-871-3033 "Ajith Ranabahu" [EMAIL PROTECTED] 08/15/2006 09:08 AM Please respond to axis-user To: axis-user@ws.apache.orgcc: (bcc: Debasish DuttaRoy/X/PH/Novartis)Subject: Re: Axis2: Code Generator BUG? - Create list/Array of objects - IMPORTANTHi,If your schema declaration is proper then it should generate an arrayof the correct type. If you are still seeing OMElements then therecould be a problem with your schemaAjithOn 8/15/06, Debasish Dutta Roy [EMAIL PROTECTED] wrote: I have seen that example on the net. But my list/array is of another object. Not a native data type. If I do a complextype then this object is not created. I any case, it creates an array of OMElement[] and not an Object[]. As for creating list vs array, i think it would depend on the tool. If it can create one you can get a list. I am using the nightly build of 08/07/2006. Anybody has got any idea??? It is a simple case, I have a manager Class which has member of array of Employee objects who are subordinates to him. On 8/11/06, Ajith Ranabahu [EMAIL PROTECTED] wrote: Hi, As far as generating code is concerned you *cannot* generate a list field, even if you have a the maxOccurs set to unbound! it is always an array! As for this schema it is not right. What you should be doing is the following xsd:element name="bList" type="B" minOccurs="1" maxOccurs="unbounded"/ xsd:complexType name="B" xsd:sequence xsd:element name="str"
RE: [Axis2]Unable to use WSDL2JAVA.
Agreed, it looks like the null pointer bug is already fixed. I did, however, just file a new JIRA on the fact that the generated error message is missing a space and is a bit ungrammatical: http://issues.apache.org/jira/browse/AXIS2-1037 Derek -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 15, 2006 10:19 AM To: axis-user@ws.apache.org Subject: Re: [Axis2]Unable to use WSDL2JAVA. Yura, No, please don't reopen the JIRA. As Dims says, the latest build throws an informative exception. Your problem is caused by the fact that you do not import your second schema (targetNamespace=urn:/crmondemand/xml/territory) into the first schema, therefore Axis cannot find elements/types with a prefix of xsdLocal1. Add this line to the first schema: xsd:import namespace=urn:/crmondemand/xml/territory/ Anne On 8/15/06, Yura Tkachenko [EMAIL PROTECTED] wrote: I have in wsdl *element*: xsd:element name=ListOfTerritory type=xsdLocal1:ListOfTerritory/xsd:element xsd:complexType name=ListOfTerritoryxsd:sequencexsd:element name=Territory maxOccurs=unbounded minOccurs=0 type=xsdLocal1:Territory/xsd:element /xsd:sequence /xsd:complexTypeShould I reopen bug http://issues.apache.org/jira/browse/AXIS2-1026 ? 2006/8/15, Anne Thomas Manes [EMAIL PROTECTED]: Yura, Your exception says that it cannot find an *element* called ListOfTerritory. In your last message you showed us a *complexType* called ListOfTerritory. Is there also an element with this name? If not, then that is the cause of your problem. I'm with Derek -- the tool should never throw a NPE, so please update the JIRA with sufficient information so that Dims and crew can define a better exception for this type of WSDL error. Anne On 8/15/06, Yura Tkachenko [EMAIL PROTECTED] wrote: Ok, here is exception from bug: Caused by: org.apache.axis2.schema.SchemaCompilationException: Referenced element {urn:/crmondemand/xml/territory}ListOfTerritorynot found! at org.apache.axis2.schema.SchemaCompiler.process (SchemaCompiler.java :1446) at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler. java:1318) at org.apache.axis2.schema.SchemaCompiler.processComplexType (SchemaCompiler.java:846) at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaTy pe (SchemaCompiler.java:791) at org.apache.axis2.schema.SchemaCompiler.processSchema (SchemaCompiler.java:775) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.j ava:475) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.j ava :446) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:308 ) at org.apache.axis2.schema.SchemaCompiler.compile (SchemaCompiler.java:230) at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java: 77) ... 8 more And in the territory description of the ListOfTerritory presents. xsd:complexType name=ListOfTerritory xsd:sequence xsd:element name=Territory maxOccurs=unbounded minOccurs=0 type=xsdLocal1:Territory / /xsd:sequence /xsd:complexType BTW I think any wsdl which worked with Axis 1.3 should always work with Axis2, am I right? Also for generate stubs using this wsdl in Axis 1.3, I'm used property file with package mappings. Is it possible to use this property file in the WSDL2JAVA in Axis2 1.0 ? 2006/8/15, Davanum Srinivas [EMAIL PROTECTED] : Bug is closed :) see comments in the bug report. thanks, dims On 8/14/06, Yura Tkachenko [EMAIL PROTECTED] wrote: I'm using 1.0, the same issue and for nightly build. I logged bug at JIRA: http://issues.apache.org/jira/browse/AXIS2-1026 2006/8/14, Ajith Ranabahu [EMAIL PROTECTED]: Hi, Is this 1.0 or the latest SVN ? if its 1.o please check with the latest nightlies. if the problem persists please file a Jira (attach the WSDL as well) Ajith On 8/14/06, Derek [EMAIL PROTECTED] wrote: Yura: WSDL2Java should never throw a NullPointerException. If it is sent invalid data, it should always throw an exception containing an informative error message instead. Please file a JIRA so that this issue is fixed. Thank you. Derek -Original Message- From: Yura Tkachenko [mailto:[EMAIL PROTECTED] ] Sent: Monday, August 14, 2006 7:11 AM To: axis
RE: [AXIS2] nightly build problem when parsing xml stream
Although I agree with what Ajith said, below, I still encourage you (Alistair) to file a JIRA about the fact that Axis does not log the error. Axis should not ever fail without logging an error message. Even if the problem was due to misconfiguration, Axis should leave an informative error message in the log file saying so. (It sounds like a static initialization block in the code (or a static variable initializer) is missing a try..catch block that would ensure that any thrown exceptions get logged.) Derek -Original Message- From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 1:20 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: [AXIS2] nightly build problem when parsing xml stream Hi, Try using the generated ant build to build your aar file. The ant build inserts the necessary files into the aar file and you should not have a problem! Ajith On 8/14/06, Derek [EMAIL PROTECTED] wrote: Alistair: Please file a JIRA indicating that the error that occurs in this case doesn't get logged (and it should!) Thanks. Derek -Original Message- From: Alistair Young [mailto:[EMAIL PROTECTED] Sent: Thursday, August 10, 2006 6:37 AM To: axis-user@ws.apache.org Subject: Re: [AXIS2] nightly build problem when parsing xml stream aha! handy thing a debugger coz the exception doesn't make it into the log. schemaorg_apache_xmlbeans.system.sA6973D16021071091ABD334B25B9 A53E.TypeS ystemHolder was missing. sorted Alistair On 10 Aug 2006, at 13:11, Alistair Young wrote: Hi there, Is there anything obvious that might be causing these? They occur when a MessageReceiver (generated by WSDL2Java) is trying to do a Factory.newInstance (org.apache.axiom.om.OMElement.getXMLStreamReaderWithoutCaching(), new org.apache.xmlbeans.XmlOptions().setLoadAdditionalNamespaces (extraNamespaces)) there's no other info in the logs. first attempt at calling the service via stub: SEVERE: java.lang.ExceptionInInitializerError next attempt: SEVERE: java.lang.NoClassDefFoundError INFO: org.apache.axis2.AxisFault: null; nested exception is: com.ctc.wstx.exc.WstxIOException: null thanks, Alistair - 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] - 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]Unable to use WSDL2JAVA.
Title: Message Yura: WSDL2Java should never throw a NullPointerException. If it is sent invalid data, it should always throw an exception containingan informative error message instead. Please file a JIRA so that this issue is fixed. Thank you. Derek -Original Message-From: Yura Tkachenko [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 7:11 AMTo: axis-user@ws.apache.orgSubject: Re: [Axis2]Unable to use WSDL2JAVA. Hello, Martin I solved this issue: when I run WSDL2JAVA.bat file not Wsdl2Java class everything was all right, but for Siebel CRM Ondemand Service wsdl I'm always getting exception: Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: org.apache.axis2.schema.SchemaCompilationException: java.lang.NullPointerException at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:185) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java :21)Caused by: java.lang.RuntimeException: org.apache.axis2.schema.SchemaCompilationException: java.lang.NullPointerException at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:117) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:140) ... 2 moreCaused by: org.apache.axis2.schema.SchemaCompilationException: java.lang.NullPointerException at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:186) at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java :70) ... 3 moreCaused by: java.lang.NullPointerException at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:360) at org.apache.axis2.schema.SchemaCompiler.processElement (SchemaCompiler.java:344) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:410) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:334) at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:915) at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:878) at org.apache.axis2.schema.SchemaCompiler.processComplexType (SchemaCompiler.java:643) at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:594) at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.j ava:579) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:366) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:344) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:226) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:181) ... 4 more Don't know what does it means, but for Axis 1.3 I'm used also NstoPkg.properties file to generate stubs. Axis2 doesn't used this file or I missed some parameter, here is my command line: WSDL2JAVA.bat -uri account.wsdl Let me know if you need some additional info. Thanks, Yura. 2006/8/13, Martin Gainty [EMAIL PROTECTED]: Good Afternoon Yura-Your WSDL will need to identify the method which will process the Requestin this example the wsdl:operation name="" is the method wsdl:portType name="SelectFromZip"- wsdl:operation name="getSelectFromZip" parameterOrder="in0 in1 in2"wsdl:input message="impl:getSelectFromZipRequest" name="getSelectFromZipRequest" / wsdl:output message="impl:getSelectFromZipResponse" name="getSelectFromZipResponse" //wsdl:operation/wsdl:portTypeAnyone else?Martin --* This email message and any files transmitted with it contain confidentialinformation intended only for the person(s) to whom this email message isaddressed.If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the originalmessage without making a copy.Thank you.- Original Message -From: [EMAIL PROTECTED] To: axis-user@ws.apache.orgSent: Sunday, August 13, 2006 6:21 AMSubject: [Axis2]Unable to use WSDL2JAVA. Hi, there. Everytime when I'm trying to use WSDL2JAVA util to generate client stubs I'm getting exception: Exception in thread "main" java.lang.NoSuchMethodError: javax.wsdl.PortType.getExtensionAttributes()Ljava/util/Map; at org.apache.axis2.description.WSDL2AxisServiceBuilder.processPortType (WSDL2AxisServiceBuilder.java:369) at org.apache.axis2.description.WSDL2AxisServiceBuilder.processBinding(WSDL2AxisServiceBuilder.java:299) at org.apa
RE: 1.4: String[] translated to String in WSDL
Title: Message Timothy: Please file a JIRA for this. Axis should be capable of generating correct WSDL. Thanks. Derek -Original Message-From: Timothy Chan [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 09, 2006 3:04 PMTo: axis-user@ws.apache.orgSubject: 1.4: String[] translated to String in WSDL Hi everyone,I'd appreciate any insight on an issue I've encountered. A String[] is being translated into a non-array String in the WSDL. The result is an "argument type mismatch" error.More specifically, I have a bean object that contains a String[] property. During Ant build, Java2WSDL correctly produces a WSDL where the schema defines this property as... element name="items" nillable="true" type="impl:ArrayOf_xsd_string"/And WSDL2Java correctly produces the .java w/ the String[] property.But when I deploy the project, the Axis translates the property to a non-array String property so that the WSDL defines the property as... element name="items" nillable="true" type="xsd:string"/As a result, the client encounters the "argument type mismatch" error when the server replies w/ a String[] but the client expects a non-array String. I would appreciate any insight. thx,-Tim
RE: User Guide: Code generation for client
Title: Message Hi, folks. While I'm flattered to hear that you might think I know what is going on, I'm afraid you are sadly mistaken. :-) Actually, I'm not an Axis developer. I'm just a rather frustrated user, like yourself, who is maybe a bit more verbose than most because I try to ensure that people actually report the bugs in Axis to JIRA so that they get fixed. (Developers typically don't try to fix bugs unless they actually show up in a bug tracking system, so complaining about them on the mailing list is not enough.) I don't have any special knowledge about Axis other than having tripped a bunch of times, fallen flat on my face, and having learned enough to avoid the few specific potholes that I've stepped in. As far as I can tell, your problem is not one of these. As far as diagnosing a data binding error, I would try to capture the data that is being sent from client to server or back (using something like tcpmonitor) and see if the data being transmitted is something reasonable. That will at least tell you if the error is occurring in the client versus in the server. It's also possible that you might be having a problem with 'chunked' data encoding (as described by some other people on the list) screwing up your XML parsing. I haven't had this problem, so I don't know much about it. I would try to make very sure, however, that the version of Axis libraries that you are using for your client,your server, and WSDL2Java are all exactly the same (which should preferably be the latest nightly build you can get).Version skew between these could cause a lot of problemssuch as data binding errors. I also seem to remember there being some discussion to the effect that some of the samples in the user guide were wrong, so you might do some searches on the list to see if your problem is related to this. I also recommend filing a JIRA to the effect that the error message "data binding error" that you seem to be getting is not specific enough to be useful in solving the problem. I think that any such error message generated by Axis or Axiom should at least identify what specific XML element could not be bound, and why. Derek -Original Message-From: jayachandra [mailto:[EMAIL PROTECTED] Sent: Friday, August 11, 2006 12:22 AMTo: axis-user@ws.apache.orgSubject: 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 tohttp://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.
RE: [AXIS2] nightly build problem when parsing xml stream
Alistair: Please file a JIRA indicating that the error that occurs in this case doesn't get logged (and it should!) Thanks. Derek -Original Message- From: Alistair Young [mailto:[EMAIL PROTECTED] Sent: Thursday, August 10, 2006 6:37 AM To: axis-user@ws.apache.org Subject: Re: [AXIS2] nightly build problem when parsing xml stream aha! handy thing a debugger coz the exception doesn't make it into the log. schemaorg_apache_xmlbeans.system.sA6973D16021071091ABD334B25B9 A53E.TypeS ystemHolder was missing. sorted Alistair On 10 Aug 2006, at 13:11, Alistair Young wrote: Hi there, Is there anything obvious that might be causing these? They occur when a MessageReceiver (generated by WSDL2Java) is trying to do a Factory.newInstance (org.apache.axiom.om.OMElement.getXMLStreamReaderWithoutCaching(), new org.apache.xmlbeans.XmlOptions().setLoadAdditionalNamespaces (extraNamespaces)) there's no other info in the logs. first attempt at calling the service via stub: SEVERE: java.lang.ExceptionInInitializerError next attempt: SEVERE: java.lang.NoClassDefFoundError INFO: org.apache.axis2.AxisFault: null; nested exception is: com.ctc.wstx.exc.WstxIOException: null thanks, Alistair - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WSDL2Java generates an incorrect service name
I've seen this before. A bit annoying: The port name specified in WSDL becomes the service name in the deployed service. I'd suggest filing a JIRA for this. I haven't noticed Axis2 doing it, though. Derek -Original Message- From: Jon Carmignani [mailto:[EMAIL PROTECTED] Sent: Friday, August 04, 2006 3:13 PM To: axis-user@ws.apache.org Subject: WSDL2Java generates an incorrect service name I am using WSDL2Java to generate code on either side of a web service. I am employing the wrapped literal style in my WSDL, and most of the code seems to come out correctly. My only problem seems to be that the deploy.wsdd file generated in this process lists the name of the port in the service name ... attribute instead of the name I specify in the service tag in the WSDL. When I fill in the business logic and try to deploy this I get errors connecting to my web service. However, when I change the service name ... attribute to be the same that I have in the service tag in the WSDL and then deploy, it works beautifully. Is this a common issue? I am using Axis 1.3 and running it on a Tomcat 5.0 server. Thank you, Jon Carmignani - 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: Question about handling custom exceptions in Axis 1.3
In general, you cannot send arbitrary exceptions to remote clients, since Axis (or most other client/server communication protocols) has no idea how to serialize/deserialize an arbitrary exception that you might have created so that it can be transmitted to a remote client. You should probably only be sending subclasses of RemoteException, and probably should include very limited, if any, additional information in the exception class itself. I suggest that you make sure that your TestException extends RemoteException, not just Exception. I am not sure how this works if a RemoteException has a 'cause' field which is not a RemoteException. I am not an expert in what RemoteException is capable of, but I think I know enough to understand that what you are trying to do (throw an exception that is not derived from RemoteException from server to client) is not, in general, possible. Derek -Original Message- From: Eric Borisow [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 6:33 AM To: axis-user@ws.apache.org Subject: Re: Question about handling custom exceptions in Axis 1.3 I tried using this line: TestException myEx = (TestException) gbe; But, it won't even compile. It gives me the error: Cannot cast from RemoteException to TestException. Is there something I am missing? Thanks, Eric --- xu cai [EMAIL PROTECTED] wrote: AxisFault extends from RemoteException, I think you can simply cast RemoteException to your customized exception. hope it works. -jeff On 8/3/06, Eric Borisow [EMAIL PROTECTED] wrote: Hi, I have been trying to piece together the best way to generate and consume a custom exception with Axis 1_3. I have created a test with an interface, a service implementation of the interface and an Exception. When I generate the wsdl using java2wsdl, the wsdl contains a reference to the TestException class as a fault of the service. When I call the service, it returns an AxisFault containing information about the fault. My question is... what can I do with that RemoteException to get my exception out of it? I have seen some other articles where it seems you should just be able to catch your custom exception but all I ever get is RemoteException which I then have to convert to an AxisFault but I still don't get access to my exception per se. See below for my code. Thanks, Eric Interface: public interface IServiceTest { public void throwError() throws TestException; } Service implementation: public class Service implements IServiceTest { public void throwError() throws TestException { throw new TestException(); } } Exception: import java.io.Serializable; public class TestException extends Exception implements Serializable { private String someError; public TestException() {} public TestException(String someError) { this.someError = someError; } public String getSomeError() { return someError; } public void setSomeError(String someError) { this.someError = someError; } } wsdl: ?xml version=1.0 encoding=UTF-8? wsdl:definitions targetNamespace=http://services.spx.com; xmlns:impl=http://services.spx.com; xmlns:intf=http://services.spx.com; xmlns:apachesoap=http://xml.apache.org/xml-soap; xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; !--WSDL created by Apache Axis version: 1.3 Built on Oct 05, 2005 (05:23:37 EDT)-- wsdl:types schema xmlns=http://www.w3.org/2001/XMLSchema; targetNamespace=http://services.spx.com; import namespace=http://schemas.xmlsoap.org/soap/encoding// complexType name=TestException sequence element name=someError nillable=true type=xsd:string/ /sequence /complexType /schema /wsdl:types wsdl:message name=TestException wsdl:part name=fault type=impl:TestException/ /wsdl:message wsdl:message name=throwErrorRequest /wsdl:message wsdl:message name=throwErrorResponse /wsdl:message wsdl:portType name=Service wsdl:operation name=throwError wsdl:input name=throwErrorRequest message=impl:throwErrorRequest/ wsdl:output name=throwErrorResponse message=impl:throwErrorResponse/ wsdl:fault name=TestException message=impl:TestException/ /wsdl:operation /wsdl:portType wsdl:binding name=axisexceptiontestSoapBinding type=impl:Service wsdlsoap:binding style=rpc transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=throwError
RE: [Axis2] Axiom OMException
Title: Message Please file a JIRA for this. Axis code should not be throwing exceptions unless they includemessages that clearly explain what the problem is. In this case, it is not clear to me that an exception should be thrown at all. Thanks. Derek -Original Message-From: Brecht Yperman [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 1:44 AMTo: axis-user@ws.apache.orgSubject: [Axis2] Axiom OMException Hi, Im trying to call the GoogleSearch webservice, for a simple test, but I dont seem to succeed. When reading in a very simple document, I get an OMException, without detailMessage. Definition serviceDefinition = getWsdlDefinition(wsdl); AxisConfiguration config = new AxisConfiguration(); ConfigurationContext context = new ConfigurationContext(config); ServiceClient client = new ServiceClient(context, serviceDefinition, serviceName, port); OMFactory omFactory = OMAbstractFactory.getOMFactory(); InputStream is = new StringBufferInputStream("doSpellingSuggestionkeysome_valid_key/keyphrasegogle/phrase/doSpellingSuggestion"); StAXBuilder builder = new StAXOMBuilder(is); OMDocument omDocument = omFactory.createOMDocument(builder); // the following instruction throws the Exception OMElement documentElement = omDocument.getOMDocumentElement(); client.sendReceive(documentElement); The following is reported in the logging: START_ELEMENT: doSpellingSuggestion:doSpellingSuggestion START_ELEMENT: key:key CHARACTERS: [some_valid_key] END_ELEMENT: key:key START_ELEMENT: phrase:phrase CHARACTERS: [gogle] END_ELEMENT: phrase:phrase END_ELEMENT: doSpellingSuggestion:doSpellingSuggestion END_DOCUMENT: org.apache.axiom.om.OMException at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:121) at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:144) at com.invenso.xb.isp.xbconnect.wscall.WebserviceCallWorker.run(WebserviceCallWorker.java:121) This is Axiom-related ofcourse, but I think this is the best place to ask this question? Any help is very much appreciated. Thanks, Brecht Invenso - The Integration Software specialists._ Brecht YpermanDevelopment teamDirect: +32 (0)3 780 30 05Email: [EMAIL PROTECTED] INVENSO bvbaIndustriepark-West 759100 Sint-NiklaasBelgium - EuropePhone: +32 (0)3 780 30 02Fax: +32 (0)3 780 30 03Email: [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."
RE: Book for Axis
Title: Message In my opinion, the 1.0 release was so unstable that it should have been termed a beta. Extremely commonly used features simply did not work, or did not work reliably, or had a design that was not yet stable enough to be worth writing code for. The current nightly builds are starting to become moderately stable. However, documentation (updated user guide, etc.) for the changes made in these builds has lagged the development effort for quite a bit, making it difficult to actually figure out how to use the new features. I have been trying for weeks to port a web service that worked fine on Axis 1.4 to Axis 2. I have not yet succeeded. I have hit a lot of bugs, including quite a few I consider "serious" which made basic, commonly neededfeatures unusable. Many have been fixed, but a number of crucial ones have not yet been fixed. (Yes, I have entered these in JIRA). Documentation of how to use Axis2 is spotty, with many important areas entirely omitted from the user documentation. Some infrequently used areas are covered in great depth, but more commonly needed areas (Fault handling, HTTP chunking, accessing SOAP headers, invocation of WSDL2Java from ANT, etc.) are omitted entirely, and hence the mailing list tends to discuss these topics quite frequently. Also,some of the existing documentation is no longer entirely correct, due to design changes. Reading the mailing list, I am still seeing a lot of people complaining about NullPointerExceptions andsimilar other low-level exceptions (OMException, etc.) being thrown from various tools or from generated code. This just shouldn't happen on a regular basis. These sorts of problems should be exceedingly rare, but instead they seem to be quite common. They seem particularly common when feeding invalid or unsupported input to tools -- the tools fail to properly detect that the input is invalid, and simply crash instead of issuing a useful error message. I would say that Axis2 is fairly immature at this point. It has a lot of nice features, and the code I wrote using it is FAR more elegant, smaller, and easier to understandthan the corresponding code for Axis 1.4. However, my experience has been that there are a lot of "rough edges" in Axis2, and a single one of those can stop you cold for a week or more while you try to figure out what is going on. At the moment, my project is entirely on hold waiting for some of the bugs I have filed to be fixed. To their credit, the people on this mailing list have been quite helpful. Also, a number of the bugs that I filed were fixed within a week (or even a few days) of having been submitted. It is clear that Axis2 is improving rapidly. Still, I would hesitate to base a major project on Axis2 at its current stage of code maturity unless you are prepared to devote significant time to identifying and fixing bugs in Axis2 itself. Derek -Original Message-From: sudip shrestha [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 12:52 PMTo: axis-user@ws.apache.orgSubject: Re: Book for AxisWondering if Axis 2 is production ready or if not when we should expect it to be production ready? On 8/2/06, José Ferreiro [EMAIL PROTECTED] wrote: hello Sudip,I am also new to web services and I bought this book: http://agileskills2.org/DWSAA/I am interested in WSS4J security.As I am a beginner I don't know if this is a good book or not. I start it and it is not too bad.It explains Eclipse, Axis 1.3 and WSS4J! Hope this helps. I am starting soon also with a project about web services.However I think I will use Axis 1.4 (obviously Axis 2 is another way). Some comments from someone between Axis 1.x and Axis2 will be appreciated.Thank you.José On 8/2/06, sudip shrestha [EMAIL PROTECTED] wrote: Hi,What is a good reference book for Apache Axis? Need to start diggin into Web Services I am new to web services, should I jump into Axis 2, (not studyin Axis 2)? -- José FerreiroEPFL Communication Systems engineering.sys.com.dipl.EPFLPhone: +41 (0)79 644 98 25 [+41 (0)76 526 55 55]
RE: Axis 1.3 WSDL2Java Overwrites the original files
Title: Message The thing to keep in mind is that there may be multiple directories all of which are named "Package1", but in different source tree roots. For instance, your project might have the following structure: build/ build/classes/ build/generatedSrc/ build/generatedSrc/com/ build/generatedSrc/com/example/ build/generatedSrc/com/example/Package1 build/generatedSrc/com/example/Package1/MyClass.javasrc/ src/com/ src/com/example/ src/com/example/Package1 src/com/example/Package1/MyOtherClass.java There are two different source tree roots in the above structure: "build/generatedSrc" and "src". If these are configured properly, then MyClass and MyOtherClass will be considered to be in the same package. Also note that the entire 'build' directory doesn't need to be checked into version control. It only contains transient data that is created or updated when a build happens. Now, notice that there are TWO directories here named "Package1". If both "build/generatedSrc" and "src" are named as root directories in your 'javac' invocation, then these two directories will both be considered to be in the same package, and any Java source files that are found in either of them will be considered to be in the same package by javac, which will output only onedirectory containing ".class" files constructed from the contents of these two source directories. Therefore, you can have WSDL2Java generate files into the generatedSrc root, thus overwriting the contents of build/generatedSrc/com/example/Package1, but leaving any files that you have in src/com/example/Package1 untouched. If you have an identically named file in both Package1 directories, you will have a problem. Therefore, if you want to, for instance, customize your skeleton file, you can move a generated file out of the generatedSrc tree into the src tree and then modify it as you like. To prevent the file from being regenerated and conflicting with your modified version (since they will have the same name and package) you can make your ANT script or whatever runs WSDL2Java for you just delete that file every time it is generated in the future, thus leaving your own modified version as the only file with that name and package. For instance, my WSDL2Java invocation looks something like this: property name="wsdl" location="MyWSDL.wsdl"/ property name="generatedSrc" location="${build}/generatedSrc"/ target name="generateJava" !--These deletions are necessary because WSDL2Javarefuses to overwrite these files if they are found -- delete dir="${generatedSrc}/com/example/Package1" includes="*.java" failonerror="false"/ !-- Consult http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html for details on the following -- java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true" failonerror="true" classpath refid="axis.classpath"/ arg value="--databinding-method"/ arg value="xmlbeans"/ arg value="--uri"/ arg value="${wsdl}"/ arg value="--server-side"/ arg value="--generate-all"/ arg value="--service-description"/ arg value="--output"/ arg value="${generatedSrc}"/ arg value="--package"/ arg value="com.example.Package1"/ arg value="--namespace2package"/ arg value=http://www.example.com/wsdl/2004-10-01=com.example.xmlbeans.wsdl/ arg value="--namespace2package"/ arg value="http://www.w3.org/2004/06/xmlmime=com.example.xmlbeans.xmlmime"/ arg value="--namespace2package"/ arg value="http://schemas.xmlsoap.org/soap/encoding/=com.example.xmlbeans.soapencoding"/ /java !-- Delete the skeleton file that was generated, since there is a custom version in the 'src' tree -- delete dir="${generatedSrc}/src/com/example/Package1" includes="*Skeleton.java"/ /target My invocation of javac is something like the following. Note that there are TWO 'src' lines, indicating that there are two source roots: target name="compile" depends="generateJava" path id="axis.classpath" fileset dir="${lib}/axis2" includes="*.jar"/ /path javac source="1.5" destDir="${build}/classes" verbose="true" debug="true" failonerror="true" src location="${src}"/ src location="${generatedSrc}"/ classpath refid="axis.classpath"/ include name="**/*.java"/ /javac /target I hope this helps! Derek -Original Message-From: Amit Andhale [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 2:53 AMTo: axis-user@ws.apache.org; [EMAIL PROTECTED]Subject: Re
RE: [Axis2] How do you generate WSDL that has a wsdl:fault?
This appears to me to be a bug. Please file a JIRA so it doesn't get forgotten. Thanks. Derek -Original Message- From: William Ferguson [mailto:[EMAIL PROTECTED] Sent: Sunday, July 30, 2006 8:29 PM To: axis-user@ws.apache.org Subject: [Axis2] How do you generate WSDL that has a wsdl:fault? Hi, I'm using Axis2 1.0 and cam't seem to get the AxisServlet to return WSDL that defines a wsdl:fault. I have a simple Service class that has 3 methods, 1) returns void and throws WSException which extends from Exception 2) returns void and throws WSRemoteException which extends from RemoteException 3) returns String and throws WSException which extends from Exception I package the service up (just the Service class and the Exceptions) with the services.xml and deploy it into Tomcat. I then retrieve the WSDL via the AxisServlet and this is where the problem seems to lie. There is no wsdl:fault definitions for any of the service methods that actually throw Exceptions. What do I need to do to get some valid WSDL? When I execute a client against this service, the method that returns String throws an AxisFault. Since the WSDL doesn't define any fault I expect this is reasonable. But the other 2 methods don't throw any Exception and just return normally. What has swallowed the Exception? William - 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: envelop null. how to invoke an axis 2 method?
Simon: Generated code might legitimately throw either IllegalArgumentExceptions or IllegalStateExceptions with appropriately descriptive error messages, but if it's throwing a descriptionless NullPointerException, it has a bug in it. Even if you eventually find a workaround, please file a JIRA for this issue so that the code gets fixed. Thanks. Derek -Original Message- From: Simon West [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 11:40 AM To: axis-user@ws.apache.org Subject: Re: envelop null. how to invoke an axis 2 method? Thanks for the fast answer, but its the same problem. I added: wsdl:message name=GetCategoriesRequest/ to my wsdl. But an invokation produces: java.lang.NullPointerException at org.apache.axis2.context.MessageContext.setEnvelope(MessageCon text.java:681) at org.apache.axis2.ProductStub.GetCategories(ProductStub.java:119) at ProductTest.main(ProductTest.java:10) Here is the new WSDL again: wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://www.example.org/Product/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; targetNamespace=http://www.example.org/Product/; wsdl:types xsd:schema targetNamespace=http://www.example.org/Product/; elementFormDefault=unqualified attributeFormDefault=unqualified xsd:element name=Categories xsd:complexType xsd:sequence xsd:element type=xsd:string name=Category maxOccurs=unbounded / /xsd:sequence /xsd:complexType /xsd:element /xsd:schema /wsdl:types wsdl:message name=GetCategoriesRequest / wsdl:message name=GetCategoriesResponse wsdl:part element=tns:Categories name=part1 / /wsdl:message wsdl:portType name=ProductPortType wsdl:operation name=GetCategories wsdl:input message=tns:GetCategoriesRequest / wsdl:output message=tns:GetCategoriesResponse / /wsdl:operation /wsdl:portType wsdl:binding type=tns:ProductPortType name=ProductSOAP11Binding soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=GetCategories soap:operation style=document soapAction=http://www.example.org/Product/GetCategories; / wsdl:input soap:body namespace=http://www.example.org/Product/; use=literal / /wsdl:input wsdl:output soap:body namespace=http://www.example.org/Product/; use=literal / /wsdl:output /wsdl:operation /wsdl:binding wsdl:binding type=tns:ProductPortType name=ProductSOAP12Binding soap12:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=GetCategories soap12:operation style=document soapAction=http://www.example.org/Product/GetCategories; / wsdl:input soap12:body namespace=http://www.example.org/Product/; use=literal / /wsdl:input wsdl:output soap12:body namespace=http://www.example.org/Product/; use=literal / /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=Product wsdl:port binding=tns:ProductSOAP11Binding name=ProductSOAP11port0 soap:address location=http://localhost:8080/axis2/services/Product; / /wsdl:port wsdl:port binding=tns:ProductSOAP12Binding name=ProductSOAP12port0 soap12:address location=http://localhost:8080/axis2/services/Product; / /wsdl:port /wsdl:service /wsdl:definitions Simon -Ursprüngliche
RE: Problem with dependant jar files inside aar - URGENT
Title: Message How are you trying to open the dao.xml file? As a resource? As a file? What lines of code are you using? -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 8:50 AMTo: axis-user@ws.apache.orgSubject: Problem with dependant jar files inside aar - URGENTHi Here is my scenario. 1. I have a myeclipse Java project MyCommons. This contains some util libraries etc. 2.I have a myeclipse Java proeject named MyPersistence which communicates with the database. 3. I have a myeclipse java project named MyServices which has all the business rules and calls the DAO classes inside MyPersistence. I have a dao.xml file inside this project. 4. I have a myeclipse java project named MyWebServices where I have my web services. The Skeleton client class is updated to call the delegate methods inside MyServices. With this done, I deploy the service like --Services ---MyWebServices --lib //contains all the jar files like axis2 jars, iBATIS jars and MyPersistence, MyServices MyCommons exported as jar files --META-INF //contains services.xml and wsdl files The services are deployed perfectly. Did not give any problems. But at runtime, the control gets into the business delegate class inside MyServices, but the delegate cannot find the dao.xml, which is there inside the MyServices.jar file. I am pretty sure this is an ordinary situation and perhaps is a combination of packaging and class loader issue. Looking forward for some resolution. Thanks Debasish___Debasish Dutta RoyNITASPh: 617-871-3033_CONFIDENTIALITY NOTICEThe 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: Axis 1.3 WSDL2Java Overwrites the original files
Title: Message What I do is have my ANT script set up to run WSDL2Java to put files in a different source tree, 'build/generatedSrc', which has the same structure as my 'src' tree. Then I have an ANT target which generates files into the 'generatedSrc' tree. If I want to modify a file (a skeleton file, for instance), I copy the file from my generatedSrc tree to my src tree, modify it as desired, and then modify my ANT script to automatically delete it from the generatedSrc tree after each time that WSDL2Java is run. That way, I can be sure that none of my modified files have been overridden. I think it's unwise to generate files into a directory where non-generated files sit. (Also, keeping them separateallows me tomake sure, for instance, that the generated files don't get checked into version control.) When compiling, I just include both source tree roots in the 'javac' ANT target. Derek -Original Message-From: Amit Andhale [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 12:34 AMTo: axis-user@ws.apache.orgSubject: Axis 1.3 WSDL2Java Overwrites the original files Hi All, When I run WSDL2Java command, it generates the Stub files, which also overrides my existing files. Could you please help me in this context? Regards Amit
RE: [AXIS2-1.0] WSDL2Java: NullPointerException
Although Anne seems to have identified a typo in your WSDL, WSDL2Java should never throw a NullPointerException under any circumstances, so there is definitely a bug here. Please file a JIRA so that it gets fixed. Thanks. Derek -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Thursday, July 27, 2006 9:44 AM To: axis-user@ws.apache.org Subject: Re: [AXIS2-1.0] WSDL2Java: NullPointerException You have a typo in the binding: output name=requestForMembershipoResponse --- Also, you must remove all the namespace attributes in your soap:body definitions. they should simply be: soap:body use=literal/ You use the namespace attribute only when using rpc style. Regards, Anne On 7/27/06, Nirmit Desai [EMAIL PROTECTED] wrote: Hi, I am trying to generate code from the WSDL below, It throws the following exception: Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(Code GenerationEngine.java:94) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) Caused by: org.apache.axis2.AxisFault: null; nested exception is: java.lang.NullPointerException at org.apache.axis2.description.WSDL2AxisServiceBuilder.populateS ervice(WSDL2AxisServiceBuilder.java:243) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(Code GenerationEngine.java:87) ... 2 more Caused by: java.lang.NullPointerException at org.apache.axis2.description.WSDL2AxisServiceBuilder.createSch emaForPorttype(WSDL2AxisServiceBuilder.java:595) at org.apache.axis2.description.WSDL2AxisServiceBuilder.generateW rapperSchema(WSDL2AxisServiceBuilder.java:554) at org.apache.axis2.description.WSDL2AxisServiceBuilder.populateS ervice(WSDL2AxisServiceBuilder.java:228) ... 3 more: === ?xml version=1.0 encoding=UTF-8? definitions name=ClubInfo targetNamespace=http://sobe.ibm.com/ClubInfo; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns=http://sobe.ibm.com/ClubInfo; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsd1=http://sobe.ibm.com/xsd; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; types schema targetNamespace=http://sobe.ibm.com/xsd; xmlns=http://www.w3.org/2001/XMLSchema; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; elementFormDefault=qualified complexType name=Void/ complexType name=ContextStruct sequence element name=memberID type=xsd:string/ element name=clubRegistrationEPR type= xsd:string/ /sequence /complexType element name=getMembershipInfoParam type=xsd1:Void/ element name=getMembershipInfoReturn type=xsd:string/ element name=requestForMembershipParam type=xsd:string/ element name=requestForMembershipReturn type= xsd1:ContextStruct/ /schema /types message name=getMembershipInfo part element=xsd1:getMembershipInfoParam name=in/ /message message name=getMembershipInfoResponse part element=xsd1:getMembershipInfoReturn name=out/ /message message name=requestForMembership part element=xsd1:requestForMembershipParam name=in/ /message message name=requestForMembershipResponse part element=xsd1:requestForMembershipReturn name=out/ /message portType name=ClubInfoPortType operation name=getMembershipInfo input message=tns:getMembershipInfo name=getMembershipInfo / output message=tns:getMembershipInfoResponse name= getMembershipInfoResponse/ /operation operation name=requestForMembership input message=tns:requestForMembership name= requestForMembership/ output message=tns:requestForMembershipResponse name= requestForMembershipResponse/ /operation /portType binding name=ClubInfoPortBinding type=tns:ClubInfoPortType soap:binding style=document transport= http://schemas.xmlsoap.org/soap/http/ operation name=getMembershipInfo soap:operation soapAction=getMembershipInfo style=document / input name=getMembershipInfo soap:body namespace=http://sobe.ibm.com/xsd; use= literal/ /input output name
RE: WSDD reference or examples
-Original Message- From: Andrew Morrison [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 25, 2006 1:54 AM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: WSDD reference or examples Thanks Derek, it looks like this is something quite a few people would like to see. Would anyone have an opinion on the following? It is my understanding that for message style there is little point in including a schema within the WSDL as there is no direct way to use this schema for validation. I have read many articles describing the great advantages of being able to share valid XML documents using document literal/wrapped web services. However, it is difficult to find any concrete examples where this is actually being done. Essentially, both the client and the service would require a separate copy of the schema elsewhere to use with a third party XML API. Thanks, Andy. What's supposed to happen is: The person implementing the server generates WSDL, along with any associated referenced schema documents. The person implementing the server runs WSDL2Java to generate Java server code implementing the objects described in the schema, and uses thes for his/her web service. The person deploying the server makes sure that the WSDL and schemas are available to anyone who can download them from a URL associated with the service. A person who wants to build a client downloads the WSDL and the schema documents. He/she then runs WSDL2Java to generate Java client code, and then uses the generated code to build a web service. So, the schemas are not useless just because Axis2 doesn't use them for validation. They do at least document the interface that a WSDL2Java-like tool (Axis2's or some other project's) can use to generate both client and server generation/parsing code. How much validation is done by the generated code is up to the tool. Axis2 currently does very little validation (unfortunately). Other tools might do more. Still, using tools like these is a great deal easier and less error-prone than writing the parsers and generators by hand and manually trying to keep them up to date as the schema changes. Derek -Original Message- From: Derek [mailto:[EMAIL PROTECTED] Sent: 24 July 2006 19:22 To: axis-user@ws.apache.org Subject: RE: WSDD reference or examples Andrew: You might want to search the mailing list archives for the thread titled Schema Validation, which went over this subject in a bit more depth. At the moment there's still no easy solution. Derek -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Monday, July 24, 2006 7:38 AM To: axis-user@ws.apache.org Subject: Re: WSDD reference or examples That's correct. Axis does not validate messages. If you use a databinding framework, then the framework will perform rudimentary validation -- basically because it is expecting the message to conform to a known structure so that it can convert it. Anne On 7/24/06, Andrew Morrison [EMAIL PROTECTED] wrote: Will do. Regarding my other question, am I right to assume that schema validation of the messages is not provided by Axis and would still have to be done within the web service implementation class? -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 24 July 2006 14:31 To: axis-user@ws.apache.org Subject: Re: WSDD reference or examples That sounds like a bug. File a JIRA please. On 7/24/06, Andrew Morrison [EMAIL PROTECTED] wrote: Thanks for the help Anne. Yes, I am using message style and I want both the input and output to be the eligibility type specified by the schema. I was defining the extra elements as I thought it was necessary to explicitly specify the type of the input and output. It looks like I was complicating the WSDD unnecessarily, your suggestion seems to be the answer. The attached WSDL is now generated by Axis. It is interesting though that it generates the same element twice: element name=eligibility type=cns:eligibilityType/ as expected, but also element name=eligibility type=xsd:anyType/. Do you know if this is something I can disable? My intention was to specify the schema type on order to force the SOAP body XML messages to be of a particular type through validation - but now I think this may not be possible with Axis. Am I right to assume that schema validation of the messages is not provided by Axis and would still have to be done within the web service implementation class? All the best, Andrew. -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 21 July 2006 18:23 To: axis-user@ws.apache.org Subject: Re: WSDD reference or examples So, help me understand -- you want both
RE: NullPointerException running WSDL2Java
I'd like to point out that WSDL2Java should not throw a NullPointerException under any circumstances. Please file a JIRA so someone else doesn't stumble on this bug due to a typo of their own. Thanks. Derek -Original Message- From: Matt Magoffin [mailto:[EMAIL PROTECTED] Sent: Sunday, July 23, 2006 2:40 PM To: axis-user@ws.apache.org Subject: Re: NullPointerException running WSDL2Java Thank you for spotting that typo, that solved the problem. -- m@ You have a typo in the ProcessMessageOut message definition: The header part is named responeHeader instead of responseHeader. Anne On 7/22/06, Martin Gainty [EMAIL PROTECTED] wrote: Matt- Straight from the horses mouth-- I fed this wsdl into a validator located at http://www.soapclient.com/soapclient?template=%2Fclientform.htmlfn=s oapformSoapTemplate=%2FSoapResult.htmlSoapWSDL=http://apps.gotdotne t.com/xws/wsdlverifier/wsdlverify.asmx?WSDL| ErrorOutputError: Unable to import binding 'StarTransport' from namespace 'http://www.starstandards.org/webservices/2003/12/transport/bindings' . - Unable to import operation 'ProcessMessage'. - Missing message part 'responseHeader' for message 'ProcessMessageOut' from namespace 'http://www.starstandards.org/webservices/2003/12/transport/bindings'. Parameter name: partName/ErrorOutput ErrorHintsI was unable to diagnose why this WSDL didn't work. You may want to verify that you are using the 2001 XSD Schema (although this isn't requried by the WSDL spec, it is the only schema version supported by many SOAP SDKs./ErrorHints As a quick test I could'nt locate your import located at 'http://www.starstandards.org/webservices/2003/12/transport/bindings' Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Matt Magoffin [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Friday, July 21, 2006 8:37 PM Subject: NullPointerException running WSDL2Java Hello, I am trying to use Axis2 to generate classes from WSDL. I get the below exception, however. I've attached my WSDL. This is occurring with the latest nightly build, as well as the 1.0 release. Is there something wrong with the WSDL by chance? [java] org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL [java] at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(Code GenerationEngine.java:123) [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess orImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:193) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava. java:130) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:705) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:177) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [java] at org.apache.tools.ant.Task.perform(Task.java:364) [java] at org.apache.tools.ant.Target.execute(Target.java:341) [java] at org.apache.tools.ant.Target.performTasks(Target.java:369) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062) [java] at org.apache.tools.ant.Main.runBuild(Main.java:673) [java] at org.apache.tools.ant.Main.startAnt(Main.java:188) [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) [java] Caused by: org.apache.axis2.AxisFault: null; nested exception is: [java] java.lang.NullPointerException [java] at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.popula teService(WSDL11ToAxisServiceBuilder.java:234) [java
RE: WSDD reference or examples
Andrew: You might want to search the mailing list archives for the thread titled Schema Validation, which went over this subject in a bit more depth. At the moment there's still no easy solution. Derek -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Monday, July 24, 2006 7:38 AM To: axis-user@ws.apache.org Subject: Re: WSDD reference or examples That's correct. Axis does not validate messages. If you use a databinding framework, then the framework will perform rudimentary validation -- basically because it is expecting the message to conform to a known structure so that it can convert it. Anne On 7/24/06, Andrew Morrison [EMAIL PROTECTED] wrote: Will do. Regarding my other question, am I right to assume that schema validation of the messages is not provided by Axis and would still have to be done within the web service implementation class? -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 24 July 2006 14:31 To: axis-user@ws.apache.org Subject: Re: WSDD reference or examples That sounds like a bug. File a JIRA please. On 7/24/06, Andrew Morrison [EMAIL PROTECTED] wrote: Thanks for the help Anne. Yes, I am using message style and I want both the input and output to be the eligibility type specified by the schema. I was defining the extra elements as I thought it was necessary to explicitly specify the type of the input and output. It looks like I was complicating the WSDD unnecessarily, your suggestion seems to be the answer. The attached WSDL is now generated by Axis. It is interesting though that it generates the same element twice: element name=eligibility type=cns:eligibilityType/ as expected, but also element name=eligibility type=xsd:anyType/. Do you know if this is something I can disable? My intention was to specify the schema type on order to force the SOAP body XML messages to be of a particular type through validation - but now I think this may not be possible with Axis. Am I right to assume that schema validation of the messages is not provided by Axis and would still have to be done within the web service implementation class? All the best, Andrew. -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 21 July 2006 18:23 To: axis-user@ws.apache.org Subject: Re: WSDD reference or examples So, help me understand -- you want both the input and output message to contain the eligibility element? And you're using Message style? Then why are you defining additional elements called ProcessSOAPBody and ProcessSOAPBodyReturn? I think you just want: operation name=processSOAPBody qname=curamns:eligibility returnQName=curamns:elegibility returnType=curamns:eligibilityType /operation On 7/21/06, Andrew Morrison [EMAIL PROTECTED] wrote: Here you go, sorry. I am doing this is because I am working on creating a framework that will allow users to create a web service by simply writing an interface (and implementation class). I want to generate a wsdd dynamically which can then be deployed to Axis. This process already works well for RPC and WRAPPED, and I want to enhance it with Message style. Thanks for taking an interest in my query, Andy. -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 21 July 2006 17:34 To: axis-user@ws.apache.org Subject: Re: WSDD reference or examples Please attach the WSDD. (You included the schema twice, but not the WSDD.) If you already have the Schema, why not just create the WSDL first (rather than the WSDD)? Anne On 7/21/06, Andrew Morrison [EMAIL PROTECTED] wrote: Hi Anne, Thanks for your replies - further investigation is making me wonder if there is an issue with the runtime WSDL generation in Axis 1.4. I am working on a proof-of-concept for creating a deploy.wsdd where an XML Schema can be used to defined what XML is sent within the soap:body. Looking at the WSDL generated by the Axis webapp running on Tomcat, I think I am most of the way there. However, the WSDL describing the request element is not what I expected. The schema types include element name=processSOAPBody type=xsd:anyType/ and the wsdl messages for the input is wsdl:message name=processSOAPBodyRequest wsdl:part element=impl:processSOAPBody name=part/ /wsdl:message I would have expected these to be in the same format as the entries for the return element name=processSOAPBodyInput type
RE: Exception in returning SOAP Fault.
Take a look at http://issues.apache.org/jira/browse/AXIS2-919. It seems like it might be the same issue. Derek -Original Message- From: JayG [mailto:[EMAIL PROTECTED] Sent: Thursday, July 06, 2006 11:18 AM To: axis-user@ws.apache.org Subject: Re: Exception in returning SOAP Fault. I'm having the same problem. I can return values from the generated skeleton code, but trying to throw an excepion causes an OMException. The exception I'm throwing was created by wsdl2java and maps to the fault I declared in the WSDL. It looks like it should be very straighforward (the exception was already created and declared for me, I'm just newing one and throwing it), but it just doesn't work. My stack trace looks slightly different. org.apache.axiom.om.OMException at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(O MElementImpl.java:265) at org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasN ext(OMChildrenQNameIterator.java:75) at org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithN ame(OMElementImpl.java:222) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOA PEnvelopeImpl.java:76) at org.apache.axis2.engine.AxisEngine.createFaultMessageContext(A xisEngine.java:183) at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisSe rvlet.java:168) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet .java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:616) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) ... -- View this message in context: http://www.nabble.com/Exception-in-returning-SOAP-Fault.-tf162 6630.html#a5205008 Sent from the Axis - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot load SchemaTypeSystem
Thanks for your response, Robert. I did some more looking, and found that my IDE (IntelliJ Idea) was hiding the class file that was generated from me, so I didn't know it existed. I also found that the specific run target that I was using wasn't including the resources directory in the class path like I thought it was. I had set up Idea to include the directory in the source path for compilation, not the class path, assuming that what was going to be generated was Java source code rather than a class file. I am still a bit surprised that an actual class file is being generated here, particularly after looking at the code in WSDL2Java which does it by copying and modifying an existing class file (!). With the directory now properly included in my runtime class path, the code now seems to run correctly. Derek -Original Message- From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Thursday, July 20, 2006 9:20 AM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: Cannot load SchemaTypeSystem When you run WSDL2Java with xmlbeans, there will indeed be a TypeSystemHolder class generated and you have to somehow get that class into you classpath. From the codegen guide: http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html An important detail is that an XMLBean class file is also generated by WSDL2Java, TypeSystemHolder.class. That file is placed into build/classes by the above ant task and will be needed to compile the generated sources. A frequent problem is users get an error such as: ClassNotFoundException : Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s68C41DB812F52C975439BA10FE4F EE54.TypeSystemHolder. Make sure the generated binary files are on the classpath. The TypeSystemHolder.class generated by WSDL2Java must be placed in your classpath in order to avoid this error. For example, when I run WSDL2Java, I do it thru an ant task: target name=wsdl2java depends=clean,prepare delete dir=output / java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpath refid=axis.classpath/ arg value=-d/ !-- none ??? -- arg value=xmlbeans/ arg value=-uri/ arg file=wsdl/Maragato.wsdl/ arg value=-ss/ arg value=-ssi/ arg value=-g/ arg value=-sd/ arg value=-o/ arg file=output/ arg value=-p/ arg value=br.com.atlantico.maragato.webservices.endpoint/ /java !-- Move the schema folder to classpath-- move todir=${build.classes} fileset dir=output/resources include name=*schema*/**/*.class/ include name=*schema*/**/*.xsb/ /fileset /move /target In this case, I get: build/classes/schemaorg_apache_xmlbeans/system/sC4DADC577FF83F 46C2C248EE4254F70D/TypeSystemHolder.class I just confirmed that still works with todays svn. HTH, Robert http://www.braziloutsource.com/ On 7/19/06, Derek [EMAIL PROTECTED] wrote: Hi, folks. I just ran WSDL2Java (from yesterday's nightly build), and generated a bunch of output files. Now, I am trying to test a client which is written with those output files. Whenever I try, however, I get the following exception: Exception in thread main java.lang.ExceptionInInitializerError at crc.ieee1512import.xmlbeans.im.IMWrapper$Factory.newInstance(IMWrapper .java: 79) at crc.importtestclient.IEEE1512Client.createIMWrapper(IEEE1512Cl ient.java:67) at crc.importtestclient.IEEE1512Client.runTest(IEEE1512Client.java:50) at crc.importtestclient.ClientMain.main(ClientMain.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess orImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s3F178E0A50CC587BC745803A994C E78D.TypeSyste mHolder. Make sure the generated binary files are on the classpath. at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans .java:781) at crc.ieee1512import.xmlbeans.im.IMWrapper.clinit(IMWrapper.java:18) ... 9 more Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.s3F178E0A50CC587BC745803A994C E78D.TypeSyste mHolder at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method
Reporting bugs (was: RE: Problems with WSDL2Java)
I still think that the original poster (below) has found an error worth logging in JIRA. Either Axis should generate a compilable webservice from his WSDL, or it should emit an error message explaining why it can't. It appears that neither is happening in this case. In general, I think errors of that sort should be fixed, so that Axis at least emits reasonable error messages when people do something wrong. I'm going to get on a soapbox for a moment, because this is starting to become a pet peeve of mine. It seems to be pretty common on this mailing list to have dialogues of the form: A: When I do blah, I get a NullPointerException from WSDL2Java! B: Your WSDL is broken. Don't do blah. Do blargh instead. A: OK. I fixed the WSDL. But now, WSDL2Java produces uncompilable code! B: I noticed another way that your WSDL is broken. Don't do foo. Do bar instead. A: OK. I fixed that too. Now everything works great. Thanks! with the implication being that a NullPointerException or producing uncompilable code is a perfectly valid way for WSDL2Java to tell the user that something is wrong, and that fixing the user's WSDL is therefore enough to fix the problem. Thus, the original user's problem is solved with no JIRA having been created, so that Axis never gets fixed. This means that the next person who does blah hits the same problem, and MAYBE eventually resolves it by searching the mailing list archive, or maybe just wanders off and finds another SOAP server with a less user-hostile interface. This is part of why there is so much traffic and so many confused people on the Axis mailing lists. I would like to see more dialogue like the following: A: When I do blah, I get a NullPointerException from WSDL2Java! B: WSDL2Java should never throw a NullPointerException under any circumstances. Please file a JIRA. Also, I noticed that your WSDL is broken. Don't do blah. Do blargh instead. A: OK. I filed JIRA #1234. But now, WSDL2Java produces uncompilable code! B: WSDL2Java should never produce uncompilable code under any circumstances. Please file a JIRA. Also, I noticed another way that your WSDL is broken. Don't do foo. Do bar instead. A: OK. I filed JIRA #5678. Also, fixing my WSDL as per your suggestion fixed my problem. Thanks! C: I fixed JIRA #1234 by having WSDL2Java detect attempts to use blah, and emit an error message suggesting blargh instead. D: I fixed JIRA #5678 by having WSDL2Java detect attempts to use foo, and emit an error message stating that foo is not supported. I'm guilty of this myself a bit -- I have seen some bizarre Axis WSDL2Java behavior that I haven't reported to JIRA yet because I found a workaround. In particular, WSDL that isn't WS-I compliant seems to frequently produce malignant chaos of one sort or another instead of nice, comprehensible error messages. I'm going to report the bugs that I found when I get a chance. I encourage others to do likewise. It seems to me that if WSDL2Java or similar tools EVER fail due to a NullPointerException, ClassCastException or other RuntimeException, or if they appear to run but produce uncompilable code, a JIRA should be filed in every case. Derek -Original Message- From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 9:57 AM To: axis-user@ws.apache.org Subject: Re: Problems with WSDL2Java Your WSDL doesn't validate - try using one of the many wsdl validators and that should point you in the right direction. In the w3 case, you also need to supply the external schema reference. HTH, Robert http://www.braziloutsource.com/ On 7/19/06, Christian Pöcher [EMAIL PROTECTED] wrote: Hi there, since I am still very fresh to the area of webservices, I'm not sure, if my problem is related to a bug in the code gerneration of Axis2 or if I made an error. I try to write a simple webservie that adds two integers and gives back the sum. After writing the WSDL file and and generating code with WSDL2Java, I notice errors in the code. I tried both Axis2 1.0 and the nightly build of today. In 1.0 I get an error about newXMLStreamReader() as described in http://issues.apache.org/jira/browse/AXIS2-760?page=all and in the nightly I get totally funny code like this: wrappedParam = ()fromOM( msgContext.getEnvelope().getBody().getFirstElement(), .class, getEnvelopeNamespaces(msgContext.getEnvelope())); I'd appriciate an explaination and a workaround very much. I used the following WSDL file: ?xml version=1.0? definitions name=mathWS targetNamespace=http://chris.math.ut.ee/plus.wsdl; xmlns:tns=http://chris.math.ut.ee/plus.wsdl; xmlns:xsd1=http://chris.math.ut.ee/plus.xsd; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns=http://schemas.xmlsoap.org/wsdl/; types schema xmlns=http://www.w3.org/2000/10/XMLSchema; element name=sum type=integer/ element
Cannot load SchemaTypeSystem
Hi, folks. I just ran WSDL2Java (from yesterday's nightly build), and generated a bunch of output files. Now, I am trying to test a client which is written with those output files. Whenever I try, however, I get the following exception: Exception in thread main java.lang.ExceptionInInitializerError at crc.ieee1512import.xmlbeans.im.IMWrapper$Factory.newInstance(IMWrapper.java: 79) at crc.importtestclient.IEEE1512Client.createIMWrapper(IEEE1512Client.java:67) at crc.importtestclient.IEEE1512Client.runTest(IEEE1512Client.java:50) at crc.importtestclient.ClientMain.main(ClientMain.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s3F178E0A50CC587BC745803A994CE78D.TypeSyste mHolder. Make sure the generated binary files are on the classpath. at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:781) at crc.ieee1512import.xmlbeans.im.IMWrapper.clinit(IMWrapper.java:18) ... 9 more Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.s3F178E0A50CC587BC745803A994CE78D.TypeSyste mHolder at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:767) ... 10 more I have verified that the generated 'resources' directory is in my classpath. I have also verified that there exists a subdirectory of it named schemaorg_apache_xmlbeans/system/s3F178E0A50CC587BC745803A994CE78D. However, there is no TypeSystemHolder class in that directory (although there are a bunch of .xsb files in it). I am rather flummoxed as to what to do. Has anybody seen this before? Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to map namespaces to package names
Title: Message Tom: I spent quite a while fighting this one. I had serious problems in trying to specify the namespace2package options on the command line, so I was forced to use a properties file. After finally having had to trace through the source code to WSDL2Java, here's what I came up with: !-- This macro is for creating Java code from a WSDL description. "binding" is the name of the skeleton SOAP binding that will be generated "package" is the name of the package that classes will be generated into "path" is the directory that the classes will be generated into "wsdl" is the path to the WSDL file that will be parsed. -- macrodef name="generateJavaFromWSDL" attribute name="binding"/ attribute name="package"/ attribute name="path"/ attribute name="wsdl"/ sequential !-- Delete some files that will be generated, since WSDL2Java refuses to overwrite them -- delete file="@{path}/src/crc/@{package}/wsdl2java/@{binding}SkeletonInterface.java" failonerror="false"/ delete file="@{path}/src/crc/@{package}/wsdl2java/@{binding}MessageReceiverInOut.java" failonerror="false"/ delete file="@{path}/src/crc/@{package}/wsdl2java/@{binding}CallbackHandler.java" failonerror="false"/ delete file="@{path}/src/crc/@{package}/wsdl2java/@{binding}Stub.java" failonerror="false"/ delete file="@{path}/src/crc/@{package}/wsdl2java/@{binding}Skeleton.java" failonerror="false"/ property name="tempFile" value="${env.TEMP}/Namespace2PackageMap.properties"/ echo file="${tempFile}"http\://www.crc-corp.com/wsdl/2004-10-01/cars=com.mycompany.package1 http\://www.w3.org/2004/06/xmlmime=com.mycompany.package2 /echo !-- Consult http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html for details on the following -- java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true" failonerror="true" classpath refid="axis.classpath"/ arg value="--databinding-method"/ arg value="xmlbeans"/ arg value="--uri"/ arg value="@{wsdl}"/ arg value="--server-side"/ arg value="--generate-all"/ arg value="--service-description"/ arg value="--output"/ arg value="@{path}"/ arg value="--package"/ arg value="[EMAIL PROTECTED]"/ arg value="--namespace2package"/ arg value="${tempFile}"/ /java !-- Delete the skeleton file that was generated,since I have a modified version ina different source treeincluded in mysource path -- delete file="@{path}/src/crc/@{package}/wsdl2java/@{binding}Skeleton.java"/ /sequential /macrodef Note that a backslash is needed after http, since the colon is considered a separator in a property file. Also note that the ability to specify a properties file like this is undocumented as far as I can tell. Derek -Original Message-From: Tom Höfte [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 2:47 AMTo: axis-user@ws.apache.orgSubject: How to map namespaces to package names Hi, I'm using Axis 1.2 for while now in my project. However I want to migrate to Axis2.0 in the near future, but I still have one openissue on generatingthe client code for Axis2.0 using the ant-task.Int the WSDL2Java task in Axis 1.2 youare able to specifymappings between the namespaces in the WSDL and theJava package names. I cannot find this option in de codegen task in Axis2.0 and also not in the argument list of the WSDL2Java tool.. So I want to know if and how I can specify mappings between namespaces and the Javapackage namesduringthe generation of the client-code for a WSDL in AXIS2.0 Thanks in advance! -Tom -- --Keep the faith in all the things you think you can't do--
RE: AW: How to access the SOAPHeader
+1 from me. Interfaces defined only by implicit signatures and invoked via reflection scare me, since if I misremember the arguments or names, things fail to work with no compiler warnings. I much prefer interfaces defined by actual 'implements' declarations, which my IDE (IntelliJ IDEA) can check at edit time to warn me if I am doing something wrong. Derek -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Friday, July 14, 2006 5:21 AM To: axis-user@ws.apache.org Subject: Re: AW: How to access the SOAPHeader +1 from me. On 7/14/06, Deepal Jayasinghe [EMAIL PROTECTED] wrote: so lets go for that , AFAIK we only need to change DependencyManager to support that. Eran Chinthaka wrote: Rodrigo Ruiz wrote: Mmm, yes of course. But I guess you are talking about a mandatory interface, like Remote. I am talking about an optional one, like LifeCycle. For example: public interface ContextAware { void setOperationContext(OperationContext ctx); } In this case, only those services interested in having this data will need to implement it. The rest can work just like now. Such an interface would make reflection/introspection unnecessary, and the relationship with Axis2 more explicit. Hmm, now it makes sense to me :). I can remember there was a discussion on the same topic some time back, on this list, but can not remember what happened to it. What do the others think about this? Can I implement this? For the time being, lets leave the dependency injection for the existing code to work and implement this as well. Comments ? -- Chinthaka -- Thanks, Deepal ~Future is Open~ - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: General approach for xsd:union?
The fact that Axis 1 didn't support xsd:union caused me a *LOT* of problems because the schemas I have to work with are filled with constructs of the form: xs:simpleType name=Action_request_flag xs:annotation xs:appinfo send actions (1) do not send actions (2) /xs:appinfo /xs:annotation xs:union xs:simpleType xs:restriction base=xs:unsignedInt xs:minInclusive value=1/ xs:maxInclusive value=2/ /xs:restriction /xs:simpleType xs:simpleType xs:restriction base=xs:string xs:enumeration value=send actions/ xs:enumeration value=do not send actions/ /xs:restriction /xs:simpleType /xs:union /xs:simpleType This happens for pretty much every enumeration in a very large schema. Since I didn't write these schemas and can't control what's in them (a rather unresponsive standards body wrote them), I ultimately ended up having to write an XSLT script to traverse my schema and replace all xs:unions with equivalent constructs that didn't use unions. I don't recommend doing this if you can possibly avoid it. Even if Axis were to treat a union of simple types as an untyped string, I think it would be far better than not supporting them at all. I haven't tried this with Axis2 (XMLBeans) yet, so I don't know if the situation is improved or not. I would be interested to hear if XMLBeans can handle this case. Derek -Original Message- From: Nathan Sowatskey [mailto:[EMAIL PROTECTED] Sent: Friday, July 07, 2006 9:23 AM To: axis-user@ws.apache.org Cc: mTOP Reference Implementation Team Subject: Re: General approach for xsd:union? Well, that's certainly one approach, but xsd:unions are supported by some tools, but not others, and they are a valid construct. It is hard to argue that they shouldn't be used just because a given tool doesn't support them. I will look into the other options in any case. Many thanks Nathan Nathan Sowatskey - Technical Leader, NMTG CTO Engineering - +34-638-083-675, +34-91-201-2139 - AIM NathanCisco - [EMAIL PROTECTED] On 7 Jul 2006, at 18:07, Anne Thomas Manes wrote: On the other hand, is there a better way entirely? XMLBeans perhaps? Yes. Don't use xsd:union. Try xsd:choice instead. Or maybe a substitution group. Anne On 7/7/06, Nathan Sowatskey [EMAIL PROTECTED] wrote: Hi I guess we all know that xsd:union types are not supported for Axis 1.x, so we need to write our own de/serialisers. Does anyone have any useful guidance on how to do that please? On the other hand, is there a better way entirely? XMLBeans perhaps? Many thanks Nathan Nathan Sowatskey - Technical Leader, NMTG CTO Engineering - +34-638-083-675, +34-91-201-2139 - AIM NathanCisco - [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] - 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] WSDL2Java fails to detect nonexistent element
Hi, folks. I recently noticed that the Axis2 WSDL2Java program, when generating XmlBeans, seems to accept WSDL which contains references to nonexistent elements. For instance: types xs:schema xs:import namespace=http://www.dummy-im-address; schemaLocation=im.xsd/ /xs:schema /types message name=IEEE1512Event part name=iMWrapper element=im:thisDoesNotExist/ /message The element thisDoesNotExist is not defined anywhere in the im.xsd schema file, yet WSDL2Java reports no warnings or errors when asked to generate code for a service using this WSDL file. The server skeleton that is generated takes a parameter of type XmlObject where the thisDoesNotExist element would be passed. Considering that this can happen due to a simple typo in an element name, this seems like a very difficult problem to track down. It seems to me that an error, or at least a warning, should be reported for cases like this. Should I file this as a JIRA bug? Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2] Why do I get service skeletons taking OMElement, and uncompilable code?
OK. I created the following: http://issues.apache.org/jira/browse/AXIS2-844 Thanks. Derek -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 7:15 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: [Axis2] Why do I get service skeletons taking OMElement, and uncompilable code? Yes, Please log a JIRA bug. thanks, dims On 6/21/06, Derek [EMAIL PROTECTED] wrote: Thanks for the suggestion, Robert. I tried downloading the June 21 nightly build of Axis, and that version of WSDL2Java did produce the same skeleton files for me that it did for you (the ones taking an XmlObject parameter, rather than OMObject as I was getting with the 1.0 release). I then tried to test your hypothesis about xs:any. I modified my XML schema to comment out the two xs:any tags. I then ran WSDL2Java and regenerated the files. I got the same generated skeleton files as before. After pounding my head against the keyboard vigorously for a while, I decided to start drastically simplifying the WSDL to try to find out what was going wrong. Eventually, I found a change that made the problem go away. I still don't understand why, though. One of my xs:schema declarations in my WSDL has the same namespace as the targetNamespace declared at the top of the WSDL file itself. It declares three elements: full-event-update, full-event-updates, and return, which are referenced in the FEvent, FRecap, and FResponse messages. When I change the WSDL so this schema is declared to instead have a different namespace from the WSDL targetNamespace, then the generated signature I get for my method is: /** * FEUServiceSkeletonInterface java skeleton interface for the axisService */ public interface FEUServiceSkeletonInterface { /** * Auto generated method signature * @param param0 */ public com.crc_corp.www.wsdl._2004_10_01.feu2.ReturnDocument acceptFEUEvent (com.crc_corp.www.wsdl._2004_10_01.feu2.FullEventUpdateDocumen t param0 ) ; } So it seems to be the case that if a message references an XML element declaration which is in the same namespace as the targetNamespace of the WSDL file itself, then the XMLBeans WSDL2Java code generator decides for mysterious reasons of its own to pass those messages as XmlObject instances instead of the types that should be generated for the messages. Why this should be so, I have no idea. There seems to be no documentation or warnigns of any such behavior that I can find in the Axis documentation, so I assume this is a bug. Should I file this in Jira? Derek -Original Message- From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 5:38 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Why do I get service skeletons taking OMElement, and uncompilable code? Oops, a little late here and I misread the method signature. Getting XmlObject instead of OMElement probably isn't what you were hoping for, so perhaps as Anne implied xs:any is the culprit. Do keep in mind the bug fixes in the xmlbeans code since the 1.0 release, however. Good luck, Robert http://www.braziloutsource.com/ On 6/20/06, robert lazarski [EMAIL PROTECTED] wrote: To add to what Anne said, you're using a version of axis from May 05, 2006 . While that may be the official 1.0 release, there were several important bugs fixed for xmlbeans after that. The good news is that this is the code that I was able to produce from the latest nightly: /** * FServiceSkeleton.java * * This file was auto-generated from WSDL * by the Apache Axis2 version: SNAPSHOT Jun 20, 2006 (11:24:21 GMT+00:00) */ package org.simple.endpoint; /** * FServiceSkeleton java skeleton for the axisService */ public class FServiceSkeleton{ /** * Auto generated method signature * @param param0 */ public org.apache.xmlbeans.XmlObject acceptFEvent (org.apache.xmlbeans.XmlObject param0 ) throws org.simple.endpoint.FServiceSkeleton.GeneralFaultException{ //Todo fill this with the necessary business logic throw new java.lang.UnsupportedOperationException(); } /** * Auto generated method signature * @param param4 */ public org.apache.xmlbeans.XmlObject acceptFRecap (org.apache.xmlbeans.XmlObject param4 ) throws
RE: [Axis2] Why do I get service skeletons taking OMElement, and uncompilable code?
Thanks for the suggestion, Robert. I tried downloading the June 21 nightly build of Axis, and that version of WSDL2Java did produce the same skeleton files for me that it did for you (the ones taking an XmlObject parameter, rather than OMObject as I was getting with the 1.0 release). I then tried to test your hypothesis about xs:any. I modified my XML schema to comment out the two xs:any tags. I then ran WSDL2Java and regenerated the files. I got the same generated skeleton files as before. After pounding my head against the keyboard vigorously for a while, I decided to start drastically simplifying the WSDL to try to find out what was going wrong. Eventually, I found a change that made the problem go away. I still don't understand why, though. One of my xs:schema declarations in my WSDL has the same namespace as the targetNamespace declared at the top of the WSDL file itself. It declares three elements: full-event-update, full-event-updates, and return, which are referenced in the FEvent, FRecap, and FResponse messages. When I change the WSDL so this schema is declared to instead have a different namespace from the WSDL targetNamespace, then the generated signature I get for my method is: /** * FEUServiceSkeletonInterface java skeleton interface for the axisService */ public interface FEUServiceSkeletonInterface { /** * Auto generated method signature * @param param0 */ public com.crc_corp.www.wsdl._2004_10_01.feu2.ReturnDocument acceptFEUEvent (com.crc_corp.www.wsdl._2004_10_01.feu2.FullEventUpdateDocument param0 ) ; } So it seems to be the case that if a message references an XML element declaration which is in the same namespace as the targetNamespace of the WSDL file itself, then the XMLBeans WSDL2Java code generator decides for mysterious reasons of its own to pass those messages as XmlObject instances instead of the types that should be generated for the messages. Why this should be so, I have no idea. There seems to be no documentation or warnigns of any such behavior that I can find in the Axis documentation, so I assume this is a bug. Should I file this in Jira? Derek -Original Message- From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 5:38 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Why do I get service skeletons taking OMElement, and uncompilable code? Oops, a little late here and I misread the method signature. Getting XmlObject instead of OMElement probably isn't what you were hoping for, so perhaps as Anne implied xs:any is the culprit. Do keep in mind the bug fixes in the xmlbeans code since the 1.0 release, however. Good luck, Robert http://www.braziloutsource.com/ On 6/20/06, robert lazarski [EMAIL PROTECTED] wrote: To add to what Anne said, you're using a version of axis from May 05, 2006 . While that may be the official 1.0 release, there were several important bugs fixed for xmlbeans after that. The good news is that this is the code that I was able to produce from the latest nightly: /** * FServiceSkeleton.java * * This file was auto-generated from WSDL * by the Apache Axis2 version: SNAPSHOT Jun 20, 2006 (11:24:21 GMT+00:00) */ package org.simple.endpoint; /** * FServiceSkeleton java skeleton for the axisService */ public class FServiceSkeleton{ /** * Auto generated method signature * @param param0 */ public org.apache.xmlbeans.XmlObject acceptFEvent (org.apache.xmlbeans.XmlObject param0 ) throws org.simple.endpoint.FServiceSkeleton.GeneralFaultException{ //Todo fill this with the necessary business logic throw new java.lang.UnsupportedOperationException(); } /** * Auto generated method signature * @param param4 */ public org.apache.xmlbeans.XmlObject acceptFRecap (org.apache.xmlbeans.XmlObject param4 ) throws org.simple.endpoint.FServiceSkeleton.GeneralFaultException{ //Todo fill this with the necessary business logic throw new java.lang.UnsupportedOperationException(); } public static class GeneralFaultException extends java.rmi.RemoteException{ private com.example.www.wsdl._2006_06_13.carsfault.GeneralFaultDocument faultMessage; public void setFaultMessage(com.example.www.wsdl._2006_06_13.carsfault.GeneralFaul tDocument msg){ faultMessage = msg; } public com.example.www.wsdl._2006_06_13.carsfault.GeneralFaultDocument getFaultMessage(){ return
[Axis2] Why do I get service skeletons taking OMElement, and uncompilable code?
I'm getting rather frustrated trying to use Axis2 to do something apparently pretty basic. Using the WSDL and schema below, and the given WSDL2Java command line, I get XMLBeans classes generated. However, the generated skeleton methods take parameters of type OMElement and return a result of type OMElement, instead of using the generated XMLBeans wrapper classes. Also, some of the code does not compile, trying to call methods on OMElement that do not exists. I get no errors reported when I run WSDL2Java, though. Does anybody know what I might be doing wrong? This example seems only slightly more complicated than the ones that exist in the Axis2 user's guide. Thanks in advance for any replies. The WSDL: ?xml version=1.0 encoding=UTF-8? definitions name=FDefinitions targetNamespace=http://www.example.com/wsdl/2004-10-01/feu; xmlns:carshdr=http://www.example.com/wsdl/2004-10-01/cars; xmlns:carsfault=http://www.example.com/wsdl/2006-06-13/carsfault; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://www.example.com/wsdl/2004-10-01/feu; xmlns:feu=http://www.dummy-temp-address; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns=http://schemas.xmlsoap.org/wsdl/; wsdl:types xs:schema xs:import namespace=http://www.dummy-temp-address; schemaLocation=FEU.xsd/ /xs:schema xs:schema targetNamespace=http://www.example.com/wsdl/2004-10-01/feu; xs:element name=full-event-updates xs:complexType xs:sequence xs:element name=full-event-update type=feu:FullEventUpdate minOccurs=0 maxOccurs=unbounded/ /xs:sequence /xs:complexType /xs:element xs:element name=full-event-update type=feu:FullEventUpdate/ xs:element name=return type=xs:string/ /xs:schema xs:schema targetNamespace=http://www.example.com/wsdl/2004-10-01/cars; xs:element name=CPassword type=xs:string/ xs:element name=CLogin type=xs:string/ /xs:schema xs:schema targetNamespace=http://www.example.com/wsdl/2006-06-13/carsfault; xs:element name=generalFault type=xs:string/ /xs:schema /wsdl:types message name=FEvent part name=contents element=tns:full-event-update/ /message message name=FRecap part name=contents element=tns:full-event-updates/ /message message name=FResponse part name=return element=tns:return/ /message message name=CPassword part name=CPassword element=carshdr:CPassword/ /message message name=CLogin part name=CLogin element=carshdr:CLogin/ /message message name=GeneralFault part name=faultDetail element=carsfault:generalFault/ /message portType name=FPortType documentationF Port Type/documentation operation name=acceptFEvent parameterOrder=contents input name=acceptFEventRequest message=tns:FEvent/ output name=acceptFEventResponse message=tns:FResponse/ fault name=GeneralFault message=tns:GeneralFault/ /operation operation name=acceptFRecap parameterOrder=contents input name=acceptFRecapRequest message=tns:FRecap/ output name=acceptFRecapResponse message=tns:FResponse/ fault name=GeneralFault message=tns:GeneralFault/ /operation /portType binding name=FSoapBinding type=tns:FPortType documentationF Soap Binding/documentation soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ operation name=acceptFEvent soap:operation soapAction=acceptFEventAction/ input soap:header message=tns:CLogin part=CLogin use=literal/ soap:header message=tns:CPassword part=CPassword use=literal/ soap:body use=literal/ /input output soap:body use=literal/ /output fault name=GeneralFault soap:fault name=GeneralFault use=literal/ /fault /operation operation name=acceptFRecap soap:operation soapAction=acceptFRecapAction/ input soap:header message=tns:CLogin part=CLogin use=literal/ soap:header message=tns:CPassword part=CPassword use=literal/ soap:body use=literal/ /input output soap:body use=literal/ /output fault name=GeneralFault soap:fault name=GeneralFault use=literal/ /fault /operation /binding service name=FService documentationF Web Service/documentation port name=FPort binding=tns:FSoapBinding soap:address location=http://localhost:8080/axis/services/FService/ /port /service /definitions The schema: ?xml version=1.0 encoding=UTF-8? xs:schema targetNamespace=http://www.dummy-temp-address;
RE: [Axis2] Why do I get service skeletons taking OMElement, and uncompilable code?
Title: Message Thanks for the reply, Anne. Unfortunately, the problem stilloccurs even if I comment out the xs:any instances, so that does not appear to be the cause of what I am seeing. Derek -Original Message-From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 5:10 PMTo: axis-user@ws.apache.org; [EMAIL PROTECTED]Subject: Re: [Axis2] Why do I get service skeletons taking OMElement, and uncompilable code?I suspect it's because you have xs:any in your schema. Since WSDL2Java doesn't know what will be in the message, it defaults to OMElement.Anne On 6/20/06, Derek [EMAIL PROTECTED] wrote: I'm getting rather frustrated trying to use Axis2 to do something apparentlypretty basic.Using the WSDL and schema below, and the given WSDL2Java command line, I getXMLBeans classes generated.However, the generated skeleton methods take parameters of type OMElement and return a result of type OMElement, instead of using the generatedXMLBeans wrapper classes. Also, some of the code does not compile, trying tocall methods on OMElement that do not exists. I get no errors reported when I run WSDL2Java, though.Does anybody know what I might be doing wrong? This example seems onlyslightly more complicated than the ones that exist in the Axis2 user'sguide.Thanks in advance for any replies. The WSDL:?xml version="1.0" encoding="UTF-8"?definitions name="FDefinitions" targetNamespace=" http://www.example.com/wsdl/2004-10-01/feu" xmlns:carshdr="http://www.example.com/wsdl/2004-10-01/cars" xmlns:carsfault=" http://www.example.com/wsdl/2006-06-13/carsfault" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns=" http://www.example.com/wsdl/2004-10-01/feu" xmlns:feu="http://www.dummy-temp-address" xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/" wsdl:typesxs:schema xs:import namespace=" http://www.dummy-temp-address"schemaLocation="FEU.xsd"//xs:schemaxs:schematargetNamespace=" http://www.example.com/wsdl/2004-10-01/feu" xs:element name="full-event-updates"xs:complexType xs:sequencexs:element name="full-event-update" type="feu:FullEventUpdate" minOccurs="0" maxOccurs="unbounded"/ /xs:sequence/xs:complexType /xs:element xs:element name="full-event-update" type="feu:FullEventUpdate"/ xs:element name="return" type="xs:string"//xs:schemaxs:schematargetNamespace="http://www.example.com/wsdl/2004-10-01/cars " xs:element name="CPassword" type="xs:string"/ xs:element name="CLogin" type="xs:string"//xs:schemaxs:schema targetNamespace="http://www.example.com/wsdl/2006-06-13/carsfault" xs:element name="generalFault" type="xs:string"/ /xs:schema /wsdl:types message name="FEvent"part name="contents" element="tns:full-event-update"/ /message message name="FRecap"part name="contents" element="tns:full-event-updates"/ /message message name="FResponse"part name="return" element="tns:return"/ /message message name="CPassword"part name="CPassword" element="carshdr:CPassword"/ /message message name="CLogin" part name="CLogin" element="carshdr:CLogin"/ /message message name="GeneralFault"part name="faultDetail" element="carsfault:generalFault"/ /message portType name="FPortType"documentationF Port Type/documentationoperation name="acceptFEvent" parameterOrder="contents" input name="acceptFEventRequest" message="tns:FEvent"/ output name="acceptFEventResponse" message="tns:FResponse"/ fault name="GeneralFault" message="tns:GeneralFault"/ /operationoperation name="acceptFRecap" parameterOrder="contents" input name="acceptFRecapRequest" message="tns:FRecap"/ output name="acceptFRecapResponse" message="tns:FResponse"/ fault name="GeneralFault" message="tns:GeneralFault"//operation /portType binding name="FSoapBinding"
[Axis2] Apparent bug in WSDL2Java re: imports
Hi, folks. I have been seeing an apparent bug in the Axis2 WSDL2Java code. Specifically, I have WSDL that looks like this: wsdl:definitions targetNamespace=http://www.example.com/wsdl/router; xmlns:schema=http://www.example.com/schemas; wsdl:import namespace=http://www.example.com/schemas; location=MySchema.xsd/ wsdl:message name=routeEmergencyIncidentRequest wsdl:part name=vehicularEmergencyIncident type=schema:MyElement/ /wsdl:message which seems to correctly generate Java code for the types mentioned in MySchema.xsd, and also produces a RouteEmergencyIncidentRequest type as I would have expected. However, this code is supposedly illegal according to http://www.xml.com/pub/a/ws/2003/08/05/wsdl.html because it uses wsdl:import to import something that is not a WSDL document but is in fact an XML schema. However, if I replace it with the following, which is supposedly correct: wsdl:definitions targetNamespace=http://www.example.com/wsdl/router; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:schema=http://www.example.com/schemas; wsdl:types xsd:schema xsd:import id=Something namespace=http://www.example.com/schemas; schemaLocation=MySchema.xsd/ /xsd:schema /wsdl:types wsdl:message name=routeEmergencyIncidentRequest wsdl:part name=vehicularEmergencyIncident type=schema:MyElement/ /wsdl:message then if I run WSDL2Java, it generates Java code as before for the types mentioned in MySchema.xsd, but it does NOT produce a RouteEmergencyIncident class, leaving me nothing to use to parse the OMElement that the generated server skeleton takes as a parameter. (And, for that matter, I have no idea why a server skeleton method taking an OMElement parameter is produced, rather than a MyElement parameter. This also seems like a bug.). It seems to me that which form of import I use shouldn't determine whether or not Java types are generated for each message. The biggest problem for me in this respect is that the second form of the WSDL (the one using xsd:import) is the one actually used by the WSDL that I have been given by a third party. So just changing it is not an attractive option. Is this a bug? Any advice would be appreciated. Thanks! Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with C# client of axis2 service
I think that there is actually a problem with Axis2. Using the attached WSDL file I sent the2 messages and received2 responses, one from each client type (see attached message transcript). As you can see, the responses have identical meta-data. Regarding what Ms. Manes said before (below), about how the reponse message *should* look, think that Axis2 is sending incorrectly formatted responses for the given WSDL. -Original Message-From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]Sent: Wednesday, April 19, 2006 8:50 AMTo: axis-user@ws.apache.orgSubject: Re: problem with C# client of axis2 servicePerhaps someone more familiar with the raw XML receiver can explain why Axis2 is generating a bogus WSDL file for you. On 4/18/06, Bennett, Derek [EMAIL PROTECTED] wrote: The WSDL is that which was produced by axis2 when I make the following request: http://localhost:8080/axis2/services/XmlEcho?wsdl I shall attach my sources so that you can replicate my results. The XmlEchoClient works just fine even with the bad WSDL. The .Net client (using "WebReference" objects generated by Visual Studio 2005) seems to be less tolerent of the WSDL vs actual message mismatch. Any diagnostic help you could provide would be most helpful. Thanks, Derek Bennett [EMAIL PROTECTED] -Original Message-From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]]Sent: Monday, April 17, 2006 8:24 PMTo: axis-user@ws.apache.orgSubject: Re: problem with C# client of axis2 serviceFirst -- the parameter name="dotNetSoapEncFix" value="true"/ issue applies only to Axis1 using rpc/encoded. Second, your response message doesn't correspond with your WSDL. Your WSDL is telling .NET to expect a response message like this: ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" soapenv:Header/ soapenv:Body ns1:echoStringResponse xmlns:ns1=" http://org.apache.axis2/xsd" return [anyType content] /return /ns1:echoStringResponse /soapenv:Body /soapenv:EnvelopeHow is it that you produced the response message that you did?Anne On 4/17/06, Bennett, Derek [EMAIL PROTECTED] wrote: I have created a service, XmlEcho, which takes a String and outputs the same String. I am running the service in axis2 running within an out-of-the-box local JBoss server.A simple Java client using the axis2 client jar(s) runs perfectly.However, a simple C# client created by using the "WebReference" facility within Visual Studio 2005 to gets a null response object. I have already tried adding parameter name="dotNetSoapEncFix" value="true"/to my system.xml based on a thread from earlier this week.Does anyone have any advice regarding how to get C# and Visual Studio working with Axis2? The xml of the response looks like this:===?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"soapenv:Header/soapenv:Bodyresult:return xmlns:result="http://hdayservice.result.com " xmlns:tns="http://org.apache.axis2/"result:valueFoobar/result:value /result:return/soapenv:Body /soapenv:Envelope===And, here is the wsdl that Axis2 produces:===wsdl:definitions xmlns:ns1=" http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://org.apache.axis2/ " targetNamespace="http://org.apache.axis2/"wsdl:typesxs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema " xmlns:ns1="http://org.apache.axis2/xsd" targetNamespace="http://org.apache.axis2/xsd" elementFormDefault="unqualified" attributeFormDefault="unqualified" xs:element name="mainRequest"xs:complexTypexs:sequencexs:element minOccurs="0" type="xs:string" name="args" maxOccurs="unbounded" / /xs:sequence/xs:complexType/xs:elementxs:element name="echoStringRequest"xs:complexTypexs:sequencexs:element type="xs:anyType" name="in" / /xs:
RE: Very Urgent Please help
It sounds like your problem is the same as mine. See the thread with problem with C# client of axis2 service in the subject. I am going to see whether a hand-constructed wsdl fixes this problem. -Original Message- From: MUHAMMAD IQBAL [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 18, 2006 6:51 PM To: axis-user@ws.apache.org Subject: Very Urgent Please help Hi every one, Pleae accept my apologize if this question already been posted. I have an Axis Web service runing on tomcat, i am trying to consume it through ASP 2.0 client using MS Soap Toolkit 2.0. I am getting error about : - Technical Information (for support personnel) * Error Type: WSDLReader (0x80020009) WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason is: The download of the specified resource has failed. HRESULT=0x1: Incorrect function. - WSDLReader:Loading of the WSDL file failed HRESULT=0x80070057: The parameter is incorrect. - Client:-One of the parameters supplied is invalid. HRESULT=0x80070057: The parameter is incorrect. /agio/soapclient.asp, line 7 * Browser Type: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2 * Page: GET /agio/soapclient.asp * Time: Tuesday, April 19, 2005, 3:47:30 AM -- Can any one help me in this? Thanks in advance Muhammad Iqbal Software Engineer Etilize Inc. cell :0092-300-9377801 ** This e-mail contains privileged attorney-client communications and/or confidential information, and is only for the use by the intended recipient. Receipt by an unintended recipient does not constitute a waiver of any applicable privilege. Reading, disclosure, discussion, dissemination, distribution or copying of this information by anyone other than the intended recipient or his or her employees or agents is strictly prohibited. If you have received this communication in error, please immediately notify us and delete the original material from your computer. Sempra Energy Trading Corp. (SET) is not the same company as SDGE or SoCalGas, the utilities owned by SET's parent company. SET is not regulated by the California Public Utilities Commission and you do not have to buy SET's products and services to continue to receive quality regulated service from the utilities. **
RE: problem with C# client of axis2 service
The WSDL is that which was produced by axis2 when I make the following request: http://localhost:8080/axis2/services/XmlEcho?wsdl I shall attach my sources so that you can replicate my results. The XmlEchoClient works just fine even with the bad WSDL. The .Net client (using "WebReference" objects generated by Visual Studio 2005) seems to be less tolerent of the WSDL vs actual message mismatch. Any diagnostic help you could provide would be most helpful. Thanks, Derek Bennett [EMAIL PROTECTED] -Original Message-From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]Sent: Monday, April 17, 2006 8:24 PMTo: axis-user@ws.apache.orgSubject: Re: problem with C# client of axis2 serviceFirst -- the parameter name="dotNetSoapEncFix" value="true"/ issue applies only to Axis1 using rpc/encoded. Second, your response message doesn't correspond with your WSDL. Your WSDL is telling .NET to expect a response message like this: ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" soapenv:Header/ soapenv:Body ns1:echoStringResponse xmlns:ns1=" http://org.apache.axis2/xsd" return [anyType content] /return /ns1:echoStringResponse /soapenv:Body /soapenv:EnvelopeHow is it that you produced the response message that you did?Anne On 4/17/06, Bennett, Derek [EMAIL PROTECTED] wrote: I have created a service, XmlEcho, which takes a String and outputs the same String. I am running the service in axis2 running within an out-of-the-box local JBoss server.A simple Java client using the axis2 client jar(s) runs perfectly.However, a simple C# client created by using the "WebReference" facility within Visual Studio 2005 to gets a null response object. I have already tried adding parameter name="dotNetSoapEncFix" value="true"/to my system.xml based on a thread from earlier this week.Does anyone have any advice regarding how to get C# and Visual Studio working with Axis2? The xml of the response looks like this:===?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"soapenv:Header/soapenv:Bodyresult:return xmlns:result="http://hdayservice.result.com " xmlns:tns="http://org.apache.axis2/"result:valueFoobar/result:value/result:return/soapenv:Body /soapenv:Envelope===And, here is the wsdl that Axis2 produces:===wsdl:definitions xmlns:ns1=" http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://org.apache.axis2/ " targetNamespace="http://org.apache.axis2/"wsdl:typesxs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema " xmlns:ns1="http://org.apache.axis2/xsd" targetNamespace="http://org.apache.axis2/xsd" elementFormDefault="unqualified" attributeFormDefault="unqualified" xs:element name="mainRequest"xs:complexTypexs:sequencexs:element minOccurs="0" type="xs:string" name="args" maxOccurs="unbounded" / /xs:sequence/xs:complexType/xs:elementxs:element name="echoStringRequest"xs:complexTypexs:sequencexs:element type="xs:anyType" name="in" / /xs:sequence/xs:complexType/xs:elementxs:element name="echoStringResponse"xs:complexTypexs:sequencexs:element type="xs:anyType" name="return" / /xs:sequence/xs:complexType/xs:element/xs:schema/wsdl:typeswsdl:message name="echoStringRequestMessage"wsdl:part name="part1" element="ns1:echoStringRequest" //wsdl:messagewsdl:message name="mainRequestMessage"wsdl:part name="part1" element="ns1:mainRequest" //wsdl:messagewsdl:message name="echoStringResponseMessage"wsdl:part name="part1" element="ns1:echoStringResponse" //wsdl:messagewsdl:portType name="XmlEchoPort"wsdl:operation name="main"wsdl:input message="tns:mainRequestMessage" //wsdl:operationwsdl:operation name="echoString"wsdl:input message="tns:echoStringRequestMessage" /wsdl:output message="tns:echoStringResponseMessage" //wsdl:operation/wsdl:portTypewsdl:binding name="XmlEchoBinding&
problem with C# client of axis2 service
I have created a service, XmlEcho, which takes a String and outputs the same String. I am running the service in axis2 running within an out-of-the-box local JBoss server. A simple Java client using the axis2 client jar(s) runs perfectly. However, a simple C# client created by using the WebReference facility within Visual Studio 2005 to gets a null response object. I have already tried adding parameter name=dotNetSoapEncFix value=true/ to my system.xml based on a thread from earlier this week. Does anyone have any advice regarding how to get C# and Visual Studio working with Axis2? The xml of the response looks like this: === ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header/ soapenv:Body result:return xmlns:result=http://hdayservice.result.com; xmlns:tns=http://org.apache.axis2/; result:valueFoobar/result:value /result:return /soapenv:Body /soapenv:Envelope === And, here is the wsdl that Axis2 produces: === wsdl:definitions xmlns:ns1=http://org.apache.axis2/xsd; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://org.apache.axis2/; targetNamespace=http://org.apache.axis2/;wsdl:typesxs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:ns1=http://org.apache.axis2/xsd; targetNamespace=http://org.apache.axis2/xsd; elementFormDefault=unqualified attributeFormDefault=unqualified xs:element name=mainRequest xs:complexType xs:sequence xs:element minOccurs=0 type=xs:string name=args maxOccurs=unbounded / /xs:sequence /xs:complexType /xs:element xs:element name=echoStringRequest xs:complexType xs:sequence xs:element type=xs:anyType name=in / /xs:sequence /xs:complexType /xs:element xs:element name=echoStringResponse xs:complexType xs:sequence xs:element type=xs:anyType name=return / /xs:sequence /xs:complexType /xs:element /xs:schema/wsdl:typeswsdl:message name=echoStringRequestMessagewsdl:part name=part1 element=ns1:echoStringRequest //wsdl:messagewsdl:message name=mainRequestMessagewsdl:part name=part1 element=ns1:mainRequest //wsdl:messagewsdl:message name=echoStringResponseMessagewsdl:part name=part1 element=ns1:echoStringResponse //wsdl:messagewsdl:portType name=XmlEchoPortwsdl:operation name=mainwsdl:input message=tns:mainRequestMessage //wsdl:operationwsdl:operation name=echoStringwsdl:input message=tns:echoStringRequestMessage /wsdl:output message=tns:echoStringResponseMessage //wsdl:operation/wsdl:portTypewsdl:binding name=XmlEchoBinding type=tns:XmlEchoPortsoap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document /wsdl:operation name=mainsoap:operation soapAction=main style=document /wsdl:inputsoap:body use=literal namespace=http://www.org.apache.axis2; //wsdl:input/wsdl:operationwsdl:operation name=echoStringsoap:operation soapAction=echoString style=document /wsdl:inputsoap:body use=literal namespace=http://www.org.apache.axis2; //wsdl:inputwsdl:outputsoap:body use=literal namespace=http://www.org.apache.axis2; //wsdl:output/wsdl:operation/wsdl:bindingwsdl:service name=XmlEchowsdl:port name=XmlEchoPortType0 binding=tns:XmlEchoBindingsoap:address location=http://localhost:8080/axis2/services/XmlEcho; //wsdl:port/wsdl:service/wsdl:definitions === ** This e-mail contains privileged attorney-client communications and/or confidential information, and is only for the use by the intended recipient. Receipt by an unintended recipient does not constitute a waiver of any applicable privilege. Reading, disclosure, discussion, dissemination, distribution or copying of this information by anyone other than the intended recipient or his or her employees or agents is strictly prohibited. If you have received this communication in error, please immediately notify us and delete the original material from your computer. Sempra Energy Trading Corp. (SET) is not the same company as SDGE or SoCalGas, the utilities owned by SET's parent company. SET is not regulated by the California Public Utilities Commission and you do not have to buy SET's products and services to continue to receive quality regulated service from the utilities. **