Re: AxisFault produces empty http 202
Hi Deepal. Deepal jayasinghe schrieb: I create a POJO and deploy and I got the expected result , so will you be able to provide me more data to re-generate the issues. FYI I have attached my POJO. I attached two WSDL files (stupid SQL wrapper plus common types and messages). The file with suffix orig is the web service which I want to implement. The file with the short filename is the specification which works. It looks like that AxisFault will only be correctly handled by the InOut message receiver. The RobustInOnly message receiver has a problem. Perhaps this has something to do with the initialization of the web server or the inheritaed classes. BTW some details about my server implementation. I always generate the skeleton and the interface. My implementation class extends the skeleton. If I throw the custom exception (specified in the WSDL)in my implementation then his exception will be catched by the generated message receiver. This receiver packs the exception into an AxisFault and throw it again. The problem is that it looks like the handling of the RobustInOnly and InOut message receivers is different. If you have a normal InOut receiver then you get an http 202 code plus the SOAP error. If you have RobustInOnly then you get only http 202. Best regards Michael -- ___ Michael BellHumboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin ___ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de ?xml version=1.0? !-- xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; -- wsdl:definitions xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:huiam=http://huiam.cms.hu-berlin.de/specs/ws/common; xmlns:sync=http://huiam.cms.hu-berlin.de/specs/ws/sync; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; targetNamespace=http://huiam.cms.hu-berlin.de/specs/ws/sync; wsdl:import namespace=http://huiam.cms.hu-berlin.de/specs/ws/common; location=../HU-IAM-WS-Common/common.wsdl/ wsdl:types xsd:schema targetNamespace=http://huiam.cms.hu-berlin.de/specs/ws/common; xsd:import namespace=http://huiam.cms.hu-berlin.de/specs/ws/common; schemaLocation=../HU-IAM-WS-Common/common.xsd / /xsd:schema xsd:schema attributeFormDefault=unqualified elementFormDefault=unqualified targetNamespace=http://huiam.cms.hu-berlin.de/specs/ws/sync; !-- == -- !-- TYPES -- !-- == -- !-- SQL specific types -- xsd:simpleType name=SQLDatatypeEnum xsd:restriction base=xsd:string xsd:enumeration value=VARCHAR1/ xsd:enumeration value=VARCHAR8/ xsd:enumeration value=VARCHAR64/ xsd:enumeration value=VARCHAR128/ xsd:enumeration value=VARCHAR255/ xsd:enumeration value=VARCHAR2048/ xsd:enumeration value=TEXT/ xsd:enumeration value=TIMESTAMP/ xsd:enumeration value=DATE/ xsd:enumeration value=NUMERIC/ xsd:enumeration value=SEQUENCE/ /xsd:restriction /xsd:simpleType xsd:complexType name=SQLColumn xsd:sequence xsd:element name=name type=xsd:string/ xsd:element name=type type=sync:SQLDatatypeEnum/ xsd:element name=value type=xsd:string/ /xsd:sequence /xsd:complexType !-- = -- !-- ELEMENTS FOR MESSAGES-- !-- = -- !-- SQL messages -- xsd:element name=insertRequest xsd:complexType xsd:sequence xsd:element name=table type=xsd:string/ xsd:element maxOccurs=unbounded name=data type=sync:SQLColumn/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=updateRequest xsd:complexType xsd:sequence xsd:element name=table type=xsd:string/ xsd:element maxOccurs=unbounded name=where type=sync:SQLColumn/ xsd:element maxOccurs=unbounded name=data type=sync:SQLColumn/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=deleteRequest xsd:complexType xsd:sequence xsd:element name=table type=xsd:string/ xsd:element maxOccurs=unbounded name=where type=sync:SQLColumn/ /xsd:sequence /xsd:complexType /xsd:element xsd:element name=dummyResponse type=xsd:string/ /xsd:schema /wsdl:types !-- -- !-- MESSAGES -- !-- -- !-- SQL messages -- wsdl:message name=InsertRequestMsg
Re: AxisFault produces empty http 202
Hi Amila, thanks for the pointer. So I simply send back empty answers which the clients must ignore. Sorry for the trouble Michael Amila Suriarachchi schrieb: see the wsdl spec http://www.w3.org/TR/wsdl#_one-way for one way operations there can not be fault messages. if you use fault it must be in out. Amila. On 7/30/07, Michael Bell [EMAIL PROTECTED] wrote: Hi Deepal. Deepal jayasinghe schrieb: I create a POJO and deploy and I got the expected result , so will you be able to provide me more data to re-generate the issues. FYI I have attached my POJO. I attached two WSDL files (stupid SQL wrapper plus common types and messages). The file with suffix orig is the web service which I want to implement. The file with the short filename is the specification which works. It looks like that AxisFault will only be correctly handled by the InOut message receiver. The RobustInOnly message receiver has a problem. Perhaps this has something to do with the initialization of the web server or the inheritaed classes. BTW some details about my server implementation. I always generate the skeleton and the interface. My implementation class extends the skeleton. If I throw the custom exception (specified in the WSDL)in my implementation then his exception will be catched by the generated message receiver. This receiver packs the exception into an AxisFault and throw it again. The problem is that it looks like the handling of the RobustInOnly and InOut message receivers is different. If you have a normal InOut receiver then you get an http 202 code plus the SOAP error. If you have RobustInOnly then you get only http 202. Best regards Michael -- ___ Michael BellHumboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin ___ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de -- ___ Michael BellHumboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin ___ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de smime.p7s Description: S/MIME Cryptographic Signature
AxisFault produces empty http 202
Hi, I have a web service where the operations have only input messages and SOAP faults. wsdl2java generates exceptions for this. The problem is that Axis2 1.3 RC2 sends an empty http 202 response and catalina.out contains the following message: Jul 27, 2007 5:30:45 PM org.apache.axis2.receivers.AbstractMessageReceiver receive SEVERE: org.apache.axis2.AxisFault: FaultMsg FaultMsg is the generated exception class from wsdl2java. Any ideas why AxisFault is logged and not send as a SOAP fault? Did I forget something? If you need more infos like WSDL or generated code then I can send this too. Best regards Michael -- ___ Michael BellHumboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin ___ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de smime.p7s Description: S/MIME Cryptographic Signature
Re: ExtensionMapper
Hi, the problem is that the actual code generation blocks the use of the generated packages with common types by different web services because the generated ExtensionMappers are not identical if the web services do not share all XML/WSDL types. So it is not possible for me to write some common classes because the import of the common packages fails (except that I import all web services). Amila Suriarachchi schrieb: On 7/23/07, Michael Bell [EMAIL PROTECTED] wrote: this extension mapper is used in extensions(to support polymorphysum). if the input xml stream contains an xsi:type element then we find the corresponding class from using this. Keeping one extension mapper would make the code generation easy sine we have to find the class only in one place. other wise have to see in all the places. you can not say classes in one package has only extended from the class in the same package. I only see calls to the ExtensionMapper from classes which were generated for XML types. So it looks easy for me to modify the extension mapper in the correct way and place (this is what I do with my script). if you split the extension mapper class then you have to change the places it refer as well. some times if you only extends classes from the same package this may work. but not a genearalized approach. The ExtensionMapper is used in the generated type classes. These classes can be very easily fixed. My script looks into the classes and modify the package of the extension mapper. I don't understand which external code uses the extension mapper. Can you point me to an example please? Thanks Michael -- ___ Michael BellHumboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin ___ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de smime.p7s Description: S/MIME Cryptographic Signature
ExtensionMapper
Hi, we create WSDL types with two different schemas - one for common types and one for special types. The idea is that we want to implement common types in a central place for all of our web services (e.g. common error handling). During the implementation we noticed that Axis2 generates some ExtensionMapper classes. The problem is that Axis2 does not generate one ExtensionMapper per package. It generates only one filled ExtensionMapper per service. So inheritance does not work because the java classes have always web service specific code inside. I noticed that the generated code can be easily splitted into different packages. Is there a special reason why there is only one ExtensionMapper? I implemented a small Perl script which loads the generated ExtensionMapper and generates mappers on a per package base. If someone is interested then I can send the script. Best regards Michael -- ___ Michael BellHumboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin ___ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de smime.p7s Description: S/MIME Cryptographic Signature
Code generator problem with WSDL
Hi, I have a WSDL file which generates a working client stub but when I generate the skeleton for the server then the eclipse plugin fails. I attached the error messages from the console. Perhaps you have an idea. If it helps then I can send the WSDL file too. Best regards Michael -- ___ Michael BellHumboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin ___ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de java.lang.NullPointerException at gnu.xml.transform.ParameterNode.clone(libgcj.so.71) at gnu.xml.transform.Template.clone(libgcj.so.71) at gnu.xml.transform.Stylesheet.clone(libgcj.so.71) at gnu.xml.transform.TemplatesImpl.newTransformer(libgcj.so.71) at org.apache.axis2.schema.writer.JavaBeanWriter.parse(JavaBeanWriter.java:1149) at org.apache.axis2.schema.writer.JavaBeanWriter.process(JavaBeanWriter.java:437) at org.apache.axis2.schema.writer.JavaBeanWriter.write(JavaBeanWriter.java:211) at org.apache.axis2.schema.SchemaCompiler.writeElement(SchemaCompiler.java:439) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:311) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:210) at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:75) at java.lang.reflect.Method.invoke(libgcj.so.71) at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:47) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:209) at org.apache.axis2.tool.codegen.eclipse.CodeGenWizard$1.execute(Unknown Source) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1737) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:851) at org.apache.axis2.tool.codegen.eclipse.CodeGenWizard.doFinishWSDL2Java(Unknown Source) at org.apache.axis2.tool.codegen.eclipse.CodeGenWizard.performFinish(Unknown Source) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:680) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:355) at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3180) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2856) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:181) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3180) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2856) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at java.lang.reflect.Method.invoke(libgcj.so.71) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336
Re: Axis2 and tomcat 5.5
Hi, I discovered the core of my problem by myself :) axis2.war only includes the axis2 jar archives. The lib directory only includes the licenses of the other required jar archives. Anything works fine after I copied all jar archives from the standard axis 1.1.1 distribution to my tomcat endorsed directory. Does there be an official axis2 distribution file axis2.war with all jar archives included? I want to build a war archive which does not depend on the global settings like a tomcat endorsed directory which differs on every machine. Best regards Michael -- ___ Michael BellHumboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin ___ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de smime.p7s Description: S/MIME Cryptographic Signature
Re: Axis2 and tomcat 5.5
Hi Thilina, Thilina Gunarathne schrieb: Seems like our nightly build system is broken some how... Yes, we noticed this too. All jar archives except of axis2 are missing. Nevertheless we found out that axis2 1.1.1 war archive works for us. The problem was a missing javaee.jar archive from Sun and a too strict security policy of Debian's tomcat5.5 package. Thanks for the hint that we do nothing completely senseless :) Best regards Michael -- ___ Michael BellHumboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin ___ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de smime.p7s Description: S/MIME Cryptographic Signature
Axis2 and tomcat 5.5
Hi, I try to install axis2 on tomcat 5.5 (on a Debian box). I use JRE 1.5.0.11 and tomcat 5.5.20. I noticed on the web page that sometimes it is necessary to copy the stax-api into the endorsed directory of tomcat. I did this too. Nevertheless I still get an error if I copy axis2.war to my webapps directory. I tested with 1.1.1 and the nightly snapshot. I isolated the error to a problem with include/httpbase.jsp. I called this page isolated from the rest an it turns out that the following line of code returns a null pointer: ConfigurationContext configctx = (ConfigurationContext) context.getAttribute(AxisServlet.CONFIGURATION_CONTEXT); configctx is not checked and so the next line crashes on the null pointer. It looks like a standard configuration error of mine but I don't find a solution which works for me. The full stack trace is below. Best regards Michael -- ___ Michael BellHumboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin ___ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de Mar 7, 2007 5:31:00 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp.java:22) at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:78) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:155) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245) at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:177) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Mar 7, 2007 5:31:00 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.jsp.axis2_002dweb.include.httpbase_jsp.jspInit(httpbase_jsp.java:22) at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:78) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:155) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314