Re: impl vs. intf in array return types
I don't think your problem is related to those namespace, it's probably more to do with the way arrays are encoded (using soapenc:Array). You might want to try a document/literal approach instead (style=DOCUMENT or WRAPPED in Java2Wsdl). Regards, Jan On 6/2/05, Dave <[EMAIL PROTECTED]> wrote: > Hi - > > We have some methods which return arrays of complex types. Some of > them work fine, but others (although working fine for our test clients > using axis stubs) seem to have problems for people using .net to > integrate with our web services. > > I noticed that the methods causing problems are defined a bit > differently in the wsdl. For example, if we have a java class MyWidget > and a method in the service interface like: > > public MyWidget[] getMyWidgets() > > then the response type is defined as: > > > > > > The array type gets defined like this: > > > > > > > > > > Other similar methods which don't have the problem are a bit different > in the .wsdl, in that the return part has a type of > intf:ArrayOfMyWidgets instead of impl:ArrayOfMyWidgets. > > > > > > As far as I can tell the working and non-working methods are basically > identical -- both have return types that are arrays of objects defined > by us, and both are converted to web services using the same java2wsdl > arguments. > > The error message for the people trying to use .net to integrate with > us looks like this: "Custom tool error: Unable to import > WebService/Schema. Unable to import > binding 'MyServiceSoapBinding' from namespace > 'urn:my_namespace'. Unable to import operation > 'getMyWidgets'. The datatype 'Array' is missing." > > I have no proof that the impl vs. intf difference is causing the > problem, but it seems like the most likely candidate. Can anyone > enlighten me about when java2wsdl uses intf: vs. impl: in defining a > response type? > > Thanks! >
Re: dynamic web service location?
Hi Carolyn, I can't really help you with the 'discovering' part (I think you just have to implement it yourself for now), but once you know the address there is a method setTargetEndpointAddress(java.net.URL address) on the org.apache.axis.client.Call class. If you use stubs generated by WSDL2Java there will be a method on the ServiceLocator class that takes a URL and will call this method for you. Regards, Jan On 6/1/05, Carolyn Vo <[EMAIL PROTECTED]> wrote: > Looks like there is something in the Axis docs but is not completed yet on > how to accomplish this: > > "Dynamically Discovering and Binding to a Web Service > > When Axis generates client proxy classes code from WSDL, it binds the code > to the endpoint URL specified in the WSDL -this is usually a URL generated > from the URL of the inbound request. Using a http://localhost URL to fetch a > WSDL page will result in client code also bound to a service served up on > the localhost, which is not what you want in a redistributable. Similarly, > even if you use the hostname when fetching the WSDL, you need the fully > qualified domain name, not any short name -http://s1.example.org/ and not > http://s1/ -otherwise only callers in your own domain or subnet will be able > to find the server. Hand-written WSDL does not exhibit this problem; the > endpoint in the WSDL is the one the author typed in. > > It is almost essential that you provide some way to update the URL on the > clients. The simplest is some command line override option, as used in the > Axis command line tools. More advanced is a dialog box for entering URLs, > and more advanced yet is some automated discovery mechanism. > > Axis does not provide any discovery mechanism in the JAR. There is a sibling > project, jUDDI, that provides access to UDDI registries. There is also a > multicast discovery jar that works with Axis in the Axis CVS tree; this is a > proof-of-concept mechanism that uses XML messages but is not compatible with > any existing standard. It works OK over LAN networks, but is not designed to > be used over wider area. > > TODO: how to set the URL in a service" > > Anyone have any ideas on how to accomplish this? Thanks! > > -Original Message- > From: James Taylor [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 31, 2005 6:03 PM > To: axis-user@ws.apache.org > Subject: Re: dynamic web service location? > > Think you may have to configure tomcat or your webapp to listen on a port > and > access your service through there. Not sure how to do this!! > Quoting Carolyn Vo <[EMAIL PROTECTED]>: > > > Hello, > > > > > > > > Is it possible to specify the server and port number for a web service > > during runtime? The default in my wsdl file is hardcoded to > localhost:8080 > > but I want the user to be able to specify it during runtime. How is this > > possible? > > > > > > > > Thanks, > > > > Carolyn > > > > > > > -- > Between the question and the answer lies free will > >
[Axis2] Exception not get de-serialized correctly
Re-sending with proper subject prefix. From: Salman Khan [mailto:[EMAIL PROTECTED] Sent: Thursday, June 02, 2005 8:55 AM To: axis-user@ws.apache.org Subject: Exception not get de-serialized correctly I am using Axis 2.0 I get this response from my webservices, but the exception that is thrown doesn't have any of the values set. It seems to me like that the de-serilizar is not correctly de-serialize it. The message field is still empty string. Any help would be appreciated. Thanks, --- SOAP Response - http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> soapenv:Server.userException com.xxx.webservices.OutstartFault : The Member ID you requested is already in use.Please press the back button and choose another ID or contact your administrator.http://webservices.xxx.com"> xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> xsi:nil="true"/> 0http://schemas.xmlsoap.org/soap/encoding/"> The Member ID you requested is already in use.Please press the back button and choose another ID or contact your administrator. http://schemas.xmlsoap.org/soap/encoding/">The Member ID you requested is already in use.Please press the back button and choose another ID or contact your administrator. http://xml.apache.org/axis/">cushman>
Exception not get de-serialized correctly
I am using Axis 2.0 I get this response from my webservices, but the exception that is thrown doesn't have any of the values set. It seems to me like that the de-serilizar is not correctly de-serialize it. The message field is still empty string. Any help would be appreciated. Thanks, --- SOAP Response - http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> soapenv:Server.userException com.xxx.webservices.OutstartFault : The Member ID you requested is already in use.Please press the back button and choose another ID or contact your administrator.http://webservices.xxx.com"> xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> xsi:nil="true"/> 0http://schemas.xmlsoap.org/soap/encoding/"> The Member ID you requested is already in use.Please press the back button and choose another ID or contact your administrator. http://schemas.xmlsoap.org/soap/encoding/">The Member ID you requested is already in use.Please press the back button and choose another ID or contact your administrator. http://xml.apache.org/axis/">cushman>
impl vs. intf in array return types
Hi - We have some methods which return arrays of complex types. Some of them work fine, but others (although working fine for our test clients using axis stubs) seem to have problems for people using .net to integrate with our web services. I noticed that the methods causing problems are defined a bit differently in the wsdl. For example, if we have a java class MyWidget and a method in the service interface like: public MyWidget[] getMyWidgets() then the response type is defined as: The array type gets defined like this: Other similar methods which don't have the problem are a bit different in the .wsdl, in that the return part has a type of intf:ArrayOfMyWidgets instead of impl:ArrayOfMyWidgets. As far as I can tell the working and non-working methods are basically identical -- both have return types that are arrays of objects defined by us, and both are converted to web services using the same java2wsdl arguments. The error message for the people trying to use .net to integrate with us looks like this: "Custom tool error: Unable to import WebService/Schema. Unable to import binding 'MyServiceSoapBinding' from namespace 'urn:my_namespace'. Unable to import operation 'getMyWidgets'. The datatype 'Array' is missing." I have no proof that the impl vs. intf difference is causing the problem, but it seems like the most likely candidate. Can anyone enlighten me about when java2wsdl uses intf: vs. impl: in defining a response type? Thanks!
Closing HTTP1.1 Keep-Alive Session in CommonsHTTPSender
Hello, I am developing my own webservice using the WSDL2Java server-side generated code. My webservice in turn, also acts as an Axis Client by making calls to other web services. For this, I am using stubs also generated by WSDL2Java and specified CommonsHTTPSender as the transport inside client-config.wsdd. The purpose for me to use CommonsHTTPSender is to maintain an HTTP1.1 Keep-Alive connection so as to reduce the overhead in establishing TCP connections everytime I make an outgoing SOAP. What I did was everytime my web service implementation class gets called to service the incoming SOAP, I create an instance of the stub and use it to make outgoing SOAP calls. For example, Stub stub = new Locator().getPort(url); stub.method1(); stub.method2(); stub.method3(); stub.method4(); So if I use CommonsHTTPSender, the 4 method calls above maintains a single HTTP 1.1 Keep-alive connection (which is what my objective is). However, I wanted to close the HTTP connection after the last method (method4). Becuase if i dont, I found out that the TCP connection to the server remains established. How do I do this? Thanks! Chris__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Response Message Consumption Problem Axis 1.1 -> 1.2
Maybe you can show use what's different between the old and new WSDL? I'm always leery of using a "new" WSDL to access an "old" service. Anne On 6/1/05, Parley, Thunder Jon <[EMAIL PROTECTED]> wrote: > Hi List, > > Any insight here is welcome. The WS is NOT axis based, only the client. > > The server WS used to return (older server): > > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";> y> > > > > SWPKGBUILDER > > > > > THIS > > > > > > > And this was OK with my AXIS 1.1 client, but not with my 1.2 Final > client. > > The upgraded server now returns (newer server): > > > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";> y> > > > > SWPKGBUILDER > > > > > THIS > > > > > > > So why would an Axis 1.2 client balk at the first response whereas 1.1 > client was fine? What I did was create the AXIS 1.2 client using > WSDL2Java on the newer WSDL and then pointed it at the older service. > Note, that the function being called did not change only the version of > the server hosting the function/WS. The error I get from 1.2Final is: > > {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: > SimpleDeserializer encountered a child element, which is NOT expected, > in something it was trying to deserialize. > > I looked at the autogenerated WSDLs provided by the server (again, not > AXIS) and the only difference is that the old WSDL uses > and tags whereas the newer WSDL uses and > instead. > > Thanks! > > Thunder >
Re: Webservice Design related question
Why do you convert your response into XML in the first place? Why not return the response as an object? (that's what Axis likes best) If your application requires you to return XML, then it's better to convert it to a DOM than to convert it to a string. Then at least you can tweak your WSDL to let the client know what XML structure it will receive. If you convert it to a string, then Axis will treat it as an opaque string and escape the XML. The client will then receive the XML as a string, with no knowlegde of the data structure. Alternatively, you can implement your service using the low-level messaging API, and you can just add your XML to the SOAP message (although the messaging API also works with DOM). But then you also will need to programmatically parse the input message. Anne On 6/1/05, Kiran Kumar <[EMAIL PROTECTED]> wrote: > > > Hello, > > I am trying to build web services in my existing web application. Currently > I have a business method > > String processIndividual(String strAddress, int intGeoCodingTarget, boolean > blnActual) > > This method currently returns XML in the form of String. Within this method > I am currently using XMLBeans to generate the XML response and then > converting that XML response into String. > > Now I want to expose this method as a web service. > > Since I donot want the clients to be tightly coupled with this service, I > will define the input parameters in the form of XML Schema (within the WSDL > file) > > > > > > > > > > Now I am confused with my response. > > (Q1) Should I just create an element in the following way with 'String' type > and return my XML response as a String? > > > > > > > > or Should I need to define my actual XML Response structure here? if I do > that how Axis know how to generate the response XML or what I need to do in > my code so that Axis will generate the XML response ? > > > Sorry for my long mail. Please throw some light on this. > > Thank You > Kiran > > > > This e-mail, and any attachments thereto, is confidential and is intended > only for the individual(s) named. If you are not the intended recipient, > please let us know by e-mail reply and delete it from your system; do not > copy/save this e-mail or disclose its contents to anyone. E-mail > transmissions cannot be guaranteed to be secure or error-free as the > transmission could be interrupted, corrupted, lost, destroyed, altered, > arrive late or contain viruses. ObjectWave does not accept liability for > any errors or omissions in the contents of this e-mail which arise as a > result of e-mail transmission. The views expressed in this e-mail do not > necessarily reflect those of ObjectWave or its affiliates. > >
soap request
hi when i send a soap request with this '3.14159E0' is not a correct integer value what's the problem? _ Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com
RE: edit soap message
where can I find it? _ Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com
RE: edit soap message
use the soap monitor? -Original Message- From: Omar Bennani [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 01, 2005 4:29 PM To: axis-user@ws.apache.org Subject: edit soap message hi i have a java client that invoke a webservice, how can i edit or show the soap message sent? _ Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com
edit soap message
hi i have a java client that invoke a webservice, how can i edit or show the soap message sent? _ Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com
Type names now start with a lowercase in 1.2 final?
Title: Type names now start with a lowercase in 1.2 final? Why was this change made? Ross
Webservice Design related question
Hello, I am trying to build web services in my existing web application. Currently I have a business method String processIndividual(String strAddress, int intGeoCodingTarget, boolean blnActual) This method currently returns XML in the form of String. Within this method I am currently using XMLBeans to generate the XML response and then converting that XML response into String. Now I want to expose this method as a web service. Since I donot want the clients to be tightly coupled with this service, I will define the input parameters in the form of XML Schema (within the WSDL file) Now I am confused with my response. (Q1) Should I just create an element in the following way with 'String' type and return my XML response as a String? or Should I need to define my actual XML Response structure here? if I do that how Axis know how to generate the response XML or what I need to do in my code so that Axis will generate the XML response ? Sorry for my long mail. Please throw some light on this. Thank You Kiran This e-mail, and any attachments thereto, is confidential and is intended only for the individual(s) named. If you are not the intended recipient, please let us know by e-mail reply and delete it from your system; do not copy/save this e-mail or disclose its contents to anyone. E-mail transmissions cannot be guaranteed to be secure or error-free as the transmission could be interrupted, corrupted, lost, destroyed, altered, arrive late or contain viruses. ObjectWave does not accept liability for any errors or omissions in the contents of this e-mail which arise as a result of e-mail transmission. The views expressed in this e-mail do not necessarily reflect those of ObjectWave or its affiliates.
How does Stub.setMaintainSession(boolean) work
I have this piece of code that establishes the Soap handle used to make subsequent API calls. private Config createConfigHandle() { try { URL sURL = new URL(hprotocol + "://" + wlse_ip + ":" + httpport + "/services/Config"); m_logger.info("service URL is: " + sURL) ; ConfigService service = new ConfigServiceLocator(); Config config = service.getConfig(sURL) ; ConfigSoapBindingStub stub = (ConfigSoapBindingStub)config; stub.setMaintainSession(true); stub.setUsername(username); stub.setPassword(password); return config; } I use the handle to invoke all the methods exposed in the "Config" interface. If I change the call: stub.setMaintainSession(true); to stub.setMaintainSession(false); What is the impact? Can I make multiple calls using the same handle? does Soap automatically create new session for each API call? or do I have to invoke setUserName(), and setPassword() before every API invocation if I call stub.setMaintainSession(false)?
Response Message Consumption Problem Axis 1.1 -> 1.2
Hi List, Any insight here is welcome. The WS is NOT axis based, only the client. The server WS used to return (older server): http://schemas.xmlsoap.org/soap/envelope/";> SWPKGBUILDER THIS And this was OK with my AXIS 1.1 client, but not with my 1.2 Final client. The upgraded server now returns (newer server): http://schemas.xmlsoap.org/soap/encoding/"; xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";> SWPKGBUILDER THIS So why would an Axis 1.2 client balk at the first response whereas 1.1 client was fine? What I did was create the AXIS 1.2 client using WSDL2Java on the newer WSDL and then pointed it at the older service. Note, that the function being called did not change only the version of the server hosting the function/WS. The error I get from 1.2Final is: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. I looked at the autogenerated WSDLs provided by the server (again, not AXIS) and the only difference is that the old WSDL uses and tags whereas the newer WSDL uses and instead. Thanks! Thunder
isOnlyLiteralReference flag
Can anyone explain to me what this flag means for the TypeEntry object and how it is set? I have observed type definitions in WSDLs that are very similar where the flag is set to true for one and false for another. I can't figure out any differences between the two that would account for this. What characteristic about a type would make this flag true? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: suggestion on fixing error
(I am referring to Tomcat 5 rather than 4.1.31 so you might need to make adjustments to the cited paths.) You could check out the Tomcat logs: look in C:\Program Files\Apache\jakarta-tomcat-4.1.31\logs\stdout.log for errors. Failing that, set up a logger: - Create (or edit if it already exists) a text file called log4j.properties in C:\Program Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\classes - Contents could be: # Log4j configuration file. log4j.rootCategory=DEBUG, A # A is a DailyRollingFileAppender log4j.appender.A=org.apache.log4j.DailyRollingFileAppender log4j.appender.A.file=C:\Program Files\Apache\jakarta-tomcat-4.1.31\logs\James.log log4j.appender.A.datePattern='.'-MM-dd log4j.appender.A.append=true log4j.appender.A.layout=org.apache.log4j.PatternLayout log4j.appender.A.layout.ConversionPattern=%-5p %d{ISO8601} [%t] - %m%n - Stop/start Tomcat then invoke the service. - Check the James.log for errors. Jeff - Original Message - From: "James Taylor" <[EMAIL PROTECTED]> To: ; "Jeff" <[EMAIL PROTECTED]> Sent: Wednesday, June 01, 2005 12:45 PM Subject: Re: suggestion on fixing error Hey, I did exactly as Jeff said and it fixed that particular error and it appeared to be a version conflict. I then tried to get the service to take a String and throw it back at me and it did but when I tried to implement the origional service I had that processed the String I got this error. I ran the backend code with the same input data and it returned a String as ecpected. HTTP/1.1 500 Internal Server Error Set-Cookie: JSESSIONID=B087344C80A5696CF4FCC460312362AC; Path=/axis Content-Type: text/xml;charset=utf-8 Date: Wed, 01 Jun 2005 16:36:32 GMT Server: Apache-Coyote/1.1 Connection: close http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> soapenv:Server.userException java.lang.reflect.InvocationTargetException http://xml.apache.org/axis/";>taylorjw Quoting Jeff <[EMAIL PROTECTED]>: > James, the IncompatibleClassChangeError indicates that class A is trying to > access class B but the class B that it finds is a different version to that > against which class A was compiled, i.e. the interface that class B exposes > is incompatible with that which class A expects. Since this happened in Axis > code, I guessed that you might have two versions of Axis on the classpath. > This is not necessarily the case though: classpath issues are flies in the > Java ointment and cause so much trouble for Java programmers that we will > all be glad after we migrate to a version of Java that eliminates classpath > problems or to an entirely better language. > > Here's what I suggest: > > - Check out what's in: > C:\Program Files\Apache\jakarta-tomcat-4.1.31\common\lib > C:\Program Files\Apache\jakarta-tomcat-4.1.31\common\endorsed > C:\Program Files\Apache\jakarta-tomcat-4.1.31\shared\lib > to see if there are any versions if axis.jar or xerces.jar and, if so, > make sure they are the same versions as those in: > C:\Program > Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\lib > or, even better, eliminate the duplicates. > > - Undeploy your web service and reboot your host computer. > > - Ensure that the version of Axis that you build against is the same as > the version in C:\Program > Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\lib (better still, > point to this path to build). > > - Do a full rebuild on your web service. > > - Copy the new build to C:\Program > Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\classes (or ...\lib > if you product a JAR file). > > - Redeploy the service and test. > > > Jeff > > > > - Original Message - > From: "James Taylor" <[EMAIL PROTECTED]> > To: "Jeff" <[EMAIL PROTECTED]> > Sent: Wednesday, June 01, 2005 9:25 AM > Subject: Re: suggestion on fixing error > > > Hi Jeff thanks for your reply, > surely the different versions of axis.jar > should > only be in TOMCAT_HOME\common\lib or in TOMCAT_HOME\webapps\axis\WEB-INF\lib > and all other of axis.jar are not visible if they are not set in the > classpath? > The reason I'm saying this is that I have a backup of axis on my system > but > I have no classpath env set. > This is a listing of TOMCAT_HOME\common\lib - > Directory of C:\Program Files\Apache\jakarta-tomcat-4.1.31\common\lib > > 01/06/2005 11:55 . > 01/06/2005 11:55 .. > 25/09/2004 12:3454,829 activation.jar > 16/07/2004 09:53 999,966 ant.jar > 25/09/2004 12:34 8,412 ant-launcher.jar > 25/09/2004 12:3414,544 catalina-ant.jar > 25/09/2004 12:34 165,119 commons-collections.jar > 25/09/2004 12:34 100,776 commons-dbcp-1.1.jar > 25/09/200
Re: only 1 of multiple attachments showing up - Using 1.2 final breaks completely
Upgrading to 1.2 final, no changes to any code, and it now completely fails when I invoke the interface method: get waveforms AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: The element ":item" is an attachment with sub elements which is not supported. faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: The element ":item" is an attachment with sub elements which is not supported. at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.onStartChild(JAFDataHandlerDeserializer.java:89) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1031) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:238) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:386) at org.apache.axis.client.Call.invoke(Call.java:2402) at org.apache.axis.client.Call.invoke(Call.java:2301) at org.apache.axis.client.Call.invoke(Call.java:1758) at edu.iris.dmc.dhiWS.Dhi_webserviceBindingStub.getWaveformAttach(Dhi_webserviceBindingStub.java:336) at edu.iris.dmc.dhiWS.DataPnl.getDataBtnActionPerformed(DataPnl.java:229) [...] Linus Kamb wrote: I have a web service that is to return binary data as attachments. Using Doc/Lit/wrapped. The interface looks like DataHandler[] getWaveformAttach(WaveformAttachQuery qry); The server appears to be properly packaging up the multiple attachments and returning them. On the client side, the DataHandler[] array is always of length 1. However, if I get the Attachments iterator using locator.getCall().getResponseMessage().getAttachments(), and iterate through the list, all of the attachments are there. I can also see that the attachments have come across as they exist as temp files in the system temp dir. (Another side question on this below.) So my question is, why is the DataHandler[] array always of length 1? Do I *have to* access the attachments through the iterator? Am I doing something else wrong? The java code (with the return type of DataHandler[]) was generated using WSDL2Java. Using 1.2RC3 (also happened RC2). Attached is the WSDL and deploy doc. My aside question is: Why are the temp files being written to the temp dir? Following the code/advice in the FAQ, I wouldn't think that would happen. I do the following: Iterator iterator = locator.getCall().getResponseMessage().getAttachments(); int i = 0; while ( iterator.hasNext() ) { AttachmentPart part = (AttachmentPart) iterator.next(); DataHandlerhandler = part.getDataHandler(); handler.writeTo(new FileOutputStream(selectedDir.getCanonicalPath() + File.separator + fileNameString( qry[i++] ))); } which *does* write the files to the appropriate dir, but they are *also* written to the temp dir. Sure, I could do File.renameTo() but that may involve copying, depending on the file structure. I vaguely recall from when I last used Axis a couple years ago that I could set the directory where Axis would put the files, but I could not find anything in searching the list or googling, and I could just plain be mis-remembering. Thanks for any insight, Linus http://dhiWS.dmc.iris.edu/wsdl"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://dhiWS.dmc.iris.edu/wsdl"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsd1="http://dhiWS.dmc.iris.edu/types";> http://schemas.xmlsoap.org/wsdl/";>Created using Cape Clear Studio SOA Editor - http://www.capeclear.com http://dhiWS.dmc.iris.edu/types"; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsd1="http://dhiWS.dmc.iris.edu/types";> http://schemas.xmlsoap.org/wsdl/"/> http://schemas.xmlsoap.org/soap/encoding/"/> Defines a time span with start and end times. A geographic region defined by lat, lon coor
Re: suggestion on fixing error
Hey, I did exactly as Jeff said and it fixed that particular error and it appeared to be a version conflict. I then tried to get the service to take a String and throw it back at me and it did but when I tried to implement the origional service I had that processed the String I got this error. I ran the backend code with the same input data and it returned a String as ecpected. HTTP/1.1 500 Internal Server Error Set-Cookie: JSESSIONID=B087344C80A5696CF4FCC460312362AC; Path=/axis Content-Type: text/xml;charset=utf-8 Date: Wed, 01 Jun 2005 16:36:32 GMT Server: Apache-Coyote/1.1 Connection: close http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> soapenv:Server.userException java.lang.reflect.InvocationTargetException http://xml.apache.org/axis/";>taylorjw Quoting Jeff <[EMAIL PROTECTED]>: > James, the IncompatibleClassChangeError indicates that class A is trying to > access class B but the class B that it finds is a different version to that > against which class A was compiled, i.e. the interface that class B exposes > is incompatible with that which class A expects. Since this happened in Axis > code, I guessed that you might have two versions of Axis on the classpath. > This is not necessarily the case though: classpath issues are flies in the > Java ointment and cause so much trouble for Java programmers that we will > all be glad after we migrate to a version of Java that eliminates classpath > problems or to an entirely better language. > > Here's what I suggest: > > - Check out what's in: > C:\Program Files\Apache\jakarta-tomcat-4.1.31\common\lib > C:\Program Files\Apache\jakarta-tomcat-4.1.31\common\endorsed > C:\Program Files\Apache\jakarta-tomcat-4.1.31\shared\lib > to see if there are any versions if axis.jar or xerces.jar and, if so, > make sure they are the same versions as those in: > C:\Program > Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\lib > or, even better, eliminate the duplicates. > > - Undeploy your web service and reboot your host computer. > > - Ensure that the version of Axis that you build against is the same as > the version in C:\Program > Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\lib (better still, > point to this path to build). > > - Do a full rebuild on your web service. > > - Copy the new build to C:\Program > Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\classes (or ...\lib > if you product a JAR file). > > - Redeploy the service and test. > > > Jeff > > > > - Original Message - > From: "James Taylor" <[EMAIL PROTECTED]> > To: "Jeff" <[EMAIL PROTECTED]> > Sent: Wednesday, June 01, 2005 9:25 AM > Subject: Re: suggestion on fixing error > > > Hi Jeff thanks for your reply, > surely the different versions of axis.jar > should > only be in TOMCAT_HOME\common\lib or in TOMCAT_HOME\webapps\axis\WEB-INF\lib > and all other of axis.jar are not visible if they are not set in the > classpath? > The reason I'm saying this is that I have a backup of axis on my system > but > I have no classpath env set. > This is a listing of TOMCAT_HOME\common\lib - > Directory of C:\Program Files\Apache\jakarta-tomcat-4.1.31\common\lib > > 01/06/2005 11:55 . > 01/06/2005 11:55 .. > 25/09/2004 12:3454,829 activation.jar > 16/07/2004 09:53 999,966 ant.jar > 25/09/2004 12:34 8,412 ant-launcher.jar > 25/09/2004 12:3414,544 catalina-ant.jar > 25/09/2004 12:34 165,119 commons-collections.jar > 25/09/2004 12:34 100,776 commons-dbcp-1.1.jar > 25/09/2004 12:3422,327 commons-logging-api.jar > 25/09/2004 12:3439,523 commons-pool-1.1.jar > 25/09/2004 12:34 181,624 jasper-compiler.jar > 25/09/2004 12:3472,417 jasper-runtime.jar > 25/09/2004 12:34 6,727 jdbc2_0-stdext.jar > 25/09/2004 12:3498,496 jndi.jar > 25/09/2004 12:34 8,639 jta.jar > 25/09/2004 12:34 327,603 mail.jar > 14/04/2005 22:44 409,191 mysql-connector-java-3.1.8-bin.jar > 25/09/2004 12:3427,986 naming-common.jar > 25/09/2004 12:3417,946 naming-factory.jar > 25/09/2004 12:3438,407 naming-resources.jar > 25/09/2004 12:3477,987 servlet.jar > 19 File(s) 2,672,519 bytes >2 Dir(s) 13,274,218,496 bytes free > > and here is a listing of TOMCAT_HOME\webapps\axis\WEB-INF\lib - > > Directory of C:\Program > Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF > \lib > > 01/06/2005 14:11 . > 01/06/2005 14:11 .. > 16/11/2004 13:02 1,400,426 axis.jar > 16/11/2004 13:0230,082 axis-ant.jar >
RE: Axis Client using HTTPS w/ no authentication how?
I tested the web service pointing a web browser to it, and the browser gives me the "security alert" asking me whether I want to "accept" the certificate and proceed. As to your other questions, I am not sure. I don't know much about this. I didn't want to get trusted certificates or any of that. We only need encryption. Well, breaking news, I just added the following startup option to tomcat, and things are working now, is this the solution? :-))) -Daxis.socketSecureFactory=org.apache.axis.components.net.SunFakeTrustSocketFactor I grabbed the above from Axis' FAQ (regarding unsigned certificates) Don, I will try your idea as well and report back. -Original Message- From: Ephemeris Lappis [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 01, 2005 11:56 AM To: axis-user@ws.apache.org Subject: RE: Axis Client using HTTPS w/ no authentication how? I don't know how the gsoap ssl works, but, just few questions : - Are you sure the server's certificate is valid : date, issuer, etc ? - Is this server certificate's issuer (CN=?) consistent with your server's hostname ? - Are you sure the certification chain for this certficate ends with a trusted certificate on the client side ? >>> -Original Message- >>> From: Melean, Calixto (Calixto) [mailto:[EMAIL PROTECTED] >>> Sent: Wednesday, June 01, 2005 5:49 PM >>> To: axis-user@ws.apache.org >>> Subject: Axis Client using HTTPS w/ no authentication how? >>> >>> >>> Folks, >>> >>> Could anybody please help me with the following problem. I am >>> desperate for help as I can't get this to work. >>> >>> I don't know if the problem is server or client. Anybody know how to >>> configure Axis to send HTTPS to servers without using >>> authentication/certificates. >>> >>> The web service is using gsoap. The client is using java apache >>> axis. The client is trying to use SSL(HTTPS). >>> >>> I dont want want any authentication/certificates. I only need >>> encryption. >>> >>> In the server I am doing: >>> >>> soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, NULL, NULL, NULL, >>> NULL, NULL, NULL, NULL ) >>> >>> The error printed by gsoap is: >>> >>> SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:1408A0C1:SSL >>> routines:SSL routines:reason(193). SSL_accept >>> () failed in soap_ssl_accept() >>> >>> The error on the Axis side is: >>> >>> javax.net.ssl.SSLHandshakeException: Received fatal alert: >>> handshake_failure >>> >>> - >>> >>> Now, I tried setting the soap context using the included server.pem >>> (though I dont think I need this). And this is what happens: >>> >>> soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, "server.pem", >>> "password", NULL, NULL, NULL, NULL, NULL ) >>> >>> Error on gsoap side: >>> >>> SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:14094416:SSL >>> routines:SSL routines:reason(1046). SSL_accept >>> () failed in soap_ssl_accept() >>> >>> Error on Axis side: >>> >>> javax.net.ssl.SSLHandshakeException: >>> sun.security.validator.ValidatorException: No trusted certificate >>> found >>> >>> >>> The errors are different. Again, the goal is to have encryption with >>> no authentication. Anybody knows how to get this going. >>> >>> I appreciate any help >>> >>> thanks
Re: Axis Client using HTTPS w/ no authentication how?
As a test, you might try this. It worked for me using xml-rpc when the certificate on the host was not a trusted certificate. Step 1 Create your own Host Verifier that will accept anything mine looks like this: class NullHostnameVerifier implements javax.net.ssl.HostnameVerifier { public boolean verify(String urlHostname, SSLSession session){ return true; } } Step 2 Before using https set your null verifier as the default HttpsURLConnection.setDefaultHostnameVerifier(new NullHostnameVerifier()); When I did this, it would accept any certificate without caring if it was trusted or not. I only needed it for a test implementation -- the live version checks. On 6/1/05, Melean, Calixto (Calixto) <[EMAIL PROTECTED]> wrote: Folks,Could anybody please help me with the following problem. I am desperate for help as I can't get this to work.I don't know if the problem is server or client. Anybody know how to configure Axis to send HTTPS to servers without using authentication/certificates.The web service is using gsoap. The client is using java apache axis. The client is trying to use SSL(HTTPS).I dont want want any authentication/certificates. I only need encryption. In the server I am doing:soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, NULL, NULL, NULL, NULL, NULL, NULL, NULL )The error printed by gsoap is:SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:1408A0C1:SSL routines:SSL routines:reason(193). SSL_accept () failed in soap_ssl_accept()The error on the Axis side is:javax.net.ssl.SSLHandshakeException: Received fatal alert:handshake_failure-Now, I tried setting the soap context using the included server.pem (though I dont think I need this). And this is what happens:soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, "server.pem", "password", NULL, NULL, NULL, NULL, NULL )Error on gsoap side: SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:14094416:SSL routines:SSL routines:reason(1046). SSL_accept() failed in soap_ssl_accept()Error on Axis side:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate foundThe errors are different. Again, the goal is to have encryption with no authentication. Anybody knows how to get this going.I appreciate any help thanks-- It used to be that machines automated work, giving us more time to do other things. But now machines automate the production of attention-consuming information, which takes our time. For example, if one person sends the same e-mail message to 10 people, then 10 people have to respond.Esther Dyson
Re: Second stub call returns Connection Reset
For future searchers of this mailing list, I'll fill you in on what I've debugged so far. It appears Axis is working fine. I took all the guts out of my server-side code and now I can make repeated calls without fail. As much as I hate to admit it, I must have a software bug in my code. Gasp! Most of my code is written in Java but I do have some C++ code that I call using JNI. I assume my C++ code is crashing and taking Tomcat with it since it is running in Tomcat's context. The interesting thing is that if I build a standalone app using all my pieces directly (including the JNI/C++ stuff but without Tomcat, Axis, or the stubs) and run it on the server machine, the standalone app works great. Therefore, mixing in Tomcat, Axis, and the WSDL2Java stubs has an effect that I haven't figured out yet. Probably related to memory allocations. More time and coffee are needed. On 31 May 2005 at 10:38, axis-user@ws.apache.org wrote: I've searched this mailing list and haven't found this mentioned the way it's happening to me. Sorry if it's redundant. I have a standard Java class (not a servlet) sitting on the Tomcat v5.5.9 server. I'm using Java 1.5. I used the Installation Guide, User's Guide, and WSDL2Java to generate the client-side stubs for that class. The stub classes work fine for one call only. The second call across the stub returns a "java.net.SocketException: Connection Reset" and Tomcat shuts down. I get one good call with a correct value returned and then I get the exception. I've tried changing the scope (request, session, or application) in the server- config.wsdd file but it behaves the same. It also doesn't matter whether I make two calls within the client program or if I make a single call within the client program but run the client program twice. The second call fails. The Tomcat logs show no errors or exceptions or any explaination for why it shuts down. The second call doesn't get to my server-side class but fails somewhere within Tomcat or Axis. Thank you.
RE: Sun JAX-RPC client against Axis JAX-RPC web service - problem with HttpSession
Completely different subject, but i'm having a nightmare writing a java client to call a remote web service Yet, calling the same remote web service using Perl and SOAP::Lite works fine, no hassle with data types, unlike my java client Is Axis this fussy? From: "Merten Schumann" <[EMAIL PROTECTED]> Reply-To: axis-user@ws.apache.org To: Subject: Sun JAX-RPC client against Axis JAX-RPC web service - problem with HttpSession Date: Wed, 1 Jun 2005 17:21:38 +0200 Hello, I think questions regarding maintaining HTTP sessions are too much out there, anyway, I could not find any detailed information about how things are in Axis 1.2 ... My problem is as simple as this: I've got a JAX-RPC web service up and running smoothly in Axis (I do use the approach "add Axis to your web app", if this is of interest). I do deploy my service with scope=session (I even tried application). My clients (Sun JAX-RPC, PHP, Perl ...) work fine so far (with the global configuration switch dotNetSoapEncFix set to true BTW). Now I tried for some reason to use javax.servlet.http.HttpSession. I think I did the required steps in the server side: implement javax.xml.rpc.server.ServiceLifecycle, store in init() (get's called, as expected) the javax.xml.rpc.server.ServletEndpointContext and call context.getHttpSession(). In the client, I do proxy._setProperty(javax.xml.rpc.Stub.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE). Well, and it does not work. :-( In the web service server side, I can see that each time I do call context.getHttpSession() another object get's returned. So, I guess the exchange of cookies is not working correctly between Axis 1.2 and Sun JAX-RPC (from J2EE 1.4) ... Anyone else experiencing this issue? Or anyone has got this combination running without problems? Anyone has a solution? My Perl (SOAP::Lite) client works fine against Axis when cookie support is enabled! So, who's wrong here, Apache or Sun? :-) Thanx alot Merten _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/
RE: Axis Client using HTTPS w/ no authentication how?
I don't know if is "the state of the art" :) but my simple test works: 1. Get the Server CERTIFICATE (or create one using "keytool -genkey -keyalg RSA" and install it on the server). 2. Before you make the call.invoke(...) setup the server certificate: System.setProperty("javax.net.ssl.trustStore", "C:\\t.keystore"); Where t.keystore is your server certificate that you have to copy on your client. By, Gigi -Original Message- From: Melean, Calixto (Calixto) [mailto:[EMAIL PROTECTED] Sent: mercoledì 1 giugno 2005 17.49 To: axis-user@ws.apache.org Subject: Axis Client using HTTPS w/ no authentication how? Folks, Could anybody please help me with the following problem. I am desperate for help as I can't get this to work. I don't know if the problem is server or client. Anybody know how to configure Axis to send HTTPS to servers without using authentication/certificates. The web service is using gsoap. The client is using java apache axis. The client is trying to use SSL(HTTPS). I dont want want any authentication/certificates. I only need encryption. In the server I am doing: soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) The error printed by gsoap is: SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:1408A0C1:SSL routines:SSL routines:reason(193). SSL_accept () failed in soap_ssl_accept() The error on the Axis side is: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure - Now, I tried setting the soap context using the included server.pem (though I dont think I need this). And this is what happens: soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, "server.pem", "password", NULL, NULL, NULL, NULL, NULL ) Error on gsoap side: SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:14094416:SSL routines:SSL routines:reason(1046). SSL_accept () failed in soap_ssl_accept() Error on Axis side: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found The errors are different. Again, the goal is to have encryption with no authentication. Anybody knows how to get this going. I appreciate any help thanks
only 1 of multiple attachments showing up
I have a web service that is to return binary data as attachments. Using Doc/Lit/wrapped. The interface looks like DataHandler[] getWaveformAttach(WaveformAttachQuery qry); The server appears to be properly packaging up the multiple attachments and returning them. On the client side, the DataHandler[] array is always of length 1. However, if I get the Attachments iterator using locator.getCall().getResponseMessage().getAttachments(), and iterate through the list, all of the attachments are there. I can also see that the attachments have come across as they exist as temp files in the system temp dir. (Another side question on this below.) So my question is, why is the DataHandler[] array always of length 1? Do I *have to* access the attachments through the iterator? Am I doing something else wrong? The java code (with the return type of DataHandler[]) was generated using WSDL2Java. Using 1.2RC3 (also happened RC2). Attached is the WSDL and deploy doc. My aside question is: Why are the temp files being written to the temp dir? Following the code/advice in the FAQ, I wouldn't think that would happen. I do the following: Iterator iterator = locator.getCall().getResponseMessage().getAttachments(); int i = 0; while ( iterator.hasNext() ) { AttachmentPart part = (AttachmentPart) iterator.next(); DataHandlerhandler = part.getDataHandler(); handler.writeTo(new FileOutputStream(selectedDir.getCanonicalPath() + File.separator + fileNameString( qry[i++] ))); } which *does* write the files to the appropriate dir, but they are *also* written to the temp dir. Sure, I could do File.renameTo() but that may involve copying, depending on the file structure. I vaguely recall from when I last used Axis a couple years ago that I could set the directory where Axis would put the files, but I could not find anything in searching the list or googling, and I could just plain be mis-remembering. Thanks for any insight, Linus http://dhiWS.dmc.iris.edu/wsdl"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://dhiWS.dmc.iris.edu/wsdl"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsd1="http://dhiWS.dmc.iris.edu/types";> http://schemas.xmlsoap.org/wsdl/";>Created using Cape Clear Studio SOA Editor - http://www.capeclear.com http://dhiWS.dmc.iris.edu/types"; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsd1="http://dhiWS.dmc.iris.edu/types";> http://schemas.xmlsoap.org/wsdl/"/> http://schemas.xmlsoap.org/soap/encoding/"/> Defines a time span with start and end times. A geographic region defined by lat, lon coordinates Defines most basic description of a seismographic station Contains the information needed for a basic station query. Fully describes a seismographic channel Group of BasicStation objects A collection of information on channels
RE: Axis Client using HTTPS w/ no authentication how?
I don't know how the gsoap ssl works, but, just few questions : - Are you sure the server's certificate is valid : date, issuer, etc ? - Is this server certificate's issuer (CN=?) consistent with your server's hostname ? - Are you sure the certification chain for this certficate ends with a trusted certificate on the client side ? >>> -Original Message- >>> From: Melean, Calixto (Calixto) [mailto:[EMAIL PROTECTED] >>> Sent: Wednesday, June 01, 2005 5:49 PM >>> To: axis-user@ws.apache.org >>> Subject: Axis Client using HTTPS w/ no authentication how? >>> >>> >>> Folks, >>> >>> Could anybody please help me with the following problem. I am >>> desperate for help as I can't get this to work. >>> >>> I don't know if the problem is server or client. Anybody know >>> how to configure Axis to send HTTPS to servers without using >>> authentication/certificates. >>> >>> The web service is using gsoap. The client is using java apache >>> axis. The client is trying to use SSL(HTTPS). >>> >>> I dont want want any authentication/certificates. I only need >>> encryption. >>> >>> In the server I am doing: >>> >>> soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, NULL, NULL, >>> NULL, NULL, NULL, NULL, NULL ) >>> >>> The error printed by gsoap is: >>> >>> SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:1408A0C1:SSL >>> routines:SSL routines:reason(193). SSL_accept >>> () failed in soap_ssl_accept() >>> >>> The error on the Axis side is: >>> >>> javax.net.ssl.SSLHandshakeException: Received fatal alert: >>> handshake_failure >>> >>> - >>> >>> Now, I tried setting the soap context using the included >>> server.pem (though I dont think I need this). And this is what happens: >>> >>> soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, "server.pem", >>> "password", NULL, NULL, NULL, NULL, NULL ) >>> >>> Error on gsoap side: >>> >>> SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:14094416:SSL >>> routines:SSL routines:reason(1046). SSL_accept >>> () failed in soap_ssl_accept() >>> >>> Error on Axis side: >>> >>> javax.net.ssl.SSLHandshakeException: >>> sun.security.validator.ValidatorException: No trusted certificate found >>> >>> >>> The errors are different. Again, the goal is to have encryption >>> with no authentication. Anybody knows how to get this going. >>> >>> I appreciate any help >>> >>> thanks
Axis Client using HTTPS w/ no authentication how?
Folks, Could anybody please help me with the following problem. I am desperate for help as I can't get this to work. I don't know if the problem is server or client. Anybody know how to configure Axis to send HTTPS to servers without using authentication/certificates. The web service is using gsoap. The client is using java apache axis. The client is trying to use SSL(HTTPS). I dont want want any authentication/certificates. I only need encryption. In the server I am doing: soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) The error printed by gsoap is: SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:1408A0C1:SSL routines:SSL routines:reason(193). SSL_accept () failed in soap_ssl_accept() The error on the Axis side is: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure - Now, I tried setting the soap context using the included server.pem (though I dont think I need this). And this is what happens: soap_ssl_server_context( soap, SOAP_SSL_DEFAULT, "server.pem", "password", NULL, NULL, NULL, NULL, NULL ) Error on gsoap side: SOAP FAULT: SOAP-ENV:Server. SSL_ERROR_SSL error:14094416:SSL routines:SSL routines:reason(1046). SSL_accept () failed in soap_ssl_accept() Error on Axis side: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found The errors are different. Again, the goal is to have encryption with no authentication. Anybody knows how to get this going. I appreciate any help thanks
Re: Java2WSDL options
I believe that you need to use the "-i" flag on java2wsdl: -i, --implClass optional class that contains implementation of methods in class-of-portType. The debug information in the class is used to obtain the method parameter names, which are used to set the WSDL part names. Ferruh Zamangoer wrote: Hi, is it possible when I use the Java2WSDL to generate my WSDL –Document to take over the attributes names. When I generate the WSDL file from the following interface: public boolean unlockAccount(String pseudonym) throws RemoteException, ConfuocoException; I see in the wsdl file name="in0" and have to edit it manually to the right name. Are there any options to take over the right names? Thanks for any help. Regards Ferruh
Sun JAX-RPC client against Axis JAX-RPC web service - problem with HttpSession
Hello, I think questions regarding maintaining HTTP sessions are too much out there, anyway, I could not find any detailed information about how things are in Axis 1.2 ... My problem is as simple as this: I've got a JAX-RPC web service up and running smoothly in Axis (I do use the approach "add Axis to your web app", if this is of interest). I do deploy my service with scope=session (I even tried application). My clients (Sun JAX-RPC, PHP, Perl ...) work fine so far (with the global configuration switch dotNetSoapEncFix set to true BTW). Now I tried for some reason to use javax.servlet.http.HttpSession. I think I did the required steps in the server side: implement javax.xml.rpc.server.ServiceLifecycle, store in init() (get's called, as expected) the javax.xml.rpc.server.ServletEndpointContext and call context.getHttpSession(). In the client, I do proxy._setProperty(javax.xml.rpc.Stub.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE). Well, and it does not work. :-( In the web service server side, I can see that each time I do call context.getHttpSession() another object get's returned. So, I guess the exchange of cookies is not working correctly between Axis 1.2 and Sun JAX-RPC (from J2EE 1.4) ... Anyone else experiencing this issue? Or anyone has got this combination running without problems? Anyone has a solution? My Perl (SOAP::Lite) client works fine against Axis when cookie support is enabled! So, who's wrong here, Apache or Sun? :-) Thanx alot Merten
SOAP 1.2 and JavaBean
Hello, I have a simple quaestion. I write a simple web service that receives two strings and returns a JavaBean. If i try to do it using SOAP 1.1 the system works correctly but when in the client i add the string MYWEBSERVICECALL.setSOAPVersion(SOAPConstants.SOAP12_CONSTANTS); the system crashs and in log file of Tomcat I read: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: No serializer found for class pagina.numeri.Identificativo in registry [EMAIL PROTECTED] faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class MyBeanClass in registry [EMAIL PROTECTED] Anyone can help me please. thank you for your attention.
encryption not asking for the right private key
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi all, i have been stepping through the axis and wss4j code and am at a loss. here is the code it is getting to (inside Merlin.java): public PrivateKey getPrivateKey(String alias, String password) throws Exception { if (alias == null) { throw new Exception("alias is null"); } boolean b = keystore.isKeyEntry(alias); if (!b) { log.error("Cannot find key for alias: " + alias); throw new Exception("Cannot find key for alias: " + alias); } Key keyTmp = keystore.getKey(alias, password.toCharArray()); if (!(keyTmp instanceof PrivateKey)) { throw new Exception("Key is not a private key, alias: " + alias); } return (PrivateKey) keyTmp; } this is when the client calls to the service. the client is sending an encrypted/signed message. what's happening is the server (web service) is trying to get the private key for the client. that just doesnt make sense. the server will not have a keyEntry (private key) for the client, just public keys. so above b == false because it can't find the client private key in the server keystore. it seems like it should be looking for the server private key to decrypt the client message. does anyone have any idea where i might be going wrong? i have been looking at this problem for over a week now, so maybe i am just missing something? thanks nate -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (MingW32) iD8DBQFCncsqgj8ksIjnb2wRAuHcAKCSCHwJ9mjumihwP5OtBli6t9fdxACdFkqp xYj2/dhkJs1zEFKqRRrbex4= =lfiR -END PGP SIGNATURE-
Re: suggestion on fixing error
James, the IncompatibleClassChangeError indicates that class A is trying to access class B but the class B that it finds is a different version to that against which class A was compiled, i.e. the interface that class B exposes is incompatible with that which class A expects. Since this happened in Axis code, I guessed that you might have two versions of Axis on the classpath. This is not necessarily the case though: classpath issues are flies in the Java ointment and cause so much trouble for Java programmers that we will all be glad after we migrate to a version of Java that eliminates classpath problems or to an entirely better language. Here's what I suggest: - Check out what's in: C:\Program Files\Apache\jakarta-tomcat-4.1.31\common\lib C:\Program Files\Apache\jakarta-tomcat-4.1.31\common\endorsed C:\Program Files\Apache\jakarta-tomcat-4.1.31\shared\lib to see if there are any versions if axis.jar or xerces.jar and, if so, make sure they are the same versions as those in: C:\Program Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\lib or, even better, eliminate the duplicates. - Undeploy your web service and reboot your host computer. - Ensure that the version of Axis that you build against is the same as the version in C:\Program Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\lib (better still, point to this path to build). - Do a full rebuild on your web service. - Copy the new build to C:\Program Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\classes (or ...\lib if you product a JAR file). - Redeploy the service and test. Jeff - Original Message - From: "James Taylor" <[EMAIL PROTECTED]> To: "Jeff" <[EMAIL PROTECTED]> Sent: Wednesday, June 01, 2005 9:25 AM Subject: Re: suggestion on fixing error Hi Jeff thanks for your reply, surely the different versions of axis.jar should only be in TOMCAT_HOME\common\lib or in TOMCAT_HOME\webapps\axis\WEB-INF\lib and all other of axis.jar are not visible if they are not set in the classpath? The reason I'm saying this is that I have a backup of axis on my system but I have no classpath env set. This is a listing of TOMCAT_HOME\common\lib - Directory of C:\Program Files\Apache\jakarta-tomcat-4.1.31\common\lib 01/06/2005 11:55 . 01/06/2005 11:55 .. 25/09/2004 12:3454,829 activation.jar 16/07/2004 09:53 999,966 ant.jar 25/09/2004 12:34 8,412 ant-launcher.jar 25/09/2004 12:3414,544 catalina-ant.jar 25/09/2004 12:34 165,119 commons-collections.jar 25/09/2004 12:34 100,776 commons-dbcp-1.1.jar 25/09/2004 12:3422,327 commons-logging-api.jar 25/09/2004 12:3439,523 commons-pool-1.1.jar 25/09/2004 12:34 181,624 jasper-compiler.jar 25/09/2004 12:3472,417 jasper-runtime.jar 25/09/2004 12:34 6,727 jdbc2_0-stdext.jar 25/09/2004 12:3498,496 jndi.jar 25/09/2004 12:34 8,639 jta.jar 25/09/2004 12:34 327,603 mail.jar 14/04/2005 22:44 409,191 mysql-connector-java-3.1.8-bin.jar 25/09/2004 12:3427,986 naming-common.jar 25/09/2004 12:3417,946 naming-factory.jar 25/09/2004 12:3438,407 naming-resources.jar 25/09/2004 12:3477,987 servlet.jar 19 File(s) 2,672,519 bytes 2 Dir(s) 13,274,218,496 bytes free and here is a listing of TOMCAT_HOME\webapps\axis\WEB-INF\lib - Directory of C:\Program Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF \lib 01/06/2005 14:11 . 01/06/2005 14:11 .. 16/11/2004 13:02 1,400,426 axis.jar 16/11/2004 13:0230,082 axis-ant.jar 16/11/2004 13:0274,527 commons-discovery.jar 16/11/2004 13:0231,605 commons-logging.jar 01/06/2005 14:08 6,264 flightservice.jar 17/10/2001 16:5823,317 jaxm.jar 16/11/2004 13:0231,191 jaxrpc.jar 16/11/2004 13:02 352,668 log4j-1.2.8.jar 16/11/2004 13:0218,978 saaj.jar 29/03/2005 13:4527,479 saaj-api.jar 29/03/2005 13:45 559,095 saaj-impl.jar 16/11/2004 13:02 120,280 wsdl4j.jar 20/02/2004 13:47 997,276 xalan.jar 16/05/2005 16:29 1,016,979 xerces.jar 20/02/2004 13:47 124,724 xml-apis.jar 15 File(s) 4,814,891 bytes 2 Dir(s) 13,274,218,496 bytes free and this is what my env variable look like - C:\Program Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\lib>set ALLUSERSPROFILE=C:\Documents and Settings\All Users ANT_HOME=C:\Program Files\Apache\apache-ant-1.6.2 APPDATA=C:\Documents and Settings\taylorjw\Application Data CATALINA_HOME=C:\Program Files\Apache\jakarta-tomcat-4.1.31 CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=
doc/literal web services
Hello, Can you please point me to some tutorial on how to use doc/literal style webservices using Axis 1.2 ? Thank you, Kiran This e-mail, and any attachments thereto, is confidential and is intended only for the individual(s) named. If you are not the intended recipient, please let us know by e-mail reply and delete it from your system; do not copy/save this e-mail or disclose its contents to anyone. E-mail transmissions cannot be guaranteed to be secure or error-free as the transmission could be interrupted, corrupted, lost, destroyed, altered, arrive late or contain viruses. ObjectWave does not accept liability for any errors or omissions in the contents of this e-mail which arise as a result of e-mail transmission. The views expressed in this e-mail do not necessarily reflect those of ObjectWave or its affiliates.
Re: suggestion on fixing error
- Forwarded message from James Taylor <[EMAIL PROTECTED]> - Date: Wed, 1 Jun 2005 14:25:04 +0100 From: James Taylor <[EMAIL PROTECTED]> Reply-To: James Taylor <[EMAIL PROTECTED]> Subject: Re: suggestion on fixing error To: Jeff <[EMAIL PROTECTED]> Hi Jeff thanks for your reply, surely the different versions of axis.jar should only be in TOMCAT_HOME\common\lib or in TOMCAT_HOME\webapps\axis\WEB-INF\lib and all other of axis.jar are not visible if they are not set in the classpath? The reason I'm saying this is that I have a backup of axis on my system but I have no classpath env set. This is a listing of TOMCAT_HOME\common\lib - Directory of C:\Program Files\Apache\jakarta-tomcat-4.1.31\common\lib 01/06/2005 11:55 . 01/06/2005 11:55 .. 25/09/2004 12:3454,829 activation.jar 16/07/2004 09:53 999,966 ant.jar 25/09/2004 12:34 8,412 ant-launcher.jar 25/09/2004 12:3414,544 catalina-ant.jar 25/09/2004 12:34 165,119 commons-collections.jar 25/09/2004 12:34 100,776 commons-dbcp-1.1.jar 25/09/2004 12:3422,327 commons-logging-api.jar 25/09/2004 12:3439,523 commons-pool-1.1.jar 25/09/2004 12:34 181,624 jasper-compiler.jar 25/09/2004 12:3472,417 jasper-runtime.jar 25/09/2004 12:34 6,727 jdbc2_0-stdext.jar 25/09/2004 12:3498,496 jndi.jar 25/09/2004 12:34 8,639 jta.jar 25/09/2004 12:34 327,603 mail.jar 14/04/2005 22:44 409,191 mysql-connector-java-3.1.8-bin.jar 25/09/2004 12:3427,986 naming-common.jar 25/09/2004 12:3417,946 naming-factory.jar 25/09/2004 12:3438,407 naming-resources.jar 25/09/2004 12:3477,987 servlet.jar 19 File(s) 2,672,519 bytes 2 Dir(s) 13,274,218,496 bytes free and here is a listing of TOMCAT_HOME\webapps\axis\WEB-INF\lib - Directory of C:\Program Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF \lib 01/06/2005 14:11 . 01/06/2005 14:11 .. 16/11/2004 13:02 1,400,426 axis.jar 16/11/2004 13:0230,082 axis-ant.jar 16/11/2004 13:0274,527 commons-discovery.jar 16/11/2004 13:0231,605 commons-logging.jar 01/06/2005 14:08 6,264 flightservice.jar 17/10/2001 16:5823,317 jaxm.jar 16/11/2004 13:0231,191 jaxrpc.jar 16/11/2004 13:02 352,668 log4j-1.2.8.jar 16/11/2004 13:0218,978 saaj.jar 29/03/2005 13:4527,479 saaj-api.jar 29/03/2005 13:45 559,095 saaj-impl.jar 16/11/2004 13:02 120,280 wsdl4j.jar 20/02/2004 13:47 997,276 xalan.jar 16/05/2005 16:29 1,016,979 xerces.jar 20/02/2004 13:47 124,724 xml-apis.jar 15 File(s) 4,814,891 bytes 2 Dir(s) 13,274,218,496 bytes free and this is what my env variable look like - C:\Program Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\lib>set ALLUSERSPROFILE=C:\Documents and Settings\All Users ANT_HOME=C:\Program Files\Apache\apache-ant-1.6.2 APPDATA=C:\Documents and Settings\taylorjw\Application Data CATALINA_HOME=C:\Program Files\Apache\jakarta-tomcat-4.1.31 CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME= ComSpec=C:\WINDOWS\system32\cmd.exe FP_NO_HOST_CHECK=NO HOMEDRIVE=S: HOMEPATH=\ HOMESHARE=\\ntserver-quota\studentt\taylorjw JAVA_HOME=C:\Program Files\Java\jdk1.5.0_01 LOGONSERVER=\\WINAD06 NUMBER_OF_PROCESSORS=1 OS=Windows_NT Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Program Files\Ja va\jdk1.5.0_01\bin;C:\Program Files\Apache\jakarta-tomcat-4.1.31\bin;C:\Program Files\Apache\apache-ant-1.6.2\bin;C:\Program Files\Dos Tools\Fport-2.0;C:\Progra m Files\mysql\mysql-4.1.12-win32\bin; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 6 Model 10 Stepping 0, AuthenticAMD PROCESSOR_LEVEL=6 PROCESSOR_REVISION=0a00 ProgramFiles=C:\Program Files PROMPT=$P$G SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\taylorjw\LOCALS~1\Temp TMP=C:\DOCUME~1\taylorjw\LOCALS~1\Temp USERDNSDOMAIN= USERDOMAIN= USERNAME=taylorjw USERPROFILE=C:\Documents and Settings\taylorjw windir=C:\WINDOWS hope that helps you in some way Jeff. == Reply to: It looks like there could be different versions of Axis competing for the attention of Xerces on its classpath. Search for all occurrences of axis.jar and try to eliminate all but the one in .../webapps/axis/WEB-INF/lib Jeff - Original Message - From: "James Taylor" <[EMAIL PROTECTED]> To: Sent: Wednesday, June 01, 2005 7:06 AM Subject: suggestions on fixing error? I'm getting this annoying error back from an axis deployed web service and would like to hear
Re: suggestions on fixing error?
It looks like there could be different versions of Axis competing for the attention of Xerces on its classpath. Search for all occurrences of axis.jar and try to eliminate all but the one in .../webapps/axis/WEB-INF/lib Jeff - Original Message - From: "James Taylor" <[EMAIL PROTECTED]> To: Sent: Wednesday, June 01, 2005 7:06 AM Subject: suggestions on fixing error? I'm getting this annoying error back from an axis deployed web service and would like to hear any suggestions people have to find out what's causing it HTTP/1.1 500 Internal Server Error Content-Type: text/html;charset=ISO-8859-1 Content-Language: en-IE Date: Wed, 01 Jun 2005 11:00:36 GMT Server: Apache-Coyote/1.1 Connection: close Apache Tomcat/4.1.31 - Error report HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:222) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:595) root cause java.lang.IncompatibleClassChangeError at org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1387) at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:118) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationCo ntext.java:1083) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc her.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLPars
Re: Error in deserialization
Hello, I've tried that but i get a type mismatch error - connot convert a String to EndUserIdentifier Thanks for your help From: Anne Thomas Manes <[EMAIL PROTECTED]> Reply-To: Anne Thomas Manes <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Subject: Re: Error in deserialization Date: Wed, 1 Jun 2005 08:19:36 -0400 Very simple. Change these statements: String callingparty = "tel:+440123456789;vnd.bt.cli-presentation=available";; String calledparty = "tel:+440123456789;vnd.bt.cli-presentation=available";; to this: EndUserIdentifier callingparty = "tel:+440123456789;vnd.bt.cli-presentation=available";; EndUserIdentifier calledparty = "tel:+440123456789;vnd.bt.cli-presentation=available";; Anne On 5/31/05, Plorks mail <[EMAIL PROTECTED]> wrote: > Hi Anne, > > I've created stubs as you have suggested and I have 4 packages with several > java in each > > There one java file EndUserIdentifier.java > > I've then looked at the method i'm trying to call (makeACall) that look like > this : > > public String makeACall(EndUserIdentifier callingParty, EndUserIdentifier > calledParty, String charging) > > The parameters i'm trying to pass are : > > callingParty = "tel:+44123456789;vnd.bt.cli-presentation=available";; > calledParty = "tel:+44123456789;vnd.bt.cli-presentation=available";; > String charging ="9F" > > By looking at the method callingParty and calledParty must be of type > EndUserIdentifier, I think this is my problem, I am passing these values in > as Strings but I must pass them in as EndUserIdentifier types but i'm not > sure how i convert to this > > Am i looking in the right direction? Can you help me convert my > callingParty and calledParty to type EndUserIdentifier? > > Thanks very much for your help > > > > > > > > >From: Anne Thomas Manes <[EMAIL PROTECTED]> > >Reply-To: Anne Thomas Manes <[EMAIL PROTECTED]> > >To: axis-user@ws.apache.org > >Subject: Re: Error in deserialization > >Date: Tue, 31 May 2005 08:34:38 -0400 > > > >Kumar, > > > >This WSDL imports another WSDL and two schemas. Can you send us those also? > >Also, can you tell us how you built and configured your client? I > >noticed that you're using the call interface. Have you tryied creating > >a stub client and invoking operations on the stub? > > > >Anne > > > >On 5/31/05, Plorks mail <[EMAIL PROTECTED]> wrote: > > > Hello again > > > > > > Sorry clicked send too soon > > > > > > In the 2nd WSDL there's another reference to a WSDL, heres that WSDL > > > > > > Thanks for any help you can ofer, much apreciated > > > > > > P > > > > > > > > > > > > - > > > - > > > targetNamespace="http://www.csapi.org/wsdl/parlayx/common_faults/v1_0"; > > > xmlns="http://schemas.xmlsoap.org/wsdl/"; > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";> > > > - > > > > > > > > > - > > > > > > > > > - > > > > > > > > > - > > > > > > > > > - > > > > > > > > > - > > > > > > > > > > > > > > > > > > > > > >From: Anne Thomas Manes <[EMAIL PROTECTED]> > > > >Reply-To: Anne Thomas Manes <[EMAIL PROTECTED]> > > > >To: axis-user@ws.apache.org > > > >Subject: Re: Error in deserialization > > > >Date: Sat, 28 May 2005 17:36:15 -0400 > > > > > > > >Kumar, > > > > > > > >The WSDL you sent me contains this import: > > > > > > > > > > > > >namespace="http://www.csapi.org/wsdl/parlayx/third_party_calling/v1_0/service_port"; > > > >location="parlayx_third_party_calling_service_port.wsdl" /> > > > > > > > >This imported WSDL contains the , , and > > > >definitions. I need to see this WSDL to answer your questions. > > > > > > > >Anne > > > > > > > >On 5/28/05, Plorks mail <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > Sorry about the sending, i just clicked reply, didn't notice it > >wasn't > > > >the > > > > > axis-user > > > > > > > > > > What do you mean by the imported WSDL document? > > > > > > > > > > Many thanks for nay help > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >We also need the imported WSDL document. > > > > > > > > > > > >One problem I noticed with this WSDL is that it uses "rpc" style, > >but > > > > > >it doesn't specify a namespace attribute in the > > > > > >descriptions. > > > > > > > > > > > >Thanks, > > > > > >Anne > > > > > > > > > > > >On 5/27/05, Plorks mail <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > Here is the WSDL > > > > > > > > > > > > > > Thanks for any help > > > > > > > > > > > > > > > > > > > > > > > > > > > > - > > > > > > > - > > > > > > > > > > > > > > > > > >targetNamespace="http://www.csapi.org/wsdl/parlayx/third_party_calling/v1_0/service"; > > > > > > > xmlns="http://schemas.xmlsoap.org/wsdl/"; > > > > > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; > > > > > > > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; > > > > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > > > > > > > > > > > > > > > >
Re: Error in deserialization
Very simple. Change these statements: String callingparty = "tel:+440123456789;vnd.bt.cli-presentation=available";; String calledparty = "tel:+440123456789;vnd.bt.cli-presentation=available";; to this: EndUserIdentifier callingparty = "tel:+440123456789;vnd.bt.cli-presentation=available";; EndUserIdentifier calledparty = "tel:+440123456789;vnd.bt.cli-presentation=available";; Anne On 5/31/05, Plorks mail <[EMAIL PROTECTED]> wrote: > Hi Anne, > > I've created stubs as you have suggested and I have 4 packages with several > java in each > > There one java file EndUserIdentifier.java > > I've then looked at the method i'm trying to call (makeACall) that look like > this : > > public String makeACall(EndUserIdentifier callingParty, EndUserIdentifier > calledParty, String charging) > > The parameters i'm trying to pass are : > > callingParty = "tel:+44123456789;vnd.bt.cli-presentation=available";; > calledParty = "tel:+44123456789;vnd.bt.cli-presentation=available";; > String charging ="9F" > > By looking at the method callingParty and calledParty must be of type > EndUserIdentifier, I think this is my problem, I am passing these values in > as Strings but I must pass them in as EndUserIdentifier types but i'm not > sure how i convert to this > > Am i looking in the right direction? Can you help me convert my > callingParty and calledParty to type EndUserIdentifier? > > Thanks very much for your help > > > > > > > > >From: Anne Thomas Manes <[EMAIL PROTECTED]> > >Reply-To: Anne Thomas Manes <[EMAIL PROTECTED]> > >To: axis-user@ws.apache.org > >Subject: Re: Error in deserialization > >Date: Tue, 31 May 2005 08:34:38 -0400 > > > >Kumar, > > > >This WSDL imports another WSDL and two schemas. Can you send us those also? > >Also, can you tell us how you built and configured your client? I > >noticed that you're using the call interface. Have you tryied creating > >a stub client and invoking operations on the stub? > > > >Anne > > > >On 5/31/05, Plorks mail <[EMAIL PROTECTED]> wrote: > > > Hello again > > > > > > Sorry clicked send too soon > > > > > > In the 2nd WSDL there's another reference to a WSDL, heres that WSDL > > > > > > Thanks for any help you can ofer, much apreciated > > > > > > P > > > > > > > > > > > > - > > > - > > targetNamespace="http://www.csapi.org/wsdl/parlayx/common_faults/v1_0"; > > > xmlns="http://schemas.xmlsoap.org/wsdl/"; > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";> > > > - > > > > > > > > > - > > > > > > > > > - > > > > > > > > > - > > > > > > > > > - > > > > > > > > > - > > > > > > > > > > > > > > > > > > > > > >From: Anne Thomas Manes <[EMAIL PROTECTED]> > > > >Reply-To: Anne Thomas Manes <[EMAIL PROTECTED]> > > > >To: axis-user@ws.apache.org > > > >Subject: Re: Error in deserialization > > > >Date: Sat, 28 May 2005 17:36:15 -0400 > > > > > > > >Kumar, > > > > > > > >The WSDL you sent me contains this import: > > > > > > > > > > > > >namespace="http://www.csapi.org/wsdl/parlayx/third_party_calling/v1_0/service_port"; > > > >location="parlayx_third_party_calling_service_port.wsdl" /> > > > > > > > >This imported WSDL contains the , , and > > > >definitions. I need to see this WSDL to answer your questions. > > > > > > > >Anne > > > > > > > >On 5/28/05, Plorks mail <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > Sorry about the sending, i just clicked reply, didn't notice it > >wasn't > > > >the > > > > > axis-user > > > > > > > > > > What do you mean by the imported WSDL document? > > > > > > > > > > Many thanks for nay help > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >We also need the imported WSDL document. > > > > > > > > > > > >One problem I noticed with this WSDL is that it uses "rpc" style, > >but > > > > > >it doesn't specify a namespace attribute in the > > > > > >descriptions. > > > > > > > > > > > >Thanks, > > > > > >Anne > > > > > > > > > > > >On 5/27/05, Plorks mail <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > Here is the WSDL > > > > > > > > > > > > > > Thanks for any help > > > > > > > > > > > > > > > > > > > > > > > > > > > > - > > > > > > > - > > > > > > > > > > > > > > > > > >targetNamespace="http://www.csapi.org/wsdl/parlayx/third_party_calling/v1_0/service"; > > > > > > > xmlns="http://schemas.xmlsoap.org/wsdl/"; > > > > > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; > > > > > > > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; > > > > > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > > > > > > > > > > > > > > > > > > >xmlns:tns="http://www.csapi.org/wsdl/parlayx/third_party_calling/v1_0/service"; > > > > > > > > > > > > > > > > > > >xmlns:port="http://www.csapi.org/wsdl/parlayx/third_party_calling/v1_0/service_port";> > > > > > > >> > > > > > > > > > > > > > > > > >namespace="http://www.csapi.org/wsdl/parlayx/third_party_calling/v1_0/service_por
AW: Java2WSDL options
Hallo Anne, Thanks for your reply I'am using eclipse do you know where I can set this option in eclipse? -Ursprüngliche Nachricht- Von: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 1. Juni 2005 13:59 An: axis-user@ws.apache.org Betreff: Re: Java2WSDL options Compile your class in debug mode. On 6/1/05, Ferruh Zamangoer <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > is it possible when I use the Java2WSDL to generate my WSDL Document to > take over the attributes names. When I generate the WSDL file from the > following interface: > > > >public boolean unlockAccount(String pseudonym) > > throws RemoteException, ConfuocoException; > > > > > > > > > > > > > > > > > > I see in the wsdl file name="in0" and have to edit it manually to the right > name. Are there any options to take over the right names? > > > > Thanks for any help. > > > > Regards > > Ferruh
Re: Java2WSDL options
Compile your class in debug mode. On 6/1/05, Ferruh Zamangoer <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > is it possible when I use the Java2WSDL to generate my WSDL –Document to > take over the attributes names. When I generate the WSDL file from the > following interface: > > > >public boolean unlockAccount(String pseudonym) > > throws RemoteException, ConfuocoException; > > > > > > > > > > > > > > > > > > I see in the wsdl file name="in0" and have to edit it manually to the right > name. Are there any options to take over the right names? > > > > Thanks for any help. > > > > Regards > > Ferruh
Re: Return Type of XML
If you treat your XML fragment as a string, then Axis will treat as an opaque string and escape it. If you don't want Axis to escape it, you will have to use the messaging API and add the XML fragment to the SOAP message body programmatically. Alternatively, you can return the XML fragment as an attachment. Anne On 6/1/05, Venkat Reddy <[EMAIL PROTECTED]> wrote: > > How can I include an external schema in the WSDL generated by Axis? > > In the WSDD file, specify a location for wsdl file which inturn may > import an external schema. > example: > > /srv/webapps/axis/order-message.wsdl > - - - - - - - - > > > > What is the proper return type so the retrieved XML shows up in the SOAP > > message properly > > What kind of problem did you face while using java.lang.String as the > return type for your service method? > > - venkat > > > On 6/1/05, Marc Rabil <[EMAIL PROTECTED]> wrote: > > > > > > We are designing a web service that will connect to a back-end system and > > retrieve a chunk of XML and will simply return that XML. The .JWS definition > > may look something like this: > > > > > > > > public class CallBackendSystem { > > > > public String invoke(String arg1, String arg2) { > > > > String xmlString = // contact another system and retrieve XML > > > > return xmlString; > > > > } > > > > } > > > > > > > > We want the returned XML to be part of the SOAP body in the normal way (not > > escaped, or in a CDATA, etc.). We also want to include the XML schema > > (which we have from the back-end system) in the WSDL for this service. In > > short, we would like this web service to look to the outside world like it > > was all generated from the same system. > > > > > > > > Here are my questions: > > > > > > How can I include an external schema in the WSDL generated by Axis? > > What is the proper return type so the retrieved XML shows up in the SOAP > > message properly > > > > > > > > Any help or advice will be greatly appreciated. > > > > > > > > Marc >
passing type EndUserIdentifier
Hi all I've created stubs from a remote wsdl file, and one of the java files it's created is the EndUserIdentifier.java I now want to call a method The method accepts 3 parameteres of type EndUserIdentifier , EndUserIdentifier , String My question is how to i create a type EndUserIdentifier to pass to the method? I want to pass this Param 1. "tel:+44123456;vnd.bt.cli-presentation=available";, Param 2. "tel:+44145678;vnd.bt.cli-presentation=available";, Param 3. "9F" Thanks for any help public class EndUserIdentifier implements java.io.Serializable { private org.apache.axis.types.URI value; public EndUserIdentifier() { } public org.apache.axis.types.URI getValue() { return value; } public void setValue(org.apache.axis.types.URI value) { this.value = value; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof EndUserIdentifier)) return false; EndUserIdentifier other = (EndUserIdentifier) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.value==null && other.getValue()==null) || (this.value!=null && this.value.equals(other.getValue(; __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getValue() != null) { _hashCode += getValue().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(EndUserIdentifier.class); static { typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.csapi.org/schema/parlayx/common/v1_0";, "EndUserIdentifier")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("value"); elemField.setXmlName(new javax.xml.namespace.QName("", "value")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema";, "anyURI")); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } } _ Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters
suggestions on fixing error?
I'm getting this annoying error back from an axis deployed web service and would like to hear any suggestions people have to find out what's causing it HTTP/1.1 500 Internal Server Error Content-Type: text/html;charset=ISO-8859-1 Content-Language: en-IE Date: Wed, 01 Jun 2005 11:00:36 GMT Server: Apache-Coyote/1.1 Connection: close Apache Tomcat/4.1.31 - Error report HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:222) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:595) root cause java.lang.IncompatibleClassChangeError at org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1387) at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:118)at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1083) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.apache.axis.encoding.DeserializationContext.pa
Re: Return Type of XML
> How can I include an external schema in the WSDL generated by Axis? In the WSDD file, specify a location for wsdl file which inturn may import an external schema. example: /srv/webapps/axis/order-message.wsdl - - - - - - - - > What is the proper return type so the retrieved XML shows up in the SOAP > message properly What kind of problem did you face while using java.lang.String as the return type for your service method? - venkat On 6/1/05, Marc Rabil <[EMAIL PROTECTED]> wrote: > > > We are designing a web service that will connect to a back-end system and > retrieve a chunk of XML and will simply return that XML. The .JWS definition > may look something like this: > > > > public class CallBackendSystem { > > public String invoke(String arg1, String arg2) { > > String xmlString = // contact another system and retrieve XML > > return xmlString; > > } > > } > > > > We want the returned XML to be part of the SOAP body in the normal way (not > escaped, or in a CDATA, etc.). We also want to include the XML schema > (which we have from the back-end system) in the WSDL for this service. In > short, we would like this web service to look to the outside world like it > was all generated from the same system. > > > > Here are my questions: > > > How can I include an external schema in the WSDL generated by Axis? > What is the proper return type so the retrieved XML shows up in the SOAP > message properly > > > > Any help or advice will be greatly appreciated. > > > > Marc
Return Type of XML
We are designing a web service that will connect to a back-end system and retrieve a chunk of XML and will simply return that XML. The .JWS definition may look something like this: public class CallBackendSystem { public String invoke(String arg1, String arg2) { String xmlString = // contact another system and retrieve XML return xmlString; } } We want the returned XML to be part of the SOAP body in the normal way (not escaped, or in a CDATA, etc.). We also want to include the XML schema (which we have from the back-end system) in the WSDL for this service. In short, we would like this web service to look to the outside world like it was all generated from the same system. Here are my questions: How can I include an external schema in the WSDL generated by Axis? What is the proper return type so the retrieved XML shows up in the SOAP message properly Any help or advice will be greatly appreciated. Marc
int and integer TypeMapping
Or is there any possibility to change type pefore deserializing in all requests using handlers? Marko K From: Marko Käis [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 01, 2005 10:55 AM To: axis-user@ws.apache.org Subject: int and integer TypeMapping Hi Because of converting from XML-RPC to SOAP I have to accept both int and integer types, but axis serializes int as java.lang.Integer and integer as java.math.BigInteger. How can I tell axis to serialize both types, say, into java.lang.Integer? My current (generated) wsdd looks like this: xmlns:ns="http://namespace/myname " qname="ns:Query1_request" type="java:myNameSpace.Query1_request" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> So the element in question is a bean field. Example of error when user_code’s type is int: - Could not convert java.lang.Integer to bean field 'user_code', type java.math.BigInteger Marko K
Java2WSDL options
Hi, is it possible when I use the Java2WSDL to generate my WSDL –Document to take over the attributes names. When I generate the WSDL file from the following interface: public boolean unlockAccount(String pseudonym) throws RemoteException, ConfuocoException; I see in the wsdl file name="in0" and have to edit it manually to the right name. Are there any options to take over the right names? Thanks for any help. Regards Ferruh
int and integer TypeMapping
Hi Because of converting from XML-RPC to SOAP I have to accept both int and integer types, but axis serializes int as java.lang.Integer and integer as java.math.BigInteger. How can I tell axis to serialize both types, say, into java.lang.Integer? My current (generated) wsdd looks like this: xmlns:ns="http://namespace/myname " qname="ns:Query1_request" type="java:myNameSpace.Query1_request" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> So the element in question is a bean field. Example of error when user_code’s type is int: - Could not convert java.lang.Integer to bean field 'user_code', type java.math.BigInteger Marko K
AW: Client authenticaion using certificates
Hello Ephemeris, thanks for your answer. I found a nice description at http://www-106.ibm.com/developerworks/webservices/library/ws-sec1.html . That's the same way you told me :-) --> server configuration and keystore property. Tanks! -Ursprüngliche Nachricht- Von: Ephemeris Lappis [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 31. Mai 2005 20:23 An: axis-user@ws.apache.org Betreff: RE: Client authenticaion using certificates If your server application is a J2EE web application, just configure your application server security service (the realm in Tomcat for example), to handle your client certificates, and just use the principal and roles in your web service server code. For the client code, i suppose you have to set up your HTTPS connection with the right keystore and ssl factory... In my opinion, your web service client code should not be aware of this security aspects, as it just use the endpoint URL to address requests, with no security or network knowledge... -- Ephemeris Lappis >>> -Original Message- >>> From: Christian Kunert [mailto:[EMAIL PROTECTED] >>> Sent: Tuesday, May 31, 2005 4:56 PM >>> To: axis-user@ws.apache.org >>> Subject: Client authenticaion using certificates >>> >>> >>> Hello everybody, >>> >>> I'm trying to create a client which uses certificate authentication. I >>> have a cert-file but I really don't know how the use it. Sorry, but I'm >>> a axis-newbie :-) >>> Should anybody show me a little workaround how to authenticate with this >>> certificate? >>> >>> Christian >>> Thanks! >>>