Thank you for the code Fred.
It so happens that for some reason, the remedy web server also works as the
server name. Not sure why, this could be a configuration setting fix or
what not. Our mid-tier is doing the same thing when connecting to the
server.
I've had a chance to go through your code a little bit but will have time
this weekend.
Thanks again.
On 5/2/07, Grooms, Frederick W <[EMAIL PROTECTED]> wrote:
** I just noticed something in your client call ...
$client = new SoapClient(
"http://remedyweb/WSDL/public/remedyweb/BZ_Incident "
);
Is your Remedy server known as remedyweb?
I think it should be something like
"http://remedyweb/WSDL/public/*remedyserver*/BZ_Incident<http://remedyweb/WSDL/public/remedyserver/BZ_Incident>"
A working php to Remedy service here
<?php
include("XML/Serializer.php");
$params = array(
'Source'=>"WebService",
'ShortDescription'=>"TEST",
'InitialDescription'=>"TEST");
/*
* DON'T CACHE the SOAP on the PHP server
*/
$ini = ini_set("soap.wsdl_cache_enabled","0");
/*
* Create the soapClient object
* referance the remedy dynamic wsdl
*/
$client = new
SoapClient("http://webserver/arsys/WSDL/public/remedyserver/ServiceName
", array("trace"=>1));
/*
* Create the soap header for authentication. This is the service login
info
*/
$auth->userName = $_GET["ServerLogin"];
$auth->password = $_GET["ServerPwd"];
$authvalues = new SoapVar($auth, SOAP_ENC_OBJECT);
$header = new SoapHeader("IssueInterface", "AuthenticationInfo",
$authvalues, false);
$client->__setSoapHeaders(array($header));
/*
* Call the method to create the Ticket
*/
$serializer = new XML_Serializer();
$serializer->setOption("addDecl", true);
try {
$result = $serializer->serialize($client->Operation($params));
// check result code and display XML if success
if($result === true)
{
echo $serializer->getSerializedData();
}
} catch (SoapFault $ex) {
// perform XML serialization
$result = $serializer->serialize($ex);
// check result code and display XML if success
if($result === true)
{
echo $serializer->getSerializedData();
}
/*
echo "Request: " . print_r($client->__getLastRequest(), true);
echo "RequestHeaders: " .
print_r($client->__getLastRequestHeaders(), true);
echo "Response: " . print_r($client->__getLastResponse(), true);
echo "ResponseHeaders: " .
print_r($client->__getLastResponseHeaders(), true);
*/
exit;
}
?>
------------------------------
*From:* Action Request System discussion list(ARSList) [mailto:
[EMAIL PROTECTED] *On Behalf Of *Robert Halstead
*Sent:* Wednesday, May 02, 2007 3:07 PM
*To:* [email protected]
*Subject:* Need Help Getting a WSDL Consumed with PHP
** I didn't want to continue the other topic because I'm straying away
from .Net.
It seems like I'm always seeing this error come up no matter what I do to
the code. I've also used a website to test, "
http://www.soapclient.com/soaptest.html
"
In both cases the error is the same. I'm thinking it has to do with how
my web service/mid-tier is set up. I have put in a an anonymous user name
and password for the web service so I shouldn't have to fill out the
authentication I'm thinking...
I noticed remedy uses the AXIS web servlet just by typing in
http://remedyweb/services/ARService
.
The error I repeatedly get is, *Fatal error*: Uncaught SoapFault
exception: [soapenv:Server.userException] java.lang.NullPointerException
If I just put in the address of the soap operation in the WSDL, I also get
this same error. I am stuck on how to solve this issue. I've turned up
logging on the Mid-Tier, I see the request for the WSDL, but no following
request after that.
I've tried the solution that Fred suggested, but received the same error.
Here's my code again after the revision from Fred:
<?php
$client = new SoapClient(
"http://remedyweb/WSDL/public/remedyweb/BZ_Incident "
);
$parms = array ('Incident_ID' => "INC000000038137" );
$auth->userName = "myuser"; // use $_GET["ServerLogin"] for
parameterized login name
$auth->password = "mypassword"; // use $_GET["ServerPwd"] for
parameterized password
$authvalues = new SoapVar($auth, SOAP_ENC_OBJECT);
$header = new SoapHeader("OpGet", "AuthenticationInfo", $authvalues,
false);
$client->__setSoapHeaders(array($header));
var_dump($header);
var_dump($result = $client ->__soapCall( "OpGet", $parms ));
?>
Just wanted to ping the list one more time before I hit up BMC.
--
"A fool acts, regardless; knowing well that he is wrong. The ignoramus
acts on only what he knows, but all that he knows.
The ignoramus may be saved, but the fool knows that he is doomed."
Robert Halstead __20060125_______________________This posting was
submitted with HTML in it___
__20060125_______________________This posting was submitted with HTML in
it___
--
"A fool acts, regardless; knowing well that he is wrong. The ignoramus acts
on only what he knows, but all that he knows.
The ignoramus may be saved, but the fool knows that he is doomed."
Robert Halstead
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers
Are"