axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iksrazal <iksra...@gmail.com>
Subject Re: [axis2] WSDL2Code throws NPE on complex type
Date Thu, 24 Nov 2005 16:10:23 GMT
Em Quinta 24 Novembro 2005 13:35, o Sanjiva Weerawarana escreveu:
> On Thu, 2005-11-24 at 09:08 -0200, iksrazal wrote:
> > --wrapArrays seemingly isn't implemented with 2.0 - which I'm using again
> > now ;-) . I was able to fix the issue simply by removing the <element/> 
> > tags around the complexType - I'm still leraning doc lit.
> >
> > I'm however concerned that the jira issue resolved in AXIS-2165 is still
> > present in 2.0 . I sent a mesage to list about this yesterday:
> >
> > http://marc.theaimsgroup.com/?l=axis-dev&m=113277260805012&w=2
> >
> > I'm wondering if I should create another jira issue for 2.0 ?
>
> Did you look at my reply? There are bugs in your XSD AFAICT.
>
> Sanjiva.

I did indeed have some bugs, and your comments and from others helped me fix 
them, thanks. I'm now using the soa wsdl validator from cape clear, and the 
validator now shows only one warning about JSP generation which I also had in 
my production 'rpc encoded' wsdl. 

Enclosed is my updated, hopefully bug-free wsdl. Unless anyone can spot 
something wrong I'll file a jira. Keep in mind I filed a similar jira for 
1.2, that got fixed in 1.3, for 'rpc encoded' . 

Again the problem is the constructor generated when 'extension base' is used, 
as documented in AXIS-2165. 

This is constructor in 1.3 : 

    public ReturnWeb_Login(
           java.lang.String errorMessage,
           int successErrorCode,
           java.lang.String SOAP_Session_id,
           java.lang.String web_user_name) {
        super(
            errorMessage,
            successErrorCode);
        this.SOAP_Session_id = SOAP_Session_id;
        this.web_user_name = web_user_name;
    }

With axis2 from the november 21st snapshot, and the constructor generated is: 

  public ReturnWebLoginImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }

There are getters and setters for SOAP_Session_id and web_user_name, but 
nothing for errorMessage and successErrorCode. 

The wsdl below is doc lit. Any feedback is helpful. 

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="CallCentreWebService" 
targetNamespace="http://com/callcentreweb" 
xmlns:tns="http://com/callcentreweb" xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:ns2="http://com/callcentreweb/types">
  <types>
    <schema targetNamespace="http://com/callcentreweb/types" 
xmlns:tns="http://com/callcentreweb/types" 
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      <complexType name="ReturnWeb_Base">
        <sequence>
          <element name="errorMessage" type="string"/>
          <element name="successErrorCode" 
type="int"/></sequence></complexType>
      <complexType name="ReturnWeb_Login">
        <complexContent>
          <extension base="tns:ReturnWeb_Base">
            <sequence>
              <element name="SOAP_Session_id" type="string"/>
              <element name="web_user_name" 
type="string"/></sequence></extension></complexContent></complexType>
      <element name="web_LoginElement">
        <complexType>
          <sequence>
            <element ref="tns:user_nameElement"/>
            <element ref="tns:user_passwordElement"/>
          </sequence>
        </complexType>
      </element>
      <element name="user_nameElement" type="xsd:string"/>
      <element name="user_passwordElement" type="xsd:string"/>
      <element name="ReturnWeb_LoginElement" type="ns2:ReturnWeb_Login"/>
      <element name="ReturnWeb_BaseElement" type="ns2:ReturnWeb_Base"/>
</schema></types>
  <message name="CallCentreWebEndpoint_web_Login">
     <part name="parameters" element="ns2:web_LoginElement"/>
  </message>
  <message name="CallCentreWebEndpoint_web_LoginResponse">
    <part name="result" element="ns2:ReturnWeb_LoginElement"/>
  </message>
  <portType name="CallCentreWebEndpoint">
    <operation name="web_Login">
      <input message="tns:CallCentreWebEndpoint_web_Login" 
name="CallCentreWebEndpoint_web_Login"/>
      <output message="tns:CallCentreWebEndpoint_web_LoginResponse" 
name="CallCentreWebEndpoint_web_LoginResponse"/>
    </operation>
  </portType>
  <binding name="CallCentreWebEndpointBinding" 
type="tns:CallCentreWebEndpoint">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" 
style="document"/>
    <operation name="web_Login">
      <soap:operation soapAction=""/>
      <input name="CallCentreWebEndpoint_web_Login">
        <soap:body use="literal"/>
      </input>
      <output name="CallCentreWebEndpoint_web_LoginResponse"> 
        <soap:body use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="CallCentreWebService">
    <port name="CallCentreWebEndpointPort" 
binding="tns:CallCentreWebEndpointBinding">
      <soap:address 
location="http://127.0.0.1"/></port></service></definitions>



Mime
View raw message