Re: PHP webservice returns a Null pointer error
thanks, but i still just get a null pointer error. that returns false for me which is just graceful error catching... did you get an array (or struct) returned? Got it. cftry cfset f = CreateObject(webservice,http://www.ryanmitchell.co.uk/rtCMS.php?wsdl;) cfdump var=#f# cfset code = f.listDirectory(d:\\wwwroot\\ryanmitchell.co.uk\\www\\) cfdump var=#code# cfcatch type=any cfoutputp#cfcatch.message#/p pCaught an exception, type = #CFCATCH.TYPE# /p br / StackTrace: br/ cfloop index = i from = 1 to = #ArrayLen(CFCATCH.TAGCONTEXT)# cfset sCurrent = #CFCATCH.TAGCONTEXT[i]# p#sCurrent[ID]# #cfcatch.Message#br Error Detail: #cfcatch.Detail#br Line: #sCurrent[LINE]#br Column: #sCurrent[COLUMN]#br Template: #sCurrent[TEMPLATE]#/p /cfloop /cfoutput /cfcatch /cftry Notice the directory being passed needs double slashes to escape them. !k -Original Message- From: Kevin Aebig [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 4:01 PM To: CF-Talk Subject: RE: PHP webservice returns a Null pointer error I'm getting the object dump easily with this: cfset f = CreateObject(webservice,http://www.ryanmitchell.co.uk/rtCMS.php?wsdl;) cfdump var=#f# I'm taking a look at the service itself now... !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:42 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error i couldnt get to the stage where i could use it thanks for the help, if its not asking too much, you can have a go yourself. webservice is at: http://www.ryanmitchell.co.uk/rtCMS.php?wsdl method: listDirectory parameters: dir - d:\wwwroot\ryanmitchell.co.uk\www\ i made a basic php test SOAP client, which gives: http://www.ryanmitchell.co.uk/phptest.php very frustrating!! Ryan ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252940 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: PHP webservice returns a Null pointer error
thanks, but i still just get a null pointer error. that returns false for me which is just graceful error catching... did you get an array (or struct) returned? Got it. cftry cfset f = CreateObject(webservice,http://www.ryanmitchell.co.uk/rtCMS.php?wsdl;) cfdump var=#f# cfset code = f.listDirectory(d:\\wwwroot\\ryanmitchell.co.uk\\www\\) cfdump var=#code# cfcatch type=any cfoutputp#cfcatch.message#/p pCaught an exception, type = #CFCATCH.TYPE# /p br / StackTrace: br/ cfloop index = i from = 1 to = #ArrayLen(CFCATCH.TAGCONTEXT)# cfset sCurrent = #CFCATCH.TAGCONTEXT[i]# p#sCurrent[ID]# #cfcatch.Message#br Error Detail: #cfcatch.Detail#br Line: #sCurrent[LINE]#br Column: #sCurrent[COLUMN]#br Template: #sCurrent[TEMPLATE]#/p /cfloop /cfoutput /cfcatch /cftry Notice the directory being passed needs double slashes to escape them. !k -Original Message- From: Kevin Aebig [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 4:01 PM To: CF-Talk Subject: RE: PHP webservice returns a Null pointer error I'm getting the object dump easily with this: cfset f = CreateObject(webservice,http://www.ryanmitchell.co.uk/rtCMS.php?wsdl;) cfdump var=#f# I'm taking a look at the service itself now... !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:42 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error i couldnt get to the stage where i could use it thanks for the help, if its not asking too much, you can have a go yourself. webservice is at: http://www.ryanmitchell.co.uk/rtCMS.php?wsdl method: listDirectory parameters: dir - d:\wwwroot\ryanmitchell.co.uk\www\ i made a basic php test SOAP client, which gives: http://www.ryanmitchell.co.uk/phptest.php very frustrating!! Ryan ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252941 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: PHP webservice returns a Null pointer error
I just run this example this morning and I received and array [empty] result. cfset testObj = createObject(webservice,http://www.ryanmitchell.co.uk/rtCMS.php?wsdl;) cfdump var=#testObj# cfset testDir = testObj.listDirectory(d:\\wwwroot\\ryanmitchell.co.uk\\www\\) cfdump var=#testDir# -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252979 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: PHP webservice returns a Null pointer error (SOLVED)
yeah, i opted for another php SOAP library (nuSOAP), and with a bit of tweaking i've got it working. thanks for all the help I just run this example this morning and I received and array [empty] result. cfset testObj = createObject(webservice,http://www.ryanmitchell.co. uk/rtCMS.php?wsdl) cfdump var=#testObj# cfset testDir = testObj.listDirectory(d:\\wwwroot\\ryanmitchell.co. uk\\www\\) cfdump var=#testDir# -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253003 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: PHP webservice returns a Null pointer error
Are you using AMFPHP? !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:49 AM To: CF-Talk Subject: PHP webservice returns a Null pointer error Hello I am trying to connect to a basic php webservice through coldfusion. All the basics work, however whenever I try to return a php array i get a null pointer exception. Could not perform web service invocation methodName. Here is the fault returned when invoking the web service operation: java.lang.NullPointerException Has anyone come across this before? Solutions? Returning strings etc works fine, its just arrays that don't seem to. Ryan ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252849 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: PHP webservice returns a Null pointer error
nope, im using PEAR's SOAP libraries Are you using AMFPHP? !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:49 AM To: CF-Talk Subject: PHP webservice returns a Null pointer error Hello I am trying to connect to a basic php webservice through coldfusion. All the basics work, however whenever I try to return a php array i get a null pointer exception. Could not perform web service invocation methodName. Here is the fault returned when invoking the web service operation: java.lang.NullPointerException Has anyone come across this before? Solutions? Returning strings etc works fine, its just arrays that don't seem to. Ryan ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252852 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: PHP webservice returns a Null pointer error
Take a look at the returned xml structure. It might not be right, or CF might be choking on something that it's doing. !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 8:53 AM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error nope, im using PEAR's SOAP libraries Are you using AMFPHP? !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:49 AM To: CF-Talk Subject: PHP webservice returns a Null pointer error Hello I am trying to connect to a basic php webservice through coldfusion. All the basics work, however whenever I try to return a php array i get a null pointer exception. Could not perform web service invocation methodName. Here is the fault returned when invoking the web service operation: java.lang.NullPointerException Has anyone come across this before? Solutions? Returning strings etc works fine, its just arrays that don't seem to. Ryan ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252857 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: PHP webservice returns a Null pointer error
im not too sure how, im calling it as follows: // connect to web service f = CreateObject(webservice,http://path/file.php?wsdl;); code = f.methodName('string'); it doesnt give me the option of checking the xml Take a look at the returned xml structure. It might not be right, or CF might be choking on something that it's doing. !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 8:53 AM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error nope, im using PEAR's SOAP libraries the ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252863 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: PHP webservice returns a Null pointer error
Use a browser and access the wsdl directly. I.E. go to http://path/file.php?wsdl and it should display the xml for you Ryan Mitchell wrote: im not too sure how, im calling it as follows: // connect to web service f = CreateObject(webservice,http://path/file.php?wsdl;); code = f.methodName('string'); it doesnt give me the option of checking the xml Take a look at the returned xml structure. It might not be right, or CF might be choking on something that it's doing. !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 8:53 AM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error nope, im using PEAR's SOAP libraries the ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252865 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: PHP webservice returns a Null pointer error
looks pretty much the same as an equivalent coldfusion one as i said, the webservice works for everything but php arrays... Use a browser and access the wsdl directly. I.E. go to http://path/file.php?wsdl and it should display the xml for you Ryan Mitchell wrote: ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252878 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: PHP webservice returns a Null pointer error
I recall having some difficulties with CF reading a .NET recordset and had to use a custom UDF to parse out the result proper because CF couldn't do it on it's own. I'm almost positive that this is again the case. Have you tried using CFDump to see if CF is turning the result into a different datatype? !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 1:13 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error looks pretty much the same as an equivalent coldfusion one as i said, the webservice works for everything but php arrays... Use a browser and access the wsdl directly. I.E. go to http://path/file.php?wsdl and it should display the xml for you Ryan Mitchell wrote: ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252880 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: PHP webservice returns a Null pointer error
yeah, the problem is i dont even get a variable - just an immediate null pointer error as soon as i make the call to the remote method. I recall having some difficulties with CF reading a .NET recordset and had to use a custom UDF to parse out the result proper because CF couldn't do it on it's own. I'm almost positive that this is again the case. Have you tried using CFDump to see if CF is turning the result into a different datatype? !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 1:13 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error looks pretty much the same as an equivalent coldfusion one as i said, the webservice works for everything but php arrays... ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252883 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: PHP webservice returns a Null pointer error
Do you have exception handling in place? !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 1:50 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error yeah, the problem is i dont even get a variable - just an immediate null pointer error as soon as i make the call to the remote method. I recall having some difficulties with CF reading a .NET recordset and had to use a custom UDF to parse out the result proper because CF couldn't do it on it's own. I'm almost positive that this is again the case. Have you tried using CFDump to see if CF is turning the result into a different datatype? !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 1:13 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error looks pretty much the same as an equivalent coldfusion one as i said, the webservice works for everything but php arrays... ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252884 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: PHP webservice returns a Null pointer error
not sure what you mean. i literally am just invoking a method on the webservice Do you have exception handling in place? !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 1:50 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error yeah, the problem is i dont even get a variable - just an immediate null pointer error as soon as i make the call to the remote method. I recall having some difficulties with CF reading a .NET recordset and had to use a custom UDF to parse out the result proper because CF couldn't do it on it's own. I'm almost positive that this is again the case. Have you tried using CFDump ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252890 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: PHP webservice returns a Null pointer error
Are you positive that the PHP web service is working properly? Do you have access to the PHP code? Are you passing in all required arguments to the method you are calling? What if you go to http://webserviceurl?wsdl in a browser-- do you get SOAP XML back or an error? ~Brad -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:19 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error not sure what you mean. i literally am just invoking a method on the webservice Do you have exception handling in place? !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 1:50 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error yeah, the problem is i dont even get a variable - just an immediate null pointer error as soon as i make the call to the remote method. I recall having some difficulties with CF reading a .NET recordset and had to use a custom UDF to parse out the result proper because CF couldn't do it on it's own. I'm almost positive that this is again the case. Have you tried using CFDump ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252891 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: PHP webservice returns a Null pointer error
yeah, the webservice works completely fine and well. basically in php im returning back an array (i've set the wsdl datatype to xsd:anyType) if i change it to return an element of the array, then no problem, it all works if i change it to return the array, then i get a null pointer error Are you positive that the PHP web service is working properly? Do you have access to the PHP code? Are you passing in all required arguments to the method you are calling? What if you go to http://webserviceurl?wsdl in a browser-- do you get SOAP XML back or an error? ~Brad -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:19 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error not sure what you mean. i literally am just invoking a method on the webservice null had do it on it's own. I'm almost positive that this is again the case. Have you tried using CFDump ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252893 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: PHP webservice returns a Null pointer error
Have you looked into the get_any() method for the webservice object? This could possibly help you dump anything returned... !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:07 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error yeah, the webservice works completely fine and well. basically in php im returning back an array (i've set the wsdl datatype to xsd:anyType) if i change it to return an element of the array, then no problem, it all works if i change it to return the array, then i get a null pointer error Are you positive that the PHP web service is working properly? Do you have access to the PHP code? Are you passing in all required arguments to the method you are calling? What if you go to http://webserviceurl?wsdl in a browser-- do you get SOAP XML back or an error? ~Brad -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:19 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error not sure what you mean. i literally am just invoking a method on the webservice null had do it on it's own. I'm almost positive that this is again the case. Have you tried using CFDump ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252895 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: PHP webservice returns a Null pointer error
You can wrap CF code with error handling to better control the flow of the script. Also, since you're creating a Axis Webservice Object, with a WSDL URL as it's target. The object itself has more methods than just those of the webservice and you can use them to see what's going on. Give this try: cftry cfset f = CreateObject(webservice,http://path/file.php?wsdl;); cfdump var=#f# cfset code = f.methodName('string') cfcatch type=any p#cfcatch.message#/p pCaught an exception, type = #CFCATCH.TYPE# /p /cfcatch /cftry !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 2:19 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error not sure what you mean. i literally am just invoking a method on the webservice Do you have exception handling in place? !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 1:50 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error yeah, the problem is i dont even get a variable - just an immediate null pointer error as soon as i make the call to the remote method. I recall having some difficulties with CF reading a .NET recordset and had to use a custom UDF to parse out the result proper because CF couldn't do it on it's own. I'm almost positive that this is again the case. Have you tried using CFDump ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252899 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: PHP webservice returns a Null pointer error
i couldnt get to the stage where i could use it thanks for the help, if its not asking too much, you can have a go yourself. webservice is at: http://www.ryanmitchell.co.uk/rtCMS.php?wsdl method: listDirectory parameters: dir - d:\wwwroot\ryanmitchell.co.uk\www\ i made a basic php test SOAP client, which gives: http://www.ryanmitchell.co.uk/phptest.php very frustrating!! Ryan Have you looked into the get_any() method for the webservice object? This could possibly help you dump anything returned... !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:07 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error yeah, the webservice works completely fine and well. basically in php im returning back an array (i've set the wsdl datatype to xsd:anyType) if i change it to return an element of the array, then no problem, it all works if i change it to return the array, then i get a null pointer error ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252903 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: PHP webservice returns a Null pointer error
I'm getting the object dump easily with this: cfset f = CreateObject(webservice,http://www.ryanmitchell.co.uk/rtCMS.php?wsdl;) cfdump var=#f# I'm taking a look at the service itself now... !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:42 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error i couldnt get to the stage where i could use it thanks for the help, if its not asking too much, you can have a go yourself. webservice is at: http://www.ryanmitchell.co.uk/rtCMS.php?wsdl method: listDirectory parameters: dir - d:\wwwroot\ryanmitchell.co.uk\www\ i made a basic php test SOAP client, which gives: http://www.ryanmitchell.co.uk/phptest.php very frustrating!! Ryan Have you looked into the get_any() method for the webservice object? This could possibly help you dump anything returned... !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:07 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error yeah, the webservice works completely fine and well. basically in php im returning back an array (i've set the wsdl datatype to xsd:anyType) if i change it to return an element of the array, then no problem, it all works if i change it to return the array, then i get a null pointer error ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252907 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: PHP webservice returns a Null pointer error
Got it. cftry cfset f = CreateObject(webservice,http://www.ryanmitchell.co.uk/rtCMS.php?wsdl;) cfdump var=#f# cfset code = f.listDirectory(d:\\wwwroot\\ryanmitchell.co.uk\\www\\) cfdump var=#code# cfcatch type=any cfoutputp#cfcatch.message#/p pCaught an exception, type = #CFCATCH.TYPE# /p br / StackTrace: br/ cfloop index = i from = 1 to = #ArrayLen(CFCATCH.TAGCONTEXT)# cfset sCurrent = #CFCATCH.TAGCONTEXT[i]# p#sCurrent[ID]# #cfcatch.Message#br Error Detail: #cfcatch.Detail#br Line: #sCurrent[LINE]#br Column: #sCurrent[COLUMN]#br Template: #sCurrent[TEMPLATE]#/p /cfloop /cfoutput /cfcatch /cftry Notice the directory being passed needs double slashes to escape them. !k -Original Message- From: Kevin Aebig [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 4:01 PM To: CF-Talk Subject: RE: PHP webservice returns a Null pointer error I'm getting the object dump easily with this: cfset f = CreateObject(webservice,http://www.ryanmitchell.co.uk/rtCMS.php?wsdl;) cfdump var=#f# I'm taking a look at the service itself now... !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:42 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error i couldnt get to the stage where i could use it thanks for the help, if its not asking too much, you can have a go yourself. webservice is at: http://www.ryanmitchell.co.uk/rtCMS.php?wsdl method: listDirectory parameters: dir - d:\wwwroot\ryanmitchell.co.uk\www\ i made a basic php test SOAP client, which gives: http://www.ryanmitchell.co.uk/phptest.php very frustrating!! Ryan Have you looked into the get_any() method for the webservice object? This could possibly help you dump anything returned... !k -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 3:07 PM To: CF-Talk Subject: Re: PHP webservice returns a Null pointer error yeah, the webservice works completely fine and well. basically in php im returning back an array (i've set the wsdl datatype to xsd:anyType) if i change it to return an element of the array, then no problem, it all works if i change it to return the array, then i get a null pointer error ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:252914 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4