Deserialization with Castor / Wrapped
Hey all, i think i've got another problem with use/style/wrapped/literal/rpc stuff. Perhaps someone can explain to me. I get the following answer from a web service, and want to deserialize the ServerStatus object, but it fails. A typemapping for ServerStatus is in client-config.wsdd. However, I get an Exception while Axis tries to deserialize the VersionString with SimpleDeserializer. I don't know why, but shouldn't there be a ServerStatus.../ServerStatus around the elements? I have [provider=java:RPC style=wrapped use=literal] in my server-config.wsdd. encodingStyle of all typeMappings is . The client-config.wsdd doesn't contain style or use information, but the rpc client does this: call.setOperationStyle(Style.WRAPPED); call.setOperationUse(Use.LITERAL); ?xml version=1.0 encoding=utf-8? soapenv:Envelope 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; soapenv:Body getServerStatusResponse xmlns=mynamespace getServerStatusReturn !-- missing ServerStatus element??? -- VersionStringServer/0.0.2/VersionString NumberLicenses1/NumberLicenses NumberQueries0/NumberQueries NumberRequests0/NumberRequests UptimeSince-PT1.531S/UptimeSince !-- missing ServerStatus element??? -- /getServerStatusReturn /getServerStatusResponse /soapenv:Body /soapenv:Envelope
Re: [Axis2] NPE trying to use eclipse code-gen plugin
Chathura, you're the best :-) Like dims, who fixed the bug so fast hehe. You're so right about the deps. I've written down the list of all project dependencies and external jar files, so the next newbie can use it: OM == .xml module. OM: (Project org.apache.ws.axis2.xml) - Dependency to jsr173_api.jar (javax.namespace..) - Dependency to commons-logging.jar (Logging) WSDL: (Project org.apache.ws.axis2.wsdl) - Dependency to jsr173_api.jar - Dependency to wsdl4j-1.5.1.jar - Dependency to Project org.apache.ws.axis2.xml (OM) CORE: (Project org.apache.ws.axis2.core) - Dependency to jsr173_api.jar - Dependency to commons-logging.jar - Dependency to wsdl4j-1.5.1.jar - Dependency to mailapi_1_3_1.jar - Dependency to servlet.jar - Dependency to Project org.apache.ws.axis2.xml (OM) - Dependency to Project org.apache.ws.axis2.wsdl (WSDL) Addressing: (Project org.apache.ws.axis2.addressing) - Dep. to Project org.apache.ws.axis2.core - Dep. to Project org.apache.ws.axis2.xmlö - Dep. to jsr173_api.jar - Dep. to commons-logging.jar SAAJ: (Project org.apache.ws.axis2.saaj) - Dep. to jsr173_api.jar - Dep. to activation.jar - Dep. to Project org.apache.ws.axis2.addressing - Dep. to Project org.apache.ws.axis2.core - Dep. to Project org.apache.ws.axis2.xml Samples: (Project org.apache.ws.axis2.samples) - Dep. to Project org.apache.ws.axis2.core - Dep. to Project org.apache.ws.axis2.wsdl - Dep. to Project org.apache.ws.axis2.xml - Dep. to commons-logging.jar - Dep. to jsr173_api.jar Tool: (project org.apache.ws.axis2.tool.code-gen) - Dep. to ant-1.6.jar - Dep. to wsdl4j-1.5.1jar - Dep. to Project org.apache.ws.axis2.wsdl I'm currently on the CodegenWizard and will provide the preferences enhancements as patch. regards Mike Chathura Herath schrieb: Hi Mike. First of all thank you for the input I am creating a Eclipse projects for each module and there are no cyclic dependencies. It cannot be the case. I ll list the dependencies .. OM No dependencies WSDL -- OM CORE -- OM WSDL Addressing -- CORE OM SAAJ -- CORE Addressing OM Samples -- CORE WSDL OM TOOl -- WSDL That's it .. No cyclic references. Moving to Plug-in ... Saving the values in the store/preference definite +1 Regarding the check box issue... We might want to generate both server side and client side at the same time along with a test case. For the test case to work both the server side and the client side should be generated. (The test case that is generated will create a dummy implementation of the service and deploy it in a SimpleHttpServer and use the Stubs that was generated to invoke the operations.) That was the idea. If this leads to user confusion then of course we can put a radio button and if the test case option is selected we ll generate both server side and client side. Comments?? Thanks. Chathura -Original Message- From: Mike Haller [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 9:18 PM To: axis-dev@ws.apache.org Subject: Re: [Axis2] NPE trying to use eclipse code-gen plugin Hi Chathura, thanks for working on this so fast!!! That's incredible :-] [AXIS2-25] After trying to recompile Axis2 the last few hours (i tried to use the modules as separated projects in the eclipse workspace, and that wasn't a good idea - cyclic dependencies and such). The patch worked fine! Comments on the plugin: - please replace the checkbox Generate serverside code with a radio button, since only one of client OR server is generated. Checking server checkbox automatically disables generating client stubs. Alternatively change the label to Generate serverside code instead of clientside code :) - please save the values in a store/preference, so you don't always have to type them in all over again. Again, thanks for the fast patch! regards Mike Chathura Herath schrieb: Hi Mike, Think this is a problem and I just opened a JIRA issue on this. Issue is fixed now. Please take an update and check. Can I check in your WSDL for a test case??? Thanks. Chathura -Original Message- From: Mike Haller [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 2:32 PM To: axis-dev@ws.apache.org Subject: Re: [Axis2] NPE trying to use eclipse code-gen plugin Hi, attached you will find my wsdl, the imported schema and the complete plugin errorlog. I hope this is not against the axis-dev policies (to attach files). regards Mike Chathura Herath schrieb: Can I have a look at the WSDL??? On 6/8/05, Mike Haller [EMAIL PROTECTED] wrote: Hey, i was able to compile axis2 src and create an eclipse plugin Btw, the /modules/tool/maven.xml doesn't create a .project file for the eclipse plugins - any reason? if it would create the .project files, too, you could import the folder directly as projects. Then, you don't need to manually create a Plug-In Project in Eclipse and copy all the files and set the build paths correctly etc. If you need more infos, please let me know (errorlogs, screenshots
[Axis2] java.lang.UnsupportedOperationException: service element is not allowed in the server.xml
Why is service element not allowed in (generated) service.xml ? the code snippet from ..ServerTest.java: DeploymentEngine deploymentEngine = new DeploymentEngine(basePath,service.xml); AxisConfiguration axisConfig = deploymentEngine.load(); my service.xml: !--Auto generated Axis Service XML-- service name=ILicenseServerSkeletonTest parameter locked=xsd:false name=ServiceClassde.innovations.licenseserver.axis2.ILicenseServerSkeleton/parameter !--Mounting the method QueryLicenses-- operation name=QueryLicenses/ !--Mounting the method InstallLicense-- operation name=InstallLicense/ !--Mounting the method Reload-- operation name=Reload/ !--Mounting the method FreeLicense-- operation name=FreeLicense/ !--Mounting the method GetServerStatus-- operation name=GetServerStatus/ !--Mounting the method RequestLicense-- operation name=RequestLicense/ /service java.lang.UnsupportedOperationException: service element is not allowed in the server.xml at org.apache.axis.deployment.DeploymentParser.processGlobalConfig(DeploymentParser.java:200) at org.apache.axis.deployment.DeploymentEngine.load(DeploymentEngine.java:208) at de.innovations.licenseserver.axis2.server.ILicenseServerTest.setUp(ILicenseServerTest.java:40) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)
java.lang.IncompatibleClassChangeError
What's the reason of this exception? java.lang.IncompatibleClassChangeError org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1387) org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148) org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112) org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1091) org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.XMLParser.parse(Unknown Source) org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) javax.xml.parsers.SAXParser.parse(Unknown Source) org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:228) org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) org.apache.axis.Message.getSOAPEnvelope(Message.java:424) org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) org.apache.axis.client.Call.invokeEngine(Call.java:2765) org.apache.axis.client.Call.invoke(Call.java:2748) org.apache.axis.client.Call.invoke(Call.java:2424) org.apache.axis.client.Call.invoke(Call.java:2347) org.apache.axis.client.Call.invoke(Call.java:1804)
Re: IncompatibleClassChangeError usign Axis 1.2?????
I got this today, too. I had several different versions of the same jar file in the classpath. After removing all duplicates, it was okay. I don't know if it was wsdl4j or axis itself, but it was just a problem with duplicate classes in the classpath. hope this helps Peter Len schrieb: Hello, We are trying to upgrade from Axis 1.1 to Axis 1.2. The service that is running has the new Axis 1.2 libraries and the new WSDL2Java objects (using the 1.2 libraries) have been built, compiled, and installed. When I try to make a web service call, however, I get an IncompatibleClassChangeError. Part of the stack trace is below: INFO [14:07:07] (AxisServlet.java:logException:400) - Exception: java.lang.IncompatibleClassChangeError at org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1387) at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148) at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) 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.XML11Configuration.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.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:424) at mil.dia.nces.security.validators.WSSecSignatureValidator.validate(WSSecSignatureValidator.java:117) at mil.dia.nces.security.util.NCESMessageValidator.validate(NCESMessageValidator.java:251) at mil.dia.nces.security.axis.handler.NCESBasicHandler.validate(NCESBasicHandler.java:259) at mil.dia.nces.security.axis.handler.NCESServerHandler.requestFlow(NCESServerHandler.java:99) at mil.dia.nces.security.axis.handler.NCESServerHandler.invoke(NCESServerHandler.java:59) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32). Something that is wierd is that when I call a bogus service under the webapp that Axis is running I still get the IncompatibleClassChangeError: https://myserver:8445/onto-ws/services/NotAService When I call an older version (Axis 1.1) that does not throw the IncompatibleClassChangeError and call the bogus service I get the typical error: The AXIS engine could not find a target service to invoke! That makes me think that is whatever is causing this IncompatibleClassChangeError is happening before the service is called. I don't know the Axis routing so I am unsure where to look. It seems that the WSDL (via http://myserver:8090/onto-ws/services/Post2Ontology?wsdl) looks fine and the service seemed to load properly via the server-config.wsdd file. I also verified that I don't have multiple axis JAR files. Does anyone have a thought on this type of error? Thanks - Peter Len
Re: Axis Alternative
Dims, i'm glad you're asking :) Simple Client/Server Architecture with the ability to send XML data. It does not need to be a Web Service - but for reasons of accessibility (in the meaning of firewalls, corporate proxies etc.), it should be something a proxy/firewall can handle = HTTP There are multiple types of clients, all Java: - two web applications - standalone clients - osgi services Axis should be fine with all this, and beside the fact that i'm a newbie, my impression on Axis is as follows: - Axis tries to fit everyone and everything - that's okay for interoperability - After having problems with generated classes and typemapping, I switched to wsdl first: Importing a business model schema, which itself imports a third party schema - Namespace problems - Code Generation via Ant task doesn't seem to support all settings, so I tried to directly use the wsdl2java generator - type mapping problems - I still have no idea where the client is loading client-config.wsdd from. regards Mike Davanum Srinivas schrieb: Mike, What i am asking is - what are ur requirements? -- dims On 6/7/05, Mike Haller [EMAIL PROTECTED] wrote: Nothing's really wrong with Axis itself, it's just me. Axis just doesn't fit my requirements (or vice versa). I'm searching for an alternative, which is _similar_ but not the same as Axis. But that's off-topic, sorry for bothering. Davanum Srinivas schrieb: Did you look at existing bug reports? did you open bug reports? with sample test case(s)? If we don't know what's wrong, how can we fix it? (see http://marc.theaimsgroup.com/?l=axis-userm=111788771523596w=2 for more information) thanks, dims
[Axis2] Re: Axis Alternative
Hey dims, got axis2 src, extracted to new folder, running maven. Maven fails on test:test goal. See attached error log. Davanum Srinivas schrieb: Mike, You should be using Axis2 :) Simple Client/Server Architecture with the ability to send XML data. We released M2 yesterday. May be planning a M3 sooner than you think. If you can give us feedback. that would be awesome. -- dims On 6/8/05, Mike Haller [EMAIL PROTECTED] wrote: Dims, i'm glad you're asking :) Simple Client/Server Architecture with the ability to send XML data. It does not need to be a Web Service - but for reasons of accessibility (in the meaning of firewalls, corporate proxies etc.), it should be something a proxy/firewall can handle = HTTP There are multiple types of clients, all Java: - two web applications - standalone clients - osgi services Axis should be fine with all this, and beside the fact that i'm a newbie, my impression on Axis is as follows: - Axis tries to fit everyone and everything - that's okay for interoperability - After having problems with generated classes and typemapping, I switched to wsdl first: Importing a business model schema, which itself imports a third party schema - Namespace problems - Code Generation via Ant task doesn't seem to support all settings, so I tried to directly use the wsdl2java generator - type mapping problems - I still have no idea where the client is loading client-config.wsdd from. regards Mike Davanum Srinivas schrieb: Mike, What i am asking is - what are ur requirements? -- dims On 6/7/05, Mike Haller [EMAIL PROTECTED] wrote: Nothing's really wrong with Axis itself, it's just me. Axis just doesn't fit my requirements (or vice versa). I'm searching for an alternative, which is _similar_ but not the same as Axis. But that's off-topic, sorry for bothering. Davanum Srinivas schrieb: Did you look at existing bug reports? did you open bug reports? with sample test case(s)? If we don't know what's wrong, how can we fix it? (see http://marc.theaimsgroup.com/?l=axis-userm=111788771523596w=2 for more information) thanks, dims __ __ | \/ |__ _Apache__ ___ | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ |_| |_\__,_|\_/\___|_||_| v. 1.0.2 build:start: jar: multiproject:install: multiproject:projects-init: [echo] Gathering project list Starting the reactor... Our processing order: xml wsdl core addressing saaj-impl samples + | Gathering project list xml | Memory: 5M/7M + + | Gathering project list wsdl | Memory: 5M/7M + + | Gathering project list core | Memory: 5M/7M + + | Gathering project list addressing | Memory: 5M/7M + + | Gathering project list saaj-impl | Memory: 5M/7M + + | Gathering project list samples | Memory: 5M/7M + Starting the reactor... Our processing order: xml wsdl core addressing saaj-impl samples + | Executing multiproject:install-callback xml | Memory: 5M/7M + multiproject:goal: build:start: multiproject:install-callback: [echo] Running jar:install for xml java:prepare-filesystem: java:compile: [echo] Compiling to D:\temp\axis2\modules\xml/target/classes [echo] == NOTE: Targetting JVM 1.5, classes will not run on earlier JVMs == java:jar-resources: test:prepare-filesystem: test:test-resources: test:compile: test:test: [junit] Running org.apache.axis.om.BadInputTest [junit] Tests run: 5, Failures: 0, Errors: 5, Time elapsed: 0,656 sec [junit] [ERROR] TEST org.apache.axis.om.BadInputTest FAILED [junit] Running org.apache.axis.om.CompareOMWithDOMTest [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0,703 sec [junit] [ERROR] TEST org.apache.axis.om.CompareOMWithDOMTest FAILED [junit] Running org.apache.axis.om.factory.OMLinkedListImplFactoryTest [junit] Tests run: 9, Failures: 0, Errors: 3, Time elapsed: 0,765 sec [junit] [ERROR] TEST org.apache.axis.om.factory.OMLinkedListImplFactoryTest FAILED [junit] Running org.apache.axis.om.impl.builder.StAXOMBuilderTest [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,656 sec [junit] Running org.apache.axis.om.impl.serializer.ElementSerializerTest [junit] Tests run: 8, Failures: 0, Errors: 8, Time elapsed: 0,813 sec [junit] [ERROR] TEST org.apache.axis.om.impl.serializer.ElementSerializerTest FAILED [junit
Re: [Axis2] Re: Axis Alternative
Ignore my post please. Don't use JDK1.5 is the answer. Mike Haller schrieb: got axis2 src, extracted to new folder, running maven. Maven fails on test:test goal. See attached error log.
Axis Alternative
Hi there, i'm sorry to ask, but there are so much problems for me with Axis, perhaps it's not the right framework for my project. Are there any alternatives to Axis? kind regards Mike
Re: Axis Exception
- Check your Axis Happiness page (http://localhost:8080/axis/happyaxis.jsp) - Restart your application server in debug mode and check the classpaths. - Don't put axis.jar in tomcat/shared/lib, leave it in axis/WEB-INF/lib - At one URL your server was named glororan, are you trying to access two different servers? Panayiotis Periorellis schrieb: Hi Guenter, Thanks for the response but it doesn't seem to be the solution to the problem. I had axis.jar inside axis\web-inf\lib And also I put it in tomcat\shared\lib as you suggeted The problem persistsany other ideas? p -Original Message- From: Grossberger, Guenter [mailto:[EMAIL PROTECTED] Sent: 07 June 2005 16:22 To: axis-user@ws.apache.org Subject: RE: Axis Exception Hi! I had a similar problem a few days ago. Somehow the classloader of Java VM of the J2EE container where Axis and your application are deployed cannot find the class org/apache/axis/handlers/BasicHandler which should be in axis.jar of course. So make sure that axis.jar is in the classpath of the application (WEB-INF/lib) or the J2EE container (e.g. Tomcat/shared/lib). Bye, Guenter -Original Message- From: Panayiotis Periorellis [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 07, 2005 4:56 PM To: axis-user@ws.apache.org Subject: Axis Exception Hi All, I have installed and have been using axis for over a year now and never had serious problems. Recently I tried to install the WSS4J.jar package to experiment with ws security. The same package has been used by other colleagues and it works. When I try to deploy however my service using a ws security handler that is inside the wss4j.jar package I get no errors. That is when I execute the command java org.apache.axis.client.AdminClient deploy.wsdd Now when I try to view the list of Services at http://glororan:8080/axis/servlet/AxisServlet they all dissapear and in addition when I go to the following url I get the error listed below.. http://localhost:8080/axis/services/XACMLRequest?wsdl AXIS error Sorry, something seems to have gone wrong... here are the details: Exception - java.lang.NoClassDefFoundError: org/apache/axis/handlers/BasicHandler I suspect it is something internal to axis. Has anybody else had the same problem? Any help would be appreciate it. Regards p
Re: Axis Alternative
Nothing's really wrong with Axis itself, it's just me. Axis just doesn't fit my requirements (or vice versa). I'm searching for an alternative, which is _similar_ but not the same as Axis. But that's off-topic, sorry for bothering. Davanum Srinivas schrieb: Did you look at existing bug reports? did you open bug reports? with sample test case(s)? If we don't know what's wrong, how can we fix it? (see http://marc.theaimsgroup.com/?l=axis-userm=111788771523596w=2 for more information) thanks, dims
Re: [wsdl2java] Exception Type ... is referenced but not defined
Sorry I forgot: i'm importing the schemas like this: wsdl:types !-- Import the business datatypes schema file -- xsd:import schemaLocation=business.xsd namespace=http://www.innovations.de/2005/v1/XMLBusinessSchema/ xsd:import schemaLocation=xmldsig-core-schema.xsd namespace=http://www.w3.org/2000/09/xmldsig#/ /wsdl:types Mike Haller schrieb: Hey people, I've got: - manually creates business.xsd with datatypes - manually created business.wsdl - using XML Security - using Castor generated Java Classes Because the Axis Ant tasks suck, i tried to use wsdl2java directly. However, i get the following error. It states that Reference (from XML Security) has not been defined, although a few lines earlier, it tells me that i tried to import it twice... business.xsd imports xmlsecurity.xsd, business.wsdl imports xmlsecurity.xsd. both declare the namespaces and prefixes. Another problem is that Axis generated deploy.wsdd has some chars in places where they are not supposed to be... Perhaps someone has any thoughts on my mistakes and can direct me into another direction. kind regards Mike Parsing XML file: file:src/business.wsdl {http://www.w3.org/2000/09/xmldsig#}CryptoBinary already exists {http://www.w3.org/2000/09/xmldsig#}Signature already exists ... {http://www.w3.org/2000/09/xmldsig#}Reference already exists {http://www.w3.org/2000/09/xmldsig#}ReferenceType already exists Exception in thread main java.io.IOException: Type {http://www.w3.org/2000/09/xmldsig#}Reference is referenced but not defined. at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:663) at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:493) at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:360) at java.lang.Thread.run(Thread.java:595)
Re: org.apache.axis.ConfigurationException: No service named is available
Hey all, can anyone give me a hint on what I'm doing wrong? java.lang.NullPointerException org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLoader.java:956) java.lang.ClassLoader.getResources(ClassLoader.java:851) org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:150) org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153) org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129) org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116) org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassNames(DiscoverNamesInFile.java:186) org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassName(DiscoverNamesInFile.java:170) org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNext(DiscoverNamesInFile.java:157) org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIterator(NameDiscoverers.java:143) org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(NameDiscoverers.java:126) org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159) org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147) org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:120) java.security.AccessController.doPrivileged(Native Method) org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113) org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160) org.apache.axis.client.Service.getEngineConfiguration(Service.java:812) org.apache.axis.client.Service.getAxisClient(Service.java:103) org.apache.axis.client.Service.init(Service.java:112) de.innovations.licenseserver.axis.Retriever.initCall(Retriever.java:73) de.innovations.licenseserver.axis.Retriever.init(Retriever.java:47) org.apache.jsp.index_jsp._jspService(index_jsp.java:102) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Mike Haller schrieb: Hey all, i'm trying to connect to a self-developed web service from a jsp page. The web service is deployed in the same tomcat and is working. I can successfully use Axis: http://../../ServiceName?method=getVersion I can use a java console application to call getVersion() on my service. However, trying to use the webservice from within a JSP page, it results in the following exception. I think it has something to do with the client-config.wsdd. Since the service is defined there. It is found in standalone mode, but I think that he might have problems getting it in Tomcat. The classpath where client-config.wsdd resides, is added to the Tomcat classpath (in the Sysdeo Tomcat Eclipse Plugin). If anyone has a tipp, a comment or anything. Please let me know :-) regards Mike -CLIENT-CODE IN JSP:-- % Retriever retriever = new Retriever(); % %=retriever.getVersion();% -RETRIEVER:-- Service service = new Service(); // I gave him the service name here for testing, // but didn't help. // new QName(,ServiceName); call = (Call) service.createCall(); call.setOperationStyle(Style.WRAPPED); call.setOperationUse(Use.LITERAL); call.setUsername(username); call.setPassword(password); call.setTargetEndpointAddress(endpoint); // endpoint is correct call.setOperation(GetVersion); Object obj = call.invoke(new Object[] { someParameters }); VERSIONS--- Java 1.4.2_06, running on Windows 2000 Tomcat 5.0.30, running in Eclipse 3.1M7 Axis 1.2 final, running in same Tomcat Struts 1.2, running in same Tomcat -EXCEPTION:-- 15:57:16,984 DEBUG [org.apache.axis.i18n.ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(engineFactory) 15:57:16,984 DEBUG [org.apache.axis.configuration.EngineConfigurationFactoryFinder] Got EngineFactory: org.apache.axis.configuration.EngineConfigurationFactoryDefault 15:57:16,984 DEBUG [org.apache.axis.AxisEngine] Enter: AxisEngine::init 15:57:17,000 DEBUG [org.apache.axis.AxisEngine] Exit
org.apache.axis.ConfigurationException: No service named is available
Hey all, i'm trying to connect to a self-developed web service from a jsp page. The web service is deployed in the same tomcat and is working. I can successfully use Axis: http://../../ServiceName?method=getVersion I can use a java console application to call getVersion() on my service. However, trying to use the webservice from within a JSP page, it results in the following exception. I think it has something to do with the client-config.wsdd. Since the service is defined there. It is found in standalone mode, but I think that he might have problems getting it in Tomcat. The classpath where client-config.wsdd resides, is added to the Tomcat classpath (in the Sysdeo Tomcat Eclipse Plugin). If anyone has a tipp, a comment or anything. Please let me know :-) regards Mike -CLIENT-CODE IN JSP:-- % Retriever retriever = new Retriever(); % %=retriever.getVersion();% -RETRIEVER:-- Service service = new Service(); // I gave him the service name here for testing, // but didn't help. // new QName(,ServiceName); call = (Call) service.createCall(); call.setOperationStyle(Style.WRAPPED); call.setOperationUse(Use.LITERAL); call.setUsername(username); call.setPassword(password); call.setTargetEndpointAddress(endpoint); // endpoint is correct call.setOperation(GetVersion); Object obj = call.invoke(new Object[] { someParameters }); VERSIONS--- Java 1.4.2_06, running on Windows 2000 Tomcat 5.0.30, running in Eclipse 3.1M7 Axis 1.2 final, running in same Tomcat Struts 1.2, running in same Tomcat -EXCEPTION:-- 15:57:16,984 DEBUG [org.apache.axis.i18n.ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(engineFactory) 15:57:16,984 DEBUG [org.apache.axis.configuration.EngineConfigurationFactoryFinder] Got EngineFactory: org.apache.axis.configuration.EngineConfigurationFactoryDefault 15:57:16,984 DEBUG [org.apache.axis.AxisEngine] Enter: AxisEngine::init 15:57:17,000 DEBUG [org.apache.axis.AxisEngine] Exit: AxisEngine::init 15:57:17,000 DEBUG [org.apache.axis.i18n.ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(transport00) 15:57:17,000 DEBUG [org.apache.axis.client.Call] Transport is [EMAIL PROTECTED] 15:57:17,000 DEBUG [org.apache.axis.description.OperationDesc] @b3951dsetReturnType(null) 15:57:17,000 DEBUG [org.apache.axis.client.Call] Enter: Call::invoke(ns, meth, args) 15:57:17,000 DEBUG [org.apache.axis.client.Call] operation=name:null returnQName: null returnType: null returnClass: null elementQName:null soapAction: null style: rpc use: encoded numInParams: 0 method:null 15:57:17,000 DEBUG [org.apache.axis.client.Call] operation.getNumParams()=0 15:57:17,000 DEBUG [org.apache.axis.client.Call] Enter: Call::invoke(RPCElement) 15:57:17,000 DEBUG [org.apache.axis.SOAPPart] Enter: SOAPPart ctor(FORM_SOAPENVELOPE) 15:57:17,000 DEBUG [org.apache.axis.i18n.ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(setMsgForm) 15:57:17,000 DEBUG [org.apache.axis.SOAPPart] Setting current message form to: FORM_SOAPENVELOPE (currentMessage is now org.apache.axis.message.SOAPEnvelope) 15:57:17,000 DEBUG [org.apache.axis.SOAPPart] Exit: SOAPPart ctor() 15:57:17,000 DEBUG [org.apache.axis.i18n.ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(addBody00) 15:57:17,000 DEBUG [org.apache.axis.message.SOAPBody] Adding body element to message... 15:57:17,000 DEBUG [org.apache.axis.client.Call] Enter: Call::invoke() 15:57:17,000 DEBUG [org.apache.axis.SOAPPart] Enter: SOAPPart::getAsSOAPEnvelope() 15:57:17,015 DEBUG [org.apache.axis.i18n.ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(currForm) 15:57:17,015 DEBUG [org.apache.axis.SOAPPart] current form is FORM_SOAPENVELOPE 15:57:17,015 DEBUG [org.apache.axis.MessageContext] MessageContext: setTargetService() 15:57:17,015 DEBUG [org.apache.axis.i18n.ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(noService10) 15:57:17,015 DEBUG [org.apache.axis.ConfigurationException] Exception: org.apache.axis.ConfigurationException: No service named is available org.apache.axis.ConfigurationException: No service named is available at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233) at org.apache.axis.AxisEngine.getService(AxisEngine.java:311) at org.apache.axis.MessageContext.setTargetService(MessageContext.java:755) at org.apache.axis.client.Call.invoke(Call.java:2689) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at de.innovations.licenseserver.axis.Retriever.getServerStatus(Retriever.java:168) at org.apache.jsp.serverstatus_jsp._jspService(org.apache.jsp.serverstatus_jsp:77) at
Re: DocumentBuilder from byte/packet
Any drawbacks on using input streams? DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); { String xml = ?xml version=\1.0\?foo/foo; StringReader reader = new StringReader(xml); InputSource source = new InputSource(reader); Document doc = db.parse(source); System.out.println(doc.getChildNodes().item(0)); } { byte[] xml = ?xml version=\1.0\?bar/bar.getBytes(); InputStream inputstream = new ByteArrayInputStream(xml); Document doc = db.parse(inputstream); System.out.println(doc.getChildNodes().item(0)); } Frank schrieb: Was tring to figure out the best way to take an XML document that I have read in from a datagram socket stored in a DatagramPacket(can convert to byte or String etc) to be able to parse it using DocumentBuilder using a DOM parse. All the methods seem to work off of a file or a steam. any thoughts? Thanks, Frank
No such operation 'in0'
Hi, i've got the following exception: AxisFault faultCode: {http://xml.apache.org/axis/}Client faultSubcode: faultString: No such operation 'in0' faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:No such operation 'in0' at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:179) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319) ... However, the SOAP request seems to look like this (the output comes from one custom handler): ?xml version=1.0 encoding=UTF-8? soapenv:Envelope 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;soapenv:Body in0 xsi:nil=true xmlns=myns1//soapenv:Body/soapenv:Envelope The output of msgContext.getOperationDesc() returns the correct method name, which is completely missing in the above soap message. I'm wondering where the problem lies and can't find it. Perhaps someone can direct me into the right direction? regards MIke
HashMap vs. Map
Hi all, using Axis 1.2 I'm trying to implement my own service: public interface MyService { public org.w3c.dom.Document listObjects(java.util.Map parameters); } Sadly, the generated code (java2wsdl and then wsdl2java) is generating this interface: public interface MyService extends java.rmi.Remote { public org.w3c.dom.Document listObjects(java.util.HashMap in0) throws java.rmi.RemoteException; } Note the difference: Map and HashMap in the method signatures. Why is it using HashMap instead of Map? To solve this, i tried to implement my own GeneratorFactory, but failed to find the location where the mapping is resolved. I also found out that there are typeMapping elements - but where do I have to add them, since the WSDL file is regenerated on each build. So, I hope someone can tell me where I can tell Axis' wsdl2java to use Map instead of HashMap. Thanks, regards Mike
Re: HashMap vs. Map
Thanks for your fast answer Keith. So, it's not possible to get clean generated interfaces? And there is no way to tell Axis to generate interfaces using interfaces and skels/stubs using concrete classes? It can use whatever Map-implementation it likes to use, as long as the generated interfaces use the Map interface. Keith Hatton schrieb: I can answer the first part of your question. It's using HashMap because Axis cannot instantiate an interface or abstract class. When Axis receives your XML it must build concrete object instances, so it must declare a concrete class. Otherwise which implementation of Map should it choose? Hope this helps Keith -Original Message- From: Mike Haller [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 11:00 To: axis-user@ws.apache.org Subject: HashMap vs. Map Hi all, using Axis 1.2 I'm trying to implement my own service: public interface MyService { public org.w3c.dom.Document listObjects(java.util.Map parameters); } Sadly, the generated code (java2wsdl and then wsdl2java) is generating this interface: public interface MyService extends java.rmi.Remote { public org.w3c.dom.Document listObjects(java.util.HashMap in0) throws java.rmi.RemoteException; } Note the difference: Map and HashMap in the method signatures. Why is it using HashMap instead of Map? To solve this, i tried to implement my own GeneratorFactory, but failed to find the location where the mapping is resolved. I also found out that there are typeMapping elements - but where do I have to add them, since the WSDL file is regenerated on each build. So, I hope someone can tell me where I can tell Axis' wsdl2java to use Map instead of HashMap. Thanks, regards Mike
Re: Setting the user and pw in headers using wsdl2java generated classes
I tried the following way, so i didn't have to change the generated classes nor to cast to stubs: 1) use a client-config.wsdd (some sort of configuration file for the wsdl2java generator) and include a requestFlow handler called my.package.AuthenticateHandler deployment .. globalConfiguration requestFlow handler type=java:my.package.AuthenticateHandler/ /requestFlow .. 2) my.package.AuthenticateHandler extends BasicHandler. In the invoke() method, you get the message context. public void invoke(MessageContext msgContext) throws AxisFault { msgContext.setUsername(myName); msgContext.setPassword(mySecret); } regards Mike Tamara Hills schrieb: Hello, I'm an axis newbie. Ive used wsdl2java to generate some java classes from a wsdl file. The service Im trying to connect to requires a username and password Base64 encoded in the header. Im not sure but I think the way to do this is through the MessageContext. The problem Im having is that I want to use the wsdl2java generated classes but somehow wind up with a null MessageContext ( no matter how I get to it) Below is what Im doing. I've tried getting the MessageContext in many different ways and it always turns up null. Also, I want to use the classes that wsdl2java created for me... I know there is a way to use the Call object to set the user and pw, but Im unsure of how to get to the Call object and still be able to use the Class objects that wsdl2java has generated for me. String sUser = Base64.encode(Administrator); String sPw = Base64.encode(password); AXLAPIServiceLocator loc = new AXLAPIServiceLocator(); AXLPort port = loc.getAXLPort(); AxisEngine eng = loc.getEngine(); if(eng != null) { MessageContext msgCont = eng.getCurrentMessageContext(); //MessageContext msgCont = MessageContext.getCurrentContext(); if(msgCont != null) { msgCont.setPassword(sPw); msgCont.setUsername(sUser); } else System.out.println(null message context); } else System.out.println(null engine); Any help is greatly appreciated. Regards, -tamara
XML Security
Hi, which XML Security implementations are you using? o Apache XML Security o IBM XML Security Suite o Baltimore KeyTools XML o Entrust/Toolkit for Java o IAIK-IXSIL XML Signature Library Are there any other implementations? Which one can be recommended? regards Mike