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 "Subir S (JIRA)" <ax...@ws.apache.org> on 2005/10/23 17:42:15 UTC

[jira] Created: (AXIS-2269) Serialization of user_defined enums are not done.

Serialization of user_defined enums are not done.
-------------------------------------------------

         Key: AXIS-2269
         URL: http://issues.apache.org/jira/browse/AXIS-2269
     Project: Apache Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.2    
 Environment: Windows XP OS
Tomcat 4.1.18 AppServer
jdk1.5.0_03-b07
Axis 1.2 Final Release
    Reporter: Subir S


I recently upgraded from Axis 1.1 to Axis 1.2. and jdk 1.4.2_04 to jdk1.5.0_03
The issue that i faced were
Enum classes were not generated using WSDL2Java as the restriction base for the 
SimpleType was soapenc:string.

       I resolved this with the advice from dims to keep the "dotNetSoapEncFix" 
       global parameter in server-config.wsdd to "true". [Bug Fix AXIS-1834]
       This created the Enum classes successfully and the Soap requests were send successfully.

"One important thing is that the bug i am going to describe is reproducible even if enums are generated or not".              

But this Fix is not complete. Though the enum classes are generated using WSDL2Java successfully
and the SOAP request is also send the response bean is not returned correctly. 

The bean class that i defined has a class variable of this enum class type. 
My WebService has a return type of this bean. While returning the bean it gives me the following
exception in catalina.out:

Caused by: java.io.IOException: No serializer found for class 
com.soap.auxiliary.ScheduleValidationStatusEnum in registry 
org.apache.axis.encoding.TypeMappingDelegate@1c501f7
        at org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
zationContext.java:1420)
        at org.apache.axis.encoding.SerializationContext.serialize(Serialization
Context.java:912)
        at org.apache.axis.encoding.SerializationContext.outputMultiRefs(Seriali
zationContext.java:987)
        at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145)
        at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477
)
        at org.apache.axis.message.MessageElement.output(MessageElement.java:120
7)
        at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
        ... 36 more



AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXParseException: Premature end of file.
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: P
remature end of file.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
        at org.apache.axis.encoding.DeserializationContext.parse(Deserialization
Context.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
tandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        
        
        

My deploy.wsdd has following type mapping

        <typeMapping
                xmlns:myNS="urn:ScheduleServices"
                qname="myNS:ScheduleValidationStatusEnum"
                languageSpecificType ="java:com.soap.auxiliary.ScheduleValidationStatusEnum"
                serializer="org.apache.axis.encoding.ser.EnumSerializerFactory"
                deserializer ="org.apache.axis.encoding.ser.EnumDeserializerFactory"
                encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        />


My ?wsdl contains the following

- <simpleType name="ScheduleValidationStatusEnum">
- <restriction base="xsd:string">
  <enumeration value="dirty" /> 
  <enumeration value="valid" /> 
  <enumeration value="overbook" /> 
  <enumeration value="invprice" /> 
  <enumeration value="invcost" /> 
  <enumeration value="invtopic" /> 
  <enumeration value="invdcm" /> 
  <enumeration value="noip" /> 
  <enumeration value="noport" /> 
  <enumeration value="nobw" /> 
  <enumeration value="invdcs" /> 
  <enumeration value="invsi" /> 
  <enumeration value="invcp" /> 
  </restriction>
  </simpleType>
  
  
  
  Can somebody help me out and tell me if there is any fix for this. I have a lot of WebServices similar to this.
  Changing this would mean that i have to change the whole idea of our project. 

  Any inputs would be valuable

          --Subir


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2269) Serialization of user_defined enums are not done.

Posted by "Subir S (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2269?page=comments#action_12356380 ] 

Subir S commented on AXIS-2269:
-------------------------------

Hi Dims,

Please close this issue.
I gave a wrong encoding Style for that particular enum for ScheduleServices. Other services were working fine. So i noticed the difference. I changed it to Style below and it worked.

       <typeMapping 
                xmlns:myNS="urn:ScheduleServices" 
                qname="myNS:ScheduleValidationStatusEnum" 
                languageSpecificType ="java:com.soap.auxiliary.ScheduleValidationStatusEnum" 
                serializer="org.apache.axis.encoding.ser.EnumSerializerFactory" 
                deserializer ="org.apache.axis.encoding.ser.EnumDeserializerFactory" 
                encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
        /> 

                --Subir

> Serialization of user_defined enums are not done.
> -------------------------------------------------
>
>          Key: AXIS-2269
>          URL: http://issues.apache.org/jira/browse/AXIS-2269
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2
>  Environment: Windows XP OS
> Tomcat 4.1.18 AppServer
> jdk1.5.0_03-b07
> Axis 1.2 Final Release
>     Reporter: Subir S

>
> I recently upgraded from Axis 1.1 to Axis 1.2. and jdk 1.4.2_04 to jdk1.5.0_03
> The issue that i faced were
> Enum classes were not generated using WSDL2Java as the restriction base for the 
> SimpleType was soapenc:string.
>        I resolved this with the advice from dims to keep the "dotNetSoapEncFix" 
>        global parameter in server-config.wsdd to "true". [Bug Fix AXIS-1834]
>        This created the Enum classes successfully and the Soap requests were send successfully.
> "One important thing is that the bug i am going to describe is reproducible even if enums are generated or not".              
> But this Fix is not complete. Though the enum classes are generated using WSDL2Java successfully
> and the SOAP request is also send the response bean is not returned correctly. 
> The bean class that i defined has a class variable of this enum class type. 
> My WebService has a return type of this bean. While returning the bean it gives me the following
> exception in catalina.out:
> Caused by: java.io.IOException: No serializer found for class 
> com.soap.auxiliary.ScheduleValidationStatusEnum in registry 
> org.apache.axis.encoding.TypeMappingDelegate@1c501f7
>         at org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1420)
>         at org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:912)
>         at org.apache.axis.encoding.SerializationContext.outputMultiRefs(Seriali
> zationContext.java:987)
>         at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145)
>         at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477
> )
>         at org.apache.axis.message.MessageElement.output(MessageElement.java:120
> 7)
>         at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
>         ... 36 more
> AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: org.xml.sax.SAXParseException: Premature end of file.
>  faultActor:
>  faultNode:
>  faultDetail:
>         {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: P
> remature end of file.
>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>         at org.apache.axis.encoding.DeserializationContext.parse(Deserialization
> Context.java:227)
>         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
>         at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
>         at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
> tandChecker.java:62)
>         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
>         
>         
>         
> My deploy.wsdd has following type mapping
>         <typeMapping
>                 xmlns:myNS="urn:ScheduleServices"
>                 qname="myNS:ScheduleValidationStatusEnum"
>                 languageSpecificType ="java:com.soap.auxiliary.ScheduleValidationStatusEnum"
>                 serializer="org.apache.axis.encoding.ser.EnumSerializerFactory"
>                 deserializer ="org.apache.axis.encoding.ser.EnumDeserializerFactory"
>                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>         />
> My ?wsdl contains the following
> - <simpleType name="ScheduleValidationStatusEnum">
> - <restriction base="xsd:string">
>   <enumeration value="dirty" /> 
>   <enumeration value="valid" /> 
>   <enumeration value="overbook" /> 
>   <enumeration value="invprice" /> 
>   <enumeration value="invcost" /> 
>   <enumeration value="invtopic" /> 
>   <enumeration value="invdcm" /> 
>   <enumeration value="noip" /> 
>   <enumeration value="noport" /> 
>   <enumeration value="nobw" /> 
>   <enumeration value="invdcs" /> 
>   <enumeration value="invsi" /> 
>   <enumeration value="invcp" /> 
>   </restriction>
>   </simpleType>
>   
>   
>   
>   Can somebody help me out and tell me if there is any fix for this. I have a lot of WebServices similar to this.
>   Changing this would mean that i have to change the whole idea of our project. 
>   Any inputs would be valuable
>           --Subir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXIS-2269) Serialization of user_defined enums are not done.

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2269?page=all ]
     
Tom Jordahl closed AXIS-2269:
-----------------------------

    Resolution: Invalid

closing per Subir's comments.

> Serialization of user_defined enums are not done.
> -------------------------------------------------
>
>          Key: AXIS-2269
>          URL: http://issues.apache.org/jira/browse/AXIS-2269
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2
>  Environment: Windows XP OS
> Tomcat 4.1.18 AppServer
> jdk1.5.0_03-b07
> Axis 1.2 Final Release
>     Reporter: Subir S

>
> I recently upgraded from Axis 1.1 to Axis 1.2. and jdk 1.4.2_04 to jdk1.5.0_03
> The issue that i faced were
> Enum classes were not generated using WSDL2Java as the restriction base for the 
> SimpleType was soapenc:string.
>        I resolved this with the advice from dims to keep the "dotNetSoapEncFix" 
>        global parameter in server-config.wsdd to "true". [Bug Fix AXIS-1834]
>        This created the Enum classes successfully and the Soap requests were send successfully.
> "One important thing is that the bug i am going to describe is reproducible even if enums are generated or not".              
> But this Fix is not complete. Though the enum classes are generated using WSDL2Java successfully
> and the SOAP request is also send the response bean is not returned correctly. 
> The bean class that i defined has a class variable of this enum class type. 
> My WebService has a return type of this bean. While returning the bean it gives me the following
> exception in catalina.out:
> Caused by: java.io.IOException: No serializer found for class 
> com.soap.auxiliary.ScheduleValidationStatusEnum in registry 
> org.apache.axis.encoding.TypeMappingDelegate@1c501f7
>         at org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
> zationContext.java:1420)
>         at org.apache.axis.encoding.SerializationContext.serialize(Serialization
> Context.java:912)
>         at org.apache.axis.encoding.SerializationContext.outputMultiRefs(Seriali
> zationContext.java:987)
>         at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145)
>         at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477
> )
>         at org.apache.axis.message.MessageElement.output(MessageElement.java:120
> 7)
>         at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
>         ... 36 more
> AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: org.xml.sax.SAXParseException: Premature end of file.
>  faultActor:
>  faultNode:
>  faultDetail:
>         {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: P
> remature end of file.
>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>         at org.apache.axis.encoding.DeserializationContext.parse(Deserialization
> Context.java:227)
>         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
>         at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
>         at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
> tandChecker.java:62)
>         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
>         
>         
>         
> My deploy.wsdd has following type mapping
>         <typeMapping
>                 xmlns:myNS="urn:ScheduleServices"
>                 qname="myNS:ScheduleValidationStatusEnum"
>                 languageSpecificType ="java:com.soap.auxiliary.ScheduleValidationStatusEnum"
>                 serializer="org.apache.axis.encoding.ser.EnumSerializerFactory"
>                 deserializer ="org.apache.axis.encoding.ser.EnumDeserializerFactory"
>                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>         />
> My ?wsdl contains the following
> - <simpleType name="ScheduleValidationStatusEnum">
> - <restriction base="xsd:string">
>   <enumeration value="dirty" /> 
>   <enumeration value="valid" /> 
>   <enumeration value="overbook" /> 
>   <enumeration value="invprice" /> 
>   <enumeration value="invcost" /> 
>   <enumeration value="invtopic" /> 
>   <enumeration value="invdcm" /> 
>   <enumeration value="noip" /> 
>   <enumeration value="noport" /> 
>   <enumeration value="nobw" /> 
>   <enumeration value="invdcs" /> 
>   <enumeration value="invsi" /> 
>   <enumeration value="invcp" /> 
>   </restriction>
>   </simpleType>
>   
>   
>   
>   Can somebody help me out and tell me if there is any fix for this. I have a lot of WebServices similar to this.
>   Changing this would mean that i have to change the whole idea of our project. 
>   Any inputs would be valuable
>           --Subir

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira