[
https://issues.apache.org/jira/browse/AXIS2-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550075
]
Mauro Molinari commented on AXIS2-3391:
---------------------------------------
>Your type is generated in the default package since you have not given
>elementFormDefault="qualified" in your schema.
But what is it for? That class (In_type0) is not used by any other one... The
message receiver, the ADBBeans and the skeleton all use In_type1...
Mauro.
> Extensions by restrictions and unwrapping
> -----------------------------------------
>
> Key: AXIS2-3391
> URL: https://issues.apache.org/jira/browse/AXIS2-3391
> Project: Axis 2.0 (Axis2)
> Issue Type: Improvement
> Components: codegen
> Affects Versions: 1.3
> Reporter: Mauro Molinari
> Assignee: Amila Chinthaka Suriarachchi
>
> Suppose you have the following WSDL:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://www.example.org/ProvaRestriction/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ProvaRestriction"
> targetNamespace="http://www.example.org/ProvaRestriction/">
> <wsdl:types>
> <xsd:schema targetNamespace="http://www.example.org/ProvaRestriction/">
> <xsd:element name="operation">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="in">
> <xsd:simpleType>
> <xsd:restriction base="xsd:int">
> <xsd:minInclusive value="1"></xsd:minInclusive>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="operationResponse">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="out" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="operationRequest">
> <wsdl:part element="tns:operation" name="parameters"/>
> </wsdl:message>
> <wsdl:message name="operationResponse">
> <wsdl:part element="tns:operationResponse" name="parameters"/>
> </wsdl:message>
> <wsdl:portType name="ProvaRestriction">
> <wsdl:operation name="operation">
> <wsdl:input message="tns:operationRequest"/>
> <wsdl:output message="tns:operationResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="ProvaChoiceSOAP" type="tns:ProvaRestriction">
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
> <wsdl:operation name="operation">
> <soap:operation
> soapAction="http://www.example.org/ProvaChoice/operation" />
> <wsdl:input>
> <soap:body use="literal" />
> </wsdl:input>
> <wsdl:output>
> <soap:body use="literal" />
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="ProvaRestriction">
> <wsdl:port binding="tns:ProvaChoiceSOAP" name="ProvaRestrictionSOAP">
> <soap:address location="http://www.example.org/"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> Try to call WSDL2Java on this WSDL, generating the server side code and using
> unwrapping (-uw) option. The method generated in the skeleton for operation
> named "operation" is the following:
> public java.lang.String operation(org.example.www.provarestriction.In_type1
> in)
> This is quite ugly, I think... I would expect to find:
> public java.lang.String operation(int in)
> because the type of the "in" element is just a restriction for xsd:int
> stating that the value must be >= 1.
> I know that unwrapping goes just 1 level deep to unwrap parameters, but I
> think that in some cases (like this one) it should go further...
> Moreover, I can't understand why a class named In_type0 is generated in the
> default (unnamed) package, while it seems not to be used anywhere...
> Mauro.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]