Как передать объект complexType с расширением base в wsdl, используя soapclient в php?

<s:complexType name="GuestMembershipInfo">
<s:complexContent mixed="false">
<s:extension base="tns:MembershipInfo">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SubGuests" type="tns:ArrayOfGuestMembershipInfo"/>
<s:element minOccurs="0" maxOccurs="1" name="GuestBillingInfo" type="tns:GuestBillingInfo"/>
</s:sequence>
</s:extension>
</s:complexContent>
</s:complexType><s:element name="SaveMemberInfo">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="memInfo" type="tns:MembershipInfo"/>
<s:element minOccurs="1" maxOccurs="1" name="verifyZipCode" type="s:boolean"/>
</s:sequence>
</s:complexType>
</s:element>

Это мой код .net с C # и работает нормально

         apiSvc = new net.csi.api.ApiService();
GuestMembershipInfo m = new GuestMembershipInfo();

m.Name = "Testing";
m.EmailAddress = "[email protected]";

var rInfo = apiSvc.SaveMemberInfo(m, false);`

This is my php function to saveMemberInfo and get this error
"Unable to cast object of type 'CSI.API.MembershipInfo' to type 'CSI.API.GuestMembershipInfo'."
`public function SaveMemberInfo() {
global $_sogh_soapUrl, $wcargs;
$response = null;
$memberInfo = array(
'Name'=>"Test",
'EmailAddress'=>'test123@gmail',
);
$args =  Array (
'memInfo' => $memberInfo,
'verifyZipCode'=>false,

);
try {
$authResponse = $this->Authenticate (); // Here authonticate successfully

if ($authResponse) {

$result = $this->wcfClient->SaveMemberInfo($args );
$result = $result->SaveMemberInfoResult;
if (isset ( $result->IsException ) && $result->IsException) {
$this->error ( 'Error: ' . print_r ( $result->Exception, true ) );
}else {
$response = $result->Value;
}
}
} catch ( SoapFault $fault ) {
$this->error ( 'Fault: ' . $fault->faultcode . ' - ' . $fault->faultstring );
} catch ( Exception $e ) {
$this->error ( 'Error: ' . $e->getMessage () );
}

return $response;
}

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]