how to consume php web service with php -
i have come across issue call web services api.since new maybe 1 share ideas on how solve issue.
the api connecting using cert file authenticated. setting cert option in nusoap class getting time out error.
so question is, have install certificate in user running the web server (in case iis 7). able access wsdl without problem using certificate installed in browser not when make call web service(i conection timeout).
i not sure if environment running nusoap/php under iis 7 or certificate file self.
any ideas helpful.
thank you. after couple of change still not able connect api. below request:
$request_xml = <<<eod <soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <soap-env:body> <prequal1207 xmlns="http://www.qwest.com/ppo/"> <wtn>3037555034</wtn> <streetaddress>9999 e yale ave</streetaddress> <apartmentorunit>unit f206</apartmentorunit> <city>denver</city> <statecode>co</statecode> <zipcode>80017</zipcode> <salescode>{$this->getsalescode()}</salescode> <marketsegment>con</marketsegment> <forcequalbyaddress>false</forcequalbyaddress> <customerinterest>broadband</customerinterest> </prequal1207> </soap-env:body> </soap-env:envelope> eod; // nusoap connection $this->client = new nusoap_client ( $url, true ); $this->client->soap_defencoding = 'utf-8'; $this->client->decode_utf8 = false; $this->client->operation = 'process'; // $this->client->usehttppersistentconnection(); // uses http 1.1 // instead of 1.0 $this->client->setusecurl ( true ); $this->client->loadwsdl (); $this->client->portname = "contentport"; $this->client->setcredentials ( "", "", "certificate", array ( // "cainfofile" => $sslpath . $capath , //optional "sslcertfile" => self::sslpath . self::sslcert, "sslkeyfile" => self::sslpath . self::sslcert, "passphrase" => "xxxxxx", "certpassword" => "xxxxxx", // optional "verifypeer" => 0, // optional "verifyhost" => 0 // optional ));
when send request following error:
http/1.1 500 internal server error
date: wed, 04 sep 2013 13:44:23 gmt server: apache set-cookie: appsec_emp_session=aaaaagabaeat%2frlpwvrl51eihwebql1p7uzzuqmtiziluqazdaxbzmg54whd%2b7euqaroggfggs5iloe1tibjkkawyasxazpx; domain=.centurylink.com; path=/; httponly cache-control: no-cache="set-cookie" content-length: 4213 set-cookie: jsessionid=jyg4sn5xxyp90sskr9nvk32gjvc3jxdldmflhjy0nnfns6lq7xhw!-1242467622; path=/ set-cookie: _wl_authcookie_jsessionid=myd[s24uwojchj50zb]m; path=/; secure x-powered-by: servlet/2.5 jsp/2.1 connection: close content-type: text/xml
s87dz5x5.14lgf4e.zq1mc6env:serverexception during processing: weblogic.xml.schema.types.illegallexicalvalueexception: "false" not valid lexical representation of {http://www.w3.org/2001/xmlschema}boolean (see fault detail stacktrace)weblogic.xml.schema.types.illegallexicalvalueexception: "false" not valid lexical representation of {http://www.w3.org/2001/xmlschema}boolean @ weblogic.xml.schema.types.xsdboolean.convertxml(xsdboolean.java:111) @ weblogic.xml.schema.binding.internal.builtin.xsdbooleandeserializer.getobjectfromcontent(xsdbooleandeserializer.java:12) @ weblogic.xml.schema.binding.internal.builtin.xsdsimpletypedeserializer.processcontent(xsdsimpletypedeserializer.java:173) @ weblogic.xml.schema.binding.internal.builtin.xsdsimpletypedeserializer.processcontent(xsdsimpletypedeserializer.java:161) @ weblogic.xml.schema.binding.internal.builtin.xsdsimpletypedeserializer.deserialize(xsdsimpletypedeserializer.java:101) @ weblogic.xml.schema.binding.beancodecbase.processelement(beancodecbase.java:184) @ weblogic.xml.schema.binding.beancodecbase.processallelements(beancodecbase.java:166) @ weblogic.xml.schema.binding.beancodecbase.processelements(beancodecbase.java:146) @ weblogic.xml.schema.binding.beancodecbase.deserialize(beancodecbase.java:109) @ weblogic.xml.schema.binding.runtimeutils.invoke_deserializer(runtimeutils.java:432) @ weblogic.xml.schema.binding.runtimeutils.invoke_deserializer(runtimeutils.java:332) @ weblogic.webservice.core.defaultpart.tojava(defaultpart.java:391) @ weblogic.webservice.core.defaultmessage.tojava(defaultmessage.java:487) @ weblogic.webservice.core.handler.invokehandler.handlerequest(invokehandler.java:94) @ weblogic.webservice.core.handlerchainimpl.handlerequest(handlerchainimpl.java:144) @ weblogic.webservice.core.defaultoperation.process(defaultoperation.java:551) @ weblogic.webservice.server.dispatcher.process(dispatcher.java:204) @ weblogic.webservice.server.dispatcher.dodispatch(dispatcher.java:175) @ weblogic.webservice.server.dispatcher.dispatch(dispatcher.java:97) @ weblogic.webservice.server.webservicemanager.dispatch(webservicemanager.java:102) @ weblogic.webservice.server.servlet.webserviceservlet.serversideinvoke(webserviceservlet.java:321) @ weblogic.webservice.server.servlet.servletbase.dopost(servletbase.java:453) @ weblogic.webservice.server.servlet.webserviceservlet.dopost(webserviceservlet.java:293) @ javax.servlet.http.httpservlet.service(httpservlet.java:727) @ javax.servlet.http.httpservlet.service(httpservlet.java:821) @ weblogic.servlet.internal.stubsecurityhelper$servletserviceaction.run(stubsecurityhelper.java:226) @ weblogic.servlet.internal.stubsecurityhelper.invokeservlet(stubsecurityhelper.java:124) @ weblogic.servlet.internal.servletstubimpl.execute(servletstubimpl.java:283) @ weblogic.servlet.internal.tailfilter.dofilter(tailfilter.java:27) @ weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:43) @ com.qwest.appsec.securityfilter.dofilter(unknown source) @ weblogic.servlet.internal.filterchainimpl.dofilter(filterchainimpl.java:43) @ weblogic.servlet.internal.webappservletcontext$servletinvocationaction.run(unknown source) @ weblogic.security.service.securitymanager.runas(unknown source) @ weblogic.servlet.internal.webappservletcontext.securedexecute(unknown source) @ weblogic.servlet.internal.webappservletcontext.execute(unknown source) @ weblogic.servlet.internal.servletrequestimpl.run(unknown source) @ weblogic.work.executethread.run(executethread.java:172)
debug
2013-09-04 09:44:23.358046 nusoap_client: setting new cookie(s)
https://ppo-ssppd.centurylink.com/content/ppo?wsdl
constructor error: wsdl error: getting https://ppo-ssppd.centurylink.com/content/ppo?wsdl - http error: curl error: 35: error:14094410:ssl routines:ssl3_read_bytes:sslv3 alert handshake failure
any appreciated.
Comments
Post a Comment