Re: [AXIS2] Service specific modules/handlers!
Thanks for the reply.. does clear the clouds!Ajith Ranabahu <[EMAIL PROTECTED]> wrote: Hi Vicky,Service specific handlers is an old concept and definitely not the recommended practice. However it's kept as a deprecated feature and I'll explain to you how it works.You can put a handler in the services.xml refering to the fuly qualified class name of the handler. This handler can be included along with the service classes (or theoretically even in the libs, when packed into a jar). The handler entry in the services.xml should have the necessary parameters filled such as the phase attributes. Once the service is deployed, the handler(s) mentioned in the services.xml will be deployed at the mentioned phases.This is however slightly cofusing since deploying services deploys handlers as well. So the recommended way is to make a module with the necessary handlers and the capability to add handlers in services will be completely removed in the next release.Hope that answers your doubt :D On 9/27/05, vicky axis <[EMAIL PROTECTED]> wrote: Hello everyone.. Just a minor doubt.. I came across the term "service-specific handlers". Is it just a way of referring to the tags that can be present in service.xml or we can actually put the handlers in the service archive. If the latter case is correct, then where and how do we specify the phase to which the handler belongs?? Whats the directory structure?? Thanks for the reply in advance... Will be a great help in underatanding the fine-prints of axis2! Yahoo! for GoodClick here to donate to the Hurricane Katrina relief effort. -- Ajith Ranabahu Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort.
Re: [AXIS2] Service specific modules/handlers!
Hi Vicky, Service specific handlers is an old concept and definitely not the recommended practice. However it's kept as a deprecated feature and I'll explain to you how it works. You can put a handler in the services.xml refering to the fuly qualified class name of the handler. This handler can be included along with the service classes (or theoretically even in the libs, when packed into a jar). The handler entry in the services.xml should have the necessary parameters filled such as the phase attributes. Once the service is deployed, the handler(s) mentioned in the services.xml will be deployed at the mentioned phases. This is however slightly cofusing since deploying services deploys handlers as well. So the recommended way is to make a module with the necessary handlers and the capability to add handlers in services will be completely removed in the next release. Hope that answers your doubt :D On 9/27/05, vicky axis <[EMAIL PROTECTED]> wrote: Hello everyone.. Just a minor doubt.. I came across the term "service-specific handlers". Is it just a way of referring to the tags that can be present in service.xml or we can actually put the handlers in the service archive. If the latter case is correct, then where and how do we specify the phase to which the handler belongs?? Whats the directory structure?? Thanks for the reply in advance... Will be a great help in underatanding the fine-prints of axis2! Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -- Ajith Ranabahu
[AXIS2] Service specific modules/handlers!
Hello everyone.. Just a minor doubt.. I came across the term "service-specific handlers". Is it just a way of referring to the tags that can be present in service.xml or we can actually put the handlers in the service archive. If the latter case is correct, then where and how do we specify the phase to which the handler belongs?? Whats the directory structure?? Thanks for the reply in advance... Will be a great help in underatanding the fine-prints of axis2! Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort.
ServiceLifecycle destroy() not called
I've implemented a simple service similar to what's listed below with the wsdd setting of Although I see that the ServiceLifecycle init() method is called each time a new session is created destroy() is never invoked upon session invalidation. Shortly after calling logout() which invalidates the session I expected axis to have unloaded the service class instance and in doing so call destroy(). At what point will destroy() be invoked? public class MyService implements ServiceLifecycle { public void init(Object obj) { System.out.println("Init Called"); } public void doWork() { // do something ... } public void logout() { MessageContext ctx = MessageContext.getCurrentContext(); Session session = ctx.getSession(); session.invalidate(); } public void destroy() { System.out.println("Destroy Called"); } } Thanks, -mike
Web service receiving and returning org.w3c.dom.Element
Hello all, Does anyone have a real example of a web service that receives and returns an org.w3c.dom.Element? I created one, but doesn’t work! :’- Always I get this error: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. My web service is just this: import org.w3c.dom.Element; public class ElementWS { public Element method(Element e){ return e; } } And my wsdd is: xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> qname="myNS:Element" xmlns:myNS="urn:ElementWS" languageSpecificType="java:org.w3c.dom.Element" deserializer="org.apache.axis.encoding.ser.ElementDeserializerFactory" serializer="org.apache.axis.encoding.ser.ElementSerializerFactory"/> In my client I used registerTypeMapping too. This is a piece of my client: … DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document documentXML = builder.parse("People.xml"); Element e = documentXML.getDocumentElement(); Object[] params = {e}; Service service = new Service(); QName qnElement = new QName("urn:ElementWS", "Element"); Call call = (Call) service.createCall(); call.registerTypeMapping(Element.class, qnElement , new org.apache.axis.encoding.ser.ElementSerializerFactory(), new org.apache.axis.encoding.ser.ElementDeserializerFactory()); call.setTargetEndpointAddress( new java.net.URL(urlWS) ); call.setOperationName( new QName(urlWS, "method") ); Element ele = (Element) call.invoke(params); System.out.println(ele); Does anyone can see why I’m getting this error? Thanks very, very, very, very much!! Fabrício.
Re: Axis or Eclipse error?
Thanks for your reply. I should've said in my original post that I had already imported the axis.jar as a Library on my project.On 9/26/05, Tootell, James <[EMAIL PROTECTED]> wrote: Yes, Eclipse projects use their own classpaths. Look under Project Properties >> Java Build Path >> Libraries to see which Axis jar the IDE is pointing at. Jim Tootell System Design, Development, & Integration Department A nteon Corporation 2251 San Diego Ave. Suite A240 San Diego, CA 92110(619) 542-0240 x123 mailto:[EMAIL PROTECTED] There are 10 kinds of people: those who understand binary and those who don't. From: Brian Preston [mailto:[EMAIL PROTECTED]] Sent: Monday, September 26, 2005 12:54 PMTo: axis-user@ws.apache.orgSubject: Axis or Eclipse error? I'm trying to use the Call.invoke(SoapEnvelope) method. I'm using =Eclipse. I'm getting the compile error :The method invoke(QName, Ob=ject[]) in the type Call is not applicable for the arguments(SOAPEnvelope).= But the code helper listed several invoke methods, including the one with =SOAPEnveloper.Also, in the package explorer view, I can open the axis.jar down to= the Call class and see the various invoke() methods, including invoke(SOAP=Enveloper).Why is the compiler not finding this method? It seems li=ke a classpath issue, or it's looking at an older version of the=20axis.jar. I was using an older one, and then downloaded the latest one with= the newer invoke methods.I've looked in my system classpath and it='s not there. Is there another classpath that Eclipse uses, that overrides =the project classpath settings?
Help with Simple Axis Server
I am using the simple axis user to become familiar with Axis. I am able to deploy services however when I try to view their wsdl through a web browser I receive the following exception: The AXIS engine could not find a target service to invoke! targetService is null at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:475) at org.apache.axis.transport.http.SimpleAxisWorker.execute(SimpleAxisWorker.java:328) at org.apache.axis.transport.http.SimpleAxisWorker.run(SimpleAxisWorker.java:155) at java.lang.Thread.run(Thread.java:595) I seem to have everything configured correctly. I receive this error for both Axis (AdminService,Version) s well as my own services. Below is my server-config.wsdd, any help would greatly appreciated. Tim McClure http://xml.apache.org/axis/wsdd/"; xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";> http://xml.apache.org/axis/wsdd/ http://server.media.security.ge.com/webservices/";> http://www.w3.org/2001/XMLSchema"/> http://www.w3.org/2001/XMLSchema"/> http://www.w3.org/2001/XMLSchema"/> http://www.w3.org/2001/XMLSchema"/> http://server.media.security.ge.com/webservices/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://server.media.security.ge.com/webservices/"/> http://server.media.security.ge.com/webservices/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://server.media.security.ge.com/webservices/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://server.media.security.ge.com/webservices/";> http://www.w3.org/2001/XMLSchema"/> http://server.media.security.ge.com/webservices/";> http://www.w3.org/2001/XMLSchema"/> http://server.media.security.ge.com/webservices/";> http://www.w3.org/2001/XMLSchema"/> http://www.w3.org/2001/XMLSchema"/> http://www.w3.org/2001/XMLSchema"/> http://server.media.security.ge.com/webservices/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";> http://server.media.security.ge.com/webservices/"/> http://server.media.security.ge.com/webservices/"/> http://server.media.security.ge.com/webservices/"/> http://server.media.security.ge.com/webservices/"/> http://server.media.security.ge.com/webservices/"/> http://server.media.security.ge.com/webservices/"/>
RE: Axis or Eclipse error?
Yes, Eclipse projects use their own classpaths. Look under Project Properties >> Java Build Path >> Libraries to see which Axis jar the IDE is pointing at. Jim Tootell System Design, Development, & Integration Department Anteon Corporation 2251 San Diego Ave. Suite A240 San Diego, CA 92110(619) 542-0240 x123 mailto:[EMAIL PROTECTED] There are 10 kinds of people: those who understand binary and those who don't. From: Brian Preston [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 12:54 PMTo: axis-user@ws.apache.orgSubject: Axis or Eclipse error? I'm trying to use the Call.invoke(SoapEnvelope) method. I'm using =Eclipse. I'm getting the compile error :The method invoke(QName, Ob=ject[]) in the type Call is not applicable for the arguments(SOAPEnvelope).= But the code helper listed several invoke methods, including the one with =SOAPEnveloper.Also, in the package explorer view, I can open the axis.jar down to= the Call class and see the various invoke() methods, including invoke(SOAP=Enveloper).Why is the compiler not finding this method? It seems li=ke a classpath issue, or it's looking at an older version of the=20axis.jar. I was using an older one, and then downloaded the latest one with= the newer invoke methods.I've looked in my system classpath and it='s not there. Is there another classpath that Eclipse uses, that overrides =the project classpath settings?
SwA Instructions
I downloaded Axis1.2.1 package and deployed on Tomcat server. There is an swa folder under samples directory. I try to test the SwA(SOAP with Attachment) exmple. But I didn't see any README or instructions in swa folder how to deploy and run it. Anyone could give me a clue? Many thanks, Daniel
Boolean mismatch
Hi, I have these elements (among many others) in a WSDL that is used to generate client code using Axis 1.2.1: When I send a request to the gSOAP web service to modify the Enabled element: AddReplace true FlatRate I get this error message back: http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:unsp="urn:siemens-hiq8000"> http://schemas.xmlsoap.org/soap/encoding/" id="_0"> SOAP-ENV:Client Data type 'xsd:boolean' mismatch in element 'Enabled' I believe that the gSoap web service is expecting the Enabled element to be of type "unsp:Enabled", not "xsd:boolean". Is this a bug? Is there any way to get Axis to send it as type unsp:Enabled and not xsd:boolean? I am using Axis 1.2.1 & wsdl2Java for the SOAP client and gSoap 2.7 for the web service. The WSDL was generated with gSoap 2.4. Thanks, - Phil Philip G. Lawrence Siemens Network Convergence, LLC 271 Mill Road Chelmsford, MA 01824 978-923-3302
Axis or Eclipse error?
I'm trying to use the Call.invoke(SoapEnvelope) method. I'm using = Eclipse. I'm getting the compile error :The method invoke(QName, Ob= ject[]) in the type Call is not applicable for the arguments(SOAPEnvelope).= But the code helper listed several invoke methods, including the one with =SOAPEnveloper.Also, in the package explorer view, I can open the axis.jar down to= the Call class and see the various invoke() methods, including invoke(SOAP= Enveloper).Why is the compiler not finding this method? It seems li= ke a classpath issue, or it's looking at an older version of the=20 axis.jar. I was using an older one, and then downloaded the latest one with= the newer invoke methods.I've looked in my system classpath and it= 's not there. Is there another classpath that Eclipse uses, that overrides =the project classpath settings?
problems using wsdl2java on .net remoting wsdl
Hi, I need to access a .Net remoting object from java. I currently have a web service client (that connects to the remote object) that I used axis to create a java wrapper for -- i.e. I used the wsdl2java on the web service wsdl file. This works fine (without have to make any modifications to the wsdl) but the amout of data that is being passed is getting to be too large for the web service and perfomance is too slow. I have heard that you can use the wsdl2java tool directly on the remote server wsdl, and connect directly to the singleton from Java. But when I try this get the following error (error in red): C:\VisualStudioProjects\testJava>java org.apache.axis.wsdl.WSDL2Java http://localhost:8088/RATEngine.soap?WSDL{http://schemas.microsoft.com/clr/nsassem/RATLib/RATLib%2C%20Version%3D1.3.4.18022%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dc62454177e0166f9}Tree already exists{http://schemas.microsoft.com/clr/nsassem/RATLib/RATLib%2C%20Version%3D1.3.4.18022%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dc62454177e0166f9}FactorTree already exists{http://schemas.microsoft.com/clr/nsassem/RATLib/RATLib%2C%20Version%3D1.3.4.18022%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dc62454177e0166f9}IRCurve already exists{http://schemas.microsoft.com/clr/nsassem/RATLib/RATLib%2C%20Version%3D1.3.4.18022%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dc62454177e0166f9}CompositeSecurity already existsjava.io.IOException: Type {http://schemas.microsoft.com/clr/nsassem/System.Data.OleDb/System.Data%2C%20Version%3D1.0.5000.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089}OleDbConnection is referenced but not defined. at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:522) at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393) at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245) at java.lang.Thread.run(Unknown Source) How do I get it to recognize OleDbConnection etc.? Notice that in the wsdl there is an entry for OleDb (relevent lines in green) xml version='1.0' encoding='UTF-8'?>> This release includes the following features: > > Complete XML infoset support for AXIOM > AXIOM, a SOAP specific streaming XML infoset model for SOAP 1.1/1.2 messages > Support for one-way messaging and request response messaging > Modules, mechanism to extend the SOAP processing model > Archives based deployment model > WSDL2Java code generation tool for stub and skeltons > XML Beans based data binding support > Support for WS-Addressing, both the submission and final versions > Client API > REST web service support > HTTP transport support > SMTP transport support > TCP transport support > MTOM/SWA attachments support > SAAJ implementation > WS-Security support using WSS4J > Support for context hierarchy serialization > and numerous bug fixes after 0.91 release > > The release include following tools > > Admin Web App > WSDL2Java, eclipse Plugin/Command line version > Service Archive Wizard, eclipse Plugin > Module Archive Wizard, eclipse Plugin > Service Archive Wizard, IntelliJ IDEA Plugin > What's still to do? > > Please see a list of what we think needs doing - and please consider helping > out if you're interested & able! > > SOAP 1.1 and 1.2 validation > JAX-RPC 1.1/2.0 compliance > Implementation of other transports. e.g. JMS.. > WSDL Generation > Axis2 Databinding implementation > > Axis2 is taking shape, this 0.92 release is a glimpse of 1.0 that should be > comming soon. If you happen to have vision of how the next generation of the > Web Service should be, and like to contribute to Apache Axis2 please help us > to shape the Apache Axis2. Any contribution in the form of Coding, testing, > submiting improvements to the documentation, and reporting bugs are always > welcome. > > Thanks for your interest in Axis2! -- The Axis Development Team -- Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform
Re: [ANN] [Axis2] Axis2 0.92 Released
Please use the mirrors to download (may have to wait a few hours): http://www.apache.org/dyn/closer.cgi/ws/axis2/0_92/ thanks, dims On 9/26/05, Eran Chinthaka <[EMAIL PROTECTED]> wrote: > > You can download the release from: > > http://ws.apache.org/axis2/download.cgi > > What's in this release? > > This release includes the following features: > > Complete XML infoset support for AXIOM > AXIOM, a SOAP specific streaming XML infoset model for SOAP 1.1/1.2 messages > Support for one-way messaging and request response messaging > Modules, mechanism to extend the SOAP processing model > Archives based deployment model > WSDL2Java code generation tool for stub and skeltons > XML Beans based data binding support > Support for WS-Addressing, both the submission and final versions > Client API > REST web service support > HTTP transport support > SMTP transport support > TCP transport support > MTOM/SWA attachments support > SAAJ implementation > WS-Security support using WSS4J > Support for context hierarchy serialization > and numerous bug fixes after 0.91 release > > The release include following tools > > Admin Web App > WSDL2Java, eclipse Plugin/Command line version > Service Archive Wizard, eclipse Plugin > Module Archive Wizard, eclipse Plugin > Service Archive Wizard, IntelliJ IDEA Plugin > What's still to do? > > Please see a list of what we think needs doing - and please consider helping > out if you're interested & able! > > SOAP 1.1 and 1.2 validation > JAX-RPC 1.1/2.0 compliance > Implementation of other transports. e.g. JMS.. > WSDL Generation > Axis2 Databinding implementation > > Axis2 is taking shape, this 0.92 release is a glimpse of 1.0 that should be > comming soon. If you happen to have vision of how the next generation of the > Web Service should be, and like to contribute to Apache Axis2 please help us > to shape the Apache Axis2. Any contribution in the form of Coding, testing, > submiting improvements to the documentation, and reporting bugs are always > welcome. > > Thanks for your interest in Axis2! -- The Axis Development Team -- Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform
[ANN] [Axis2] Axis2 0.92 Released
You can download the release from: http://ws.apache.org/axis2/download.cgi What's in this release? This release includes the following features: Complete XML infoset support for AXIOM AXIOM, a SOAP specific streaming XML infoset model for SOAP 1.1/1.2 messages Support for one-way messaging and request response messaging Modules, mechanism to extend the SOAP processing model Archives based deployment model WSDL2Java code generation tool for stub and skeltons XML Beans based data binding support Support for WS-Addressing, both the submission and final versions Client API REST web service support HTTP transport support SMTP transport support TCP transport support MTOM/SWA attachments support SAAJ implementation WS-Security support using WSS4J Support for context hierarchy serialization and numerous bug fixes after 0.91 release The release include following tools Admin Web App WSDL2Java, eclipse Plugin/Command line version Service Archive Wizard, eclipse Plugin Module Archive Wizard, eclipse Plugin Service Archive Wizard, IntelliJ IDEA Plugin What's still to do? Please see a list of what we think needs doing - and please consider helping out if you're interested & able! SOAP 1.1 and 1.2 validation JAX-RPC 1.1/2.0 compliance Implementation of other transports. e.g. JMS.. WSDL Generation Axis2 Databinding implementation Axis2 is taking shape, this 0.92 release is a glimpse of 1.0 that should be comming soon. If you happen to have vision of how the next generation of the Web Service should be, and like to contribute to Apache Axis2 please help us to shape the Apache Axis2. Any contribution in the form of Coding, testing, submiting improvements to the documentation, and reporting bugs are always welcome. Thanks for your interest in Axis2! -- The Axis Development Team
RE: WSDL2Java and SSL
What I showed you runs on the client, not the server. Jim Tootell System Design, Development, & Integration Department Anteon Corporation 2251 San Diego Ave. Suite A240 San Diego, CA 92110(619) 542-0240 x123 mailto:[EMAIL PROTECTED] There are 10 kinds of people: those who understand binary and those who don't. From: Chris Hall [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 8:20 AMTo: axis-user@ws.apache.orgSubject: RE: WSDL2Java and SSL Thanks for your help James. Unfortunately, I am not running the server in question, only the client. So I can’t make the server permissive, I need to configure my (WSDL2Java) client correctly. Sorry if I was unclear!--Chris --- Chris: I ran into a similar problem and from what I could gather you onlyhave two choices but they depend on how concerned you are aboutcertificate authentication. You can either retrieve the certificate andmanually install it ahead of time (using keytool with the trustcacertsflag) or accept ALL certificates (which is what I had to do). Yourconnections will still be encrypted using SSL but there's noauthentication. There seems to be a flaw in JSSE that SSL certs cannot be dynamicallyimported AND used in the same JVM instance. To clarify, you candynamically install them but they won't be read until the JVM isrestarted. If you find a way around this, I'd love to hear about it. The solution for me was to create an "IndiscriminateTrustManager"that implements javax.net.ssl.TrustManager andjavax.net.ssl.X509TrustManager and hardwire all the boolean tests: public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } public boolean isServerTrusted( java.security.cert.X509Certificate[] certs) { return true; } public boolean isClientTrusted( java.security.cert.X509Certificate[] certs) { return true; } public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType) throws java.security.cert.CertificateException { return; } public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType) throws java.security.cert.CertificateException { return; } Then you have to modify org.apache.axis.components.net.JSSESocketFactoryto use IndiscriminateTrustManager. I have a method calledtrustAllHttpsCertificates as follows: private static void trustAllHttpsCertificates() throws Exception { //Create a trust manager that does not validate certificatechains: javax.net.ssl.TrustManager[] lTrustManagers = new javax.net.ssl.TrustManager[1]; javax.net.ssl.TrustManager lTrustManager = neworg.apache.axis.components.net.IndiscriminateTrustManager(); lTrustManagers[0] = lTrustManager; javax.net.ssl.SSLContext lSslContext = javax.net.ssl.SSLContext.getInstance("SSL"); lSslContext.init(null, lTrustManagers, null); javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory( lSslContext.getSocketFactory()); } Then, in JSSESocketFactory.init() and .create(), you have to calltrustAllHttpsCertificates. Hope this helps and, like I said, if you find a more elegant way aroundthis please let me know. Jim Tootell System Design, Development, & Integration Department Anteon Corporation 2251 San Diego Ave. Suite A240 San Diego, CA 92110(619) 542-0240 x123 mailto:[EMAIL PROTECTED] There are 10 kinds of people: those who understand binary and those who don't. From: Chris Hall [mailto:[EMAIL PROTECTED] Sent: Friday, September 23, 2005 10:06 AM To: axis-user@ws.apache.org Subject: WSDL2Java and SSL Hi all, I'd be very grateful for any help that you can offer mewith this issue. I'm writing code to interact with a WSDL specified web servicethat uses SSL certificates to verify that a given request is legitimate.That is, SSL is both used to create a secure connection against thirdparties, but also to establish trust in that connection between the twoparties. I've used WSDL2Java to create some client java code whichmakes the SOAP request. When I run this code, I get a not trusted type error from theserver, after SSL handshaking is correctly executed (I do not get ajavax.net.ssl.SSLHandshakeException). If I take the same SOAP requestand pipe it into an SSLSocket (that is, I take the generated SOAP fromthe WSDL2Java generated code and send it to the server with my ownsocket management code) I get a successful response from the server. Inboth cases the correct certificate is being put into the client'skeystore with java system properties. So there seems to be s
RE: WSDL2Java and SSL
Thanks for your help James. Unfortunately, I am not running the server in question, only the client. So I can’t make the server permissive, I need to configure my (WSDL2Java) client correctly. Sorry if I was unclear!--Chris --- Chris: I ran into a similar problem and from what I could gather you onlyhave two choices but they depend on how concerned you are aboutcertificate authentication. You can either retrieve the certificate andmanually install it ahead of time (using keytool with the trustcacertsflag) or accept ALL certificates (which is what I had to do). Yourconnections will still be encrypted using SSL but there's noauthentication. There seems to be a flaw in JSSE that SSL certs cannot be dynamicallyimported AND used in the same JVM instance. To clarify, you candynamically install them but they won't be read until the JVM isrestarted. If you find a way around this, I'd love to hear about it. The solution for me was to create an "IndiscriminateTrustManager"that implements javax.net.ssl.TrustManager andjavax.net.ssl.X509TrustManager and hardwire all the boolean tests: public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } public boolean isServerTrusted( java.security.cert.X509Certificate[] certs) { return true; } public boolean isClientTrusted( java.security.cert.X509Certificate[] certs) { return true; } public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType) throws java.security.cert.CertificateException { return; } public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType) throws java.security.cert.CertificateException { return; } Then you have to modify org.apache.axis.components.net.JSSESocketFactoryto use IndiscriminateTrustManager. I have a method calledtrustAllHttpsCertificates as follows: private static void trustAllHttpsCertificates() throws Exception { //Create a trust manager that does not validate certificatechains: javax.net.ssl.TrustManager[] lTrustManagers = new javax.net.ssl.TrustManager[1]; javax.net.ssl.TrustManager lTrustManager = neworg.apache.axis.components.net.IndiscriminateTrustManager(); lTrustManagers[0] = lTrustManager; javax.net.ssl.SSLContext lSslContext = javax.net.ssl.SSLContext.getInstance("SSL"); lSslContext.init(null, lTrustManagers, null); javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory( lSslContext.getSocketFactory()); } Then, in JSSESocketFactory.init() and .create(), you have to calltrustAllHttpsCertificates. Hope this helps and, like I said, if you find a more elegant way aroundthis please let me know. Jim Tootell System Design, Development, & Integration Department Anteon Corporation 2251 San Diego Ave. Suite A240 San Diego, CA 92110(619) 542-0240 x123 mailto:[EMAIL PROTECTED] There are 10 kinds of people: those who understand binary and those who don't. From: Chris Hall [mailto:[EMAIL PROTECTED] Sent: Friday, September 23, 2005 10:06 AM To: axis-user@ws.apache.org Subject: WSDL2Java and SSL Hi all, I'd be very grateful for any help that you can offer mewith this issue. I'm writing code to interact with a WSDL specified web servicethat uses SSL certificates to verify that a given request is legitimate.That is, SSL is both used to create a secure connection against thirdparties, but also to establish trust in that connection between the twoparties. I've used WSDL2Java to create some client java code whichmakes the SOAP request. When I run this code, I get a not trusted type error from theserver, after SSL handshaking is correctly executed (I do not get ajavax.net.ssl.SSLHandshakeException). If I take the same SOAP requestand pipe it into an SSLSocket (that is, I take the generated SOAP fromthe WSDL2Java generated code and send it to the server with my ownsocket management code) I get a successful response from the server. Inboth cases the correct certificate is being put into the client'skeystore with java system properties. So there seems to be something going wrong with how theWSDL2Java generated code sends the SOAP request, but not with how itcreates the SOAP and not with now it initiates the connection. Can anyone offer me any insight? Thanks so much, --Chris
RE: Basic Auth with SAAJ (JAXM) ?
Thanks, that worked. That leads to the next question, since that was so simple, where's the fine manual or rfc I should have read that would have told me that? Regards, Scott >-Original Message- >From: Davanum Srinivas [mailto:[EMAIL PROTECTED] >Sent: Friday, September 23, 2005 12:47 PM >To: axis-user@ws.apache.org >Subject: Re: Basic Auth with SAAJ (JAXM) ? > >try http://username:[EMAIL PROTECTED] > >On 9/22/05, Parnell, Scott <[EMAIL PROTECTED]> wrote: >> I need to use Basic Auth in a client I've written, but I >haven't found a >> way to do this when using the Axis implementation of javax.xml.soap >> classes. I thought I might be able to configure it on the URL (via >> URLConnection) that is passed into the SOAPConnection 'call' >method, but >> unfortunately, SOAPConnectionImpl does this: >> >> public SOAPMessage call(SOAPMessage request, Object endpoint) >> ... >> Call call = new Call(endpoint.toString()); >> >> which throws my configured URL away and makes a new one. As >far as I've >> been able to determine I don't have access to the underlying Call >> object, so none of the JAX-RPC configuration can be done either. Has >> anyone figured out how to do this? >> >> Regards, >> Scott >> > > >-- >Davanum Srinivas : http://wso2.com/ - Oxygenating The Web >Service Platform >
Re: (newbie) SAXException: SimpleDeserializer encountered a child element
Hi, I'm still investigating and debugging on this problem. I've discovered some facts that maybe can be useful to understand the problem (thank you for listening :-)) First of all, the error is server-side. The server receives a soap body like this: http://impl.ws.service.rc.nec";> http://stato.ws.model.rc.nec";> String String http://stato.ws.model.rc.nec";>1001 Then the DeserializationContext starts processing the body. The problem seems to be about the topHandler associated with the element. In fact it is a SimpleDeserializer, and when in the DeserializationContext is called SimpleDeserializer.startElement it raises an exception (SimpleDerializer does not support this operation). The topHandler associated with is a RPCHandler Logs: eu_rc] DEBUG [http-8080-Processor24] DeserializerImpl.onStartElement(431) | Deser got type {http://www.w3.org/2001/XMLSchema}string [eu_rc] DEBUG [http-8080-Processor24] NSStack.push(85) | NSPush (32) [eu_rc] DEBUG [http-8080-Processor24] DeserializationContext.startElement(1067) | Exit: DeserializationContext::startElement() [eu_rc] DEBUG [http-8080-Processor24] DeserializationContext.startElement(1003) | Enter: DeserializationContext::startElement(, username) [eu_rc] DEBUG [http-8080-Processor24] ProjectResourceBundle.handleGetObject(72) | org.apache.axis.i18n.resource::handleGetObject(cantHandle00) [eu_rc] DEBUG [http-8080-Processor24] ProjectResourceBundle.handleGetObject(72) | org.apache.axis.i18n.resource::handleGetObject(toAxisFault00) [eu_rc] DEBUG [http-8080-Processor24] enterprise.invoke(321) | Mapping Exception to AxisFault org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) at javax.s --- Filippo Diotalevi <[EMAIL PROTECTED]> ha scritto: > Hi, I tried also adding > elementFormDefault="qualified" > to the second schema but it does not work... > > The think is pretty weird because sometimes (well, > just the first time tomorrow) it works, but most of > the times I have the usual exception: > org.xml.sax.SAXException: SimpleDeserializer > encountered a child element, which is NOT expected, > in > something it was trying to deserialize > > filippo > > --- Anne Thomas Manes <[EMAIL PROTECTED]> ha > scritto: > > > The WSDL looks fine to me, and your input message > > looks like it conforms to > > the WSDL. > > Nonetheless, I suggest you add > > elementFormDefault="qualified" to the second > > schema (http://ws.model.rc.nec). > > > > Anne > ___ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it
Re: Connecting AXIS with .NET Dataset
A dataset contains its schema. You will need to parse the schema, and then based on the schema, parse the dataset contents. AnneOn 9/26/05, Ronny Weiser <[EMAIL PROTECTED]> wrote: Hi,I think you are right with the fact that datasets are only known in .NET. SoI think the best way is to serialize the dataset into xml and return this asstring.Or you write your own dataset implementation in java and an own de-/serializer for axis.I would prefer the first way.Ronny Weiser-Ursprüngliche Nachricht-Von: Raúl García [mailto:[EMAIL PROTECTED] ]Gesendet: Montag, 26. September 2005 12:15An: axis-user@ws.apache.orgBetreff: Connecting AXIS with .NET DatasetHi all,We need to connect to a .NET webservice. At the moment we can read simple types (String, integer, Boolean and also asimple Class).We don't use the wsdl2java so we need it to be integrated to an own javaarchitecture.We create a service and a Call, we fill the sending and returning params and we create a serializable object of the class (In case we return a class from.NET webservice), we cannot connect with vectors, arrays or DataSet...As we can see at the wsdl, a DataSet seems to be an object only supported by .NET.Can please someone tell me how to connect to a .NET Dataset? , Without usingwsdl2java.Some ideas or workarounds will be appreciated.Thanks on advanceBest RegardsRaúl.
.net XML datatype !
Hello list Im trying to integrate towards this .net webservice, and wsdl2java produces stubs and all. One method takes an xml datatype (XMLNode), and axis has generated this ; “_xmlTemplatePassThrough_mmRequest” class, wich has an set_any(org.apache.axis.message.MessageElement [] _any) method, from wich I can construct an XML (MessageElement.addChild etc.) Now I’ve tried constructing an xml manually and from an existing XML with “SAXBuilder” with very very little result… in best case the .net service pukes my xml-type right back up… Any tips, howto’s tricks or other suggestions? Thanks
AW: Connecting AXIS with .NET Dataset
Hi, I think you are right with the fact that datasets are only known in .NET. So I think the best way is to serialize the dataset into xml and return this as string. Or you write your own dataset implementation in java and an own de-/serializer for axis. I would prefer the first way. Ronny Weiser -Ursprüngliche Nachricht- Von: Raúl García [mailto:[EMAIL PROTECTED] Gesendet: Montag, 26. September 2005 12:15 An: axis-user@ws.apache.org Betreff: Connecting AXIS with .NET Dataset Hi all, We need to connect to a .NET webservice. At the moment we can read simple types (String, integer, Boolean and also a simple Class). We don't use the wsdl2java so we need it to be integrated to an own java architecture. We create a service and a Call, we fill the sending and returning params and we create a serializable object of the class (In case we return a class from .NET webservice), we cannot connect with vectors, arrays or DataSet... As we can see at the wsdl, a DataSet seems to be an object only supported by .NET. Can please someone tell me how to connect to a .NET Dataset? , Without using wsdl2java. Some ideas or workarounds will be appreciated. Thanks on advance Best Regards Raúl.
Connecting AXIS with .NET Dataset
Hi all, We need to connect to a .NET webservice. At the moment we can read simple types (String, integer, Boolean and also a simple Class). We don't use the wsdl2java so we need it to be integrated to an own java architecture. We create a service and a Call, we fill the sending and returning params and we create a serializable object of the class (In case we return a class from .NET webservice), we cannot connect with vectors, arrays or DataSet... As we can see at the wsdl, a DataSet seems to be an object only supported by .NET. Can please someone tell me how to connect to a .NET Dataset? , Without using wsdl2java. Some ideas or workarounds will be appreciated. Thanks on advance Best Regards Raúl.
Guideline with schema condition maxOccurs="1"
Title: Guideline with schema condition maxOccurs="1" Hi everyone, I am developing a Web Services with wsdl described below and would like to confirm with the AXIS behaviour. I Invoked the service with the following SOAP request message, and it returned the result properly. xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> http://www.mysite.org/MyWebServices.myws"> Svc1 Name1 type1 Hello Next, I modified the the tag to include multiple , eg. Name1 type1 Hello Yellow With modified SOAP request message, the AXIS on the service provider side, took the 2nd , which is Yellow, to process the request. From what it has been declared in the WSDL, the tag has maxOccurs="1". My Questions are: 1. With maxOccurs="1", does AXIS always take only the last value within same tag? 2. Is this how AXIS handles the restriction on the maxOccurs="1"? 3. Or must it throw an error, since the SOAP request does not follow the schema rule? Appreciate if someone could explain more, regarding this. Thank you. Herbert WSDL: name="MyWebServices" targetNamespace="http://www.mysite.org/MyWebServices.wsdl" xmlns:myws="http://www.mysite.org/MyWebServices.myws" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.mysite.org/MyWebServices.wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> http://schemas.xmlsoap.org/wsdl/">My WebServices targetNamespace="http://www.mysite.org/MyWebServices.myws" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:myws="http://www.mysite.org/MyWebServices.myws" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> http://schemas.xmlsoap.org/soap/http"/> soapAction="capeconnect:MyWebServices:MyWebServicesPortType#execXQuery"/> http://schemas.xmlsoap.org/wsdl/">A service to use the X Service location="https://localhost:8080/ws121/services/MyWebServices"/>
How to get the client stub in my handler code ?
Hi, Is there a way to get, in a client-side handler's code, a reference to the org.apache.axis.client.Stub instance that was used to make the request ? Thanks, -- Tony
Re: (newbie) SAXException: SimpleDeserializer encountered a child element
Hi, I tried also adding elementFormDefault="qualified" to the second schema but it does not work... The think is pretty weird because sometimes (well, just the first time tomorrow) it works, but most of the times I have the usual exception: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize filippo --- Anne Thomas Manes <[EMAIL PROTECTED]> ha scritto: > The WSDL looks fine to me, and your input message > looks like it conforms to > the WSDL. > Nonetheless, I suggest you add > elementFormDefault="qualified" to the second > schema (http://ws.model.rc.nec). > > Anne ___ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it