By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,968 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,968 IT Pros & Developers. It's quick & easy.

New to webservices, wsdl and nusoap

P: n/a
I have access to the following web service but always retreive the
same error:-

Array
(
[faultcode] =soapenv:Server.userException
[faultstring] =se.brodit.ws.InvalidUserException
[detail] =Array
(
[hostname] =webserver
)

)

This is the following code (taken from numerous examples)

// Pull in the NuSOAP code
require_once('nusoap/nusoap.php');

$serverpath ='http://www.brodit.se/';
$wsdl = $serverpath . 'Brodit/wsdl/WebService.wsdl';
$param = array(
'userId' ='xxxxxxxx'
);

// Create the client instance
$client = new soapclient($wsdl, true);
// Check for an error
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
// At this point, you know the call that follows will fail
}
// Call the SOAP method
$result = $client->call('getBrandtypes', $param);
// Check for a fault
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
// Display the result
echo '<h2>Result</h2><pre>';
print_r($result);
echo '</pre>';
}
}
any help would be grateful. many thanks

craig

Apr 23 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
It means the service says your user id is wrong. I see there are x's in
the user id string in your snippet, did you replace your user id with
x's for safety when posting on newsgroups? Or did you not fill that in
when you copied out of the example?
Apr 23 '07 #2

P: n/a
On Apr 23, 9:57 pm, Michael Placentra II <sumguyovrt...@gmail.com>
wrote:
It means the service says your user id is wrong. I see there are x's in
the user id string in your snippet, did you replace your user id with
x's for safety when posting on newsgroups? Or did you not fill that in
when you copied out of the example?
yes, i removed the userId value.

my problem is that i have tried with the correct user id and retreived
the above error message.
I have used the webservice in eclipse and that let me access the
information with no problems.

am i doing anything wrond witht the code posted?

Apr 24 '07 #3

P: n/a
Apr 24 '07 #4

P: n/a
On Apr 24, 11:06 am, craigyk <craig.keight...@gmail.comwrote:
On Apr 23, 9:57 pm, Michael Placentra II <sumguyovrt...@gmail.com>
wrote:
It means the service says your user id is wrong. I see there are x's in
the user id string in your snippet, did you replace your user id with
x's for safety when posting on newsgroups? Or did you not fill that in
when you copied out of the example?

yes, i removed the userId value.

my problem is that i have tried with the correct user id and retreived
the above error message.
I have used the webservice in eclipse and that let me access the
information with no problems.

am i doing anything wrond witht the code posted?
I have noticed whilst using the eclipse plug-in, the request layout is
as follows:

<?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:q0="http://ws.brodit.se" xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance">
- <soapenv:Body>
- <q0:getBrandtypes>
<q0:userId />
<q0:brandTypeId>XXXXXX</q0:brandTypeId>
</q0:getBrandtypes>
</soapenv:Body>
</soapenv:Envelope>

do i need the q0 tags in nusoap?
is it the text encoding?

Apr 24 '07 #5

P: n/a
On Apr 23, 9:57 pm, Michael Placentra II <sumguyovrt...@gmail.com>
wrote:
It means the service says your user id is wrong. I see there are x's in
the user id string in your snippet, did you replace your user id with
x's for safety when posting on newsgroups? Or did you not fill that in
when you copied out of the example?
I have noticed whilst using the eclipse plug-in, the request layout is
as follows:

<?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:q0="http://ws.brodit.se" xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance">
- <soapenv:Body>
- <q0:getBrandtypes>
<q0:userId />
<q0:brandTypeId>XXXXXX</q0:brandTypeId>
</q0:getBrandtypes>
</soapenv:Body>
</soapenv:Envelope>

do i need the q0 tags in nusoap?

Apr 24 '07 #6

P: n/a
On Apr 24, 11:06 am, craigyk <craig.keight...@gmail.comwrote:
On Apr 23, 9:57 pm, Michael Placentra II <sumguyovrt...@gmail.com>
wrote:
It means the service says your user id is wrong. I see there are x's in
the user id string in your snippet, did you replace your user id with
x's for safety when posting on newsgroups? Or did you not fill that in
when you copied out of the example?

yes, i removed the userId value.

my problem is that i have tried with the correct user id and retreived
the above error message.
I have used the webservice in eclipse and that let me access the
information with no problems.

am i doing anything wrond witht the code posted?
I have noticed whilst using the eclipse plug-in, the request layout is
as follows:

<?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:q0="http://ws.brodit.se" xmlns:soapenv="http://
schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance">
- <soapenv:Body>
- <q0:getBrandtypes>
<q0:userId />
<q0:brandTypeId>XXXXXX</q0:brandTypeId>
</q0:getBrandtypes>
</soapenv:Body>
</soapenv:Envelope>

do i need the q0 tags in nusoap?

Apr 24 '07 #7

P: n/a
On Apr 24, 11:06 am, craigyk <craig.keight...@gmail.comwrote:
On Apr 23, 9:57 pm, Michael Placentra II <sumguyovrt...@gmail.com>
wrote:
It means the service says your user id is wrong. I see there are x's in
the user id string in your snippet, did you replace your user id with
x's for safety when posting on newsgroups? Or did you not fill that in
when you copied out of the example?

yes, i removed the userId value.

my problem is that i have tried with the correct user id and retreived
the above error message.
I have used the webservice in eclipse and that let me access the
information with no problems.

am i doing anything wrond witht the code posted?
testting, i twont add my psts

Apr 24 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.