BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-03-2009, 02:29 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2009
Location: Quebec, Ca
Model: 8330
OS: v4.5.0.77
PIN: 30293EF0
Carrier: Telus
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Web Services : not nillable missed

Please Login to Remove!

Hello,
I have a little problem with my new Web Service. I always get the error :

Quote:
not nillable element of array type in response is missed.
here is the SOAP Response :
Code:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="">
    <soap:Body>
        <GetHRRequestToApproveResponse xmlns="">
            <GetHRRequestToApproveResult>true</GetHRRequestToApproveResult>
            <result>
                <HRRequest>
                    <RequestID>6163</RequestID>
                    <ParentRequestID xsi:nil="true" />
                    <RequestTypeID>501</RequestTypeID>
                    <RequestTypeDescFr>Ajustement salarial (C)</RequestTypeDescFr>
                    <RequestTypeDescEn>Salary adjustment (C)</RequestTypeDescEn>
                    <RequestStatusID>20</RequestStatusID>
                    <RequestStatusDescFr>En processus d'approbation</RequestStatusDescFr>
                    <RequestStatusDescEn>Waiting for approval</RequestStatusDescEn>
                    <MemberCode>074566</MemberCode>
                    <MemberLastName>Rioux</MemberLastName>
                    <MemberFirstName>Marc</MemberFirstName>
                    <RequestedByMemberCode>011456</RequestedByMemberCode>
                    <RequestedByMemberLastName>Carrie</RequestedByMemberLastName>
                     <RequestedByMemberFirstName>Joe</RequestedByMemberFirstName>
                    <RequestDate>2009-02-28 15:31:30</RequestDate>
                    <DateTimeFormat>yyyy-MM-dd HH:mm:ss</DateTimeFormat>
                </HRRequest>
            </result>
            <rowCount>1</rowCount>
            <errorMsg />
        </GetHRRequestToApproveResponse>
    </soap:Body>
</soap:Envelope>

Last edited by SamuelD : 03-03-2009 at 02:31 PM.
Offline  
Old 03-04-2009, 03:04 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2009
Location: Quebec, Ca
Model: 8330
OS: v4.5.0.77
PIN: 30293EF0
Carrier: Telus
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Don't know if that would help you, the WSDL :

Code:
<wsdl:definitions xmlns:soap="xschemas.xmlsoap.org/wsdl/soap/" xmlns:tm="xmicrosoft.com/wsdl/mime/textMatching/" xmlns:soapenc="xschemas.xmlsoap.org/soap/encoding/" xmlns:mime="xschemas.xmlsoap.org/wsdl/mime/" xmlns:tns="xtempuri.org/" xmlns:s="xw3.org/2001/XMLSchema" xmlns:soap12="xschemas.xmlsoap.org/wsdl/soap12/" xmlns:http="xschemas.xmlsoap.org/wsdl/http/" targetNamespace="xtempuri.org/" xmlns:wsdl="xschemas.xmlsoap.org/wsdl/"> 
  <wsdl:types> 
    <s:schema elementFormDefault="qualified" targetNamespace="xtempuri.org/"> 
      <s:element name="GetHRRequestToApprove"> 
        <s:complexType> 
          <s:sequence> 
            <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" /> 
            <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" /> 
            <s:element minOccurs="1" maxOccurs="1" name="initUserContext" type="s:boolean" /> 
            <s:element minOccurs="1" maxOccurs="1" name="maximumRows" type="s:int" /> 
            <s:element minOccurs="1" maxOccurs="1" name="startRowIndex" type="s:int" /> 
          </s:sequence> 
        </s:complexType> 
      </s:element> 
      <s:element name="GetHRRequestToApproveResponse"> 
        <s:complexType> 
          <s:sequence> 
            <s:element minOccurs="1" maxOccurs="1" name="GetHRRequestToApproveResult" type="s:boolean" /> 
            <s:element minOccurs="0" maxOccurs="1" name="result" type="tns:ArrayOfHRRequest" /> 
            <s:element minOccurs="1" maxOccurs="1" name="rowCount" nillable="true" type="s:int" /> 
            <s:element minOccurs="0" maxOccurs="1" name="errorMsg" type="s:string" /> 
          </s:sequence> 
        </s:complexType> 
      </s:element> 
      <s:complexType name="ArrayOfHRRequest"> 
        <s:sequence> 
          <s:element minOccurs="0" maxOccurs="unbounded" name="HRRequest" nillable="true" type="tns:HRRequest" /> 
        </s:sequence> 
      </s:complexType> 
      <s:complexType name="HRRequest"> 
        <s:sequence> 
          <s:element minOccurs="1" maxOccurs="1" name="RequestID" type="s:long" /> 
          <s:element minOccurs="1" maxOccurs="1" name="ParentRequestID" nillable="true" type="s:long" /> 
          <s:element minOccurs="1" maxOccurs="1" name="RequestTypeID" type="s:int" /> 
          <s:element minOccurs="0" maxOccurs="1" name="RequestTypeDescFr" type="s:string" /> 
          <s:element minOccurs="0" maxOccurs="1" name="RequestTypeDescEn" type="s:string" /> 
          <s:element minOccurs="1" maxOccurs="1" name="RequestStatusID" type="s:int" /> 
          <s:element minOccurs="0" maxOccurs="1" name="RequestStatusDescFr" type="s:string" /> 
          <s:element minOccurs="0" maxOccurs="1" name="RequestStatusDescEn" type="s:string" /> 
          <s:element minOccurs="0" maxOccurs="1" name="MemberCode" type="s:string" /> 
          <s:element minOccurs="0" maxOccurs="1" name="MemberLastName" type="s:string" /> 
          <s:element minOccurs="0" maxOccurs="1" name="MemberFirstName" type="s:string" /> 
          <s:element minOccurs="0" maxOccurs="1" name="RequestedByMemberCode" type="s:string" /> 
          <s:element minOccurs="0" maxOccurs="1" name="RequestedByMemberLastName" type="s:string" /> 
          <s:element minOccurs="0" maxOccurs="1" name="RequestedByMemberFirstName" type="s:string" /> 
          <s:element minOccurs="0" maxOccurs="1" name="RequestDate" type="s:string" /> 
          <s:element minOccurs="0" maxOccurs="1" name="DateTimeFormat" type="s:string" /> 
        </s:sequence> 
      </s:complexType> 
      <s:element name="GetHRRequestToSign"> 
        <s:complexType> 
          <s:sequence> 
            <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" /> 
            <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" /> 
            <s:element minOccurs="1" maxOccurs="1" name="initUserContext" type="s:boolean" /> 
            <s:element minOccurs="1" maxOccurs="1" name="maximumRows" type="s:int" /> 
            <s:element minOccurs="1" maxOccurs="1" name="startRowIndex" type="s:int" /> 
          </s:sequence> 
        </s:complexType> 
      </s:element> 
      <s:element name="GetHRRequestToSignResponse"> 
        <s:complexType> 
          <s:sequence> 
            <s:element minOccurs="1" maxOccurs="1" name="GetHRRequestToSignResult" type="s:boolean" /> 
            <s:element minOccurs="0" maxOccurs="1" name="result" type="tns:ArrayOfHRRequest" /> 
            <s:element minOccurs="1" maxOccurs="1" name="rowCount" nillable="true" type="s:int" /> 
            <s:element minOccurs="0" maxOccurs="1" name="errorMsg" type="s:string" /> 
          </s:sequence> 
        </s:complexType> 
      </s:element> 
    </s:schema> 
  </wsdl:types> 
  <wsdl:message name="GetHRRequestToApproveSoapIn"> 
    <wsdl:part name="parameters" element="tns:GetHRRequestToApprove" /> 
  </wsdl:message> 
  <wsdl:message name="GetHRRequestToApproveSoapOut"> 
    <wsdl:part name="parameters" element="tns:GetHRRequestToApproveResponse" /> 
  </wsdl:message> 
  <wsdl:message name="GetHRRequestToSignSoapIn"> 
    <wsdl:part name="parameters" element="tns:GetHRRequestToSign" /> 
  </wsdl:message> 
  <wsdl:message name="GetHRRequestToSignSoapOut"> 
    <wsdl:part name="parameters" element="tns:GetHRRequestToSignResponse" /> 
  </wsdl:message> 
  <wsdl:portType name="HRRequestsListWSSoap"> 
    <wsdl:operation name="GetHRRequestToApprove"> 
      <wsdl:input message="tns:GetHRRequestToApproveSoapIn" /> 
      <wsdl:output message="tns:GetHRRequestToApproveSoapOut" /> 
    </wsdl:operation> 
    <wsdl:operation name="GetHRRequestToSign"> 
      <wsdl:input message="tns:GetHRRequestToSignSoapIn" /> 
      <wsdl:output message="tns:GetHRRequestToSignSoapOut" /> 
    </wsdl:operation> 
  </wsdl:portType> 
  <wsdl:binding name="HRRequestsListWSSoap" type="tns:HRRequestsListWSSoap"> 
    <soap:binding transport="schemas.xmlsoap.org/soap/http" /> 
    <wsdl:operation name="GetHRRequestToApprove"> 
      <soap:operation soapAction="tempuri.org/GetHRRequestToApprove" style="document" /> 
      <wsdl:input> 
        <soap:body use="literal" /> 
      </wsdl:input> 
      <wsdl:output> 
        <soap:body use="literal" /> 
      </wsdl:output> 
    </wsdl:operation> 
    <wsdl:operation name="GetHRRequestToSign"> 
      <soap:operation soapAction="xtempuri.org/GetHRRequestToSign" style="document" /> 
      <wsdl:input> 
        <soap:body use="literal" /> 
      </wsdl:input> 
      <wsdl:output> 
        <soap:body use="literal" /> 
      </wsdl:output> 
    </wsdl:operation> 
  </wsdl:binding> 
  <wsdl:binding name="HRRequestsListWSSoap12" type="tns:HRRequestsListWSSoap"> 
    <soap12:binding transport="xschemas.xmlsoap.org/soap/http" /> 
    <wsdl:operation name="GetHRRequestToApprove"> 
      <soap12:operation soapAction="xtempuri.org/GetHRRequestToApprove" style="document" /> 
      <wsdl:input> 
        <soap12:body use="literal" /> 
      </wsdl:input> 
      <wsdl:output> 
        <soap12:body use="literal" /> 
      </wsdl:output> 
    </wsdl:operation> 
    <wsdl:operation name="GetHRRequestToSign"> 
      <soap12:operation soapAction="tempuri.org/GetHRRequestToSign" style="document" /> 
      <wsdl:input> 
        <soap12:body use="literal" /> 
      </wsdl:input> 
      <wsdl:output> 
        <soap12:body use="literal" /> 
      </wsdl:output> 
    </wsdl:operation> 
  </wsdl:binding> 
  <wsdl:service name="HRRequestsListWS"> 
    <wsdl:port name="HRRequestsListWSSoap" binding="tns:HRRequestsListWSSoap"> 
      <soap:address location="qcap.dev.ent.cginet/Portal/WebServices/HRRequestsListWS.asmx" /> 
    </wsdl:port> 
    <wsdl:port name="HRRequestsListWSSoap12" binding="tns:HRRequestsListWSSoap12"> 
      <soap12:address location="qcap.dev.ent.cginet/Portal/WebServices/HRRequestsListWS.asmx" /> 
    </wsdl:port> 
  </wsdl:service> 
</wsdl:definitions>

Thank you for your help, have a nice day.

--
Samuel D.
Offline  
Old 03-05-2009, 01:23 PM   #3 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8300
PIN: N/A
Carrier: at&t
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Samuel. I was wondering if you found out what the problem was? I am experiencing the same error for a web service that works fine from other java clients, just not from the blackberry. I am generating the stub files using the Sun Java Wireless Toolkit 2.5.2 and running via the 4.6 component pack within the eclipse jde plugin.
Offline  
Old 03-05-2009, 01:26 PM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2009
Location: Quebec, Ca
Model: 8330
OS: v4.5.0.77
PIN: 30293EF0
Carrier: Telus
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello, I'm still looking for a way to resolve that problem.


Thank you, have a nice day.

--
Samuel D.
Offline  
Old 03-06-2009, 03:54 PM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2009
Location: Quebec, Ca
Model: 8330
OS: v4.5.0.77
PIN: 30293EF0
Carrier: Telus
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello again,
I found the problem. That's the part of the response that is responsible :

Quote:
<ParentRequestID xsi:nil="true" />
I used SoapUI to mock the response and I set a value to ParentRequestID.
I have a new question now. Is there a way to receive nil element with the BlackBerry?

Soapui.org it's free and work just fine.
Offline  
Old 03-26-2009, 07:27 AM   #6 (permalink)
New Member
 
Join Date: Mar 2009
Model: 8320
PIN: N/A
Carrier: Orange
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello, I think it's a Blackberry 4.5 bug. I have got the same problem.
I have generated a web service client stub with the Wireless Toolkit 2.5.2 and when I invoke a webservice method that replys with a response that contains a null strings it throws that MarshalException. But when I run the same application on 4.7 devices, it works.
I have made some tests and it seems that null strings can be send but cannot be received although the send/receive packages look the same(I have captured them with a sniffer).
I have searched also a way to catch the package to modify it but i've got nothing.

Did anyone managed to solve this problem?
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Polycom CX600 Lync Optimized VoIP Phone W/ Handset & Stand
$99.0
Polycom CX600 Lync Optimized VoIP Phone W/ Handset & Stand  picturePatton SN41142JS2JOEUI - VoIP Gateway 2 FXS + 2 FXO Ports (SN41142JS2JOEUI)
$411.9
Patton SN41142JS2JOEUI - VoIP Gateway 2 FXS + 2 FXO Ports (SN41142JS2JOEUI) pictureThe VoIP Lounge Replacement Black Handset for Avaya Lucent AT&T MLX / MLS /
$14.82
The VoIP Lounge Replacement Black Handset for Avaya Lucent AT&T MLX / MLS / picture *NEW* 3Com 2102PE 3Com 2102PE POE VoIP
$90.0
 *NEW* 3Com 2102PE  3Com 2102PE POE VoIP   pictureLOT OF 10 Cisco CP-7942G Unified IP Phone - voip phone - used
$349.0
LOT OF 10 Cisco CP-7942G Unified IP Phone - voip phone - used picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.