The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
find string object phoenixV007 Shell Programming and Scripting 1 01-15-2009 08:16 AM
mozilla object ramesh.jella High Level Programming 7 03-18-2008 01:44 PM
Shared Object File sarwan Linux 0 10-07-2005 05:27 AM
create object ramneek High Level Programming 0 10-07-2005 12:09 AM
Printer Error(the Object Instance Test Does Not Exist) jav_v UNIX for Advanced & Expert Users 2 09-23-2002 10:42 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-06-2009
EddiRae EddiRae is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 7
Object reference not set to an instance of an object

I am new to PHP and UNIX. I am using Apache to do my testing on a Windows Vista machine.

I am getting this error when I am trying to connect to a web service. I did a search and did not see any posts that pertain to this.

Here is my function:

PHP Code:
<?php

function TRECSend($a$b$c$d$e$f)
{
  
$str '<?xml version=\"1.0\" encoding=\"UTF-8\" ?><Transmission><EdProviderData><DetailData><Detail>';
  
$str $str '<IN_PROV>$a</IN_PROV> <IN_CRSE>$b</IN_CRSE> <IN_CDATE>$c</IN_CDATE> <IN_ZIP>$d</IN_ZIP>';
  
$str $str '<IN_LICENSE>$e</IN_LICENSE> <IN_NAME>$f</IN_NAME> </Detail> </DetailData> </EdProviderData> </Transmission>';

  
$wsdl="https://www.trec.state.tx.us/ProcessEdRoster/Service1.asmx?wsdl";

  
$client=new soapclient($wsdl);
  
// this is the authentication ticket I got from an authentication webservice
  
try
  {
     
// instantiate soapclient
     
$client = new SoapClient($wsdl);

     
// create header object and insert into headers

     
$header = array(new SoapHeader('https://www.trec.state.tx.us/ValidationSoapHeader/''DevToken','12345'));

//     $client->__setSoapHeaders($header);

     // do it
     
$outputheader "";
     
$response "";
     
$response $client->__soapCall("ProcessRoster", array($str), NULL$header$outputheader);
     return 
$response;
   }
   catch (
SoapFault $exception)
   {
     return 
$exception;
   }
}

echo 
$TREC TRECSend('0303','66-66-129-6503','06242009','77041','1234567','Eddi Rae Melton');

?>
Here is the output that I am getting:

SoapFault exception:
[soap:Server] Server was unable to process request. ---> Object reference not set to an instance of an object. in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\TREC.php:27
Stack trace:
#0 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\TREC.php(27): SoapClient->__soapCall('ProcessRoster', Array, NULL, Array, Array)
#1 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\TREC.php(36): TRECSend('0303', '66-66-129-6503', '06242009', '77041', '1234567', 'Eddi Rae Melton')
#2 {main}

I am not sure what I need to change to get this to work.

Thanks for your help in advance
Eddi Rae

Last edited by EddiRae; 07-07-2009 at 07:26 PM..
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0