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 "Murugadas Karunanithi (JIRA)" <ji...@apache.org> on 2010/07/08 22:47:49 UTC

[jira] Created: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
------------------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2-4766
                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
             Project: Axis2
          Issue Type: Bug
          Components: adb
    Affects Versions: 1.3
            Reporter: Murugadas Karunanithi
            Priority: Critical


Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Balaji



-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4766.
------------------------------------

    Resolution: Invalid

Please don't clone issues without valid reason.

> CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4766
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>            Reporter: Murugadas Karunanithi
>            Priority: Critical
>
> Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.
> This causes issues when the response has elements of sub-types.
> Snippet from WSDL definition:
> - <xs:complexType name="RuleDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
> ...
>   <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
> </xs:sequence>
>  </xs:complexType>
> Definition of SubjectDTO (which has following sub types).
> <xs:complexType name="SubjectDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
>   <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
>   </xs:sequence>
>   </xs:complexType>
> - <xs:complexType name="SubjectCollectionDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectDTO">
> - <xs:sequence>
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
>   <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
>   </xs:sequence>
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> - <xs:complexType name="SubjectLinesDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectCollectionDTO">
>   <xs:sequence /> 
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> Server Response :
> <return type="com.bmc.bcan.dto.RuleDTO">
> 		<ns1:annotation></ns1:annotation>
> 		<ns1:applicableTrails
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
> 		<ns1:deviceTypeId>0</ns1:deviceTypeId>
>                <!-- SubType Element -->
> 		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
>                     <ns1:collection>set mls flow full</ns1:collection>
>                     <ns1:collection>
>                         set mls nde ${global.netflowDestination}
>                         ${global.netflowPort}
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls nde version 5
>                     </ns1:collection>
>                     <ns1:collection>set mls nde enable</ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime long 64
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime fast 16 0
>                     </ns1:collection>
>                     <ns1:contiguous>false</ns1:contiguous>
>                     <ns1:ordered>false</ns1:ordered>
>                     <ns1:caseSensitive>false</ns1:caseSensitive>
>                     <ns1:frequency>2</ns1:frequency>
>                     <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
>                     <ns1:key type="com.bmc.bcan.dto.KeyDTO">
>                         <ns1:keyString>458169663-121</ns1:keyString>
>                     </ns1:key>
>                 </ns1:subject>
>                 <ns1:substitutionValidation>
>                     true
>                 </ns1:substitutionValidation>
>                 <ns1:trigger
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                     xsi:nil="true" />
>                 <ns1:violationSeverity>5</ns1:violationSeverity>
>             </return>
> The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
> in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
> 	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
> 	... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
> 	... 5 more
> Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.
> -Balaji

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

Posted by "Murugadas Karunanithi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Murugadas Karunanithi updated AXIS2-4766:
-----------------------------------------

     Original Estimate: 120h
    Remaining Estimate: 120h
     Affects Version/s: 1.4
                            (was: 1.3)
           Environment: JDK 1.4, WAS 6.0
           Description: 
Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Murugadas



  was:
Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Balaji




> CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4766
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4
>         Environment: JDK 1.4, WAS 6.0
>            Reporter: Murugadas Karunanithi
>            Priority: Critical
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.
> This causes issues when the response has elements of sub-types.
> Snippet from WSDL definition:
> - <xs:complexType name="RuleDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
> ...
>   <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
> </xs:sequence>
>  </xs:complexType>
> Definition of SubjectDTO (which has following sub types).
> <xs:complexType name="SubjectDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
>   <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
>   </xs:sequence>
>   </xs:complexType>
> - <xs:complexType name="SubjectCollectionDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectDTO">
> - <xs:sequence>
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
>   <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
>   </xs:sequence>
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> - <xs:complexType name="SubjectLinesDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectCollectionDTO">
>   <xs:sequence /> 
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> Server Response :
> <return type="com.bmc.bcan.dto.RuleDTO">
> 		<ns1:annotation></ns1:annotation>
> 		<ns1:applicableTrails
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
> 		<ns1:deviceTypeId>0</ns1:deviceTypeId>
>                <!-- SubType Element -->
> 		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
>                     <ns1:collection>set mls flow full</ns1:collection>
>                     <ns1:collection>
>                         set mls nde ${global.netflowDestination}
>                         ${global.netflowPort}
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls nde version 5
>                     </ns1:collection>
>                     <ns1:collection>set mls nde enable</ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime long 64
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime fast 16 0
>                     </ns1:collection>
>                     <ns1:contiguous>false</ns1:contiguous>
>                     <ns1:ordered>false</ns1:ordered>
>                     <ns1:caseSensitive>false</ns1:caseSensitive>
>                     <ns1:frequency>2</ns1:frequency>
>                     <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
>                     <ns1:key type="com.bmc.bcan.dto.KeyDTO">
>                         <ns1:keyString>458169663-121</ns1:keyString>
>                     </ns1:key>
>                 </ns1:subject>
>                 <ns1:substitutionValidation>
>                     true
>                 </ns1:substitutionValidation>
>                 <ns1:trigger
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                     xsi:nil="true" />
>                 <ns1:violationSeverity>5</ns1:violationSeverity>
>             </return>
> The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
> in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
> 	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
> 	... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
> 	... 5 more
> Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.
> -Murugadas

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

Posted by "Murugadas Karunanithi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Murugadas Karunanithi updated AXIS2-4766:
-----------------------------------------

     Original Estimate: 120h
    Remaining Estimate: 120h
     Affects Version/s: 1.4
                            (was: 1.3)
           Environment: JDK 1.4, WAS 6.0
           Description: 
Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Murugadas



  was:
Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Balaji




> CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4766
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4
>         Environment: JDK 1.4, WAS 6.0
>            Reporter: Murugadas Karunanithi
>            Priority: Critical
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.
> This causes issues when the response has elements of sub-types.
> Snippet from WSDL definition:
> - <xs:complexType name="RuleDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
> ...
>   <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
> </xs:sequence>
>  </xs:complexType>
> Definition of SubjectDTO (which has following sub types).
> <xs:complexType name="SubjectDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
>   <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
>   </xs:sequence>
>   </xs:complexType>
> - <xs:complexType name="SubjectCollectionDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectDTO">
> - <xs:sequence>
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
>   <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
>   </xs:sequence>
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> - <xs:complexType name="SubjectLinesDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectCollectionDTO">
>   <xs:sequence /> 
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> Server Response :
> <return type="com.bmc.bcan.dto.RuleDTO">
> 		<ns1:annotation></ns1:annotation>
> 		<ns1:applicableTrails
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
> 		<ns1:deviceTypeId>0</ns1:deviceTypeId>
>                <!-- SubType Element -->
> 		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
>                     <ns1:collection>set mls flow full</ns1:collection>
>                     <ns1:collection>
>                         set mls nde ${global.netflowDestination}
>                         ${global.netflowPort}
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls nde version 5
>                     </ns1:collection>
>                     <ns1:collection>set mls nde enable</ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime long 64
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime fast 16 0
>                     </ns1:collection>
>                     <ns1:contiguous>false</ns1:contiguous>
>                     <ns1:ordered>false</ns1:ordered>
>                     <ns1:caseSensitive>false</ns1:caseSensitive>
>                     <ns1:frequency>2</ns1:frequency>
>                     <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
>                     <ns1:key type="com.bmc.bcan.dto.KeyDTO">
>                         <ns1:keyString>458169663-121</ns1:keyString>
>                     </ns1:key>
>                 </ns1:subject>
>                 <ns1:substitutionValidation>
>                     true
>                 </ns1:substitutionValidation>
>                 <ns1:trigger
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                     xsi:nil="true" />
>                 <ns1:violationSeverity>5</ns1:violationSeverity>
>             </return>
> The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
> in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
> 	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
> 	... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
> 	... 5 more
> Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.
> -Murugadas

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

Posted by "Murugadas Karunanithi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Murugadas Karunanithi updated AXIS2-4766:
-----------------------------------------

     Original Estimate: 120h
    Remaining Estimate: 120h
     Affects Version/s: 1.4
                            (was: 1.3)
           Environment: JDK 1.4, WAS 6.0
           Description: 
Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Murugadas



  was:
Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Balaji




> CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4766
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4
>         Environment: JDK 1.4, WAS 6.0
>            Reporter: Murugadas Karunanithi
>            Priority: Critical
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.
> This causes issues when the response has elements of sub-types.
> Snippet from WSDL definition:
> - <xs:complexType name="RuleDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
> ...
>   <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
> </xs:sequence>
>  </xs:complexType>
> Definition of SubjectDTO (which has following sub types).
> <xs:complexType name="SubjectDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
>   <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
>   </xs:sequence>
>   </xs:complexType>
> - <xs:complexType name="SubjectCollectionDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectDTO">
> - <xs:sequence>
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
>   <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
>   </xs:sequence>
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> - <xs:complexType name="SubjectLinesDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectCollectionDTO">
>   <xs:sequence /> 
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> Server Response :
> <return type="com.bmc.bcan.dto.RuleDTO">
> 		<ns1:annotation></ns1:annotation>
> 		<ns1:applicableTrails
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
> 		<ns1:deviceTypeId>0</ns1:deviceTypeId>
>                <!-- SubType Element -->
> 		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
>                     <ns1:collection>set mls flow full</ns1:collection>
>                     <ns1:collection>
>                         set mls nde ${global.netflowDestination}
>                         ${global.netflowPort}
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls nde version 5
>                     </ns1:collection>
>                     <ns1:collection>set mls nde enable</ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime long 64
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime fast 16 0
>                     </ns1:collection>
>                     <ns1:contiguous>false</ns1:contiguous>
>                     <ns1:ordered>false</ns1:ordered>
>                     <ns1:caseSensitive>false</ns1:caseSensitive>
>                     <ns1:frequency>2</ns1:frequency>
>                     <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
>                     <ns1:key type="com.bmc.bcan.dto.KeyDTO">
>                         <ns1:keyString>458169663-121</ns1:keyString>
>                     </ns1:key>
>                 </ns1:subject>
>                 <ns1:substitutionValidation>
>                     true
>                 </ns1:substitutionValidation>
>                 <ns1:trigger
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                     xsi:nil="true" />
>                 <ns1:violationSeverity>5</ns1:violationSeverity>
>             </return>
> The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
> in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
> 	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
> 	... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
> 	... 5 more
> Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.
> -Murugadas

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4766.
------------------------------------

    Resolution: Invalid

Please don't clone issues without valid reason.

> CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4766
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>            Reporter: Murugadas Karunanithi
>            Priority: Critical
>
> Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.
> This causes issues when the response has elements of sub-types.
> Snippet from WSDL definition:
> - <xs:complexType name="RuleDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
> ...
>   <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
> </xs:sequence>
>  </xs:complexType>
> Definition of SubjectDTO (which has following sub types).
> <xs:complexType name="SubjectDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
>   <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
>   </xs:sequence>
>   </xs:complexType>
> - <xs:complexType name="SubjectCollectionDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectDTO">
> - <xs:sequence>
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
>   <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
>   </xs:sequence>
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> - <xs:complexType name="SubjectLinesDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectCollectionDTO">
>   <xs:sequence /> 
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> Server Response :
> <return type="com.bmc.bcan.dto.RuleDTO">
> 		<ns1:annotation></ns1:annotation>
> 		<ns1:applicableTrails
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
> 		<ns1:deviceTypeId>0</ns1:deviceTypeId>
>                <!-- SubType Element -->
> 		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
>                     <ns1:collection>set mls flow full</ns1:collection>
>                     <ns1:collection>
>                         set mls nde ${global.netflowDestination}
>                         ${global.netflowPort}
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls nde version 5
>                     </ns1:collection>
>                     <ns1:collection>set mls nde enable</ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime long 64
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime fast 16 0
>                     </ns1:collection>
>                     <ns1:contiguous>false</ns1:contiguous>
>                     <ns1:ordered>false</ns1:ordered>
>                     <ns1:caseSensitive>false</ns1:caseSensitive>
>                     <ns1:frequency>2</ns1:frequency>
>                     <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
>                     <ns1:key type="com.bmc.bcan.dto.KeyDTO">
>                         <ns1:keyString>458169663-121</ns1:keyString>
>                     </ns1:key>
>                 </ns1:subject>
>                 <ns1:substitutionValidation>
>                     true
>                 </ns1:substitutionValidation>
>                 <ns1:trigger
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                     xsi:nil="true" />
>                 <ns1:violationSeverity>5</ns1:violationSeverity>
>             </return>
> The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
> in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
> 	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
> 	... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
> 	... 5 more
> Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.
> -Balaji

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

Posted by "Murugadas Karunanithi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Murugadas Karunanithi updated AXIS2-4766:
-----------------------------------------

     Original Estimate: 120h
    Remaining Estimate: 120h
     Affects Version/s: 1.4
                            (was: 1.3)
           Environment: JDK 1.4, WAS 6.0
           Description: 
Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Murugadas



  was:
Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Balaji




> CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4766
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4
>         Environment: JDK 1.4, WAS 6.0
>            Reporter: Murugadas Karunanithi
>            Priority: Critical
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.
> This causes issues when the response has elements of sub-types.
> Snippet from WSDL definition:
> - <xs:complexType name="RuleDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
> ...
>   <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
> </xs:sequence>
>  </xs:complexType>
> Definition of SubjectDTO (which has following sub types).
> <xs:complexType name="SubjectDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
>   <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
>   </xs:sequence>
>   </xs:complexType>
> - <xs:complexType name="SubjectCollectionDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectDTO">
> - <xs:sequence>
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
>   <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
>   </xs:sequence>
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> - <xs:complexType name="SubjectLinesDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectCollectionDTO">
>   <xs:sequence /> 
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> Server Response :
> <return type="com.bmc.bcan.dto.RuleDTO">
> 		<ns1:annotation></ns1:annotation>
> 		<ns1:applicableTrails
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
> 		<ns1:deviceTypeId>0</ns1:deviceTypeId>
>                <!-- SubType Element -->
> 		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
>                     <ns1:collection>set mls flow full</ns1:collection>
>                     <ns1:collection>
>                         set mls nde ${global.netflowDestination}
>                         ${global.netflowPort}
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls nde version 5
>                     </ns1:collection>
>                     <ns1:collection>set mls nde enable</ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime long 64
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime fast 16 0
>                     </ns1:collection>
>                     <ns1:contiguous>false</ns1:contiguous>
>                     <ns1:ordered>false</ns1:ordered>
>                     <ns1:caseSensitive>false</ns1:caseSensitive>
>                     <ns1:frequency>2</ns1:frequency>
>                     <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
>                     <ns1:key type="com.bmc.bcan.dto.KeyDTO">
>                         <ns1:keyString>458169663-121</ns1:keyString>
>                     </ns1:key>
>                 </ns1:subject>
>                 <ns1:substitutionValidation>
>                     true
>                 </ns1:substitutionValidation>
>                 <ns1:trigger
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                     xsi:nil="true" />
>                 <ns1:violationSeverity>5</ns1:violationSeverity>
>             </return>
> The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
> in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
> 	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
> 	... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
> 	... 5 more
> Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.
> -Murugadas

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4766.
------------------------------------

    Resolution: Invalid

Please don't clone issues without valid reason.

> CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4766
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>            Reporter: Murugadas Karunanithi
>            Priority: Critical
>
> Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.
> This causes issues when the response has elements of sub-types.
> Snippet from WSDL definition:
> - <xs:complexType name="RuleDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
> ...
>   <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
> </xs:sequence>
>  </xs:complexType>
> Definition of SubjectDTO (which has following sub types).
> <xs:complexType name="SubjectDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
>   <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
>   </xs:sequence>
>   </xs:complexType>
> - <xs:complexType name="SubjectCollectionDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectDTO">
> - <xs:sequence>
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
>   <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
>   </xs:sequence>
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> - <xs:complexType name="SubjectLinesDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectCollectionDTO">
>   <xs:sequence /> 
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> Server Response :
> <return type="com.bmc.bcan.dto.RuleDTO">
> 		<ns1:annotation></ns1:annotation>
> 		<ns1:applicableTrails
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
> 		<ns1:deviceTypeId>0</ns1:deviceTypeId>
>                <!-- SubType Element -->
> 		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
>                     <ns1:collection>set mls flow full</ns1:collection>
>                     <ns1:collection>
>                         set mls nde ${global.netflowDestination}
>                         ${global.netflowPort}
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls nde version 5
>                     </ns1:collection>
>                     <ns1:collection>set mls nde enable</ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime long 64
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime fast 16 0
>                     </ns1:collection>
>                     <ns1:contiguous>false</ns1:contiguous>
>                     <ns1:ordered>false</ns1:ordered>
>                     <ns1:caseSensitive>false</ns1:caseSensitive>
>                     <ns1:frequency>2</ns1:frequency>
>                     <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
>                     <ns1:key type="com.bmc.bcan.dto.KeyDTO">
>                         <ns1:keyString>458169663-121</ns1:keyString>
>                     </ns1:key>
>                 </ns1:subject>
>                 <ns1:substitutionValidation>
>                     true
>                 </ns1:substitutionValidation>
>                 <ns1:trigger
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                     xsi:nil="true" />
>                 <ns1:violationSeverity>5</ns1:violationSeverity>
>             </return>
> The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
> in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
> 	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
> 	... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
> 	... 5 more
> Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.
> -Balaji

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

Posted by "Murugadas Karunanithi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Murugadas Karunanithi updated AXIS2-4766:
-----------------------------------------

     Original Estimate: 120h
    Remaining Estimate: 120h
     Affects Version/s: 1.4
                            (was: 1.3)
           Environment: JDK 1.4, WAS 6.0
           Description: 
Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Murugadas



  was:
Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.

This causes issues when the response has elements of sub-types.

Snippet from WSDL definition:

- <xs:complexType name="RuleDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
  <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
...
  <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
</xs:sequence>
 </xs:complexType>

Definition of SubjectDTO (which has following sub types).

<xs:complexType name="SubjectDTO">
- <xs:sequence>
  <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
  <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
  <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>


- <xs:complexType name="SubjectCollectionDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectDTO">
- <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
  <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
  <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
  </xs:sequence>
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

- <xs:complexType name="SubjectLinesDTO">
- <xs:complexContent>
- <xs:extension base="ax21:SubjectCollectionDTO">
  <xs:sequence /> 
  </xs:extension>
  </xs:complexContent>
  </xs:complexType>

Server Response :

<return type="com.bmc.bcan.dto.RuleDTO">
		<ns1:annotation></ns1:annotation>
		<ns1:applicableTrails
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
		<ns1:deviceTypeId>0</ns1:deviceTypeId>
               <!-- SubType Element -->
		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
                    <ns1:collection>set mls flow full</ns1:collection>
                    <ns1:collection>
                        set mls nde ${global.netflowDestination}
                        ${global.netflowPort}
                    </ns1:collection>
                    <ns1:collection>
                        set mls nde version 5
                    </ns1:collection>
                    <ns1:collection>set mls nde enable</ns1:collection>
                    <ns1:collection>
                        set mls agingtime long 64
                    </ns1:collection>
                    <ns1:collection>
                        set mls agingtime fast 16 0
                    </ns1:collection>
                    <ns1:contiguous>false</ns1:contiguous>
                    <ns1:ordered>false</ns1:ordered>
                    <ns1:caseSensitive>false</ns1:caseSensitive>
                    <ns1:frequency>2</ns1:frequency>
                    <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
                    <ns1:key type="com.bmc.bcan.dto.KeyDTO">
                        <ns1:keyString>458169663-121</ns1:keyString>
                    </ns1:key>
                </ns1:subject>
                <ns1:substitutionValidation>
                    true
                </ns1:substitutionValidation>
                <ns1:trigger
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:nil="true" />
                <ns1:violationSeverity>5</ns1:violationSeverity>
            </return>

The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type


Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
	... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
	... 5 more

Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.

-Balaji




> CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4766
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4
>         Environment: JDK 1.4, WAS 6.0
>            Reporter: Murugadas Karunanithi
>            Priority: Critical
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.
> This causes issues when the response has elements of sub-types.
> Snippet from WSDL definition:
> - <xs:complexType name="RuleDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
> ...
>   <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
> </xs:sequence>
>  </xs:complexType>
> Definition of SubjectDTO (which has following sub types).
> <xs:complexType name="SubjectDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
>   <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
>   </xs:sequence>
>   </xs:complexType>
> - <xs:complexType name="SubjectCollectionDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectDTO">
> - <xs:sequence>
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
>   <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
>   </xs:sequence>
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> - <xs:complexType name="SubjectLinesDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectCollectionDTO">
>   <xs:sequence /> 
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> Server Response :
> <return type="com.bmc.bcan.dto.RuleDTO">
> 		<ns1:annotation></ns1:annotation>
> 		<ns1:applicableTrails
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
> 		<ns1:deviceTypeId>0</ns1:deviceTypeId>
>                <!-- SubType Element -->
> 		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
>                     <ns1:collection>set mls flow full</ns1:collection>
>                     <ns1:collection>
>                         set mls nde ${global.netflowDestination}
>                         ${global.netflowPort}
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls nde version 5
>                     </ns1:collection>
>                     <ns1:collection>set mls nde enable</ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime long 64
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime fast 16 0
>                     </ns1:collection>
>                     <ns1:contiguous>false</ns1:contiguous>
>                     <ns1:ordered>false</ns1:ordered>
>                     <ns1:caseSensitive>false</ns1:caseSensitive>
>                     <ns1:frequency>2</ns1:frequency>
>                     <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
>                     <ns1:key type="com.bmc.bcan.dto.KeyDTO">
>                         <ns1:keyString>458169663-121</ns1:keyString>
>                     </ns1:key>
>                 </ns1:subject>
>                 <ns1:substitutionValidation>
>                     true
>                 </ns1:substitutionValidation>
>                 <ns1:trigger
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                     xsi:nil="true" />
>                 <ns1:violationSeverity>5</ns1:violationSeverity>
>             </return>
> The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
> in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
> 	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
> 	... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
> 	... 5 more
> Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.
> -Murugadas

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4766.
------------------------------------

    Resolution: Invalid

Please don't clone issues without valid reason.

> CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4766
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>            Reporter: Murugadas Karunanithi
>            Priority: Critical
>
> Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.
> This causes issues when the response has elements of sub-types.
> Snippet from WSDL definition:
> - <xs:complexType name="RuleDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
> ...
>   <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
> </xs:sequence>
>  </xs:complexType>
> Definition of SubjectDTO (which has following sub types).
> <xs:complexType name="SubjectDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
>   <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
>   </xs:sequence>
>   </xs:complexType>
> - <xs:complexType name="SubjectCollectionDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectDTO">
> - <xs:sequence>
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
>   <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
>   </xs:sequence>
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> - <xs:complexType name="SubjectLinesDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectCollectionDTO">
>   <xs:sequence /> 
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> Server Response :
> <return type="com.bmc.bcan.dto.RuleDTO">
> 		<ns1:annotation></ns1:annotation>
> 		<ns1:applicableTrails
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
> 		<ns1:deviceTypeId>0</ns1:deviceTypeId>
>                <!-- SubType Element -->
> 		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
>                     <ns1:collection>set mls flow full</ns1:collection>
>                     <ns1:collection>
>                         set mls nde ${global.netflowDestination}
>                         ${global.netflowPort}
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls nde version 5
>                     </ns1:collection>
>                     <ns1:collection>set mls nde enable</ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime long 64
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime fast 16 0
>                     </ns1:collection>
>                     <ns1:contiguous>false</ns1:contiguous>
>                     <ns1:ordered>false</ns1:ordered>
>                     <ns1:caseSensitive>false</ns1:caseSensitive>
>                     <ns1:frequency>2</ns1:frequency>
>                     <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
>                     <ns1:key type="com.bmc.bcan.dto.KeyDTO">
>                         <ns1:keyString>458169663-121</ns1:keyString>
>                     </ns1:key>
>                 </ns1:subject>
>                 <ns1:substitutionValidation>
>                     true
>                 </ns1:substitutionValidation>
>                 <ns1:trigger
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                     xsi:nil="true" />
>                 <ns1:violationSeverity>5</ns1:violationSeverity>
>             </return>
> The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
> in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
> 	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
> 	... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
> 	... 5 more
> Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.
> -Balaji

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4766) CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4766.
------------------------------------

    Resolution: Invalid

Please don't clone issues without valid reason.

> CLONE -Subclass elements in web service response returned with type="fully qualified class name" instead of xsi:type="ns:SchemaType"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4766
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4766
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>            Reporter: Murugadas Karunanithi
>            Priority: Critical
>
> Axis2 service returns type="com.bmc.bcan.dto.SubjectLinesDTO" instead of xsi:type="ns1:SubjectLinesDTO" in soap response.
> This causes issues when the response has elements of sub-types.
> Snippet from WSDL definition:
> - <xs:complexType name="RuleDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="annotation" nillable="true" type="xs:string" /> 
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="applicableTrails" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="deviceTypeId" nillable="true" type="xs:int" /> 
> ...
>   <xs:element minOccurs="0" name="subject" nillable="true" type="ax21:SubjectDTO" /> 
> </xs:sequence>
>  </xs:complexType>
> Definition of SubjectDTO (which has following sub types).
> <xs:complexType name="SubjectDTO">
> - <xs:sequence>
>   <xs:element minOccurs="0" name="caseSensitive" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="frequency" nillable="true" type="xs:int" /> 
>   <xs:element minOccurs="0" name="ignoreWhitespace" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="key" nillable="true" type="ax21:KeyDTO" /> 
>   <xs:element minOccurs="0" name="COMPONENT_CLASSNAME" nillable="true" type="xs:string" /> 
>   </xs:sequence>
>   </xs:complexType>
> - <xs:complexType name="SubjectCollectionDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectDTO">
> - <xs:sequence>
>   <xs:element maxOccurs="unbounded" minOccurs="0" name="collection" nillable="true" type="xs:string" /> 
>   <xs:element minOccurs="0" name="contiguous" type="xs:boolean" /> 
>   <xs:element minOccurs="0" name="ordered" type="xs:boolean" /> 
>   </xs:sequence>
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> - <xs:complexType name="SubjectLinesDTO">
> - <xs:complexContent>
> - <xs:extension base="ax21:SubjectCollectionDTO">
>   <xs:sequence /> 
>   </xs:extension>
>   </xs:complexContent>
>   </xs:complexType>
> Server Response :
> <return type="com.bmc.bcan.dto.RuleDTO">
> 		<ns1:annotation></ns1:annotation>
> 		<ns1:applicableTrails
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
> 		<ns1:deviceTypeId>0</ns1:deviceTypeId>
>                <!-- SubType Element -->
> 		   <ns1:subject type="com.bmc.bcan.dto.SubjectLinesDTO">
>                     <ns1:collection>set mls flow full</ns1:collection>
>                     <ns1:collection>
>                         set mls nde ${global.netflowDestination}
>                         ${global.netflowPort}
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls nde version 5
>                     </ns1:collection>
>                     <ns1:collection>set mls nde enable</ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime long 64
>                     </ns1:collection>
>                     <ns1:collection>
>                         set mls agingtime fast 16 0
>                     </ns1:collection>
>                     <ns1:contiguous>false</ns1:contiguous>
>                     <ns1:ordered>false</ns1:ordered>
>                     <ns1:caseSensitive>false</ns1:caseSensitive>
>                     <ns1:frequency>2</ns1:frequency>
>                     <ns1:ignoreWhitespace>true</ns1:ignoreWhitespace>
>                     <ns1:key type="com.bmc.bcan.dto.KeyDTO">
>                         <ns1:keyString>458169663-121</ns1:keyString>
>                     </ns1:key>
>                 </ns1:subject>
>                 <ns1:substitutionValidation>
>                     true
>                 </ns1:substitutionValidation>
>                 <ns1:trigger
>                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                     xsi:nil="true" />
>                 <ns1:violationSeverity>5</ns1:violationSeverity>
>             </return>
> The base type in RuleDTO has been defined as SubjectDTO. Since the type attribute is not xsi:type
> in the client SubjectDTO.Factory.parse() is called which can't find the elements of sub-type
> Exception in thread "main" org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30216)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.getRules(RuleServiceStub.java:498)
> 	at com.bmc.bcan.ws.test.RuleServiceTest.main(RuleServiceTest.java:39)
> Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20920)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$RuleDTO$Factory.parse(RuleServiceStub.java:7711)
> 	at com.bmc.bcan.ws.service.RuleServiceStub$GetRulesResponse$Factory.parse(RuleServiceStub.java:8372)
> 	at com.bmc.bcan.ws.service.RuleServiceStub.fromOM(RuleServiceStub.java:30196)
> 	... 2 more
> Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement collection
> 	at com.bmc.bcan.ws.service.RuleServiceStub$SubjectDTO$Factory.parse(RuleServiceStub.java:20914)
> 	... 5 more
> Is this a know issue. Any fix or axis services.xml parameter on the server side will be helpful.
> -Balaji

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org