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 "Marc Boguerra (JIRA)" <ax...@ws.apache.org> on 2005/04/11 10:12:24 UTC

[jira] Created: (AXIS-1923) Serialization and Deserialization of simpleContent elements fails

Serialization and Deserialization of simpleContent elements fails
-----------------------------------------------------------------

         Key: AXIS-1923
         URL: http://issues.apache.org/jira/browse/AXIS-1923
     Project: Axis
        Type: Bug
  Components: Serialization/Deserialization  
 Environment: Linux Redhat9, Jonas4.3.2-Tomcat5.0.30, j2sdk4.2_07, axis 1.2RC2 integrated in Jonas
    Reporter: Marc Boguerra


Hi,

I have the following kind of snippet in my XML Schema:

<xs:complexType name="DataType">

	<xs:simpleContent>

		<xs:extension base="xs:base64Binary">

			<xs:attribute name="MimeType" type="xs:string" use="optional"/>

		</xs:extension>

	</xs:simpleContent>

</xs:complexType>



<xs:element name="EchoRequest">

	<xs:complexType>

		<xs:sequence>

			<xs:element name="Data" type="epm:DataType"/>

		</xs:sequence>

	</xs:complexType>

</xs:element>



<xs:element name="EchoResponse">

	<xs:complexType>

		<xs:sequence>

			<xs:element name="Data" type="epm:DataType"/>

		</xs:sequence>

	</xs:complexType>

</xs:element>



	

The method Echo takes a DataType element and returns a DataType element.

Here are the SOAP Request and Response i get : 

SOAP Request
----------------------

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <Echo xmlns="">
   <Data MimeType="mimetype" xsi:type="ns1:DataType" xmlns:ns1="http://www.service.schemas">
    [B@6c585a
   </Data>
  </Echo>
 </soapenv:Body>
</soapenv:Envelope>

SOAP Response
----------------------

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <EchoResponse xmlns="http://www.service.schemas">
   <Data MimeType="mimetype" xmlns=""/>
  </EchoResponse>
 </soapenv:Body>
</soapenv:Envelope>


But if i have the following schema without simpleContent (and as a consequence without attribute), serialization and deserialization works :

<xs:complexType name="DataType">
	<xs:sequence>

		<xs:element name="tab" type="xs:base64Binary"/> 
	</xs:sequence>

</xs:complexType>



<xs:element name="EchoRequest">

	<xs:complexType>

		<xs:sequence>

			<xs:element name="Data" type="epm:DataType"/>

		</xs:sequence>

	</xs:complexType>

</xs:element>



<xs:element name="EchoResponse">

	<xs:complexType>

		<xs:sequence>

			<xs:element name="Data" type="epm:DataType"/>

		</xs:sequence>

	</xs:complexType>

</xs:element>


and i get the following SOAP request and response (which is OK) : 

requete SOAP
----------------------

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <Echo xmlns="">
   <Data xsi:type="ns1:DataType" xmlns:ns1="http://www.service.schemas">
    <tab xsi:type="xsd:base64Binary">
     MIAGC...AA
    </tab>
   </Data>
  </Verify>
 </soapenv:Body>
</soapenv:Envelope>

reponse SOAP
----------------------

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <EchoResponse xmlns="http://www.service.schemas">
   <Data xmlns="">
    <tab>MIAGC...AA==</tab>
   </Data>
  </EchoResponse>
 </soapenv:Body>
</soapenv:Envelope>


Every time i have a simpleContent element i get problems with serialization and deserialization.

Thanks for any precision,

marc

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1923) Serialization and Deserialization of simpleContent elements fails

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1923?page=comments#action_64126 ]
     
Davanum Srinivas commented on AXIS-1923:
----------------------------------------

please upload the complete WSDL.

thanks,
dims

> Serialization and Deserialization of simpleContent elements fails
> -----------------------------------------------------------------
>
>          Key: AXIS-1923
>          URL: http://issues.apache.org/jira/browse/AXIS-1923
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>  Environment: Linux Redhat9, Jonas4.3.2-Tomcat5.0.30, j2sdk4.2_07, axis 1.2RC2 integrated in Jonas
>     Reporter: Marc Boguerra

>
> Hi,
> I have the following kind of snippet in my XML Schema:
> <xs:complexType name="DataType">
> 	<xs:simpleContent>
> 		<xs:extension base="xs:base64Binary">
> 			<xs:attribute name="MimeType" type="xs:string" use="optional"/>
> 		</xs:extension>
> 	</xs:simpleContent>
> </xs:complexType>
> <xs:element name="EchoRequest">
> 	<xs:complexType>
> 		<xs:sequence>
> 			<xs:element name="Data" type="epm:DataType"/>
> 		</xs:sequence>
> 	</xs:complexType>
> </xs:element>
> <xs:element name="EchoResponse">
> 	<xs:complexType>
> 		<xs:sequence>
> 			<xs:element name="Data" type="epm:DataType"/>
> 		</xs:sequence>
> 	</xs:complexType>
> </xs:element>
> 	
> The method Echo takes a DataType element and returns a DataType element.
> Here are the SOAP Request and Response i get : 
> SOAP Request
> ----------------------
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <Echo xmlns="">
>    <Data MimeType="mimetype" xsi:type="ns1:DataType" xmlns:ns1="http://www.service.schemas">
>     [B@6c585a
>    </Data>
>   </Echo>
>  </soapenv:Body>
> </soapenv:Envelope>
> SOAP Response
> ----------------------
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <EchoResponse xmlns="http://www.service.schemas">
>    <Data MimeType="mimetype" xmlns=""/>
>   </EchoResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> But if i have the following schema without simpleContent (and as a consequence without attribute), serialization and deserialization works :
> <xs:complexType name="DataType">
> 	<xs:sequence>
> 		<xs:element name="tab" type="xs:base64Binary"/> 
> 	</xs:sequence>
> </xs:complexType>
> <xs:element name="EchoRequest">
> 	<xs:complexType>
> 		<xs:sequence>
> 			<xs:element name="Data" type="epm:DataType"/>
> 		</xs:sequence>
> 	</xs:complexType>
> </xs:element>
> <xs:element name="EchoResponse">
> 	<xs:complexType>
> 		<xs:sequence>
> 			<xs:element name="Data" type="epm:DataType"/>
> 		</xs:sequence>
> 	</xs:complexType>
> </xs:element>
> and i get the following SOAP request and response (which is OK) : 
> requete SOAP
> ----------------------
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <Echo xmlns="">
>    <Data xsi:type="ns1:DataType" xmlns:ns1="http://www.service.schemas">
>     <tab xsi:type="xsd:base64Binary">
>      MIAGC...AA
>     </tab>
>    </Data>
>   </Verify>
>  </soapenv:Body>
> </soapenv:Envelope>
> reponse SOAP
> ----------------------
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <EchoResponse xmlns="http://www.service.schemas">
>    <Data xmlns="">
>     <tab>MIAGC...AA==</tab>
>    </Data>
>   </EchoResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> Every time i have a simpleContent element i get problems with serialization and deserialization.
> Thanks for any precision,
> marc

-- 
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