php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35273 Error in mapping soap - java types
Submitted: 2005-11-18 10:26 UTC Modified: 2005-11-18 12:01 UTC
From: steckovic at aarongroup dot cz Assigned: dmitry
Status: Closed Package: SOAP related
PHP Version: 5.0.5 OS: Fedora
Private report: No CVE-ID:
 [2005-11-18 10:26 UTC] steckovic at aarongroup dot cz
Description:
------------
Hello,
I have problem with mapping java.lang.Integer types in PHP SOAP responses. When I change type to int everything is 
working good. I thing that problem is in mapping nullable types. 

Thank you,
Petr Steckovic

JAX:RPC

WSDL fragment:
<complexType name="FbpSectorInfo">
  <sequence>
    <element name="airline" type="string"/>
    <element name="iataFrom" type="string"/>
    <element name="iataTo" type="string"/>
    <element name="id" type="soap11-enc:int"/>
  </sequence>
</complexType>


Mapped from
public class FbpSectorInfo {
	private Integer id;
	private String iataFrom;
	private String iataTo;
	private String airline;
	..
}

Reproduce code:
---------------
Request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fbp.aag.cz/wsdl/fbp" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://fbp.aag.cz/types/fbp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
      <ns1:getBurnRbd>
         <String_1 xsi:type="xsd:string">7d96caf9053a7a7aba29790986d63232</String_1>
         <String_2 xsi:type="xsd:string">2005-11-18 09:18:21</String_2>
         <String_3 xsi:type="xsd:string">CZ</String_3>
         <String_4 xsi:type="xsd:string">CZ</String_4>
         <arrayOfFbpSectorInfo_5 SOAP-ENC:arrayType="ns2:FbpSectorInfo[2]" xsi:type="ns2:ArrayOfFbpSectorInfo">
            <item xsi:type="ns2:FbpSectorInfo">
               <airline xsi:type="xsd:string">OK</airline>
               <iataFrom xsi:type="xsd:string">PRG</iataFrom>
               <iataTo xsi:type="xsd:string">CDG</iataTo>
               <id xsi:type="xsd:int">0</id>
            </item>
            <item xsi:type="ns2:FbpSectorInfo">
               <airline xsi:type="xsd:string">OK</airline>
               <iataFrom xsi:type="xsd:string">CDG</iataFrom>
               <iataTo xsi:type="xsd:string">PRG</iataTo>
               <id xsi:type="xsd:int">1</id>
            </item>
         </arrayOfFbpSectorInfo_5>
      </ns1:getBurnRbd>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Expected result:
----------------
Correct mapping.

Actual result:
--------------
Sun one log:

[#|2005-11-18T10:00:35.906+0100|SEVERE|sun-appserver-ee8.1|com.sun.xml.rpc.server|_ThreadID=12;|unexpected element type: expected={http://schemas.xmlsoap.org/
unexpected element type: expected={http://schemas.xmlsoap.org/soap/encoding/}int, actual={http://www.w3.org/2001/XMLSchema}int
        at com.sun.xml.rpc.encoding.SerializerBase.verifyType(SerializerBase.java:128)
        at com.sun.xml.rpc.encoding.SimpleTypeSerializer.deserialize(SimpleTypeSerializer.java:114)
        at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155)
        at cz.aag.fbp.services.bean.FbpSectorInfo__fbp__SOAPSerializer.doDeserialize(FbpSectorInfo__fbp__SOAPSerializer.java:100)
        at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:192)
        at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155)
        at com.sun.xml.rpc.encoding.ObjectArraySerializer.deserializeArrayInstance(ObjectArraySerializer.java:207)
        at com.sun.xml.rpc.encoding.ArraySerializerBase.deserialize(ArraySerializerBase.java:260)
        at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155)
        at cz.aag.fbp.services.FbpService_getBurnRbd_RequestStruct__fbp__SOAPSerializer.doDeserialize(FbpService_getBurnRbd_RequestStruct__fbp__SOAPSerializer
        at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:192)
        at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155)
        at cz.aag.fbp.services.FbpService__fbp__Tie.deserialize_getBurnRbd(FbpService__fbp__Tie.java:1636)
        at cz.aag.fbp.services.FbpService__fbp__Tie.readFirstBodyElement(FbpService__fbp__Tie.java:1479)
        at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:233)
        at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
        at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:102)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:264)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:178)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
        at com.sun.enterprise.web.connector.httpservice.HttpServiceProcessor.process(HttpServiceProcessor.java:221)
        at com.sun.enterprise.web.HttpServiceWebContainer.service(HttpServiceWebContainer.java:2072)
|#]

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-18 10:38 UTC] sniper@php.net
Assigned to the maintainer.
 [2005-11-18 12:01 UTC] dmitry@php.net
Fixed in CVS HEAD, PHP_5_1 and PHP_5_0.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 17 16:02:22 2014 UTC