You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "olivier chapelliere (JIRA)" <ji...@apache.org> on 2006/09/25 15:46:54 UTC

[jira] Created: (AXIS2-1230) Warning at client generation stage

Warning at client generation stage
----------------------------------

                 Key: AXIS2-1230
                 URL: http://issues.apache.org/jira/browse/AXIS2-1230
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: Tools
         Environment: solaris 8, java 1.5, axis2 latest nightly build (25th september 2006)
            Reporter: olivier chapelliere


I have been asked to open this defect in this mail http://marc.theaimsgroup.com/?l=axis-user&m=115653373229928&w=2

command line used to generate client code is
WSDL2Java.sh -uri  bug.wsdl -o client

and WSDL file is the following:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  targetNamespace="http://www.mynamespace.net"
                  xmlns="http://www.mynamespace.net">

    <wsdl:types>
        <xsd:schema elementFormDefault="qualified"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                xmlns="http://www.mynamespace.net"
                targetNamespace="http://www.mynamespace.net">

            <xsd:element name="myStatus"><xsd:complexType><xsd:sequence>
                <xsd:element maxOccurs="1" minOccurs="1" name="errorcode" type="xsd:int"/>
            </xsd:sequence></xsd:complexType></xsd:element>

            <xsd:element name="myMethod1"><xsd:complexType><xsd:sequence>
                <xsd:element maxOccurs="1" minOccurs="1" name="myArg" type="xsd:string"/>
            </xsd:sequence></xsd:complexType></xsd:element>

            <xsd:element name="myMethod1Response"><xsd:complexType><xsd:sequence>
                <xsd:element maxOccurs="1" minOccurs="1" ref="myStatus"/>
            </xsd:sequence></xsd:complexType></xsd:element>

        </xsd:schema>
    </wsdl:types>

    <wsdl:message name="myMethod1Request">
        <wsdl:part name="input" element="myMethod1"/>
    </wsdl:message>
    <wsdl:message name="myMethod1Result">
        <wsdl:part name="output" element="myMethod1Response"/>
    </wsdl:message>

    <wsdl:portType name="myWebServices">
        <wsdl:operation name="myMethod1" parameterOrder="input">
            <wsdl:input name="myMethod1Request" message="myMethod1Request"/>
            <wsdl:output name="myMethod1Result" message="myMethod1Result"/>
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="myWebServicesSoapBinding" type="myWebServices">
        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="myMethod1">
            <wsdlsoap:operation soapAction="myMethod1"/>
            <wsdl:input><wsdlsoap:body use="literal"/></wsdl:input>
            <wsdl:output><wsdlsoap:body use="literal"/></wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="myWebServices">
        <wsdl:port name="myWebServices" binding="myWebServicesSoapBinding">
            <wsdlsoap:address location="http://localhost:8080/axis2/services/myWebServices"/>
        </wsdl:port>
    </wsdl:service>
</wsdl: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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-1230) Warning at client generation stage

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1230?page=all ]

Davanum Srinivas resolved AXIS2-1230.
-------------------------------------

    Resolution: Fixed

- No NPE during w2j
- Generated code works fine

If you are worried about the warning, you can split the element and the complextype into 2 things

basically from:
            <xsd:element name="myStatus"><xsd:complexType><xsd:sequence>
                <xsd:element maxOccurs="1" minOccurs="1" name="errorcode" type="xsd:int"/>
            </xsd:sequence></xsd:complexType></xsd:element> 

to:

            <xsd:complexType name="myStatusType"><xsd:sequence>
                <xsd:element maxOccurs="1" minOccurs="1" name="errorcode" type="xsd:int"/>
            </xsd:sequence></xsd:complexType>
            <xsd:element name="myStatus" type="tns:myStatusType"></xsd:element> 
  PS: make sure you define xmlns:tns and set it to the same namespace as the target namespace of the schema.

thanks,
dims

> Warning at client generation stage
> ----------------------------------
>
>                 Key: AXIS2-1230
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1230
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>         Environment: solaris 8, java 1.5, axis2 latest nightly build (25th september 2006)
>            Reporter: olivier chapelliere
>
> I have been asked to open this defect in this mail http://marc.theaimsgroup.com/?l=axis-user&m=115653373229928&w=2
> command line used to generate client code is
> WSDL2Java.sh -uri  bug.wsdl -o client
> and WSDL file is the following:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>                   xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>                   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>                   targetNamespace="http://www.mynamespace.net"
>                   xmlns="http://www.mynamespace.net">
>     <wsdl:types>
>         <xsd:schema elementFormDefault="qualified"
>                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>                 xmlns="http://www.mynamespace.net"
>                 targetNamespace="http://www.mynamespace.net">
>             <xsd:element name="myStatus"><xsd:complexType><xsd:sequence>
>                 <xsd:element maxOccurs="1" minOccurs="1" name="errorcode" type="xsd:int"/>
>             </xsd:sequence></xsd:complexType></xsd:element>
>             <xsd:element name="myMethod1"><xsd:complexType><xsd:sequence>
>                 <xsd:element maxOccurs="1" minOccurs="1" name="myArg" type="xsd:string"/>
>             </xsd:sequence></xsd:complexType></xsd:element>
>             <xsd:element name="myMethod1Response"><xsd:complexType><xsd:sequence>
>                 <xsd:element maxOccurs="1" minOccurs="1" ref="myStatus"/>
>             </xsd:sequence></xsd:complexType></xsd:element>
>         </xsd:schema>
>     </wsdl:types>
>     <wsdl:message name="myMethod1Request">
>         <wsdl:part name="input" element="myMethod1"/>
>     </wsdl:message>
>     <wsdl:message name="myMethod1Result">
>         <wsdl:part name="output" element="myMethod1Response"/>
>     </wsdl:message>
>     <wsdl:portType name="myWebServices">
>         <wsdl:operation name="myMethod1" parameterOrder="input">
>             <wsdl:input name="myMethod1Request" message="myMethod1Request"/>
>             <wsdl:output name="myMethod1Result" message="myMethod1Result"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="myWebServicesSoapBinding" type="myWebServices">
>         <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>         <wsdl:operation name="myMethod1">
>             <wsdlsoap:operation soapAction="myMethod1"/>
>             <wsdl:input><wsdlsoap:body use="literal"/></wsdl:input>
>             <wsdl:output><wsdlsoap:body use="literal"/></wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="myWebServices">
>         <wsdl:port name="myWebServices" binding="myWebServicesSoapBinding">
>             <wsdlsoap:address location="http://localhost:8080/axis2/services/myWebServices"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl: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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org