[ http://issues.apache.org/jira/browse/AXIS2-830?page=comments#action_12418191 ]
Thomas Weber commented on AXIS2-830: ------------------------------------ the bug report is for non-http transports still valid and for http transport an error message would be more appropriate than a NPE > WSDL2Java fails with NPE when soapAction attribute is missing > ------------------------------------------------------------- > > Key: AXIS2-830 > URL: http://issues.apache.org/jira/browse/AXIS2-830 > Project: Apache Axis 2.0 (Axis2) > Type: Bug > Components: wsdl > Versions: 1.0 > Reporter: Thomas Weber > Assignee: Ajith Harshana Ranabahu > > if soapAction attribute does not appear in soap:operation, WSDL2Java fails > with NPE. > adding soapAction="" fixes this, but from WSDL1.1 spec, section 3.4, I read > that it must be omitted. > java.lang.NullPointerException > at > org.apache.xalan.serialize.SerializerToXML.writeAttrString(SerializerToXML.java:2229) > at > org.apache.xalan.serialize.SerializerToXML.processAttribute(SerializerToXML.java:1084) > at > org.apache.xalan.serialize.SerializerToXML.startElement(SerializerToXML.java:944) > at > org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1017) > at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:346) > at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:167) > at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:325) > at > org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.debugLogDocument(AxisServiceBasedMultiLanguageEmitter.java:1322) > at > org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeInterface(AxisServiceBasedMultiLanguageEmitter.java:585) > at > org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStubFromService(AxisServiceBasedMultiLanguageEmitter.java:262) > at > org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:169) > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:176) > at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) > at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) > java.lang.NullPointerException > at > org.apache.xalan.serialize.SerializerToXML.writeAttrString(SerializerToXML.java:2229) > at > org.apache.xalan.serialize.SerializerToXML.processAttribute(SerializerToXML.java:1084) > at > org.apache.xalan.serialize.SerializerToXML.startElement(SerializerToXML.java:944) > at > org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1017) > wsdl: > <?xml version="1.0" encoding="UTF-8"?> > <definitions name="DataRequest" targetNamespace="http://test.nowhere.de" > xmlns="http://schemas.xmlsoap.org/wsdl/" > xmlns:tns="http://test.nowhere.de" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" > xmlns:wsa="http://www.w3.org/2005/08/addressing" > xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" > > > > <!-- Schema --> > <types> > <xsd:schema elementFormDefault="qualified" > targetNamespace="http://test.nowhere.de"> > <xsd:import > namespace="http://schemas.xmlsoap.org/soap/encoding/"/> > <!-- object data type definitions --> > <xsd:complexType name="Data"> > <xsd:sequence> > <xsd:element name="a" type="xsd:string" /> > <xsd:element name="b" type="xsd:string" /> > </xsd:sequence> > </xsd:complexType> > > <!-- SOAP definitions --> > > <xsd:element name="requestDataRequest"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="data" type="tns:Data"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > </xsd:schema> > </types> > <!-- Messages --> > <message name="requestDataSoapIn"> > <part name="parameters" element="tns:requestDataRequest" /> > </message> > <!-- Port Types --> > <portType name="DataRequestServiceSoapPortType"> > <operation name="requestData"> > <input message="tns:requestDataSoapIn" /> > </operation> > </portType> > <!-- Bindings --> > <binding name="DataRequestServiceSoapBinding" > type="tns:DataRequestServiceSoapPortType"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http" /> > <operation name="requestData"> > <soap:operation style="document" /> > <input> > <soap:body use="literal" /> > </input> > </operation> > </binding> > <!-- Service --> > <service name="DataRequestService"> > <port name="DataRequestServiceSoapPort" > binding="tns:DataRequestServiceSoapBinding"> > <soap:address location="@access-point-url@" /> > </port> > </service> > </definitions> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
