axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sevak Asadorian (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AXIS2C-1685) Unable to serialize/deserialize object, wrong element type or null node (om_element.c)
Date Tue, 19 Jul 2016 21:13:20 GMT

     [ https://issues.apache.org/jira/browse/AXIS2C-1685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sevak Asadorian updated AXIS2C-1685:
------------------------------------
    Description: 
>> Note #1: I was unable to find a forum and this was the only means of communication
I found for this project.
>> Note #2: Searched the DB before creating this issue to skip duplicates.

>> Description: Unable to serialize object. (most likely why it's failing to deserialize
as well).

>> In generated code:
...
xsi_type_attri = axiom_attribute_create (env, "type", "LocomotiveInformationTransaction",
xsi_ns);
//The following line results in ERROR:
axiom_element_add_attribute (parent_element, env, xsi_type_attri, parent);
...

>> The error. (from wlis.log):
...
[error] om_element.c(283) Wrong element type or null node
...

>> Pasting part of the wsdl file (i couldn't attach it, let me know if you need the
entire file):

<?xml version="1.0" encoding="UTF-8"?>
<!--Created by TIBCO WSDL-->
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:ns0="http://www.nscorp.com" xmlns:tns="http://www.nscorp.com" xmlns:ns1="java:com.nscorp.wlis.locoinfo"
name="Untitled" targetNamespace="http://www.nscorp.com">
    <wsdl:types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.nscorp.com"
elementFormDefault="qualified" attributeFormDefault="unqualified">
            <xs:import namespace="java:com.nscorp.wlis.locoinfo"/>
            <xs:element name="UpdateLocoStatus" nillable="true" type="ns1:LocomotiveInformationTransaction"/>
            <xs:element name="UpdateLocoStatusResponse" nillable="true" type="ns1:LocomotiveResponse"/>
            <xs:element name="isAliveResponse" nillable="true" type="xs:string"/>
        </xs:schema>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stns="java:com.nscorp.wlis.locoinfo"
xmlns="java:com.nscorp.wlis.locoinfo" targetNamespace="java:com.nscorp.wlis.locoinfo" elementFormDefault="qualified"
attributeFormDefault="qualified">
            <xsd:complexType name="ArrayOfCondition">
                <xsd:sequence>
                    <xsd:element name="Condition" nillable="true" type="stns:Condition"
minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
            </xsd:complexType>
...


The only thing I could see that stood out was the namespace it was using. In this case, it
looked like (after stepping through the code and lots of debugging log statements) it was
using the default "xsi" namespace. i tried hard coding "ns1" as the namespace for LocomotiveInformationTransaction
but that did not resolve the issue.

  was:
>> Note #1: I was unable to find a forum and this was the only means of communication
I found for this project.
>> Note #2:Searched the DB before creating this issue to skip duplicates.

>> Description: Unable to serialize object. (most likely why it's failing to deserialize
as well).

>> In generated code:
...
xsi_type_attri = axiom_attribute_create (env, "type", "LocomotiveInformationTransaction",
xsi_ns);
//The following line results in ERROR:
axiom_element_add_attribute (parent_element, env, xsi_type_attri, parent);
...

>> The error. (from wlis.log):
...
[error] om_element.c(283) Wrong element type or null node
...

>> Pasting part of the wsdl file (i couldn't attach it, let me know if you need the
entire file):

<?xml version="1.0" encoding="UTF-8"?>
<!--Created by TIBCO WSDL-->
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:ns0="http://www.nscorp.com" xmlns:tns="http://www.nscorp.com" xmlns:ns1="java:com.nscorp.wlis.locoinfo"
name="Untitled" targetNamespace="http://www.nscorp.com">
    <wsdl:types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.nscorp.com"
elementFormDefault="qualified" attributeFormDefault="unqualified">
            <xs:import namespace="java:com.nscorp.wlis.locoinfo"/>
            <xs:element name="UpdateLocoStatus" nillable="true" type="ns1:LocomotiveInformationTransaction"/>
            <xs:element name="UpdateLocoStatusResponse" nillable="true" type="ns1:LocomotiveResponse"/>
            <xs:element name="isAliveResponse" nillable="true" type="xs:string"/>
        </xs:schema>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stns="java:com.nscorp.wlis.locoinfo"
xmlns="java:com.nscorp.wlis.locoinfo" targetNamespace="java:com.nscorp.wlis.locoinfo" elementFormDefault="qualified"
attributeFormDefault="qualified">
            <xsd:complexType name="ArrayOfCondition">
                <xsd:sequence>
                    <xsd:element name="Condition" nillable="true" type="stns:Condition"
minOccurs="0" maxOccurs="unbounded"/>
                </xsd:sequence>
            </xsd:complexType>
...


The only thing I could see that stood out was the namespace it was using. In this case, it
looked like (after stepping through the code and lots of debugging log statements) it was
using the default "xsi" namespace. i tried hard coding "ns1" as the namespace for LocomotiveInformationTransaction
but that did not resolve the issue.


> Unable to serialize/deserialize object, wrong element type or null node (om_element.c)
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-1685
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1685
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation, wsdl, wsdl2c tool
>    Affects Versions: 1.6.0
>         Environment: CentOS 6.5
>            Reporter: Sevak Asadorian
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> >> Note #1: I was unable to find a forum and this was the only means of communication
I found for this project.
> >> Note #2: Searched the DB before creating this issue to skip duplicates.
> >> Description: Unable to serialize object. (most likely why it's failing to deserialize
as well).
> >> In generated code:
> ...
> xsi_type_attri = axiom_attribute_create (env, "type", "LocomotiveInformationTransaction",
xsi_ns);
> //The following line results in ERROR:
> axiom_element_add_attribute (parent_element, env, xsi_type_attri, parent);
> ...
> >> The error. (from wlis.log):
> ...
> [error] om_element.c(283) Wrong element type or null node
> ...
> >> Pasting part of the wsdl file (i couldn't attach it, let me know if you need
the entire file):
> <?xml version="1.0" encoding="UTF-8"?>
> <!--Created by TIBCO WSDL-->
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:ns0="http://www.nscorp.com" xmlns:tns="http://www.nscorp.com" xmlns:ns1="java:com.nscorp.wlis.locoinfo"
name="Untitled" targetNamespace="http://www.nscorp.com">
>     <wsdl:types>
>         <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.nscorp.com"
elementFormDefault="qualified" attributeFormDefault="unqualified">
>             <xs:import namespace="java:com.nscorp.wlis.locoinfo"/>
>             <xs:element name="UpdateLocoStatus" nillable="true" type="ns1:LocomotiveInformationTransaction"/>
>             <xs:element name="UpdateLocoStatusResponse" nillable="true" type="ns1:LocomotiveResponse"/>
>             <xs:element name="isAliveResponse" nillable="true" type="xs:string"/>
>         </xs:schema>
>         <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stns="java:com.nscorp.wlis.locoinfo"
xmlns="java:com.nscorp.wlis.locoinfo" targetNamespace="java:com.nscorp.wlis.locoinfo" elementFormDefault="qualified"
attributeFormDefault="qualified">
>             <xsd:complexType name="ArrayOfCondition">
>                 <xsd:sequence>
>                     <xsd:element name="Condition" nillable="true" type="stns:Condition"
minOccurs="0" maxOccurs="unbounded"/>
>                 </xsd:sequence>
>             </xsd:complexType>
> ...
> The only thing I could see that stood out was the namespace it was using. In this case,
it looked like (after stepping through the code and lots of debugging log statements) it was
using the default "xsi" namespace. i tried hard coding "ns1" as the namespace for LocomotiveInformationTransaction
but that did not resolve the issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


Mime
View raw message