From:             steckovic at aarongroup dot cz
Operating system: Fedora
PHP version:      5.0.5
PHP Bug Type:     SOAP related
Bug description:  Error in mapping soap - java types

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)
|#]

-- 
Edit bug report at http://bugs.php.net/?id=35273&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=35273&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=35273&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=35273&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=35273&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=35273&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=35273&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=35273&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=35273&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=35273&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=35273&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=35273&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=35273&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=35273&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=35273&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=35273&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=35273&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=35273&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=35273&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=35273&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=35273&r=mysqlcfg

Reply via email to