473,473 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

New to webservices, wsdl and nusoap

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
7 3788
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
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
Apr 24 '07 #4
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Unbreakable | last post by:
I am using the nusoap client and nusoap server without any problem. However, once I change the client to the excel, I am not sure how to call the nusoap server. Especially the nusoap server only...
0
by: Ward G | last post by:
Hi, Below is a basic webservice using the NuSOAP class. When I run the code to register the service, I get the nice html page generated by nusoap, offering a link to view the WSDL for my...
1
by: ffhansix | last post by:
Hi, I am having problems with generating a c# proxy class from a IBM websphere WSDL file, when running the wsdl.exe to create the c# proxy file command i recieve an error: Warning: one or...
3
by: frustratedcoder | last post by:
I need to consume a web service written in Perl but there is no wsdl file for this service. The perl soap client that can call and consume this web service looks like this (if it helps) #!perl...
1
by: neoblitz | last post by:
Hi Guys, I'm very new to NuSoap. I'm able to call a webservice which actually returned me results.. But I'm having trouble to read the response or I simply don't understand how to read the response.....
1
by: Philluminati | last post by:
I've had a nightmare at work. I have a simple app makes a simple SOAP call to a webservice. It all worked fine but when we tried to deploy it on the live site there appears to be some version...
2
by: flydev | last post by:
Hello, I have very little knowledge when it comes to SOAP, but a developer I'm working with says it will make things easier when passing data to/from client software and the mySQL database. Anyhow, I...
2
by: mme807 | last post by:
hi all. i have a web_service and i connect to it with nusoap . my ask: is there a method in nusoap that get me list of function in web_service and if there is how work? please help me
0
by: rajat teotia | last post by:
Hi, i have created a simple web service using Php Nusoap. its working correctly but the only thing missing is to add the default xmlns attribute to the response tag. Here is the copy of Response :...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.