web services - SOAP response Error using WSDL in php -
i using soap call wsdl file, getting below error.. below error
soapfault exception: [a:internalservicefault] object reference not set instance of object. in /opt/projects/php/dev1/sopadatatest.php:40 stack trace: #0 /opt/projects/php/dev1/sopadatatest.php(40): soapclient->__call('accountsignup', array) #1 /opt/projects/php/dev1/sopadatatest.php(40): soapclient->accountsignup(array) #2 {main}
$url = "signup.wsdl"; $data = array( "signupinformation" => array("accountname" => "secret", "affiliateid" => "secret", "comment" => "secret", "currencycode" => "secret", "dba" => "secret" ), "primarybankaccountinformation" => array("accountname" => "external", "accountnumber" => "2012-10-20t00:04:34.479z", "accountownershiptype" => "2012-10-20t00:04:34.479z", "accounttype" => "ext-id-00502", "bankname" => "test ", "countrycode" => "customer contact", "routingnumber" => "123456789" ) ); try { $soapclient = new soapclient($url, array('soap_version' => soap_1_1, 'trace' => 1, 'exceptions' => 0 // debugging, disable in production //"connection_timeout" => 1 )); // list types idea how call methods, since looks // there no pages in .asmx services //var_dump($soapclient->__gettypes()); $response = $soapclient->accountsignup($data); echo $response; } catch (exception $e) { trigger_error("soap error: ".$e->getmessage(), e_user_warning); } print_r($e);
and below wsdl file trying unable solution doing above code , and getting above error message while printing response ..can 1 tell me did wrong might more helpful me ..
<?xml version="1.0" encoding="utf-8"?> <wsdl:definitions name="signup" targetnamespace="https://clickandpledge.com/applicationservice/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:i0="https://clickandpledge.com/signup/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="https://clickandpledge.com/applicationservice/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"> <wsdl:types> <xs:schema elementformdefault="qualified" targetnamespace="https://clickandpledge.com/applicationservice/" xmlns:xs="http://www.w3.org/2001/xmlschema"> <xs:import namespace="http://schemas.datacontract.org/2004/07/applicationservice" /> <xs:element name="accountsignup"> <xs:complextype> <xs:sequence> <xs:element minoccurs="0" name="key1" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="key2" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="signupinformation" nillable="true" type="q1:signupinformation" xmlns:q1="http://schemas.datacontract.org/2004/07/applicationservice" /> <xs:element minoccurs="0" name="primaryaccount" nillable="true" type="q2:primarybankaccountinformation" xmlns:q2="http://schemas.datacontract.org/2004/07/applicationservice" /> </xs:sequence> </xs:complextype> </xs:element> <xs:element name="accountsignupresponse"> <xs:complextype> <xs:sequence> <xs:element minoccurs="0" name="accountsignupresult" nillable="true" type="q3:signupresult" xmlns:q3="http://schemas.datacontract.org/2004/07/applicationservice" /> </xs:sequence> </xs:complextype> </xs:element> </xs:schema> <xs:schema attributeformdefault="qualified" elementformdefault="qualified" targetnamespace="http://schemas.microsoft.com/2003/10/serialization/" xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:tns="http://schemas.microsoft.com/2003/10/serialization/"> <xs:element name="anytype" nillable="true" type="xs:anytype" /> <xs:element name="anyuri" nillable="true" type="xs:anyuri" /> <xs:element name="base64binary" nillable="true" type="xs:base64binary" /> <xs:element name="boolean" nillable="true" type="xs:boolean" /> <xs:element name="byte" nillable="true" type="xs:byte" /> <xs:element name="datetime" nillable="true" type="xs:datetime" /> <xs:element name="decimal" nillable="true" type="xs:decimal" /> <xs:element name="double" nillable="true" type="xs:double" /> <xs:element name="float" nillable="true" type="xs:float" /> <xs:element name="int" nillable="true" type="xs:int" /> <xs:element name="long" nillable="true" type="xs:long" /> <xs:element name="qname" nillable="true" type="xs:qname" /> <xs:element name="short" nillable="true" type="xs:short" /> <xs:element name="string" nillable="true" type="xs:string" /> <xs:element name="unsignedbyte" nillable="true" type="xs:unsignedbyte" /> <xs:element name="unsignedint" nillable="true" type="xs:unsignedint" /> <xs:element name="unsignedlong" nillable="true" type="xs:unsignedlong" /> <xs:element name="unsignedshort" nillable="true" type="xs:unsignedshort" /> <xs:element name="char" nillable="true" type="tns:char" /> <xs:simpletype name="char"> <xs:restriction base="xs:int" /> </xs:simpletype> <xs:element name="duration" nillable="true" type="tns:duration" /> <xs:simpletype name="duration"> <xs:restriction base="xs:duration"> <xs:pattern value="\-?p(\d*d)?(t(\d*h)?(\d*m)?(\d*(\.\d*)?s)?)?" /> <xs:mininclusive value="-p10675199dt2h48m5.4775808s" /> <xs:maxinclusive value="p10675199dt2h48m5.4775807s" /> </xs:restriction> </xs:simpletype> <xs:element name="guid" nillable="true" type="tns:guid" /> <xs:simpletype name="guid"> <xs:restriction base="xs:string"> <xs:pattern value="[\da-fa-f]{8}-[\da-fa-f]{4}-[\da-fa-f]{4}-[\da-fa-f]{4}-[\da-fa-f]{12}" /> </xs:restriction> </xs:simpletype> <xs:attribute name="factorytype" type="xs:qname" /> <xs:attribute name="id" type="xs:id" /> <xs:attribute name="ref" type="xs:idref" /> </xs:schema> <xs:schema elementformdefault="qualified" targetnamespace="http://schemas.datacontract.org/2004/07/applicationservice" xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:tns="http://schemas.datacontract.org/2004/07/applicationservice"> <xs:complextype name="signupinformation"> <xs:sequence> <xs:element minoccurs="0" name="accountname" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="affiliateid" type="xs:long" /> <xs:element minoccurs="0" name="comment" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="currencycode" type="xs:int" /> <xs:element minoccurs="0" name="dba" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="givebigcampaignid" type="xs:long" /> <xs:element minoccurs="0" name="mailingaddress" nillable="true" type="tns:address" /> <xs:element minoccurs="0" name="physicaladdress" nillable="true" type="tns:address" /> <xs:element minoccurs="0" name="planid" type="xs:long" /> <xs:element minoccurs="0" name="referalid" type="xs:long" /> <xs:element minoccurs="0" name="taxid" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="timezone" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="user1" nillable="true" type="tns:user" /> <xs:element minoccurs="0" name="user2" nillable="true" type="tns:user" /> <xs:element minoccurs="0" name="websiteurl" nillable="true" type="xs:string" /> </xs:sequence> </xs:complextype> <xs:element name="signupinformation" nillable="true" type="tns:signupinformation" /> <xs:complextype name="address"> <xs:sequence> <xs:element minoccurs="0" name="address1" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="address2" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="city" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="country" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="state" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="zipcode" nillable="true" type="xs:string" /> </xs:sequence> </xs:complextype> <xs:element name="address" nillable="true" type="tns:address" /> <xs:complextype name="user"> <xs:sequence> <xs:element minoccurs="0" name="email" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="firstname" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="lastname" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="phone" nillable="true" type="xs:string" /> </xs:sequence> </xs:complextype> <xs:element name="user" nillable="true" type="tns:user" /> <xs:complextype name="primarybankaccountinformation"> <xs:sequence> <xs:element minoccurs="0" name="accountname" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="accountnumber" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="accountownershiptype" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="accounttype" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="bankname" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="countrycode" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="routingnumber" nillable="true" type="xs:string" /> </xs:sequence> </xs:complextype> <xs:element name="primarybankaccountinformation" nillable="true" type="tns:primarybankaccountinformation" /> <xs:complextype name="signupresult"> <xs:sequence> <xs:element minoccurs="0" name="accountid" type="xs:long" /> <xs:element minoccurs="0" name="code" nillable="true" type="xs:string" /> <xs:element minoccurs="0" name="description" nillable="true" type="xs:string" /> </xs:sequence> </xs:complextype> <xs:element name="signupresult" nillable="true" type="tns:signupresult" /> </xs:schema> </wsdl:types> <wsdl:message name="isignup_accountsignup_inputmessage"> <wsdl:part name="parameters" element="tns:accountsignup" /> </wsdl:message> <wsdl:message name="isignup_accountsignup_outputmessage"> <wsdl:part name="parameters" element="tns:accountsignupresponse" /> </wsdl:message> <wsdl:porttype name="isignup"> <wsdl:operation name="accountsignup"> <wsdl:input wsaw:action="https://clickandpledge.com/applicationservice/isignup/accountsignup" message="tns:isignup_accountsignup_inputmessage" /> <wsdl:output wsaw:action="https://clickandpledge.com/applicationservice/isignup/accountsignupresponse" message="tns:isignup_accountsignup_outputmessage" /> </wsdl:operation> </wsdl:porttype> <wsdl:binding name="basichttpendpoint" type="tns:isignup"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="accountsignup"> <soap:operation soapaction="https://clickandpledge.com/applicationservice/isignup/accountsignup" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="signup"> <wsdl:port name="basichttpendpoint" binding="tns:basichttpendpoint"> <soap:address location="https://application.cloud.clickandpledge.com/signup.svc" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
Comments
Post a Comment