axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Dick <adrian.d...@uk.ibm.com>
Subject Re: empty array of complex type crashes the client
Date Tue, 24 Jan 2006 10:17:39 GMT
Hi,

Looking at your WSDL you're using rpc/literal style messages.

Axis c++ supports either rpc/encoded or doc/literal, but not rpc/literal.
Are you in a position to convert the WSDL?  If so, I'd recommend
doc/literal as it has been more thoroughly tested and is the option
recommended for WS-I compliance.


Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


Guilhem Tardy <gravsten@yahoo.com> wrote on 23/01/2006 17:21:30:

> Hi,
>
> I would very much appreciate if someone confirms that no problem should
arise
> from an empty array:
> <AdvertiseResponse
xmlns="test.wsdl"><Events></Events></AdvertiseResponse>
>
> > To aid in understanding the problem you're currently seeing,
> > can you provide the following:
> > - Version of Axis C++
>
> from CVS (last week)
>
> > - WSDL file
>
> corresponding part of WSDL file is below:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="Service" targetNamespace="test.wsdl"
> xmlns:tns="test.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>   <wsdl:types>
>     <xsd:schema targetNamespace="test.wsdl"
elementFormDefault="qualified">
>       <xsd:complexType name="EventSequenceObject">
>         <xsd:annotation>
>           <xsd:documentation>This object contains two strings : the first
> identifies the event type, the secont gives details abount the
> event.</xsd:documentation>
>
>         </xsd:annotation>
>         <xsd:sequence maxOccurs="1" minOccurs="1">
>           <xsd:element name="Type" type="xsd:string"></xsd:element>
>           <xsd:element name="Details" type="xsd:string"></xsd:element>
>         </xsd:sequence>
>       </xsd:complexType>
>
>       <xsd:complexType name="EventArray">
>         <xsd:annotation>
>           <xsd:documentation>Used as a return type in the Advertise
procedure.
> This array contains events about availability changes of contacts and
> invitations, it may be used otherwise in the future.</xsd:documentation>
>         </xsd:annotation>
>         <xsd:sequence>
>           <xsd:element name="EventElement" type="tns:EventSequenceObject"
> maxOccurs="unbounded" minOccurs="0"></xsd:element>
>         </xsd:sequence>
>       </xsd:complexType>
>   </wsdl:types>
>
>   <wsdl:message name="AdvertiseResponse">
>     <wsdl:documentation>See Advertise porttype, EventArray and
> EventSequenceObject</wsdl:documentation>
>     <wsdl:part name="Events" type="tns:EventArray">
>       <wsdl:documentation>See Advertise porttype, EventList and
> </wsdl:documentation>
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:message name="AdvertiseRequest">
>     <wsdl:documentation>See Advertise porttype, EventArray and
> EventSequenceObject</wsdl:documentation>
>     <wsdl:part name="AuthTicket" type="xsd:string"></wsdl:part>
>     <wsdl:part name="Status" type="xsd:string"></wsdl:part>
>   </wsdl:message>
>
>   <wsdl:binding name="Binding" type="tns:PortType">
>     <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="Advertise"><soap:operation
> soapAction="test.wsdl#Advertise"/><wsdl:input><soap:body use="literal"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="test.wsdl"/></wsdl:input><wsdl:output><soap:body use="literal"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="test.wsdl"/></wsdl:output></wsdl:operation>
>   </wsdl:binding>
>
> </wsdl:definitions>
>
> Note that the above has <soap:body use="literal"/> but I expect no
relation to
> the current problem, does it?
>
> - SOAP request/response for the failing situation
>
> Since Axis C++ client crashes, I get little debug info. Below is
> extract of the
> server (not Axis).
>
> I can send the complete WSDL file, request/response (seen by server) and
> relevant Etheral dump at client privately. Just let me know if you need
it.
>
> The request received by server:
>
> params:
> array(2) {
>   ["Status"]=>
>   string(32) "a75514999f8dc847cfc6035e89750728"
>   ["AuthTicket"]=>
>   string(1) "0"
> }
>
> This calls the corresponding method at server:
>
> methodreturn:
> array(0) {
> }
>
> Therefore...
>
> no value provided for complexType element EventElement and element is not
> nillable, so serialize nothing
> returning: <Events></Events>
>
> serializing response
> have WSDL for serialization: style is rpc
> style is rpc for serialization: use is literal
> In Envelope length=104 body (max 1000 characters)=<AdvertiseResponse
> xmlns="test.wsdl"><Events></Events></AdvertiseResponse> style=rpc
use=
> encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
> headers:
> string(0) ""
> namespaces:
> array(0) {
> }
>
> Best regards,
> Guilhem.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com


Mime
View raw message