[PHP] SOAP: Is correct to override XML standards?
I am working with some WSDL call for a provider. The strange thing is that the SOAP used (for me, as client) should include an 'xml' element, and it is supported by the Php constructor, even that is not correct under XML syntaxis. Why? Is somekind of not validation? This works: ?php $client = new SoapClient($url_wsdl); $params = array( xml = $xml_content, login = $login ); $response = $client-__soapCall(wsdl_method, array($params)); ? But W3 standards: All SOAP messages are encoded using XML (see [W3C Recommendation The XML Specification] for more information on XML). Source: http://www.w3.org/TR/2000/NOTE-SOAP-2508/#_Toc478383492 (Relation with SOAP) Names beginning with the string xml, or with any string which would match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization in this or future versions of this specification. Source: http://www.w3.org/TR/REC-xml/#sec-common-syn (Common Syntactic Constructs) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP problem
Hi, My first post for several years. Using PHP 5.2.6 on Debian. I'm trying to connect to an external SOAP server where no WSDL file exists. I've been unsuccessful in getting a response which I've put down to the message being sent. My code is: $params = array( 'RequestSystem' = 'PackTrackerTest', 'SenderName' = 'George', 'MessageId'= '1234' ); $client = new SoapClient(null, array( 'soap_version' = 'SOAP_1_2', 'location' = XX, 'uri' = XX, 'trace'= TRUE, )); $result = $client-__soapCall(GetReferenceData,array(GetReferenceData=$params)); Which generates the following message: ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=http://; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:ns2=http://xml.apache.org/xml-soap; xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/; SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; SOAP-ENV:Body ns1:GetReferenceData param0 xsi:type=ns2:Map item key xsi:type=xsd:stringRequestSystem/key value xsi:type=xsd:stringPackTrackerTest/value /item item key xsi:type=xsd:stringSenderName/key value xsi:type=xsd:stringGeorge/value /item item key xsi:type=xsd:stringMessageId/key value xsi:type=xsd:string1234/value /item /param0 /ns1:GetReferenceData /SOAP-ENV:Body /SOAP-ENV:Envelope The SOAP server is expecting to get something like: soap:Envelope xmlns:soap=http://www.w3.org/2003/05/soap-envelope; xmlns:v1= soap:Body v1:GetReferenceData v1:RequestParameters RequestParameters xmlns= RequestSystem PackTrackerTest /RequestSystem SenderName George /SenderName MessageId1024/MessageId /RequestParameters /v1:RequestParameters /v1:GetReferenceData /soap:Body /soap:Envelope Does anyone have any suggestions as to how I can format my xml message accordingly? MTIA George The information in this message is intended solely for the addressee and should be considered confidential. Publishing Technology does not accept legal responsibility for the contents of this message and any statements contained herein which do not relate to the official business of Publishing Technology are neither given nor endorsed by Publishing Technology and are those of the individual and not of Publishing Technology. This message has been scanned for viruses using the most current and reliable tools available and Publishing Technology excludes all liability related to any viruses that might exist in any attachment or which may have been acquired in transit.
Re: [PHP] SOAP and Php question about authentication
Op 17 jul. 2012 05:23 schreef James Newman james.new...@primalmedia.co.nz het volgende: I'm having a few authentication issues and I'm not sure if it's my code or the web service I'm connecting to. The code below shows what I'm working with not sire if I'm going about it the right way. This is the error I get! Fatal error: Uncaught SoapFault exception: [soap:Client] System.Web.Services.Protocols.SoapException: Authentication error. Username and/or Password are incorrect at Really.. have you had a look at your error before mailing it to this list? This error looks pretty clear to me.. - Matijn
Re: [PHP] SOAP and Php question about authentication
That's not a helpful answer. I'd be curious at a real answer for this, too. I'm sure that there is something going on with session management on the client side as authentication has probably already happened, but the author doesn't know how to handle the response to the authentication correctly. --Curtis Matijn Woudt wrote: Op 17 jul. 2012 05:23 schreef James Newman james.new...@primalmedia.co.nz het volgende: I'm having a few authentication issues and I'm not sure if it's my code or the web service I'm connecting to. The code below shows what I'm working with not sire if I'm going about it the right way. This is the error I get! Fatal error: Uncaught SoapFault exception: [soap:Client] System.Web.Services.Protocols.SoapException: Authentication error. Username and/or Password are incorrect at Really.. have you had a look at your error before mailing it to this list? This error looks pretty clear to me.. - Matijn
Re: [PHP] SOAP and Php question about authentication
I agree with your response, the payment gateway insists that the authentication I have been given is correct. My question was more around was I using the function correctly. It says authentication failed but I've followed he documentation to the letter. Is there a way I can output what the server is saying when a request is sent? On Wed, Jul 18, 2012 at 2:32 AM, Curtis Maurand cur...@maurand.com wrote: That's not a helpful answer. I'd be curious at a real answer for this, too. I'm sure that there is something going on with session management on the client side as authentication has probably already happened, but the author doesn't know how to handle the response to the authentication correctly. --Curtis Matijn Woudt wrote: Op 17 jul. 2012 05:23 schreef James Newman james.new...@primalmedia.co.nz het volgende: I'm having a few authentication issues and I'm not sure if it's my code or the web service I'm connecting to. The code below shows what I'm working with not sire if I'm going about it the right way. This is the error I get! Fatal error: Uncaught SoapFault exception: [soap:Client] System.Web.Services.Protocols.SoapException: Authentication error. Username and/or Password are incorrect at Really.. have you had a look at your error before mailing it to this list? This error looks pretty clear to me.. - Matijn
Re: [PHP] SOAP and Php question about authentication
Op 17 jul. 2012 22:44 schreef James Newman james.new...@primalmedia.co.nz het volgende: I agree with your response, the payment gateway insists that the authentication I have been given is correct. My question was more around was I using the function correctly. It says authentication failed but I've followed he documentation to the letter. Is there a way I can output what the server is saying when a request is sent? Well, that really depends on the payment gateway. Anyway it should of course work if you have followed the documentation. Just want to let you know that you're probably not going to get a in depth response on how to use the payment gateway, since that is specific to your provider. The best way of looking what you're sending to the server and back is using a packet logger, for example wireshark. Though, make sure you run the capture on the webserver .. - Matijn
[PHP] SOAP and Php question about authentication
I'm having a few authentication issues and I'm not sure if it's my code or the web service I'm connecting to. The code below shows what I'm working with not sire if I'm going about it the right way. This is the error I get! Fatal error: Uncaught SoapFault exception: [soap:Client] System.Web.Services.Protocols.SoapException: Authentication error. Username and/or Password are incorrect at F2CPaymentWS.Shared.Exceptions.ExceptionManager.RaiseSoapException(String ErrorMessage, Int32 ErrorNumber, ExceptionType Type, FaultCode WhosFault, String Method) at F2CPaymentWS.PaymentWS.ProcessPayment(String Username, String Password, Int32 TxType, Int32 AccountId, Decimal Amount, String Reference, String Particular, String Email, String CardNumber, String CardType, String CardExpiry, String CardHolderName, String CardCSC, Boolean StoreCard) at F2CPaymentWS.PaymentWS.ProcessPurchase(String Username, String Password, Int32 AccountId, Decimal Amount, String Reference, String Particular, String Email, String CardNumber, String CardType, String CardExpiry, String CardHolderName, String CardCSC, Boolean StoreCard) in C:\Development\website\includes\class\Flo2cash_API.php:50 Stack trace: #0 C:\Development\allaboutauckland.com\includes\class in C:\Development\website\includes\class\Flo2cash_API.php on line *50* * * Can someone point me in the right direction? $data = array( 'Username' ='', 'Password' ='', 'AccountId' ='', 'Amount' ='10.00', 'Reference' ='00010', 'Particular'='Test Payment', 'Email' ='james.new...@gmail.com', 'CardNumber'='5123456789012346', 'CardType' ='MC', 'CardExpiry'='0513', 'CardHolderName'='JamesNewman', 'CardCSC' ='111', 'StoreCard' ='true' ); $vars = array( 'login'= '', 'password' = '', 'trace' = 1, 'exceptions' = true, 'cache_wsdl' = WSDL_CACHE_NONE, 'features' = SOAP_SINGLE_ELEMENT_ARRAYS); $client = new SoapClient(http://demo.flo2cash.co.nz/ws/paymentws.asmx?WSDL;, $vars); $text = array('Username' ='', 'Password' ='', 'AccountId' ='', 'Amount' ='10.00', 'StoreCard' ='false'); $out = $client-ProcessPurchase($data); var_dump($client-__getFunctions()); var_dump($client-__getLastRequestHeaders()); var_dump($client-__getTypes()); print_r($client); exit;
[PHP] SOAP
Hello! I am looking for some help on Web Services (SOAP) client. Is there anyone here who has already worked with such client? Thank you Deleo
Re: [PHP] SOAP
Hey there, If you are running php5 then ot is relativly easy to use the SoapClient object. It also supports ssl. Look it up in the phpmanual. Regards Lars Nielsen Hello! I am looking for some help on Web Services (SOAP) client. Is there anyone here who has already worked with such client? Thank you Deleo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/ Soap issue
I am hoping there's a SOAP expert on the list as this is driving me mad and Google doesn't come up with much help ... I am trying to build a fairly simple web service in SOAP -- the client sends a string SKU to query a product catalogue database and receives product pricing data - I am using a WSDL file which validates OK ... anyway I keep getting this error:- SOAP-ERROR: Encoding: object has no 'name' property The PHP code is below:- $client = new SoapClient('http://example.com/catalogue.wsdl',array('trace' = 1,'exceptions' = 0)); $sku = '12345'; $client-getProduct($sku); I can post the wsdl file contents if necessary. Hoping someone can help point me in the right direction! TIA Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
On 01/09/2011 14:07, Louis Huppenbauer wrote: I think it would be best if you could provide us with the .wsdl (and possibly with the server-code). Thanks for the quick response Louis.. WSDL ?xml version=1.0 encoding=UTF-8? definitions name=CatalogueService targetNamespace=http://example.com/catalogue.wsdl; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns=http://example.com/catalogue.wsdl; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsd1=http://example.com/schema; types xsd:schema targetNamespace=http://example.com/schema; xmlns=http://www.w3.org/2001/XMLSchema; xsd:complexType name=product xsd:sequence xsd:element name=name type=xsd:string/ xsd:element name=description type=xsd:string/ xsd:element name=price type=xsd:double/ xsd:element name=SKU type=xsd:string/ /xsd:sequence /xsd:complexType /xsd:schema /types message name=getProductRequest part name=sku type=xsd:string/ /message message name=getProductResponse part name=product type=xsd1:product/ /message portType name=Product_PortType operation name=getProduct input message=tns:getProductRequest/ output message=tns:getProductResponse/ /operation /portType binding name=Product_Binding type=tns:Product_PortType soap:binding style=rpc transport=http://schemas.xmlsoap.org/soap/http/ operation name=getProduct soap:operation soapAction=urn:examples:CatalogueService/ input soap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=urn:examples:CatalogueService use=encoded/ /input output soap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=urn:examples:CatalogueService use=encoded/ /output /operation /binding service name=Product_Service port name=Product_Port binding=tns:Product_Binding soap:address location=http://example.com/api/catalogue/ /port /service /definitions SERVER CODE ini_set('soap.wsdl_cache_enabled',false); $server = new SoapServer('http://example.com/catalogue.wsdl'); $server-handle();
Re: [PHP] PHP/ Soap issue
On 01/09/2011 14:16, Richard Quadling wrote: Can you give me the URL for the WSDL file? Either online or by direct email. Thanks for the quick response Richard -- I have just posted the WSDL in my earlier resply to Louis... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
On 1 September 2011 13:27, richard gray r...@richgray.com wrote: On 01/09/2011 14:16, Richard Quadling wrote: Can you give me the URL for the WSDL file? Either online or by direct email. Thanks for the quick response Richard -- I have just posted the WSDL in my earlier resply to Louis... Is there any chance of having the live URL? That way I can show exactly what/where the issue lies. I can build my test code for the WSDL file but I can't test it as the URLs are junk. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
On 1 September 2011 13:35, Richard Quadling rquadl...@gmail.com wrote: On 1 September 2011 13:27, richard gray r...@richgray.com wrote: On 01/09/2011 14:16, Richard Quadling wrote: Can you give me the URL for the WSDL file? Either online or by direct email. Thanks for the quick response Richard -- I have just posted the WSDL in my earlier resply to Louis... Is there any chance of having the live URL? That way I can show exactly what/where the issue lies. I can build my test code for the WSDL file but I can't test it as the URLs are junk. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea Unless of course, you own example.com! -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
I think it would be best if you could provide us with the .wsdl (and possibly with the server-code). 2011/9/1 richard gray r...@richgray.com I am hoping there's a SOAP expert on the list as this is driving me mad and Google doesn't come up with much help ... I am trying to build a fairly simple web service in SOAP -- the client sends a string SKU to query a product catalogue database and receives product pricing data - I am using a WSDL file which validates OK ... anyway I keep getting this error:- SOAP-ERROR: Encoding: object has no 'name' property The PHP code is below:- $client = new SoapClient('http://example.**com/catalogue.wsdlhttp://example.com/catalogue.wsdl ',array('**trace' = 1,'exceptions' = 0)); $sku = '12345'; $client-getProduct($sku); I can post the wsdl file contents if necessary. Hoping someone can help point me in the right direction! TIA Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
On 1 September 2011 13:02, richard gray r...@richgray.com wrote: I am hoping there's a SOAP expert on the list as this is driving me mad and Google doesn't come up with much help ... I am trying to build a fairly simple web service in SOAP -- the client sends a string SKU to query a product catalogue database and receives product pricing data - I am using a WSDL file which validates OK ... anyway I keep getting this error:- SOAP-ERROR: Encoding: object has no 'name' property The PHP code is below:- $client = new SoapClient('http://example.com/catalogue.wsdl',array('trace' = 1,'exceptions' = 0)); $sku = '12345'; $client-getProduct($sku); I can post the wsdl file contents if necessary. Hoping someone can help point me in the right direction! TIA Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Can you give me the URL for the WSDL file? Either online or by direct email. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
On 1 September 2011 13:25, richard gray r...@richgray.com wrote: On 01/09/2011 14:07, Louis Huppenbauer wrote: I think it would be best if you could provide us with the .wsdl (and possibly with the server-code). Thanks for the quick response Louis.. We need the URL for the WSDL file. Without that, we don't know what is happening. The WSDL content you've supplied is not tied to a real server. It just uses the example.com domain as a way of showing you a placeholder where your real URLs would exist. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute
Hi everybody! I've got some troubles trying to connect with a WS. I'd tried that with natives functions: $web_service=http://url_of_the_webservice.asmx?WSDLhttp://url_of_the_webservice.asmx/?WSDL ; try { $client = new SoapClient($web_service, array('soap_version' = SOAP_1_1, 'encoding'='utf-8', 'trace' = TRUE, 'STYLE' = SOAP_DOCUMENT, 'use' = SOAP_LITERAL ) ); } catch (SoapFault $exception) { //ERROR!!! echo h1A exception has ocurred: /h1 ; echo $exception; } and i recived this error: A exception has ocurred: SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute in /var/www/sites/version_2/SOAPdingus.php:20 Stack trace: #0 /var/www/sites/version_2/ SOAPexample.php(20): SoapClient-__construct('http://services...', Array) #1 {main} We are working with PHP 5.1.6 (but we tried too in a server with PHP 5.3.4 with the same error). You must know that we connect with others WS without any kind of problems.
Re: [PHP] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute
2011/8/19 Ignacio Marín Hernández nah...@gmail.com: $web_service=http://url_of_the_webservice.asmx?WSDLhttp://url_of_the_webservice.asmx/?WSDL ; Surely, that should be ... $web_service=http://url_of_the_webservice.asmx?WSDL;; And sorry for calling you Surely. Richard. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: [PHP] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute
Dear Richard Surely (hehe): I don´t understand what do you want to say with that should be $web_service=http://url_of_the_webservice.asmx?WSDLhttp://url_of_the_webservice.asmx/?WSDL ; Obviusly, url_of_the_web_sevice it's just an example. With the real url I can read without any problems the especifications of the WSDL. But i recived that error when I trie to connect doing new SoapClient($web_service, array('soap_version' = SOAP_1_1, 'encoding'='utf-8', 'trace' = TRUE, 'STYLE' = SOAP_DOCUMENT, 'use' = SOAP_LITERAL ) ); Thanks! El 19 de agosto de 2011 11:26, Richard Quadling rquadl...@gmail.comescribió: 2011/8/19 Ignacio Marín Hernández nah...@gmail.com: $web_service=http://url_of_the_webservice.asmx?WSDL http://url_of_the_webservice.asmx/?WSDL ; Surely, that should be ... $web_service=http://url_of_the_webservice.asmx?WSDL;; And sorry for calling you Surely. Richard. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
Re: [PHP] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute
mmm, i think i understand you now! But the url it's ok, it's only $web_service=http://url_of_the_webservice.asmx?WSDL;; The second part between ($web_service= http://url_of_the_webservice.asmx?WSDL http://url_of_the_webservice.asmx/?WSDL) was Gmail who wrote it (not me) when I forward the email. LoL By the way, Thanx fro the answer! El 19 de agosto de 2011 12:18, Richard Quadling rquadl...@gmail.comescribió: 2011/8/19 Ignacio Marín Hernández nah...@gmail.com: Dear Richard Surely (hehe): I don´t understand what do you want to say with that should be $web_service=http://url_of_the_webservice.asmx?WSDL;; Obviusly, url_of_the_web_sevice it's just an example. With the real url I can read without any problems the especifications of the WSDL. But i recived that error when I trie to connect doing new SoapClient($web_service, array('soap_version' = SOAP_1_1, 'encoding'='utf-8', 'trace' = TRUE, 'STYLE' = SOAP_DOCUMENT, 'use' = SOAP_LITERAL ) ); Thanks! El 19 de agosto de 2011 11:26, Richard Quadling rquadl...@gmail.com escribió: 2011/8/19 Ignacio Marín Hernández nah...@gmail.com: $web_service=http://url_of_the_webservice.asmx?WSDL http://url_of_the_webservice.asmx/?WSDL ; Surely, that should be ... $web_service=http://url_of_the_webservice.asmx?WSDL;; And sorry for calling you Surely. Richard. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea Your url was ... http://www.site.com/service?wsdlhttp://www.site.com/service?wsdl Rather than ... http://www.site.com/service?wsdl Can you provide the URL? -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
Re: [PHP] SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute
Ah! The joy to mail readers. If you can supply a valid URL, I can take a look and see what it is doing. 2011/8/19 Ignacio Marín Hernández nah...@gmail.com: mmm, i think i understand you now! But the url it's ok, it's only $web_service=http://url_of_the_webservice.asmx?WSDL;; The second part between ($web_service=http://url_of_the_webservice.asmx?WSDLhttp://url_of_the_webservice.asmx/?WSDL) was Gmail who wrote it (not me) when I forward the email. LoL By the way, Thanx fro the answer! El 19 de agosto de 2011 12:18, Richard Quadling rquadl...@gmail.com escribió: 2011/8/19 Ignacio Marín Hernández nah...@gmail.com: Dear Richard Surely (hehe): I don´t understand what do you want to say with that should be $web_service=http://url_of_the_webservice.asmx?WSDL;; Obviusly, url_of_the_web_sevice it's just an example. With the real url I can read without any problems the especifications of the WSDL. But i recived that error when I trie to connect doing new SoapClient($web_service, array('soap_version' = SOAP_1_1, 'encoding'='utf-8', 'trace' = TRUE, 'STYLE' = SOAP_DOCUMENT, 'use' = SOAP_LITERAL ) ); Thanks! El 19 de agosto de 2011 11:26, Richard Quadling rquadl...@gmail.com escribió: 2011/8/19 Ignacio Marín Hernández nah...@gmail.com: $web_service=http://url_of_the_webservice.asmx?WSDLhttp://url_of_the_webservice.asmx/?WSDL ; Surely, that should be ... $web_service=http://url_of_the_webservice.asmx?WSDL;; And sorry for calling you Surely. Richard. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea Your url was ... http://www.site.com/service?wsdlhttp://www.site.com/service?wsdl Rather than ... http://www.site.com/service?wsdl Can you provide the URL? -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP client and SSL version 3
Hello, I'm trying to enforce ssl version 3 for PHP Soap client. Is it possible somehow ? Pawel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP, Soap, and WDSL
One more question. How would I parse the data below so that I only display the section - information=info_2 I've read a few articles on xml name spaces and none have helped. ?xml version=1.0 encoding=utf-16?soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns=http://nowhere.com/wsdl;soap:Bodyresponse status=complete version=46 resource_type=data_1 ns=username op_type=get_data data_1 id=ID 1 information=info_2/ /response/soap:Body/soap:Envelope I tried the following which give me an error in foreach $test2 = simplexml_load_file('file.xml') or die(Error: Cannot create object); $test = $test2-xpath('Envelope/Body/response/data_1/@information'); foreach($test as $test) { echo $test.PHP_EOL; } From: sbs_comput...@hotmail.com To: chris...@gmail.com; jang...@jangita.com CC: php-general@lists.php.net Subject: RE: [PHP] PHP, Soap, and WDSL Date: Fri, 3 Sep 2010 09:05:52 -0400 Thanks guys. Both methods worked. Gino Date: Fri, 3 Sep 2010 08:31:06 -0400 From: chris...@gmail.com To: jang...@jangita.com CC: php-general@lists.php.net Subject: Re: [PHP] PHP, Soap, and WDSL Alternatively you can pass the var through htmlspecialchars... echo htmlspecialchars( $response ); and for a really simple solution you can echo it inside a textarea... echo textarea $response /textarea; Though you'll likely want to increase the size of the textarea! ;-) Chris. On Fri, Sep 3, 2010 at 3:39 AM, Jangita jang...@jangita.com wrote: On 02/09/2010 10:51 p, SBS Computers wrote: It's as if the data is not getting to my php page? The view source shows the following data: ?xml version=1.0 encoding=utf-16?soap:Envelope xmlns:soap= http://schemas.xmlsoap.org/soap/envelope/; . . .bunch of data . . /response/soap:Body/soap:Envelope Seems like the data is getting there OK. But a browser normally will not output normal xml and hides it (unless there is a body / tag or other tags that normally display output since it is using the text/html MIME add this line header('Content-type: text/plain'); before the echo and see what happens. Also make sure there is no other output (echo or any html tags) before the line above -- Jangita | +256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP, Soap, and WDSL
On 02/09/2010 10:51 p, SBS Computers wrote: It's as if the data is not getting to my php page? The view source shows the following data: ?xml version=1.0 encoding=utf-16?soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; . . .bunch of data . . /response/soap:Body/soap:Envelope Seems like the data is getting there OK. But a browser normally will not output normal xml and hides it (unless there is a body / tag or other tags that normally display output since it is using the text/html MIME add this line header('Content-type: text/plain'); before the echo and see what happens. Also make sure there is no other output (echo or any html tags) before the line above -- Jangita | +256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP, Soap, and WDSL
Alternatively you can pass the var through htmlspecialchars... echo htmlspecialchars( $response ); and for a really simple solution you can echo it inside a textarea... echo textarea $response /textarea; Though you'll likely want to increase the size of the textarea! ;-) Chris. On Fri, Sep 3, 2010 at 3:39 AM, Jangita jang...@jangita.com wrote: On 02/09/2010 10:51 p, SBS Computers wrote: It's as if the data is not getting to my php page? The view source shows the following data: ?xml version=1.0 encoding=utf-16?soap:Envelope xmlns:soap= http://schemas.xmlsoap.org/soap/envelope/; . . .bunch of data . . /response/soap:Body/soap:Envelope Seems like the data is getting there OK. But a browser normally will not output normal xml and hides it (unless there is a body / tag or other tags that normally display output since it is using the text/html MIME add this line header('Content-type: text/plain'); before the echo and see what happens. Also make sure there is no other output (echo or any html tags) before the line above -- Jangita | +256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP, Soap, and WDSL
Thanks guys. Both methods worked. Gino Date: Fri, 3 Sep 2010 08:31:06 -0400 From: chris...@gmail.com To: jang...@jangita.com CC: php-general@lists.php.net Subject: Re: [PHP] PHP, Soap, and WDSL Alternatively you can pass the var through htmlspecialchars... echo htmlspecialchars( $response ); and for a really simple solution you can echo it inside a textarea... echo textarea $response /textarea; Though you'll likely want to increase the size of the textarea! ;-) Chris. On Fri, Sep 3, 2010 at 3:39 AM, Jangita jang...@jangita.com wrote: On 02/09/2010 10:51 p, SBS Computers wrote: It's as if the data is not getting to my php page? The view source shows the following data: ?xml version=1.0 encoding=utf-16?soap:Envelope xmlns:soap= http://schemas.xmlsoap.org/soap/envelope/; . . .bunch of data . . /response/soap:Body/soap:Envelope Seems like the data is getting there OK. But a browser normally will not output normal xml and hides it (unless there is a body / tag or other tags that normally display output since it is using the text/html MIME add this line header('Content-type: text/plain'); before the echo and see what happens. Also make sure there is no other output (echo or any html tags) before the line above -- Jangita | +256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP ERROR - Encoding
On 22 July 2010 21:59, Augusto Flavio afla...@gmail.com wrote: Hi guys, I created a simple wsdl web service. Everything works fine, but when I fill the fields with accents and send the soap request, the PHP returns me an error: *Fatal error*: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: string 'ol\xe1...' is not a valid utf-8 string in PATH\cilent.php 16 Stack trace: #0 [internal function]: SoapClient-__call('Send', Array) #1 PATH\cilent.php(16): SoapClient-Send(Array) #2 {main} thrown in * PATH\cilent.php* on line *16* I tested this same request using the eclipse web service explorer(It's a java client web service inside the eclipse IDE) and the response was ok. I found few topics about this issue on the google. One related solution to this problem is use the utf8_encode() function. I tried add this function before to send the soap request but didnt worked. I think that this problem is in the PHP soap client because using the eclipse web service explorer it works fine. Here is my php soap client: $client = new SoapClient('http://app/webservice.wsdl'); $return = $client-Send(array('token' = '123123', 'message' = array( 'text' = 'This is a string with special characters á é í ó ú', 'dest' = 'John', 'sender' = 'Augusto'))); As I said I tried to use the utf8_encode() here: $return = $client-Send(array('token' = '123123', 'message' = array( 'text' = utf8_encode('This is a string with special characters á é í ó ú'), 'dest' = 'John', 'sender' = 'Augusto'))); But the problem still. I tried also add the propertie defencoding in the soap server: $server-soap_defencoding = 'UTF-8'; But still not working. What I'm missing? Thanks Augusto Morais Not 100% sure on this, but, are you saving the source code in UTF-8 format? If not, then the error is quite correct. Also, utf8_encode() only deals with converting ISO-8859-1 to UTF-8, so, again, if the source code is NOT in ISO-8859-1 then you are not going to get the conversion. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP ERROR - Encoding
Hi guys, I created a simple wsdl web service. Everything works fine, but when I fill the fields with accents and send the soap request, the PHP returns me an error: Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: string 'ol\xe1...' is not a valid utf-8 string in PATH\cilent.php 16 Stack trace: #0 [internal function]: SoapClient-__call('Send', Array) #1 PATH\cilent.php(16): SoapClient-Send(Array) #2 {main} thrown in PATH\cilent.php on line 16 I tested this same request using the eclipse web service explorer(It's a java client web service inside the eclipse IDE) and the response was ok. I found few topics about this issue on the google. One related solution to this problem is use the utf8_encode() function. I tried add this function before to send the soap request but didnt worked. I think that this problem is in the PHP soap client because using the eclipse web service explorer it works fine. Here is my php soap client: $client = new SoapClient('http://app/webservice.wsdl'); $return = $client-Send(array('token' = '123123', 'message' = array( 'text' = 'This is a string with special characters á é í ó ú', 'dest' = 'John', 'sender' = 'Augusto'))); As I said I tried to use the utf8_encode() here: $return = $client-Send(array('token' = '123123', 'message' = array( 'text' = utf8_encode('This is a string with special characters á é í ó ú'), 'dest' = 'John', 'sender' = 'Augusto'))); But the problem still. I tried also add the propertie defencoding in the soap server: $server-soap_defencoding = 'UTF-8'; But still not working. What I'm missing? Thanks Augusto Morais -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP ERROR - Encoding
Hi guys, I created a simple wsdl web service. Everything works fine, but when I fill the fields with accents and send the soap request, the PHP returns me an error: *Fatal error*: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: string 'ol\xe1...' is not a valid utf-8 string in PATH\cilent.php 16 Stack trace: #0 [internal function]: SoapClient-__call('Send', Array) #1 PATH\cilent.php(16): SoapClient-Send(Array) #2 {main} thrown in * PATH\cilent.php* on line *16* I tested this same request using the eclipse web service explorer(It's a java client web service inside the eclipse IDE) and the response was ok. I found few topics about this issue on the google. One related solution to this problem is use the utf8_encode() function. I tried add this function before to send the soap request but didnt worked. I think that this problem is in the PHP soap client because using the eclipse web service explorer it works fine. Here is my php soap client: $client = new SoapClient('http://app/webservice.wsdl'); $return = $client-Send(array('token' = '123123', 'message' = array( 'text' = 'This is a string with special characters á é í ó ú', 'dest' = 'John', 'sender' = 'Augusto'))); As I said I tried to use the utf8_encode() here: $return = $client-Send(array('token' = '123123', 'message' = array( 'text' = utf8_encode('This is a string with special characters á é í ó ú'), 'dest' = 'John', 'sender' = 'Augusto'))); But the problem still. I tried also add the propertie defencoding in the soap server: $server-soap_defencoding = 'UTF-8'; But still not working. What I'm missing? Thanks Augusto Morais
[PHP] SOAP connect error
Hello, I am working with the SOAP package of PHP and I am trying make a connection from a hosted website to a server in our office. I can get to the server perfectly fine from within our office, but I cannot connect from the eternal site. I have checked and I am certain that the firewall for the server is open. When I attempt to use the login page that I have created for the website I am getting the following error message: Connect Error to XX.XX.XX.XXX:8080 Where XX.XX.XX.XXX mask the actual ip address of the server. I have tried to interogate all the values that soap_fault documents that it can return and the only information I have been able to find beside the above message, which is the $errorstring, is that my $faultcode = HTTP. The information that I am getting is very cryptic. if I include our ip address when I search I get no results. If I put in connect error :8080 I get millions of meaningless results. Can someone please help to figure out how to get more meaningful information from soap_fault for this problem so that I can figure out how to fix it. Thank you Eric H. Lommatsch Programmer 360 Business 2087 South Grant Street Denver, CO 80210 Tel 303-777-8939 Ext 23 Fax 888-282-9927 er...@360b.com
[PHP] SOAP: Return object to client
Hi All, I am implementing the web service through PHP SOAP library. Actually I want to return the object to the client through web service so that client can call all the methods of that object. Please help me out. Regards, Manoj
[PHP] PHP SOAP Using SAML
Hi Anybody, I am evaluating to use Webservices to solve an knowed Issue. I need to know, if it is Possible to use SAML 1.0 with PHP 4 or PHP 5 and when yes, where can i get information about this Issue or open Source Software,etc. Regards Carlos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP SOAP Using SAML
Hi, take a look to Lasso. They claims it support SAML 2.0. http://lasso.entrouvert.org/ Karel Carlos Medina napsal(a): Hi Anybody, I am evaluating to use Webservices to solve an knowed Issue. I need to know, if it is Possible to use SAML 1.0 with PHP 4 or PHP 5 and when yes, where can i get information about this Issue or open Source Software,etc. Regards Carlos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP and Exception Handling
Hello Guys, I use SOAP calls to make web service requests.I have a class that does webservice calls to various wsdls. So my question is about try catch blocks. so my method looks like this: private function method($cookie){ //Define Client try{ // Check if WSDL exists if(!...@file_get_contents($this-WSDL)) { throw new SoapFault('Server', 'No WSDL found at ' . $this-WSDL); } $client = new SoapClient($this-WSDL, array( 'exceptions' = 1, 'encoding' = UTF-8, 'connection_timeout' = 60 )); }catch(SoapFault $fault){ // Error if the WSDL is not available or new client cannot be made //log errror } //Define Input Array $input = array(); $input['cookie'] = $cookie; //Make the call try{ $result = $client-function($input);// Make the Call return $result; }catch(SoapFault $fault){ //log error } } How is it possible for me to *remove *these 2 try and catch blocks from this method and just throw exceptions, but do a try and catch in the business logic. So basically I might have different functions in business logic area that might call the same method and I do error logging there itself instead directly in the method? Thanks, V
[PHP] Soap Client Help
Hi All, I am using the following code to build a SoapClient with some web service: ?php ini_set(soap.wsdl_cache_enabled, 0); ini_set('default_socket_timeout', 600); $client = new SoapClient(http://iaspub.epa.gov/webservices/StationService/index.html?WSDL,array('trace' = 1)); try { $sc = $client-getStationCount(43.1,43.5,-83.5,-83.1); print $sc; } catch (SoapFault $exception) { echo $exception; } ? // But I got the following error: /// Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Unspecified encodingStyle in /var/www/myphp/wqxststest.php:5 Stack trace: #0 /var/www/myphp/wqxststest.php(5): SoapClient-SoapClient('http://iaspub.e...', Array) #1 {main} thrown in /var/www/myphp/wqxststest.php on line 5 /// Also when I tried same code (See below) with another service, it seems working fine. /// ?php $huc = $_REQUEST['huc']; ini_set(soap.wsdl_cache_enabled, 0); ini_set('default_socket_timeout', 600); $client = new SoapClient(http://iaspub.epa.gov/webservices/WatershedSummaryService/index.html?WSDL,array('trace' = 1)); try { $client-getCharacteristicSummary($huc); print $client-__getLastResponse(); } catch (SoapFault $exception) { echo $exception; } /// ? I tried to find what's causing this error on Google but no success. Anyone know what's going on? Your help is highly appreciated! Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP call
Is there a way to call a SOAP function and pass the required XML as an argument instead of an object? I can get this to work: $oClient = new SoapClient( $sWSDL_URI, array( 'trace' = TRUE, 'exceptions'= TRUE ); $oArgObj = new ArgObj(); $oArgObj-node1 = 'value' $oArgObj-node2 = 'value' $oArgObj-node3 = 'value' $oClient-doMyAction( $oArgObj ); but not this: $oClient = new SoapClient( $sWSDL_URI, array( 'trace' = TRUE, 'exceptions'= TRUE ); $sXML = 'doMyActionnode1value/node1node2value/node2node3value/node3/doMyAction'; Which, if I look at the result from __getLastRequest(), is exactly what the XML sent looks like (minus the SOAP body, etc). The error I keep gettings is xml-resolve-missing-var-error. Is there any way I can just send the XML? Or does it have to be an object with the appropriate properties set? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP - return a list of items
Hi, I am using the PHP5 SOAP Functions... I am trying to find some information on how to properly build a function into my web service to return a list of quotes. Each list will have a QuoteID, Origin, Destination, Name. Example: 1011, 48167, 90222, John Smith 1012, 54888, 19893, Joe Johnson etc... From everything I read, I just need to build an array with this information, and return it to the SOAP client trying to get the information. I think the problem lies in my WSDL, I am certain I need to setup a complexType that handles the arrayType. Unfortunately, I cannot find any resources on how to setup the WSDL. Can someone point in the direction to get going on this? Anyone have an example WSDL that handles this type of thing that I could look at? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
[PHP] SOAP / Server Communication
Hi, At the moment I've taken over a group of individual systems that all do their job well enough independently, but all need to talk to one another. For example, one system handles stock levels, one system handles sales leads, another handles special offers, etc. etc. A complete rewrite is in order but as a step towards that, I'd like each part to be able to communicate and keep the other systems aware of their own status. eg. the special offers system needs to know whether there is stock of a particular product. Each system is running on a separate server and I need that level of separation to continue, what would be the best way of setting this up? I had used SOAP a while back on other projects but would this be the best solution in this case? Is there something better suited? To give a rough estimate of the data, the special offers system will only hold roughly about 100 offers and be changed every month or so, the sales leads are only catching incoming website form enquiries (maybe about 50 a day) and the stock levels can change maybe once or twice a day but only normally by either a mass import or removing a sold product. Thanks for any help / advice! _ Win New York holidays with Kellogg’s Live Search http://clk.atdmt.com/UKM/go/107571440/direct/01/
[PHP] [soap]about compress
I have an issue about soap. Is the data returned from servier compressed by gzip, When using soap in php5 to creat web service? Can we set for compress lever or not compress? _ 这里好多好玩的视频,用鼠标点到视频看看,有惊喜! http://cnweb.search.live.com/video/results.aspx?q=%E5%A5%A5%E8%BF%90%E5%9C%A3%E7%81%ABmkt=zh-cnFORM=WLMTWC
Re: [PHP] [soap]about compress
Quoting 付兴林 [EMAIL PROTECTED]: I have an issue about soap. Is the data returned from servier compressed by gzip, When using soap in php5 to creat web service? Can we set for compress lever or not compress? _ 这里好多好玩的视频,用鼠标点到视频看看,有惊喜! http://cnweb.search.live.com/video/results.aspx?q=%E5%A5%A5%E8%BF%90%E5%9C%A3%E7%81%ABmkt=zh-cnFORM=WLMTWC For the SOAPClient you can pass some settings in the $options parameter. $options = array('compression' = SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 9); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Soap Call Error
On Wed, 2008-07-16 at 17:44 -0700, VamVan wrote: Hello Guys, I have been getting a wierd soap exception lately [faultstring] = looks like we got no XML document [faultcode] = Client [faultcodens] = http://schemas.xmlsoap.org/soap/envelope/ What does that mean? The call gets properly called and it does what it needs to do, but the response xml is always a $fault? Did anyone have this problem? I am using php 5.2.6 for the info. This is usually a malformed XML document - I had the problem recently when fetching an XML document that wasn't complete (no /xml). Check what you're *actually* getting with something like: } catch(SoapFault $exception) { $request_xml = $client-__getLastRequestHeaders() . $client-__getLastRequest(); $response_xml = $client-__getLastResponseHeaders() . $client-__getLastResponse(); print Response:.$response_xml; print Request:.$request_xml; print $exception; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Soap Call Error
I tried that this is what i get Response:HTTP/1.1 200 OK Date: Thu, 17 Jul 2008 18:27:23 GMT Server: Apache/2.2.6 (Unix) Set-Cookie: JSESSIONID=DF4D15B8D0A0610B4832C3A708874672; Path=/ Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: multipart/related; type=application/xop+xml; start= [EMAIL PROTECTED]; start-info=text/xml; boundary==_Part_281_1620393832.1216319243198 --=_Part_281_1620393832.1216319243198 Content-Type: application/xop+xml; charset=UTF-8; type=text/xml Content-Transfer-Encoding: 8bit Content-ID: [EMAIL PROTECTED] --=_Part_281_1620393832.1216319243198-- Request:POST /rpc/soap/ForumService HTTP/1.1 Host: Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.0 Content-Type: text/xml; charset=utf-8 SOAPAction: Content-Length: 850soap:Envelope xmlns:soap= http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd= http://www.w3.org/2001/XMLSchema; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance;soap:BodycreateThreadResponse xmlns=http://jivesoftware.com/webservices;out xmlns= http://jivesoftware.com/webservices;ID xmlns= http://webservices.community.jivesoftware.com;xx/IDcommunityID xmlns=http://webservices.community.jivesoftware.com;x/communityIDcreationDate xmlns=http://webservices.community.jivesoftware.com;-07-17T11:27:23.078-07:00/creationDatelatestMessageID xmlns=http://webservices.community.jivesoftware.com;x/latestMessageIDmessageCount xmlns=http://webservices.community.jivesoftware.com;1/messageCountmoderationValue xmlns=http://webservices.community.jivesoftware.com;1/moderationValuemodificationDate xmlns=http://webservices.community.jivesoftware.com;2008-07-17T11:27:23.078-07:00/modificationDatename xmlns=http://webservices.community.jivesoftware.com;new appliance 108/nameobjectType xmlns=http://webservices.community.jivesoftware.com;0/objectTyperootMessage xmlns=http://webservices.community.jivesoftware.com;ID989430/IDanonymousfalse/anonymousattachmentCount0/attachmentCountbodyhello/bodycommunityID2352/communityIDcommunityIndex1538/communityIndexcreationDate2008-07-17T11:27:23.078-07:00/creationDateforumThreadID155479/forumThreadIDimageCount0/imageCountmoderationValue1/moderationValuemodificationDate2008-07-17T11:27:23.078-07:00/modificationDateparentMessageID0/parentMessageIDsubjectnew appliance 108/subjectunfilteredBodyhello/unfilteredBodyunfilteredSubjectnew appliance 108/unfilteredSubjectuserID135558/IDcreationDate2006-05-10T11:55:27.114-07:00/creationDateemailasdadasd/emailemailVisiblefalse/emailVisiblemodificationDate2006-05-10T11:55:27.114-07:00/modificationDatename /namenameVisibletrue/nameVisiblepassword xsi:nil=true /passwordHash/passwordHashusername /username/user/rootMessage/out/createThreadResponse/soap:Body/soap:Envelope ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=http://jivesoftware.com/webservices; xmlns:ns2= http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd SOAP-ENV:Header wsse:Security xmlns:wsse= http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd wsse:UsernameToken wsse:Usernamexxx/wsse:Username wsse:Passwordx/wsse:Password /wsse:UsernameToken /wsse:Security /SOAP-ENV:HeaderSOAP-ENV:Bodyns1:createThreadns1:subjectnew appliance 108/ns1:subjectns1:bodyhello/ns1:bodyns1:communityIDx/ns1:communityIDns1:userID/ns1:userID/ns1:createThread/SOAP-ENV:Body/SOAP-ENV:Envelope I dont know what can I infer from this. I still get the same error. On Wed, Jul 16, 2008 at 11:26 PM, Jason Norwood-Young [EMAIL PROTECTED] wrote: On Wed, 2008-07-16 at 17:44 -0700, VamVan wrote: Hello Guys, I have been getting a wierd soap exception lately [faultstring] = looks like we got no XML document [faultcode] = Client [faultcodens] = http://schemas.xmlsoap.org/soap/envelope/ What does that mean? The call gets properly called and it does what it needs to do, but the response xml is always a $fault? Did anyone have this problem? I am using php 5.2.6 for the info. This is usually a malformed XML document - I had the problem recently when fetching an XML document that wasn't complete (no /xml). Check what you're *actually* getting with something like: } catch(SoapFault $exception) { $request_xml = $client-__getLastRequestHeaders() . $client-__getLastRequest(); $response_xml = $client-__getLastResponseHeaders() . $client-__getLastResponse(); print Response:.$response_xml; print Request:.$request_xml; print $exception; }
[PHP] Soap Call Error
Hello Guys, I have been getting a wierd soap exception lately [faultstring] = looks like we got no XML document [faultcode] = Client [faultcodens] = http://schemas.xmlsoap.org/soap/envelope/ What does that mean? The call gets properly called and it does what it needs to do, but the response xml is always a $fault? Did anyone have this problem? I am using php 5.2.6 for the info. and below is my method... private function createThread($userID, $applianceTitle, $applianceDetails_link){ // Define Client try { $client = new SoapClient($this-createThreadWSDL, array(trace = 1 )); } catch(SoapFault $fault) { return ; } // Define Input array $params = array( 'subject'= $applianceTitle, 'body' = $applianceDetails_link, 'communityID' = $this-parentCommunityID, 'userID' = $userID ); //Make the Call try { $result = $client-__soapCall('createThread', array('parameters'=$params), NULL, $this-header); return $result; } catch (SoapFault $fault){ return $fault; } } Thanks
[PHP] SOAP - function does not exist?
Hi, I've got a web service that I have created that. It has several functions, here is the var_dump of __getfunctions(); array(11) { [0]= string(52) getQuoteResponse getQuote(getQuote $getquoterequest) [1]= string(64) submitOrderResponse submitOrder(submitOrder $submitorderrequest) [2]= string(64) updateQuoteResponse updateQuote(updateQuote $updatequoterequest) [3]= string(68) accountLoginResponse accountLogin(accountLogin $accountloginrequest) [4]= string(80) accountPasswordResponse accountPassword(accountPassword $accountpasswordrequest) [5]= string(64) accountInfoResponse accountInfo(accountInfo $accountinforequest) [6]= string(72) accountUpdateResponse accountUpdate(accountUpdate $accountupdaterequest) [7]= string(80) getQuoteHistoryResponse getQuoteHistory(getQuoteHistory $getquotehistoryrequest) [8]= string(80) getQuoteDetailsResponse getQuoteDetails(getQuoteDetails $getquotedetailsrequest) [9]= string(80) getOrderHistoryResponse getOrderHistory(getOrderHistory $getorderhistoryrequest) [10]= string(80) getOrderDetailsResponse getOrderDetails(getOrderDetails $getorderdetailsrequest) } The response I am getting is: SoapFault Object ( [message:protected] = Function 'getOrderHistory' doesn't exist [string:private] = [code:protected] = 0 [file:protected] = /home/yerkes/public_html/soap/client.php [line:protected] = 74 [trace:private] = Array ( [0] = Array ( [function] = __call [class] = SoapClient [type] = - [args] = Array ( [0] = getOrderHistory [1] = Array ( [0] = Array ( [id] = 24 [key] = asdlkjf [username] = [EMAIL PROTECTED] [startdate] = 2008-05-01 [enddate] = 2008-05-31 [password] = x ) ) ) } ) I have gone over the wsdl countless times, and do not see anything wrong it. Can anyone tell me where to begin trouble shooting this? I can post code from the client and class if need be. I guess I'm mainly trying to figure out: Does this point to a wsdl problem, or code problem? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
RE: [PHP] SOAP - function does not exist?
Your WSDL is referencing a document literal service. How are you making the request? For instance, look at this example: $soap = new SoapClient('some.wsdl'); $soap-getOrderHistory('somestring'); The above might not work as your document literal service (not RPC) is looking for the data in the SOAP headers, not the body. You may have to attach the data to the headers and use __call() rather than RPC. Can you provide the WSDL (as attachment please) -Original Message- From: Dan Joseph [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 9:43 AM To: PHP General List Subject: [PHP] SOAP - function does not exist? Hi, I've got a web service that I have created that. It has several functions, here is the var_dump of __getfunctions(); array(11) { [0]= string(52) getQuoteResponse getQuote(getQuote $getquoterequest) [1]= string(64) submitOrderResponse submitOrder(submitOrder $submitorderrequest) [2]= string(64) updateQuoteResponse updateQuote(updateQuote $updatequoterequest) [3]= string(68) accountLoginResponse accountLogin(accountLogin $accountloginrequest) [4]= string(80) accountPasswordResponse accountPassword(accountPassword $accountpasswordrequest) [5]= string(64) accountInfoResponse accountInfo(accountInfo $accountinforequest) [6]= string(72) accountUpdateResponse accountUpdate(accountUpdate $accountupdaterequest) [7]= string(80) getQuoteHistoryResponse getQuoteHistory(getQuoteHistory $getquotehistoryrequest) [8]= string(80) getQuoteDetailsResponse getQuoteDetails(getQuoteDetails $getquotedetailsrequest) [9]= string(80) getOrderHistoryResponse getOrderHistory(getOrderHistory $getorderhistoryrequest) [10]= string(80) getOrderDetailsResponse getOrderDetails(getOrderDetails $getorderdetailsrequest) } The response I am getting is: SoapFault Object ( [message:protected] = Function 'getOrderHistory' doesn't exist [string:private] = [code:protected] = 0 [file:protected] = /home/yerkes/public_html/soap/client.php [line:protected] = 74 [trace:private] = Array ( [0] = Array ( [function] = __call [class] = SoapClient [type] = - [args] = Array ( [0] = getOrderHistory [1] = Array ( [0] = Array ( [id] = 24 [key] = asdlkjf [username] = [EMAIL PROTECTED] [startdate] = 2008-05-01 [enddate] = 2008-05-31 [password] = x ) ) ) } ) I have gone over the wsdl countless times, and do not see anything wrong it. Can anyone tell me where to begin trouble shooting this? I can post code from the client and class if need be. I guess I'm mainly trying to figure out: Does this point to a wsdl problem, or code problem? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SOAP - function does not exist?
It doesn't look like the SOAP service at http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.php doesn't actually implement a function called getOrderHistory. Can you verify that? From: Dan Joseph [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 9:52 AM To: Will Fitch Cc: PHP General List Subject: Re: [PHP] SOAP - function does not exist? On Mon, Jun 30, 2008 at 10:48 AM, Will Fitch [EMAIL PROTECTED] wrote: Your WSDL is referencing a document literal service. How are you making the request? For instance, look at this example: $soap = new SoapClient('some.wsdl'); $soap-getOrderHistory('somestring'); The above might not work as your document literal service (not RPC) is looking for the data in the SOAP headers, not the body. You may have to attach the data to the headers and use __call() rather than RPC. Can you provide the WSDL (as attachment please) -Original Message- From: Dan Joseph [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 9:43 AM To: PHP General List Subject: [PHP] SOAP - function does not exist? Hi, I've got a web service that I have created that. It has several functions, here is the var_dump of __getfunctions(); array(11) { [0]= string(52) getQuoteResponse getQuote(getQuote $getquoterequest) [1]= string(64) submitOrderResponse submitOrder(submitOrder $submitorderrequest) [2]= string(64) updateQuoteResponse updateQuote(updateQuote $updatequoterequest) [3]= string(68) accountLoginResponse accountLogin(accountLogin $accountloginrequest) [4]= string(80) accountPasswordResponse accountPassword(accountPassword $accountpasswordrequest) [5]= string(64) accountInfoResponse accountInfo(accountInfo $accountinforequest) [6]= string(72) accountUpdateResponse accountUpdate(accountUpdate $accountupdaterequest) [7]= string(80) getQuoteHistoryResponse getQuoteHistory(getQuoteHistory $getquotehistoryrequest) [8]= string(80) getQuoteDetailsResponse getQuoteDetails(getQuoteDetails $getquotedetailsrequest) [9]= string(80) getOrderHistoryResponse getOrderHistory(getOrderHistory $getorderhistoryrequest) [10]= string(80) getOrderDetailsResponse getOrderDetails(getOrderDetails $getorderdetailsrequest) } The response I am getting is: SoapFault Object ( [message:protected] = Function 'getOrderHistory' doesn't exist [string:private] = [code:protected] = 0 [file:protected] = /home/yerkes/public_html/soap/client.php [line:protected] = 74 [trace:private] = Array ( [0] = Array ( [function] = __call [class] = SoapClient [type] = - [args] = Array ( [0] = getOrderHistory [1] = Array ( [0] = Array ( [id] = 24 [key] = asdlkjf [username] = [EMAIL PROTECTED] [startdate] = 2008-05-01 [enddate] = 2008-05-31 [password] = x ) ) ) } ) I have gone over the wsdl countless times, and do not see anything wrong it. Can anyone tell me where to begin trouble shooting this? I can post code from the client and class if need be. I guess I'm mainly trying to figure out: Does this point to a wsdl problem, or code problem? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life. Hi Will, thanks for the response. Here is the wsdl. I am calling the service with: ?php $client = new SoapClient( http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.wsdl; ); $d = $client-getOrderHistory( $data ); ? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
Re: [PHP] SOAP - function does not exist?
On Mon, Jun 30, 2008 at 11:08 AM, Will Fitch [EMAIL PROTECTED] wrote: It doesn't look like the SOAP service at http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.phpdoesn't actually implement a function called getOrderHistory. Can you verify that? *From:* Dan Joseph [mailto:[EMAIL PROTECTED] *Sent:* Monday, June 30, 2008 9:52 AM *To:* Will Fitch *Cc:* PHP General List *Subject:* Re: [PHP] SOAP - function does not exist? On Mon, Jun 30, 2008 at 10:48 AM, Will Fitch [EMAIL PROTECTED] wrote: Your WSDL is referencing a document literal service. How are you making the request? For instance, look at this example: $soap = new SoapClient('some.wsdl'); $soap-getOrderHistory('somestring'); The above might not work as your document literal service (not RPC) is looking for the data in the SOAP headers, not the body. You may have to attach the data to the headers and use __call() rather than RPC. Can you provide the WSDL (as attachment please) -Original Message- From: Dan Joseph [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 9:43 AM To: PHP General List Subject: [PHP] SOAP - function does not exist? Hi, I've got a web service that I have created that. It has several functions, here is the var_dump of __getfunctions(); array(11) { [0]= string(52) getQuoteResponse getQuote(getQuote $getquoterequest) [1]= string(64) submitOrderResponse submitOrder(submitOrder $submitorderrequest) [2]= string(64) updateQuoteResponse updateQuote(updateQuote $updatequoterequest) [3]= string(68) accountLoginResponse accountLogin(accountLogin $accountloginrequest) [4]= string(80) accountPasswordResponse accountPassword(accountPassword $accountpasswordrequest) [5]= string(64) accountInfoResponse accountInfo(accountInfo $accountinforequest) [6]= string(72) accountUpdateResponse accountUpdate(accountUpdate $accountupdaterequest) [7]= string(80) getQuoteHistoryResponse getQuoteHistory(getQuoteHistory $getquotehistoryrequest) [8]= string(80) getQuoteDetailsResponse getQuoteDetails(getQuoteDetails $getquotedetailsrequest) [9]= string(80) getOrderHistoryResponse getOrderHistory(getOrderHistory $getorderhistoryrequest) [10]= string(80) getOrderDetailsResponse getOrderDetails(getOrderDetails $getorderdetailsrequest) } The response I am getting is: SoapFault Object ( [message:protected] = Function 'getOrderHistory' doesn't exist [string:private] = [code:protected] = 0 [file:protected] = /home/yerkes/public_html/soap/client.php [line:protected] = 74 [trace:private] = Array ( [0] = Array ( [function] = __call [class] = SoapClient [type] = - [args] = Array ( [0] = getOrderHistory [1] = Array ( [0] = Array ( [id] = 24 [key] = asdlkjf [username] = [EMAIL PROTECTED] [startdate] = 2008-05-01 [enddate] = 2008-05-31 [password] = x ) ) ) } ) I have gone over the wsdl countless times, and do not see anything wrong it. Can anyone tell me where to begin trouble shooting this? I can post code from the client and class if need be. I guess I'm mainly trying to figure out: Does this point to a wsdl problem, or code problem? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life. Hi Will, thanks for the response. Here is the wsdl. I am calling the service with: ?php $client = new SoapClient( http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.wsdl; ); $d = $client-getOrderHistory( $data ); ? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life. Ahhh! You are right on with that! I forgot to put $ursqs-addFunction( getOrderHistory ); I added it, its working now. Thanks Will! -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
[PHP] SOAP Client - Cannot use object of type stdClass as array
Hi, I have a web service: http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.wsdl I wrote a simple client to connect to it and get a quote, however I am running into a snag. I get the below error when trying to run it. I've tried it as an array, as an object, nothing seems to work. I have also included the code. Any help would be appreciated. *Fatal error*: Uncaught SoapFault exception: [SOAP-ENV:Server] Cannot use object of type stdClass as array in /home/yerkes/public_html/soap/client.php:119 Stack trace: #0 [internal function]: SoapClient-__call('getQuote', Array) #1 /home/yerkes/public_html/soap/client.php(119): SoapClient-getQuote(Array) #2 {main} thrown in */home/yerkes/public_html/soap/client.php* on line *119* ?php $client = new SoapClient( http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.wsdl; ); $data = array ( id = 24, key = laksjdfl, firstname = Dan, lastname = Joseph, companyname = UR, dealername = , contact_address1 = 321 Street, contact_address2 = , contact_city = Romulus, contact_state = MI, contact_zip = 48167, emailaddress = [EMAIL PROTECTED], referral = 24, origin_contactname = , origin_contactphone1 = , origin_contactphone2 = , origin_address1 = , origin_address2 = , origin_city = Northville, origin_state = MI, origin_zip = 48167, dest_contactname = , dest_contactphone1 = , dest_contactphone2 = , dest_address1 = , dest_address2 = , dest_city = Beverly Hills, dest_state = CA, dest_zip = 90210, phone = , cellphone = , fax = , contactpref = , vin = , color = , height = , buyer_id = , item_id = , engine_size = , modified = , pickupdate = , latestpickupdate = , make = Ford, model = Taurus, year = 2002, vehicletype = 1, inop = 0, enclosed_carrier = 0, quote_type = quote, savequote = 1 ); try { $d = $client-getQuote( $data ); } catch ( SoapException $e ) { echo pre; print_r( $e ); echo /pre; exit(); } echo pre; var_dump( $d ); ? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
[PHP] HELP !!!!! PHP SOAP Not building objects correctly
Hi all, sorry for the cross post to the general PHP list as well as the SOAP PHP list, but I'm a little bit desperate... Ok, for some reason when I am sending the proper objects to the __soapCall method, it is not including those objects in the XML call itself... I am using PHP 5.2.6 now after using 5.2.5 and thinking this may be fixed in an upgrade, but it is not... ok, here is a dump of the object I am sending the __soapCall method as an argument : [struct] = CreateCustomerPaymentProfile Object ( [merchantAuthentication] = MerchantAuthenticationType Object ( [name] = x [transactionKey] = xx ) [customerProfileId] = 181854 [paymentProfile] = CustomerPaymentProfileType Object ( [payment] = PaymentSimpleType Object ( [creditCard] = CreditCardType Object ( [cardNumber] = [expirationDate] = -XX ) ) [customerType] = individual [billTo] = CustomerAddressType Object ( [firstName] = Tim [lastName] = Traver ) ) [validationMode] = none ) And here is the call that is generated : [__last_request] = ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=https://api.authorize.net/soap/v1/; SOAP-ENV:Body ns1:CreateCustomerPaymentProfile ns1:merchantAuthentication ns1:name/ns1:name ns1:transactionKey/ns1:transactionKey /ns1:merchantAuthentication ns1:customerProfileId181854/ns1:customerProfileId ns1:paymentProfile ns1:customerTypeindividual/ns1:customerType ns1:billTo ns1:firstNameTim/ns1:firstName ns1:lastNameTraver/ns1:lastName /ns1:billTo ns1:payment/ /ns1:paymentProfile ns1:validationModenone/ns1:validationMode /ns1:CreateCustomerPaymentProfile /SOAP-ENV:Body /SOAP-ENV:Envelope As you can see, all of the object variables are created correctly, except that the payment object is not. It is simply represented by ns1:payment/ and has no start, and no variables that were sent in the object. This is very strange, and I can't figure out where to look to try and solve this problem, but it is a very big problem. I have tried to changed the order of the objects, what the actual values of the objects are, but I'm now banging my head as to why the soap construction is not including these values... Any help would be greatly appreciated, Tim.
Re: [PHP] HELP !!!!! PHP SOAP Not building objects correctly
On Fri, May 16, 2008 at 1:04 PM, Tim Traver [EMAIL PROTECTED] wrote: Hi all, sorry for the cross post to the general PHP list as well as the SOAP PHP list, but I'm a little bit desperate... Ok, for some reason when I am sending the proper objects to the __soapCall method, it is not including those objects in the XML call itself... I am using PHP 5.2.6 now after using 5.2.5 and thinking this may be fixed in an upgrade, but it is not... ok, here is a dump of the object I am sending the __soapCall method as an argument : [struct] = CreateCustomerPaymentProfile Object ( [merchantAuthentication] = MerchantAuthenticationType Object ( [name] = x [transactionKey] = xx ) [customerProfileId] = 181854 [paymentProfile] = CustomerPaymentProfileType Object ( [payment] = PaymentSimpleType Object ( [creditCard] = CreditCardType Object ( [cardNumber] = [expirationDate] = -XX ) ) [customerType] = individual [billTo] = CustomerAddressType Object ( [firstName] = Tim [lastName] = Traver ) ) [validationMode] = none ) And here is the call that is generated : [__last_request] = ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV= http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1= https://api.authorize.net/soap/v1/; SOAP-ENV:Body ns1:CreateCustomerPaymentProfile ns1:merchantAuthentication ns1:name/ns1:name ns1:transactionKey/ns1:transactionKey /ns1:merchantAuthentication ns1:customerProfileId181854/ns1:customerProfileId ns1:paymentProfile ns1:customerTypeindividual/ns1:customerType ns1:billTo ns1:firstNameTim/ns1:firstName ns1:lastNameTraver/ns1:lastName /ns1:billTo ns1:payment/ /ns1:paymentProfile ns1:validationModenone/ns1:validationMode /ns1:CreateCustomerPaymentProfile /SOAP-ENV:Body /SOAP-ENV:Envelope As you can see, all of the object variables are created correctly, except that the payment object is not. It is simply represented by ns1:payment/ and has no start, and no variables that were sent in the object. This is very strange, and I can't figure out where to look to try and solve this problem, but it is a very big problem. I have tried to changed the order of the objects, what the actual values of the objects are, but I'm now banging my head as to why the soap construction is not including these values... Any help would be greatly appreciated, Tim. first thing that comes to mind, the SoapClient::__call() method is deprecated. have you tried using the SoapClient instance directly? for example, if you are in WSDL mode and the wsdl defines a method doStuff(), you can use a SoapClient instance $sc as $sc-doStuff(). i would try that and see what happens. -nathan
Re: [PHP] HELP !!!!! PHP SOAP Not building objects correctly
Nathan Nobbe wrote: On Fri, May 16, 2008 at 1:04 PM, Tim Traver [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi all, sorry for the cross post to the general PHP list as well as the SOAP PHP list, but I'm a little bit desperate... Ok, for some reason when I am sending the proper objects to the __soapCall method, it is not including those objects in the XML call itself... I am using PHP 5.2.6 now after using 5.2.5 and thinking this may be fixed in an upgrade, but it is not... ok, here is a dump of the object I am sending the __soapCall method as an argument : [struct] = CreateCustomerPaymentProfile Object ( [merchantAuthentication] = MerchantAuthenticationType Object ( [name] = x [transactionKey] = xx ) [customerProfileId] = 181854 [paymentProfile] = CustomerPaymentProfileType Object ( [payment] = PaymentSimpleType Object ( [creditCard] = CreditCardType Object ( [cardNumber] = [expirationDate] = -XX ) ) [customerType] = individual [billTo] = CustomerAddressType Object ( [firstName] = Tim [lastName] = Traver ) ) [validationMode] = none ) And here is the call that is generated : [__last_request] = ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=https://api.authorize.net/soap/v1/; SOAP-ENV:Body ns1:CreateCustomerPaymentProfile ns1:merchantAuthentication ns1:name/ns1:name ns1:transactionKey/ns1:transactionKey /ns1:merchantAuthentication ns1:customerProfileId181854/ns1:customerProfileId ns1:paymentProfile ns1:customerTypeindividual/ns1:customerType ns1:billTo ns1:firstNameTim/ns1:firstName ns1:lastNameTraver/ns1:lastName /ns1:billTo ns1:payment/ /ns1:paymentProfile ns1:validationModenone/ns1:validationMode /ns1:CreateCustomerPaymentProfile /SOAP-ENV:Body /SOAP-ENV:Envelope As you can see, all of the object variables are created correctly, except that the payment object is not. It is simply represented by ns1:payment/ and has no start, and no variables that were sent in the object. This is very strange, and I can't figure out where to look to try and solve this problem, but it is a very big problem. I have tried to changed the order of the objects, what the actual values of the objects are, but I'm now banging my head as to why the soap construction is not including these values... Any help would be greatly appreciated, Tim. first thing that comes to mind, the SoapClient::__call() method is deprecated. have you tried using the SoapClient instance directly? for example, if you are in WSDL mode and the wsdl defines a method doStuff(), you can use a SoapClient instance $sc as $sc-doStuff(). i would try that and see what happens. -nathan Thanks for the response Nathan, but that doesn't appear to change anything... I'm just super confused as to why it would leave an entire object out of the tree that it is sending... Anyone else have any suggestions??? Tim.
[PHP] PHP/SOAP WDSL Restrictions
Hi All, I'm struggling with the WDSL restrictions in PHP/SOAP for a while know. I would like to create some simple restrictions in my WDSL file. The script are running both on the same server with PHP Version 5.2.6 with the official soap extension. On both my client and server there is some error configuration: error_reporting(E_ALL); ini_set(soap.wsdl_cache_enabled, 0); use_soap_error_handler(true); In my WDSL file there are some restrictions like: A rule to accept only numbers, PHP/SOAP is translating not numbers to 0. (but I want an error message!) xsd:element name=streetNumber minOccurs=1 maxOccurs=1 type=xsd:int Almost the same for this more advanced restriction, you can provide every string. There is no error message and the whole string is accepted by my server. xsd:simpleType name=Email xsd:restriction base=xsd:string xsd:pattern value=^[_a-z0-9-]+(\.[_a-z0-9-]+)[EMAIL PROTECTED](\.[a-z0-9-]+)*$ /xsd:pattern /xsd:restriction /xsd:simpleType I hope there are some people that have some more experience with PHP/SOAP and the use of restrictions who can help me with this! Best regards, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP/SOAP WDSL Restrictions
I'm struggling with the WDSL restrictions in PHP/SOAP for a while Sorry, I mean WSDL instead of WDSL. But of course the problem stays the same :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Recommended book on PHP/SOAP
I would like a book on implementing SOAP geared for someone with no SOAP experience. Hopefully SOAP can be used with PHP 4?!? Many thanks... Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recommended book on PHP/SOAP
On Mon, May 5, 2008 at 12:29 PM, Todd Cary [EMAIL PROTECTED] wrote: I would like a book on implementing SOAP geared for someone with no SOAP experience. Hopefully SOAP can be used with PHP 4?!? Many thanks... I'm not sure of a book, but for PHP4 you'll want to grab NuSOAP. Its actually a pretty nice SOAP library. You can ifnd it on google. I was able to work with it by searching for examples just fine. You may not even need a book. -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Reseller plans and Dedicated servers available. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
Re: [PHP] Recommended book on PHP/SOAP
Dan Joseph wrote: On Mon, May 5, 2008 at 12:29 PM, Todd Cary [EMAIL PROTECTED] wrote: I would like a book on implementing SOAP geared for someone with no SOAP experience. Hopefully SOAP can be used with PHP 4?!? Many thanks... I'm not sure of a book, but for PHP4 you'll want to grab NuSOAP. Its actually a pretty nice SOAP library. You can ifnd it on google. I was able to work with it by searching for examples just fine. You may not even need a book. Thank you Dan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recommended book on PHP/SOAP
On May 5, 2008, at 12:29 PM, Todd Cary wrote: I would like a book on implementing SOAP geared for someone with no SOAP experience. A book I like is: Pro PHP XML and Web Services # ISBN-10: 1590596331 # ISBN-13: 978-1590596333 This book requires PHP 5. Hopefully SOAP can be used with PHP 4?!? Of course...it is after all still just text transported via the HTTP protocol and PHP does a good job at parsing text, so, at a minimum, you could write your own support for SOAP in PHP 4. Why are you looking at PHP4? After August of this year, PHP 4 will no longer be supported and I don't believe it had any built-in support for SOAP as PHP 5 does. Although, I believe there is some third-party support for SOAP in PHP 4. I believe this is one example: http://pear.php.net/package/SOAP/ http://www.evolt.org/article/The_PEAR_SOAP_Implementation/21/49993/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP and nested input
On Mon, April 28, 2008 4:52 am, Emil Edeholt wrote: If I need to pass nested input to a SOAP function; For example a function that requires these parameters: foobar/foo foonest barnestfoobar/barnest /foonest Should I simply nest two arrays to the php soap function, i.e: $client-foo(array(foo = bar, foonest = array(barnest = foobar)); Should work, I think... The exception I get is: Catchable fatal error: Object of class stdClass could not be converted to string. This means you tried to echo/print or embed into a string some kind of php built-in Object, or some on-the-fly object you created. -- Can you do me a favor? Sign up for http://Facebook.com Add http://apps.facebook.com/whereivebeen/ Review it, and let 'em know Rich sent you. http://www.facebook.com/apps/application.php?id=2603626322 (Scroll down to the middle of the middle column) Give it a 5-star rating please :-) (If you can't go 5-star, email me to tell me why) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP Server in PHP4
Looks like I will be unable to use PHP5 to do a SOAP server. I believe it was possible to do such a thing in PHP4, but perhaps not as cleanly. Unfortunately, I am unable to locate the appropriate documentation on php.net for some reason...perhaps I am just blind. Can anyone point me to it? This page: http://us3.php.net/manual/en/ref.soap.php seems to apply only to PHP5 and beyond. Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP Server in PHP4
On Tue, Mar 18, 2008 at 5:28 PM, Eric Gorr [EMAIL PROTECTED] wrote: Looks like I will be unable to use PHP5 to do a SOAP server. I believe it was possible to do such a thing in PHP4, but perhaps not as cleanly. is this because you arent able to use php5 in your current situation, because php can do soap servers in php5. Unfortunately, I am unable to locate the appropriate documentation on php.net for some reason...perhaps I am just blind. there was no native support for soap w/ php4. i dont even know if nusoap offered this, and anyway i didnt really like it nor have i ever heard of a php4 soap server. -nathan
[PHP] Newbie Question on PHP-SOAP
Hi All, I'm trying to test create a soap clienet in PHP, here's my code: ?php $client = new SoapClient( http://10.132.32.112:8080/axis2/services/TemperatureConverter?wsdl;, array('exceptions' = 0)); try { $a = 32; $result = $client-__soapCall(c2FConvertion,array($a)); #c2FConvertion(a); print_r($result); } catch (SoapFault $result) { print_r($result); } ? When I run this to invoke the service, I got this error: SoapFault Object ( [message:protected] = Exception occurred while trying to invoke service method c2fConvertion [string:private] = [code:protected] = 0 [file:protected] = /home/chino/Tests/soapclienet/GetTemp.php [line:protected] = 5 [trace:private] = Array ( [0] = Array ( [file] = /home/chino/Tests/soapclienet/GetTemp.php [line] = 5 [function] = __soapCall [class] = SoapClient [type] = - [args] = Array ( [0] = c2FConvertion [1] = Array ( [0] = 32 ) ) ) ) [faultstring] = Exception occurred while trying to invoke service method c2fConvertion [faultcode] = soapenv:Client [detail] = ) My Web Service basically does temperature convertion and is writting in java using axis2. my java client can invoke this service remotely. Here's the WSDL file: wsdl:definitions targetNamespace=http://example.ws; wsdl:documentationTemperatureConverter/wsdl:documentation wsdl:types xs:schema attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://example.ws/xsd; xs:element name=c2fConvertion xs:complexType xs:sequence xs:element name=cValue nillable=true type=xs:double/ /xs:sequence /xs:complexType /xs:element − xs:element name=c2fConvertionResponse − xs:complexType − xs:sequence xs:element name=return nillable=true type=xs:double/ /xs:sequence /xs:complexType /xs:element − xs:element name=f2cConvertion − xs:complexType − xs:sequence xs:element name=fValue nillable=true type=xs:double/ /xs:sequence /xs:complexType /xs:element − xs:element name=f2cConvertionResponse − xs:complexType − xs:sequence xs:element name=return nillable=true type=xs:double/ /xs:sequence /xs:complexType /xs:element /xs:schema /wsdl:types − wsdl:message name=f2cConvertionMessage wsdl:part name=part1 element=ns0:f2cConvertion/ /wsdl:message − wsdl:message name=f2cConvertionResponse wsdl:part name=part1 element=ns0:f2cConvertionResponse/ /wsdl:message − wsdl:message name=c2fConvertionMessage wsdl:part name=part1 element=ns0:c2fConvertion/ /wsdl:message − wsdl:message name=c2fConvertionResponse wsdl:part name=part1 element=ns0:c2fConvertionResponse/ /wsdl:message − wsdl:portType name=TemperatureConverterPortType − wsdl:operation name=f2cConvertion wsdl:input message=axis2:f2cConvertionMessage wsaw:Action=urn:f2cConvertion/ wsdl:output message=axis2:f2cConvertionResponse/ /wsdl:operation − wsdl:operation name=c2fConvertion wsdl:input message=axis2:c2fConvertionMessage wsaw:Action=urn:c2fConvertion/ wsdl:output message=axis2:c2fConvertionResponse/ /wsdl:operation /wsdl:portType − wsdl:binding name=TemperatureConverterSOAP11Binding type=axis2:TemperatureConverterPortType soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document/ − wsdl:operation name=f2cConvertion soap:operation soapAction=urn:f2cConvertion style=document/ − wsdl:input soap:body use=literal/ /wsdl:input − wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation − wsdl:operation name=c2fConvertion soap:operation soapAction=urn:c2fConvertion style=document/ − wsdl:input soap:body use=literal/ /wsdl:input − wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding − wsdl:binding name=TemperatureConverterSOAP12Binding type=axis2:TemperatureConverterPortType soap12:binding transport=http://schemas.xmlsoap.org/soap/http; style=document/ − wsdl:operation name=f2cConvertion soap12:operation soapAction=urn:f2cConvertion style=document/ − wsdl:input soap12:body use=literal/ /wsdl:input − wsdl:output soap12:body use=literal/ /wsdl:output /wsdl:operation − wsdl:operation name=c2fConvertion soap12:operation soapAction=urn:c2fConvertion style=document/ − wsdl:input soap12:body use=literal/ /wsdl:input − wsdl:output soap12:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding − wsdl:binding name=TemperatureConverterHttpBinding type=axis2:TemperatureConverterPortType http:binding verb=POST/ − wsdl:operation name=f2cConvertion http:operation location=f2cConvertion/ − wsdl:input mime:content type=text/xml/
Re: [PHP] SOAP PHP 5.2.5 and Outside WSDL's
From your samples below, if what they actually want is that snippet at the bottom, then you don't want to send SOAP. You want to send a REST response, vis, some arbitrary, use-case-specific XML. In that case, don't use SOAP at all but use SimpleXML instead, then dump that to an XML string and send it. If you mean something else, please clarify. :-) On Wednesday 05 March 2008, Jonathan Pitcher wrote: I am connecting to a Third Party WSDL that needs me to turn return an Array of results to them. I do and PHP returns this ... SOAP-ENV:Body ns1:addParties in0 xsi:type=ns2:AuthenticationInfo locale xsi:type=xsd:stringen/locale token xsi:type=xsd:string50d3c78a0213b3e083ce7b6c7fa760a299798246fb6bbf1dc2dc8 1 12a841454d5bcb9cb752b18e299cd9be84214175b6c971065d8df08b52283408b925dd85412 8 5a031ca29c39b945989b951e2523594f5c9c0aa7bbfc328c87441830b47cd0/token userType xsi:type=xsd:int1/userType /in0 in1 SOAP-ENC:arrayType=ns2:EditConferenceParty[2] xsi:type=ns3:ArrayOf_tns1_EditConferenceParty item xsi:type=ns2:EditConferenceParty conferenceId xsi:type=xsd:int163/conferenceId phoneNumber xsi:type=xsd:string99/phoneNumber /item item xsi:type=ns2:EditConferenceParty conferenceId xsi:type=xsd:int163/conferenceId phoneNumber xsi:type=xsd:string99/phoneNumber /item /in1 /ns1:addParties /SOAP-ENV:Body Problem is they need something like: EditConference conferenceId163/conferenceId phoneNumber99/ phoneNumber /EditConference EditConference conferenceId163/conferenceId phoneNumber99/ phoneNumber /EditConference I found a good read here that says it deals with the way PHP handles outputting arrays. http://archive.netbsd.se/?ml=soapa=2006-01m=1677392 Is this truly considered a bug ? If so has it been resolved in the current releases of PHP ? If not does anyone have a simple solution ? I can figure out a way to code the XML myself and send it but honestly was hoping for a simplier solution that didn't envolve writing XML by hand. Jonathan Pitcher -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP PHP 5.2.5 and Outside WSDL's
I am connecting to a Third Party WSDL that needs me to turn return an Array of results to them. I do and PHP returns this ... SOAP-ENV:Body ns1:addParties in0 xsi:type=ns2:AuthenticationInfo locale xsi:type=xsd:stringen/locale token xsi:type=xsd:string50d3c78a0213b3e083ce7b6c7fa760a299798246fb6bbf1dc2dc81 12a841454d5bcb9cb752b18e299cd9be84214175b6c971065d8df08b52283408b925dd854128 5a031ca29c39b945989b951e2523594f5c9c0aa7bbfc328c87441830b47cd0/token userType xsi:type=xsd:int1/userType /in0 in1 SOAP-ENC:arrayType=ns2:EditConferenceParty[2] xsi:type=ns3:ArrayOf_tns1_EditConferenceParty item xsi:type=ns2:EditConferenceParty conferenceId xsi:type=xsd:int163/conferenceId phoneNumber xsi:type=xsd:string99/phoneNumber /item item xsi:type=ns2:EditConferenceParty conferenceId xsi:type=xsd:int163/conferenceId phoneNumber xsi:type=xsd:string99/phoneNumber /item /in1 /ns1:addParties /SOAP-ENV:Body Problem is they need something like: EditConference conferenceId163/conferenceId phoneNumber99/ phoneNumber /EditConference EditConference conferenceId163/conferenceId phoneNumber99/ phoneNumber /EditConference I found a good read here that says it deals with the way PHP handles outputting arrays. http://archive.netbsd.se/?ml=soapa=2006-01m=1677392 Is this truly considered a bug ? If so has it been resolved in the current releases of PHP ? If not does anyone have a simple solution ? I can figure out a way to code the XML myself and send it but honestly was hoping for a simplier solution that didn't envolve writing XML by hand. Jonathan Pitcher -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP SOAP Client formats
This is a typical .NET vs. PHP interop problem, and happens because the .NET services (or clients) expect the payload to be namespace qualified as you have figured out. I too have looked into this with PHP SOAP extension, and what I gathered is that the WSDL mode implementation needs to pick the qualifying namespace and make that the default namespace of payload. However, I could not locate the exact point in C code to fix this. Samisa... Michael Gross wrote: Hi I have a similar problem, only the other way round: the server is PHP, the client is C#. I found that the problem is that the xmlns=https://api.authorize.net/soap/v1/; in the AuthenticateTest-tag is needed. I tried to modify the PHP source code, but I had no success yet (it would be fantastic, if someone could give me a hint where the XML representation is built). Michael Tim Traver wrote: The problem that I have is that the server that I am talking to (that is not in my control), will accept the following SOAP call ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body AuthenticateTest xmlns=https://api.authorize.net/soap/v1/; merchantAuthentication namename/name transactionKeystring/transactionKey /merchantAuthentication /AuthenticateTest /soap:Body /soap:Envelope -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP SOAP Client formats
Hi I have a similar problem, only the other way round: the server is PHP, the client is C#. I found that the problem is that the xmlns=https://api.authorize.net/soap/v1/; in the AuthenticateTest-tag is needed. I tried to modify the PHP source code, but I had no success yet (it would be fantastic, if someone could give me a hint where the XML representation is built). Michael Tim Traver wrote: The problem that I have is that the server that I am talking to (that is not in my control), will accept the following SOAP call ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body AuthenticateTest xmlns=https://api.authorize.net/soap/v1/; merchantAuthentication namename/name transactionKeystring/transactionKey /merchantAuthentication /AuthenticateTest /soap:Body /soap:Envelope -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP SOAP Client formats
On Wed, January 9, 2008 9:45 pm, Tim Traver wrote: Thank you for answering, but the issue is that the PHP SOAPClient classes actually create that xml to send, so I have no control over the xml that is sent with a call command to the SOAP object... I just wondered if there was any flags that I am missing that might bring the php stuff in line with what the server expects. If there are any such flags, they'd be documented in the manual. If there aren't, perhaps you can find another SOAP constructor tool in PHP. I know there have been at least 3 or 4 popular ones over the years. And while the built-in one in PHP 5 is by far the best/easiest to use generally, you might be better off using nuSoap or somesuch even if it's a PITA, because it might construct the kind of SOAP envelope the other server is expecting. I would definitely recommend abstracting it as much as possible, though, so you can upgrade easily to a better SOAP implementation if the other end changes their software. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP SOAP Client formats
-Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Monday, January 14, 2008 7:21 PM To: Tim Traver Cc: Bastien Koert; PHP General List Subject: Re: [PHP] PHP SOAP Client formats On Wed, January 9, 2008 9:45 pm, Tim Traver wrote: Thank you for answering, but the issue is that the PHP SOAPClient classes actually create that xml to send, so I have no control over the xml that is sent with a call command to the SOAP object... I just wondered if there was any flags that I am missing that might bring the php stuff in line with what the server expects. If there are any such flags, they'd be documented in the manual. If there aren't, perhaps you can find another SOAP constructor tool in PHP. I know there have been at least 3 or 4 popular ones over the years. And while the built-in one in PHP 5 is by far the best/easiest to use generally, you might be better off using nuSoap or somesuch even if it's a PITA, because it might construct the kind of SOAP envelope the other server is expecting. I would definitely recommend abstracting it as much as possible, though, so you can upgrade easily to a better SOAP implementation if the other end changes their software. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? The only problem I had with nuSOAP was a name clash with the PHP 5 native extension. But they fixed it in November (there was a previous non-official fix also.. but can't remember the link right now). nuSOAP has been around for several years and it's working for PHP 4 or PHP 5. So far it's doing the job pretty well (what's more, for a SOAP API, chances are that nuSOAP is included along with the code samples). Though I didn't run any benchmarks, its speed is more than enough for my taste, when caching the WSDL object (in fact, most of the time will be spent in the server to server roundtrip). So... my vote for nuSOAP. However, if you are using the native extension and have specific needs for the XML request, you can override the __doRequest() method http://php.net/manual/en/function.soap-soapclient-dorequest.php (there's an example in the manual notes). Regards, Rob Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 | TEL 954-607-4207 | FAX 954-337-2695 Email: [EMAIL PROTECTED] | MSN Chat: [EMAIL PROTECTED] | SKYPE: bestplace | Web: http://www.bestplace.biz | Web: http://www.seo-diy.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP SOAP Client formats
On Jan 14, 2008 8:48 PM, Andrés Robinet [EMAIL PROTECTED] wrote: The only problem I had with nuSOAP was a name clash with the PHP 5 native extension. But they fixed it in November (there was a previous non-official fix also.. but can't remember the link right now). nuSOAP has been around for several years and it's working for PHP 4 or PHP 5. So far it's doing the job pretty well (what's more, for a SOAP API, chances are that nuSOAP is included along with the code samples). Though I didn't run any benchmarks, its speed is more than enough for my taste, when caching the WSDL object (in fact, most of the time will be spent in the server to server roundtrip). So... my vote for nuSOAP. i understand what youre saying, that the network i/o will typically constitute the most time in a SOAP request. i would imagine however that the php5 extension is much faster at building the request and parsing the response since nuSOAP is written entirely in php. i had to use it once and found the lack of documentation appalling. although, to be fair, id also say for anything beyond simple requests the documentation on the php site for the SOAPClient and related classes, could be more descriptive. i would label this thread as a case-in-point. -nathan
[PHP] PHP SOAP Client formats
Hi all, ok, I am a little bit new to the SOAP game, but I understand it, and am using it to talk to an outside API. The problem that I have is that the server that I am talking to (that is not in my control), will accept the following SOAP call ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body AuthenticateTest xmlns=https://api.authorize.net/soap/v1/; merchantAuthentication namename/name transactionKeystring/transactionKey /merchantAuthentication /AuthenticateTest /soap:Body /soap:Envelope But it refuses a call that I have made using the SOAPClient PHP classes that look like this : ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=https://api.authorize.net/soap/v1/; SOAP-ENV:Body ns1:AuthenticateTest merchantAuthentication namename/name transactionKeystring/transactionKey /merchantAuthentication /ns1:AuthenticateTest /SOAP-ENV:Body /SOAP-ENV:Envelope It appears that the one that PHP creates is all in line with all of the latest standards, and I know that the server is a Microsoft IIS server. Does anyone know any parameters that I can use with the PHP SOAP client that could help me contruct the request like the top one??? I don't want to have to build the text myself, and open a socket and send the text manually like I did to verify that the top one works, and the bottom one doesn't. Thanks, Tim.
RE: [PHP] PHP SOAP Client formats
XML is case sensitive. I notice the case of the xml is different. Try making the PHP created xml the same case. Bastien Date: Wed, 9 Jan 2008 13:54:36 -0800 From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] PHP SOAP Client formats Hi all, ok, I am a little bit new to the SOAP game, but I understand it, and am using it to talk to an outside API. The problem that I have is that the server that I am talking to (that is not in my control), will accept the following SOAP call ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body AuthenticateTest xmlns=https://api.authorize.net/soap/v1/; merchantAuthentication namename/name transactionKeystring/transactionKey /merchantAuthentication /AuthenticateTest /soap:Body /soap:Envelope But it refuses a call that I have made using the SOAPClient PHP classes that look like this : ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=https://api.authorize.net/soap/v1/; SOAP-ENV:Body ns1:AuthenticateTest merchantAuthentication namename/name transactionKeystring/transactionKey /merchantAuthentication /ns1:AuthenticateTest /SOAP-ENV:Body /SOAP-ENV:Envelope It appears that the one that PHP creates is all in line with all of the latest standards, and I know that the server is a Microsoft IIS server. Does anyone know any parameters that I can use with the PHP SOAP client that could help me contruct the request like the top one??? I don't want to have to build the text myself, and open a socket and send the text manually like I did to verify that the top one works, and the bottom one doesn't. Thanks, Tim. _ Use fowl language with Chicktionary. Click here to start playing! http://puzzles.sympatico.msn.ca/chicktionary/index.html?icid=htmlsig
Re: [PHP] PHP SOAP Client formats
Bastien, Thank you for answering, but the issue is that the PHP SOAPClient classes actually create that xml to send, so I have no control over the xml that is sent with a call command to the SOAP object... I just wondered if there was any flags that I am missing that might bring the php stuff in line with what the server expects. I want to use PHP's built in classes for this so I don't have to manually send xml to the api... Thanks, Tim. Bastien Koert wrote: XML is case sensitive. I notice the case of the xml is different. Try making the PHP created xml the same case. Bastien Date: Wed, 9 Jan 2008 13:54:36 -0800 From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] PHP SOAP Client formats Hi all, ok, I am a little bit new to the SOAP game, but I understand it, and am using it to talk to an outside API. The problem that I have is that the server that I am talking to (that is not in my control), will accept the following SOAP call ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body AuthenticateTest xmlns=https://api.authorize.net/soap/v1/; merchantAuthentication namename/name transactionKeystring/transactionKey /merchantAuthentication /AuthenticateTest /soap:Body /soap:Envelope But it refuses a call that I have made using the SOAPClient PHP classes that look like this : ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=https://api.authorize.net/soap/v1/; SOAP-ENV:Body ns1:AuthenticateTest merchantAuthentication namename/name transactionKeystring/transactionKey /merchantAuthentication /ns1:AuthenticateTest /SOAP-ENV:Body /SOAP-ENV:Envelope It appears that the one that PHP creates is all in line with all of the latest standards, and I know that the server is a Microsoft IIS server. Does anyone know any parameters that I can use with the PHP SOAP client that could help me contruct the request like the top one??? I don't want to have to build the text myself, and open a socket and send the text manually like I did to verify that the top one works, and the bottom one doesn't. Thanks, Tim. HO HO HO, if you've been nice this year, email Santa! Visit asksanta.ca to learn more! http://asksanta.ca/?icid=SANTAENCA005
Re: [PHP] PHP SOAP Client formats
On Jan 9, 2008 10:45 PM, Tim Traver [EMAIL PROTECTED] wrote: Bastien, I want to use PHP's built in classes for this so I don't have to manually send xml to the api... writing the xml by hand would be madness... i didnt want to spend all night screwing around w/ it, since i dont have any credentials to test w/, but if you look on the auth.net website you will see they have a robust api in several languages, including php, that happens to use the SoapClient class from php5. there is a nice manual, http://www.authorize.net/support/CIM_SOAP_guide.pdf in it i found the service call you have mentioned in your initial post, at that point in the document is a link to sample code http://developer.authorize.net/dscode/php_cim.zip which should have everything you need to interact w/ the auth.net services in php (at a cursory glance). -nathan
Re: [PHP] PHP SOAP Client formats
Nathan Nobbe wrote: On Jan 9, 2008 10:45 PM, Tim Traver [EMAIL PROTECTED] wrote: Bastien, I want to use PHP's built in classes for this so I don't have to manually send xml to the api... writing the xml by hand would be madness... i didnt want to spend all night screwing around w/ it, since i dont have any credentials to test w/, but if you look on the auth.net website you will see they have a robust api in several languages, including php, that happens to use the SoapClient class from php5. there is a nice manual, http://www.authorize.net/support/CIM_SOAP_guide.pdf in it i found the service call you have mentioned in your initial post, at that point in the document is a link to sample code http://developer.authorize.net/dscode/php_cim.zip which should have everything you need to interact w/ the auth.net services in php (at a cursory glance). -nathan Hey Nathan, Thanks...that's actually really funny, because they must have put the PHP sample code for the CIM method in there within the last week, because that was why I was writing my own SOAP stuff to interact with them (using those manuals)... The issue that I ended up running in to was that the SOAP calls I was making were getting errors back, and I couldn't get anyone from authorize.net to give me any support for what the issue was... Hopefully, their PHP class will do the trick... Thanks, Tim.
Re: [PHP] SOAP in PHP on very restricted host?
i just read the first message in this thread and NuSoap immediately came to mind. though it will solve your problem you may end up like me, hating to use NuSoap under duress. i think it was really popular back in th php4 days when there was nothing solid that could be built right into php. anyway in my experience its a relic and i try to stay away from it if i can. -nathan On 9/26/07, David Christopher Zentgraf [EMAIL PROTECTED] wrote: On 26. Sep 2007, at 13:19, mike wrote: i've downloaded PEAR packages before and used them manually. all PEAR is is PHP object code modules in a central place. nothing special, really. you just have to tweak some script paths and you can use include/require on the files like normal. That's what I thought, but PEAR::SOAP seems to depend on the PEAR base package. ...which I could probably install manually as well, I know. But I just found out about NuSOAP (http://dietrich.ganx4.com/ nusoap/), which seems to be what I'm looking for, a no-strings- attached SOAP implementation. I'm trying my luck with this one for now. :) Cheers, Dav -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP in PHP on very restricted host?
On 9/25/07, Nathan Nobbe [EMAIL PROTECTED] wrote: i try to stay away from it if i can. i think the same of SOAP. in my opinion a shower is the only place for soap. simple XML, REST, JSON, lighter weight things are what i prefer. even XML-RPC i can live without. my $0.02 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP in PHP on very restricted host?
On 26. Sep 2007, at 15:26, Nathan Nobbe wrote: i just read the first message in this thread and NuSoap immediately came to mind. though it will solve your problem you may end up like me, hating to use NuSoap under duress. i think it was really popular back in th php4 days when there was nothing solid that could be built right into php. anyway in my experience its a relic and i try to stay away from it if i can. I already see what you mean. A big bummer is that even though it uses the same class name as the default PHP SOAP module, it uses a totally different syntax/method calls etc, which all seem slightly queer to me. Which is terrible since the library the gateway provides wants to call (and extend) SoapClient() in very specific ways. I don't think I wanna go down this road very far... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP in PHP on very restricted host?
On 26. Sep 2007, at 16:14, mike wrote: On 9/25/07, Nathan Nobbe [EMAIL PROTECTED] wrote: i try to stay away from it if i can. i think the same of SOAP. in my opinion a shower is the only place for soap. Well put. :-D I, too, fail to see what's so terribly special about it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP in PHP on very restricted host?
as i said, its a relic. i started using it where i work because we are still on php4 (dont ask) and was dismayed. i looked around at some articles online and thats where i got the impression it was the defacto standard back in php4 when java already had a robust soap api (and probly .net too). im sure it was great in its hey-day. the real problem using it anymore is, as you observed, you have to acquaint yourself w/ a totally new (to use SoapClient folks) API. and at this point (w/ SoapClient out there) i beg the question, why bother. i hate to suggest it, but you might want to take a little time and investigate what other restrictions you host has. if the list is long you may want to consider a move. it may seem arduous now, but the longer you wait the more arduous it will become. -nathan On 9/26/07, David Christopher Zentgraf [EMAIL PROTECTED] wrote: On 26. Sep 2007, at 15:26, Nathan Nobbe wrote: i just read the first message in this thread and NuSoap immediately came to mind. though it will solve your problem you may end up like me, hating to use NuSoap under duress. i think it was really popular back in th php4 days when there was nothing solid that could be built right into php. anyway in my experience its a relic and i try to stay away from it if i can. I already see what you mean. A big bummer is that even though it uses the same class name as the default PHP SOAP module, it uses a totally different syntax/method calls etc, which all seem slightly queer to me. Which is terrible since the library the gateway provides wants to call (and extend) SoapClient() in very specific ways. I don't think I wanna go down this road very far...
Re: [PHP] SOAP in PHP on very restricted host?
On 26. Sep 2007, at 16:45, Nathan Nobbe wrote: i hate to suggest it, but you might want to take a little time and investigate what other restrictions you host has. if the list is long you may want to consider a move. it may seem arduous now, but the longer you wait the more arduous it will become. Oh, we know our host sucks major [primate] [primate][bodypart]. The plan is to eventually have our own servers in-house, but until then, there really isn't that much choice unfortunately. As far as we observed all of the major hosts in Tokyo (Hi from Japan!) are pretty much the same. And hosting abroad is out of the question, since latency goes right up and throughput down with every inch off the Japanese coast. Unless somebody has a good tip for a good host... still on php4 (dont ask) Ditto. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP in PHP on very restricted host?
On Wed, 2007-09-26 at 13:26 +0900, David Christopher Zentgraf wrote: But I just found out about NuSOAP (http://dietrich.ganx4.com/ nusoap/), which seems to be what I'm looking for, a no-strings- attached SOAP implementation. I'm trying my luck with this one for now. :) If you are using nuSoap on PHP5, be sure to change the class names etc, otherwise you will get conflicts in our namespaceless world. --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP in PHP on very restricted host?
On Wednesday 26 September 2007, David Christopher Zentgraf wrote: On 26. Sep 2007, at 16:45, Nathan Nobbe wrote: i hate to suggest it, but you might want to take a little time and investigate what other restrictions you host has. if the list is long you may want to consider a move. it may seem arduous now, but the longer you wait the more arduous it will become. Oh, we know our host sucks major [primate] [primate][bodypart]. The plan is to eventually have our own servers in-house, but until then, there really isn't that much choice unfortunately. As far as we observed all of the major hosts in Tokyo (Hi from Japan!) are pretty much the same. And hosting abroad is out of the question, since latency goes right up and throughput down with every inch off the Japanese coast. Unless somebody has a good tip for a good host... http://gophp5.org/hosts Doesn't look like there's any in Japan, but perhaps there's one nearby in Asia that could be good enough. -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP in PHP on very restricted host?
On 9/25/07, David Zentgraf [EMAIL PROTECTED] wrote: Hi, We need to work with a credit card checking company for an online store. The one we're looking at only offers an API implementation via PHP modules, or via SOAP protocol. Unfortunately our host is extremely restrictive right now and did not --enable-soap and even did a --without-pear, so we can't even use the PEAR::SOAP package. Is there another implementation of SOAP or another way to possibly get SOAP going in such a restrictive environment? i've downloaded PEAR packages before and used them manually. all PEAR is is PHP object code modules in a central place. nothing special, really. you just have to tweak some script paths and you can use include/require on the files like normal. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP in PHP on very restricted host?
On 26. Sep 2007, at 13:19, mike wrote: i've downloaded PEAR packages before and used them manually. all PEAR is is PHP object code modules in a central place. nothing special, really. you just have to tweak some script paths and you can use include/require on the files like normal. That's what I thought, but PEAR::SOAP seems to depend on the PEAR base package. ...which I could probably install manually as well, I know. But I just found out about NuSOAP (http://dietrich.ganx4.com/ nusoap/), which seems to be what I'm looking for, a no-strings- attached SOAP implementation. I'm trying my luck with this one for now. :) Cheers, Dav -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP in PHP on very restricted host?
Hi, We need to work with a credit card checking company for an online store. The one we're looking at only offers an API implementation via PHP modules, or via SOAP protocol. Unfortunately our host is extremely restrictive right now and did not --enable-soap and even did a --without-pear, so we can't even use the PEAR::SOAP package. Is there another implementation of SOAP or another way to possibly get SOAP going in such a restrictive environment? If not we'll have to switch either the host or the CC company... Best Regards, Dav -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Soap .Net server Php client Problem
i have a problem in nusoap, but there is no problem with the same code in php soap extension but my hosting provider is not allowing the php soap extension so i must use nusoap.. here is my .net soap service [WebMethod] public string Siparis(double FisTutar, double FisKdvTutari, double FisTopTutar, string CariKodu, string[] StokKodu, int[] Miktar, double[] BirimFiyat) { try { //string[] StokKodu=new string[1]; // StokKodu[0]=MB.236; // int[] Miktar=new int[1]; // Miktar[0]=1; // double[] BirimFiyat=new double[1]; // BirimFiyat[0]=100; SqlConnection CLogo = new SqlConnection(conString); SqlCommand SonSifNoBul = new SqlCommand(SELECT LASTASGND,SEGMENTS1_SEGLEN FROM dbo.L_LDOCNUM WHERE FIRMID='1' AND DOCIDEN='1' AND APPMODULE='5', CLogo); if (CLogo.State == ConnectionState.Closed) { CLogo.Open(); } SqlCommand SonLogicalNoFis = new SqlCommand(Select max(LOGICALREF) FROM LG_ + SK + _ + DK + _ORFICHE, CLogo); int LastLogical = Convert.ToInt32(SonLogicalNoFis.ExecuteScalar()); SqlCommand SonFisSatirNo = new SqlCommand(Select max(LOGICALREF) FROM LG_ + SK + _ + DK + _ORFLINE, CLogo); int SonSatirNofis = Convert.ToInt32(SonFisSatirNo.ExecuteScalar()); SqlDataReader DRFisNo = SonSifNoBul.ExecuteReader(CommandBehavior.CloseConnection); DRFisNo.Read(); int FisNo = Convert.ToInt32(DRFisNo[0]) + 1; int BasamakSayisi = Convert.ToInt32(DRFisNo[1]); string SonFisNo = FisNo.ToString().PadLeft(BasamakSayisi, '0'); DataSet ds = new DataSet(); ds.ReadXml(XmlPath + Ornek_Siparis.xml); DataRow DR = ds.Tables[ORDER_SLIP].NewRow(); DR[NUMBER] = SonFisNo; DR[DATE] = DateTime.Now.ToShortDateString(); DR[TIME] = DateTime.Now.ToShortTimeString(); DR[ARP_CODE] = CariKodu; DR[TOTAL_DISCOUNTED] = FisTutar; DR[TOTAL_VAT] = FisKdvTutari; DR[TOTAL_GROSS] = FisTutar; DR[TOTAL_NET] = FisTopTutar; DR[ORDER_STATUS] = 4; DR[CREATED_BY] = 1; DR[DATE_CREATED] = DateTime.Now.ToShortDateString(); DR[HOUR_CREATED] = DateTime.Now.Hour; DR[MIN_CREATED] = DateTime.Now.Minute; DR[SEC_CREATED] = DateTime.Now.Second; DR[MODIFIED_BY] = 1; DR[DATE_MODIFIED] = DateTime.Now.ToShortDateString(); DR[HOUR_MODIFIED] = DateTime.Now.Hour; DR[MIN_MODIFIED] = DateTime.Now.Minute; DR[SEC_MODIFIED] = DateTime.Now.Second; DR[CURRSEL_TOTAL] = 1; //DOVIZ TURU DR[DATA_REFERENCE] = LastLogical + 1; DR[ORDER_SLIP_ID] = ds.Tables[ORDER_SLIP].Rows.Count + 100; DataRow DRTransss = ds.Tables[TRANSACTIONS].NewRow(); DRTransss[TRANSACTIONS_Id] = ds.Tables[TRANSACTIONS].Rows.Count + 100; DRTransss[ORDER_SLIP_Id] = ds.Tables[ORDER_SLIP].Rows.Count + 100; int sayi = ds.Tables[TRANSACTIONS].Rows.Count + 100; ds.Tables[ORDER_SLIP].Rows.Add(DR); ds.Tables[TRANSACTIONS].Rows.Add(DRTransss); for (int i = 0; i StokKodu.Length; i++) { DataRow DRTrans = ds.Tables[TRANSACTION].NewRow(); DRTrans[TYPE] = 0; DRTrans[MASTER_CODE] = StokKodu[i]; DRTrans[QUANTITY] = Miktar[i]; DRTrans[PRICE] = BirimFiyat[i]; DRTrans[TOTAL] = Miktar[i] * BirimFiyat[i]; DRTrans[VAT_RATE] = 18; DRTrans[VAT_AMOUNT] = Miktar[i] * BirimFiyat[i] * 1.18f; DRTrans[VAT_BASE] = Miktar[i] * BirimFiyat[i]; DRTrans[UNIT_CODE] = ADET; DRTrans[UNIT_CONV1] = 1; DRTrans[UNIT_CONV2] = 1; DRTrans[DUE_DATE] = DateTime.Now.ToShortDateString(); DRTrans[TOTAL_NET] = Miktar[i] * BirimFiyat[i]; DRTrans[DATA_REFERENCE] = SonSatirNofis + 1; DRTrans[TRANSACTIONS_Id] = sayi; ds.Tables[TRANSACTION].Rows.Add(DRTrans); } //SELECT LASTASGND,SEGMENTS1_SEGLEN FROM dbo.L_LDOCNUM WHERE FIRMID='1' AND DOCIDEN='1' AND APPMODULE='5' SqlCommand FisNokaydet = new SqlCommand(Update L_LDOCNUM SET LASTASGND=' + SonFisNo + ' WHERE FIRMID='1' AND DOCIDEN='1' AND APPMODULE='5', CLogo); DRFisNo.Close(); if (CLogo.State == ConnectionState.Closed) { CLogo.Open(); } FisNokaydet.ExecuteNonQuery(); ds.WriteXml(XmlPath + Ornek_Siparis.xml); return TAMAM; } catch(Exception e) { return e.Message; } } and here is the nusoap function $client = new SoapClient(WEB_SERVICE); $fisTutar = 56.55
[PHP] SOAP: xsd:choice maxOccurs=unbounded, and element order
Hi, I'm trying to make PHP5's soap implementation play nice with my web service, and I'm having a problem. Part of my schema contains a complexType, containing an xsd:choice of several different element types, which can be repeated many times (maxOccurs=unbounded) e.g.: xsd:complexType name='containertype' xsd:sequence xsd:choice maxOccurs='unbounded' xsd:element name='e1' type='e1type' xsd:element name='e2' type='e2type' /xsd:choice /xsd:sequence /xsd:complexType The problem is that the order of element here is important. I want the results returned in the same order that they appear in the XML. Unfortunately, what I end up with, is an object containing an array of all the e1 elements, followed by an array of all the e2 elements. Take the following example... If there following were in my soap result: container e1some_stuff/e1 e2different_stuff/e2 e1some_other_stuff/e1 e2different_other_stuff/e2 /container What I actually end up seeing is something like: [container] = stdClass Object ( [e1] Array ( [0] = some_stuff [1] = some_other_stuff ) [e2] Array ( [0] = different_stuff [1] = different_other_stuff ) } Note that this is somewhat simplified from my real-world example. In reality, e1 and e2 are complexTypes themselves. But I really do need to see the resulting elements in the same order that they were supplied. I'm able to do this in dotnet and gsoap clients, so far. (I haven't tried any others.) Incidentally, I'm using a basic unmodified skeleton generated by wsdl2php as my classmap. The object describing the 'container' type looks simply like: class container { } Perhaps it's possible to add something to this to help sort the order out?? Any suggestions are appreciated. Could this be a bug? Incidentally, the full-blown (and rather complicated I'm afraid) schema/wsdl for what I'm *actually* trying to do is at http://www.widgit.com/cml/symgate.wsdl if that helps. Thanks, Simon -- Simon Detheridge SEN Developer, Widgit Software CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please notify us immediately by return email and promptly delete this message and its attachments from your computer system. Logotron is a limited company registered in England, number 04113866. The registered office is Logotron Ltd, 124 Cambridge Science Park, Milton Road, Cambridge, CB4 0ZS. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need a working SOAP example using PHP SOAP
Daevid Vincent wrote: not very helpful, but an apt quote from 'the man': http://fplanque.net/Blog/devblog/2005/12/21/rasmus_i_don_t_like_soap Yeah, unfortunately, I *must* use SOAP. Not my choice, but politics and company decree, blah blah... b, you should catch exceptions These were the examples from the page. I didn't want to add extra complexity. none the less your production code should include try/catch blocks to catch soapfault exceptions and deal with them accordingly. c, could you be having a problem related to the allow_url_fopen ini setting? Now we're talkin! Okay, I made sure that allow_url_fopen and allow_url_include are both on. Verified via phpinfo(); Still no luck. :-\ However, this sparked an idea... I have been using my WinXP and IE to hit my Gentoo notebook running apache2/php/etc. (samba mounting the /home/machine/... to edit the files) When I fired up KDE and hit the EXACT same pages (which are now local), they magically worked! So now the question is, what setting do I have to change in my php.ini file to get remote requests to work? I'm not following what you mean by local and remote and when your considering something to be one or the other. windows firewall springs to mind but I can't tell if it could even be involved from your current description. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need a working SOAP example using PHP SOAP
I've been searching all day (read wasting) trying to get a working SOAP example that uses the new PHP SOAP functions. http://us2.php.net/manual/en/ref.soap.php I've tried this one from nearly THREE years ago (03/16/2004): http://devzone.zend.com/node/view/id/689 And this one, which is apparently written in the future (05/01/2007): http://www.netmag.co.uk/zine/develop/make-your-own-soap Nothing works. Mostly I get these very unhelpful errors: Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /home/machine/StockQuote/client3.php:6 Stack trace: #0 [internal function]: SoapClient-__doRequest('?xml version=...', 'http://machine', 'urn:xmethods-de...', 1, 0) #1 [internal function]: SoapClient-__call('getQuote', Array) #2 /home/machine/StockQuote/client3.php(6): SoapClient-getQuote('ibm') #3 {main} thrown in /home/machine/StockQuote/client3.php on line 6 Now you might think, Can you actually get to the host?. And why YES, if I try to hit the server1.php page that is defined in the WDSL file, I get this error: SOAP-ENV:ServerBad Request. Can't find HTTP_RAW_POST_DATA Also, I have soap.wsdl_cache_enabled = 0, yet how come I still see wsdl-47087234058273450982734508 files in /tmp ?! (yes I've restarted apache) Does anyone know of a current, WORKING, example, ideally in a .tar file or something so I don't have to waste a lot more time copy/paste/format/remove whitespace/etc.? It's also frustrating that the PHP SOAP function section doesn't have an example, nor even links to an example. :-\ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need a working SOAP example using PHP SOAP
not very helpful, but an apt quote from 'the man': http://fplanque.net/Blog/devblog/2005/12/21/rasmus_i_don_t_like_soap Daevid Vincent wrote: I've been searching all day (read wasting) trying to get a working SOAP example that uses the new PHP SOAP functions. http://us2.php.net/manual/en/ref.soap.php I've tried this one from nearly THREE years ago (03/16/2004): http://devzone.zend.com/node/view/id/689 And this one, which is apparently written in the future (05/01/2007): http://www.netmag.co.uk/zine/develop/make-your-own-soap Nothing works. Mostly I get these very unhelpful errors: a, they are helpful b, you should catch exceptions c, could you be having a problem related to the allow_url_fopen ini setting? Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /home/machine/StockQuote/client3.php:6 Stack trace: #0 [internal function]: SoapClient-__doRequest('?xml version=...', 'http://machine', 'urn:xmethods-de...', 1, 0) #1 [internal function]: SoapClient-__call('getQuote', Array) #2 /home/machine/StockQuote/client3.php(6): SoapClient-getQuote('ibm') #3 {main} thrown in /home/machine/StockQuote/client3.php on line 6 Now you might think, Can you actually get to the host?. And why YES, if I try to hit the server1.php page that is defined in the WDSL file, I get this error: SOAP-ENV:ServerBad Request. Can't find HTTP_RAW_POST_DATA Also, I have soap.wsdl_cache_enabled = 0, yet how come I still see wsdl-47087234058273450982734508 files in /tmp ?! (yes I've restarted apache) probably soap uses these tmp files but because soap.wsdl_cache_enabled is Off the files are being regenerated on each request (check the file mtimes). alternatively you may think soap.wsdl_cache_enabled is Off but actually its being turned On somewhere? Does anyone know of a current, WORKING, example, ideally in a .tar file or something so I don't have to waste a lot more time copy/paste/format/remove whitespace/etc.? It's also frustrating that the PHP SOAP function section doesn't have an example, nor even links to an example. :-\ there is quite a bit of example code in the SOAP section if you ask me: http://php.net/manual/en/function.soap-soapclient-construct.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Need a working SOAP example using PHP SOAP
not very helpful, but an apt quote from 'the man': http://fplanque.net/Blog/devblog/2005/12/21/rasmus_i_don_t_like_soap Yeah, unfortunately, I *must* use SOAP. Not my choice, but politics and company decree, blah blah... b, you should catch exceptions These were the examples from the page. I didn't want to add extra complexity. c, could you be having a problem related to the allow_url_fopen ini setting? Now we're talkin! Okay, I made sure that allow_url_fopen and allow_url_include are both on. Verified via phpinfo(); Still no luck. :-\ However, this sparked an idea... I have been using my WinXP and IE to hit my Gentoo notebook running apache2/php/etc. (samba mounting the /home/machine/... to edit the files) When I fired up KDE and hit the EXACT same pages (which are now local), they magically worked! So now the question is, what setting do I have to change in my php.ini file to get remote requests to work? alternatively you may think soap.wsdl_cache_enabled is Off but actually its being turned On somewhere? It's off in the php.ini file, also specifically turned off in each server.php file. Verified off via phpinfo(); It's also frustrating that the PHP SOAP function section doesn't have an example, nor even links to an example. :-\ there is quite a bit of example code in the SOAP section if you ask me: http://php.net/manual/en/function.soap-soapclient-construct.php No. those are fragments of ways to call the methods. NOT full working examples of client/server/wsdl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP and MSSQL
hi all, I am a new user of php SOAP..I got one question about using SOAP. I have try to run SOAP and it runs successfully without any problem the following is the code of the SOAP server: class QuoteService { private $quotes = array('V3' = 'password', 'kencana' ='kencana', 'wisna' ='wisna'); private $status = array('V3' = 'Admin', 'kencana' ='user', 'wisna' ='user'); function getQuote($symbol) { if (isset($this-quotes[$symbol])) { return $this-quotes[$symbol]; } else { throw new SoapFault(Server,Unknown User Name '$symbol'.); } } function getStatus($symbol) { if (isset($this-status[$symbol])) { return $this-status[$symbol]; } else { throw new SoapFault(Server,Unknown User Name '$symbol'.); } } as you can see, the code retrieved the data from the listed array, my question is, is that possible to retrieve the data from mssql server?if yes, can i know how? I hope somebody can help me out, and pardon me as i am a new user of this.therefore please bear with me. Regards, Kencana -- View this message in context: http://www.nabble.com/SOAP-and-MSSQL-tf2600244.html#a7253893 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP PEAR/NuSOAP
I'm working on a small webservice. When started this project i used the NuSOAP library. And it does the job perfectly. But last weekend i was playing around with the PEAR::SOAP package. This seems to be a lot more stable. And for sure a llot faster. Only in NuSOAP i could do the following to get to a secured page. $client-setCredentials(USERNAME, PASSWORD, AUTHTYPE); Now i wanna do the same in PEAR::SOAP but can't figure out a way to do it. Main is i just want Basic HTTP authentication. Maybe somebody knows? grtz, Thijs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP PEAR/NuSOAP
On 3/21/06, T.Lensselink [EMAIL PROTECTED] wrote: I'm working on a small webservice. When started this project i used the NuSOAP library. And it does the job perfectly. But last weekend i was playing around with the PEAR::SOAP package. This seems to be a lot more stable. And for sure a llot faster. Only in NuSOAP i could do the following to get to a secured page. $client-setCredentials(USERNAME, PASSWORD, AUTHTYPE); Now i wanna do the same in PEAR::SOAP but can't figure out a way to do it. Main is i just want Basic HTTP authentication. Maybe somebody knows? You might get a faster response on the pear list: http://pear.php.net/support/lists.php -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SOAP PEAR/NuSOAP
chris smith said: On 3/21/06, T.Lensselink [EMAIL PROTECTED] wrote: I'm working on a small webservice. When started this project i used the NuSOAP library. And it does the job perfectly. But last weekend i was playing around with the PEAR::SOAP package. This seems to be a lot more stable. And for sure a llot faster. Only in NuSOAP i could do the following to get to a secured page. $client-setCredentials(USERNAME, PASSWORD, AUTHTYPE); Now i wanna do the same in PEAR::SOAP but can't figure out a way to do it. Main is i just want Basic HTTP authentication. Maybe somebody knows? You might get a faster response on the pear list: http://pear.php.net/support/lists.php -- Postgresql php tutorials http://www.designmagick.com/ Yes after i posted was thinking the same... Still to early :) Thnx anyway! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP WSDL?
I'm messing around with SOAP with PHP 5 and I was wondering do I have to create my own WSDL's or can PHP create them for me like NuSoap does? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP Problems.
I'm trying to call a SOAP service where you pass it a couple of dates and it is supposed to return stuff. My testing code is below along with the errors I'm getting. What's strange is that it's not working in php but it works perfectly in Flash. The request it is sending is only sending one param the $to value and not the $from value. Any idea what's going on? $from = 06/01/2005; // some date but what format? $to = 12/31/2005; // some date but what format? $client = new SoapClient(some.wsdl, array(trace = 1, exceptions = 0)); var_dump($client-__getFunctions()); echo brbr; var_dump($client-__getTypes()); echo brbr; try { print($client-execute($from, $to)); } catch (SoapFault $exception) { echo $exception; } $client-execute($from, $to); print pre\n; print Request :\n.htmlspecialchars($client-__getLastRequest()) .\n; print Response:\n.htmlspecialchars($client-__getLastResponse()).\n; print /pre; var_dump($client-execute($from, $to)); echo brbr; echo brbr; print($client-__soapCall(execute, array(From = $from, to = $to))); array(1) { [0]= string(44) executeResponse execute(execute $parameters) } array(2) { [0]= string(44) struct execute { string From; string to; } [1]= string(44) struct executeResponse { string wsReturn; } } SoapFault exception: [soapenv:Server.userException] [TeamworksException name='Process: 'HR Training Infomation' ProcessItem: 'Untitled0' Type: 'ITEM'', message='Internal Script error: org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a non-numeric character was found where a numeric was expected ', line=-1, pos=-1 nested=] in /Library/WebServer/Documents/services/soap-test.php:9 Stack trace: #0 /Library/WebServer/Documents/services/soap-test.php(9): SoapClient-__call('execute', Array) #1 /Library/WebServer/Documents/services/soap-test.php(9): SoapClient-execute('06/01/2005', '12/31/2005') #2 {main} Request : ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=somensSOAP-ENV:Bodyns1:execute/param112/31/2005/param1/SOAP-ENV:Body/SOAP-ENV:Envelope Response: ?xml version=1.0 encoding=UTF-8? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body soapenv:Fault faultcodesoapenv:Server.userException/faultcode faultstring[TeamworksException name=apos;Process: apos;HR Training Infomationapos; ProcessItem: apos;Untitled0apos; Type: apos;ITEMapos;apos;, message=apos;Internal Script error: org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a non-numeric character was found where a numeric was expected apos;, line=-1, pos=-1 nested=lt;nonegt;]/faultstring detail/ /soapenv:Fault /soapenv:Body /soapenv:Envelope object(SoapFault)#2 (9) { [message:protected]= string(0) [string:private]= string(0) [code:protected]= int(0) [file:protected]= string(51) /Library/WebServer/Documents/services/soap-test.php [line:protected]= int(16) [trace:private]= array(2) { [0]= array(6) { [file]= string(51) /Library/WebServer/Documents/services/soap-test.php [line]= int(16) [function]= string(6) __call [class]= string(10) SoapClient [type]= string(2) - [args]= array(2) { [0]= string(7) execute [1]= array(2) { [0]= string(10) 06/01/2005 [1]= string(10) 12/31/2005 } } } [1]= array(6) { [file]= string(51) /Library/WebServer/Documents/services/soap-test.php [line]= int(16) [function]= string(7) execute [class]= string(10) SoapClient [type]= string(2) - [args]= array(2) { [0]= string(10) 06/01/2005 [1]= string(10) 12/31/2005 } } } [faultstring]= string(300) [TeamworksException name='Process: 'HR Training Infomation' ProcessItem: 'Untitled0' Type: 'ITEM'', message='Internal Script error: org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a non-numeric character was found where a numeric was expected ', line=-1, pos=-1 nested=] [faultcode]= string(28) soapenv:Server.userException [detail]= string(0) } SoapFault exception: [soapenv:Server.userException] [TeamworksException name='Process: 'HR Training Infomation' ProcessItem: 'Untitled0' Type: 'ITEM'', message='Internal Script error: org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a non-numeric character was found where a numeric was expected ', line=-1, pos=-1 nested=] in /Library/WebServer/Documents/services/soap-test.php:17 Stack trace: #0 /Library/WebServer/Documents/services/soap-test.php(17): SoapClient-__soapCall('execute', Array) #1 {main}
RE: [PHP] SOAP Problems SOLVED!
I got it to work! What I had to do is make an associtive array with the keys being the name of the params that needed to get passed to the 'execute' method that it was calling via soap. Or conversely you could write the $params as objects instead of an array. Code below: $params[From] = 06/01/2005; // also can use $params-From = date; $params[to] = 12/31/2005; // also can use $params-to = date; $client = new SoapClient(some.wsdl, array(trace = 1, exceptions = 0)); try { print($client-execute($params)); } catch (SoapFault $exception) { echo $exception; } -Original Message- From: Jay Paulson (CE CEN) [mailto:[EMAIL PROTECTED] Sent: Tue 1/10/2006 11:32 AM To: php-general@lists.php.net Subject: [PHP] SOAP Problems. I'm trying to call a SOAP service where you pass it a couple of dates and it is supposed to return stuff. My testing code is below along with the errors I'm getting. What's strange is that it's not working in php but it works perfectly in Flash. The request it is sending is only sending one param the $to value and not the $from value. Any idea what's going on? $from = 06/01/2005; // some date but what format? $to = 12/31/2005; // some date but what format? $client = new SoapClient(some.wsdl, array(trace = 1, exceptions = 0)); var_dump($client-__getFunctions()); echo brbr; var_dump($client-__getTypes()); echo brbr; try { print($client-execute($from, $to)); } catch (SoapFault $exception) { echo $exception; } $client-execute($from, $to); print pre\n; print Request :\n.htmlspecialchars($client-__getLastRequest()) .\n; print Response:\n.htmlspecialchars($client-__getLastResponse()).\n; print /pre; var_dump($client-execute($from, $to)); echo brbr; echo brbr; print($client-__soapCall(execute, array(From = $from, to = $to))); array(1) { [0]= string(44) executeResponse execute(execute $parameters) } array(2) { [0]= string(44) struct execute { string From; string to; } [1]= string(44) struct executeResponse { string wsReturn; } } SoapFault exception: [soapenv:Server.userException] [TeamworksException name='Process: 'HR Training Infomation' ProcessItem: 'Untitled0' Type: 'ITEM'', message='Internal Script error: org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a non-numeric character was found where a numeric was expected ', line=-1, pos=-1 nested=] in /Library/WebServer/Documents/services/soap-test.php:9 Stack trace: #0 /Library/WebServer/Documents/services/soap-test.php(9): SoapClient-__call('execute', Array) #1 /Library/WebServer/Documents/services/soap-test.php(9): SoapClient-execute('06/01/2005', '12/31/2005') #2 {main} Request : ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=somensSOAP-ENV:Bodyns1:execute/param112/31/2005/param1/SOAP-ENV:Body/SOAP-ENV:Envelope Response: ?xml version=1.0 encoding=UTF-8? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body soapenv:Fault faultcodesoapenv:Server.userException/faultcode faultstring[TeamworksException name=apos;Process: apos;HR Training Infomationapos; ProcessItem: apos;Untitled0apos; Type: apos;ITEMapos;apos;, message=apos;Internal Script error: org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a non-numeric character was found where a numeric was expected apos;, line=-1, pos=-1 nested=lt;nonegt;]/faultstring detail/ /soapenv:Fault /soapenv:Body /soapenv:Envelope object(SoapFault)#2 (9) { [message:protected]= string(0) [string:private]= string(0) [code:protected]= int(0) [file:protected]= string(51) /Library/WebServer/Documents/services/soap-test.php [line:protected]= int(16) [trace:private]= array(2) { [0]= array(6) { [file]= string(51) /Library/WebServer/Documents/services/soap-test.php [line]= int(16) [function]= string(6) __call [class]= string(10) SoapClient [type]= string(2) - [args]= array(2) { [0]= string(7) execute [1]= array(2) { [0]= string(10) 06/01/2005 [1]= string(10) 12/31/2005 } } } [1]= array(6) { [file]= string(51) /Library/WebServer/Documents/services/soap-test.php [line]= int(16) [function]= string(7) execute [class]= string(10) SoapClient [type]= string(2) - [args]= array(2) { [0]= string(10) 06/01/2005 [1]= string(10) 12/31/2005 } } } [faultstring]= string(300) [TeamworksException name='Process: 'HR Training Infomation' ProcessItem: 'Untitled0' Type: 'ITEM'', message='Internal Script error: org.mozilla.javascript.WrappedException: WrappedException of ORA-01858: a non-numeric character was found where a numeric was expected ', line=-1, pos=-1 nested=] [faultcode]= string(28) soapenv:Server.userException [detail]= string(0) } SoapFault exception: [soapenv:Server.userException] [TeamworksException name='Process: 'HR Training Infomation' ProcessItem: 'Untitled0' Type
Re: [PHP] SOAP and PHP
Angelo Zanetti wrote: Hi guys. I've googled but found so many pages that I'm not sure what to use. I want to use PHP to make use of SOAP. I've found: -nuSoap -libxml(2) -php-soap -and others which seemed less important. Can you recommend which one to use? and which one is the most supported. Also if I've missed some that you feel I should know about please let me know. Thanks in advance. Angelo HI guys. I've found nuSOAP. it seems to work well. Im not using PHP5 so couldnt use the suggestions but thanks anyway... http://dietrich.ganx4.com/nusoap/ regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP and PHP
Hi guys. I've googled but found so many pages that I'm not sure what to use. I want to use PHP to make use of SOAP. I've found: -nuSoap -libxml(2) -php-soap -and others which seemed less important. Can you recommend which one to use? and which one is the most supported. Also if I've missed some that you feel I should know about please let me know. Thanks in advance. Angelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php