Object reference not set to an instance of an object


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Object reference not set to an instance of an object
# 1  
Old 07-06-2009
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 09:26 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

How to initialize an object with another object of different class?

How to initialize an object of class say "A", with an object of type say "B". The following code give the error message "error: conversion from A to non-scalar type B requested" #include <iostream> using namespace std; class B; class A{ public: A() { cout <<"\nA()" << endl; } ... (1 Reply)
Discussion started by: techmonk
1 Replies

2. Programming

Shared Object Question

Hello, I am new to programming shared objects and I was hoping someone could tell me if what I want to do is possible, or else lead me in the right direction. I have a main program that contains an abstract base class. I also have a subclass that I'm compiling as a shared object. The subclass... (13 Replies)
Discussion started by: dorik
13 Replies

3. Red Hat

shared object

Hi, I would like to create a shared object ( .so). This shared object 1. uses the functions from a library. 2. Also it should be able to use the global variable in an app To achieve this what should I do ? 1) To use the functions in the library should I give the -ld option while... (1 Reply)
Discussion started by: rvan
1 Replies

4. Programming

sizeof(object) in C++

Hi, I have defined the class and call the sizeof(object to class) to get the size. # include <iostream> # include <iomanip> using namespace std; class sample { private: int i; float j; char k; public: sample() { } (2 Replies)
Discussion started by: ramkrix
2 Replies

5. Programming

object creation

Hi, I was asked this question in interview.can you people please help me out in this. class A { int i; a() { i=10; cout << i; } } int main() { A a(); // what will be the program output } Thanks, Harika (3 Replies)
Discussion started by: harikamamidala
3 Replies

6. Programming

Set User ID Bit And Shared Object

I have one app binary 'main' which is dependent on shared object libfoo.so owner of main and libfoo.so is user 'oracle:dba' > ldd main libfoo.so => ./libfoo.so libCstd.so.1 => /usr/lib/libCstd.so.1 libCrun.so.1 => /usr/lib/libCrun.so.1 libm.so.2 => ... (1 Reply)
Discussion started by: vpatil
1 Replies

7. UNIX for Advanced & Expert Users

Set User ID Bit And Shared Object

I have one app binary 'main' which is dependent on shared object libfoo.so owner of main and libfoo.so is user 'oracle:dba' > ldd main libfoo.so => ./libfoo.so libCstd.so.1 => /usr/lib/libCstd.so.1 libCrun.so.1 => /usr/lib/libCrun.so.1 libm.so.2 => ... (1 Reply)
Discussion started by: vpatil
1 Replies

8. Programming

mozilla object

hi this i tried for getting url form mozilla window. and also for getting mozilla object file. is there any plz tell the way. thanking u. ramesh (7 Replies)
Discussion started by: ramesh.jella
7 Replies

9. Programming

create object

can we create an parametrize object to a class with the help of new operator if yes then how (0 Replies)
Discussion started by: ramneek
0 Replies

10. UNIX for Advanced & Expert Users

Printer Error(the Object Instance Test Does Not Exist)

Hello, i need some help about how to set up a high velocity impact printer in UNIX SCO 5.05, this printer is attached with a parallel port in a PC(host), the host use tunemul to access unix.(this reference is just to ask you if this is a local or remote connection, just to be sure), so, i... (2 Replies)
Discussion started by: jav_v
2 Replies
Login or Register to Ask a Question

Featured Tech Videos