Jump to content

PHP's SoapClient is ignoring element extensions in wsdl


luisfpg

Recommended Posts

Hi all!

I'm trying to integrate a php client with a WebServices server written in Java using http://cxf.apache.org.

I'm using several inheritances, so, for the example given below, the AdSearchParameters class extends AbstractAdSearchParameters, which in turn, extends SearchParameters.

The problem is that PHP seems to not recognize properties defined in superclasses.

In the example given below, it complains with: SOAP-ERROR: Encoding: object hasn't 'currentPage' property, but that property is defined in SearchParameters element.

Is this a bug?

Has anyone experienced this?

Is there a workaround?

Here is the WSDL part for the said elements:

 

    <xs:complexType name="adSearchParameters">
        <xs:complexContent>
            <xs:extension base="tns:abstractAdSearchParameters">
                <xs:sequence>
                    <xs:element name="randomOrder" type="xs:boolean" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType abstract="true" name="abstractAdSearchParameters">
        <xs:complexContent>
            <xs:extension base="tns:searchParameters">
                <xs:sequence>
                    <xs:element maxOccurs="unbounded" minOccurs="0" name="adFields" nillable="true" type="tns:fieldValue" />
                    <xs:element minOccurs="0" name="categoryId" type="xs:long" />
                    <xs:element minOccurs="0" name="finalPrice" type="xs:decimal" />
                    <xs:element minOccurs="0" name="initialPrice" type="xs:decimal" />
                    <xs:element minOccurs="0" name="keywords" type="xs:string" />
                    <xs:element maxOccurs="unbounded" minOccurs="0" name="memberFields" nillable="true" type="tns:fieldValue" />
                    <xs:element maxOccurs="unbounded" minOccurs="0" name="memberGroupIds" nillable="true" type="xs:long" />
                    <xs:element minOccurs="0" name="memberId" type="xs:long" />
                    <xs:element name="showAdFields" type="xs:boolean" />
                    <xs:element name="showMemberFields" type="xs:boolean" />
                    <xs:element minOccurs="0" name="since" type="tns:timePeriod" />
                    <xs:element minOccurs="0" name="tradeType" type="tns:tradeType" />
                    <xs:element name="withImagesOnly" type="xs:boolean" />
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType abstract="true" name="searchParameters">
        <xs:sequence>
            <xs:element name="currentPage" type="xs:int" />
            <xs:element name="pageSize" type="xs:int" />
        </xs:sequence>
    </xs:complexType>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.