473,729 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PEAR::SOAP help me!

Dear all,
is the first time that I use SOAP, and i must say that i'm having
several problems.
this is SOAP message that expects the server
=============== ==XML EXPECTED FROM THE SERVER========= =======
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Header>
<wsse:Securit y
xmlns:wsse="htt p://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
SOAP-ENV:mustUnderst and="1">

<wsse:UsernameT oken>

<wsse:Username> isp</wsse:Username>

<wsse:Password> password</wsse:Password>

<wsu:Created
xmlns:wsu="http ://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2005-05-16T07:00:03Z</wsu:Created>

</wsse:UsernameTo ken>

</wsse:Security>

</SOAP-ENV:Header>

<soap:Body soap:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/">

<q1:getEcho xmlns:q1="http://echo.help.webse rvices.xxxxx.xx xx.com" />

</soap:Body>

</SOAP-ENV:Envelope>

=============== =============== =============== =============

============== XML SENT FROM MY PROGRAM =============== ===

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"

xmlns:xsd="http ://www.w3.org/2001/XMLSchema"

xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"

xmlns:SOAP-ENC="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:ns4="http ://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"

SOAP-ENV:encodingSty le="http://schemas.xmlsoap .org/soap/encoding/">

<SOAP-ENV:Header>

<Security SOAP-ENV:actor="http ://schemas.xmlsoap .org/soap/actor/next"
SOAP-ENV:mustUnderst and="1">

<ns4:wsse:Usern ameToken>

<Username xsi:type="xsd:s tring">allaxia-ws</Username>

<Password
xsi:type="xsd:s tring">6gVTJFjW 1MoerWp</Password></ns4:wsse:Userna meToken></Security>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<getEcho xsi:nil="true"/>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

=============== =============== =============== =============== =======

After several vicissitudes, i was able to set up the security header and
the mustUnderstand, but now i have always the same error, the server “
does not recognize” the tag ns4.

I have not created the ns4 tag!

=============== ======= ERROR MESSAGE =============== =
[error_message_p refix] =>

[mode] => 1

[level] => 1024

[code] => Parser

[message] => XML error on line 1 col 1 byte 0 Empty document

[userinfo] => HTTP/1.1 500 Internal Server Error

Date: Tue, 23 May 2006 13:21:45 GMT

Server: Apache/2.0.54 (Win32) mod_ssl/2.0.54 OpenSSL/0.9.8 mod_jk/1.2.10

<?xml version="1.0" encoding="UTF-8"?><soapenv:En velope
xmlns:soapenv=" http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"><soap env:Body><soape nv:Fault><fault code>soapenv:Se rver.generalExc eption</faultcode><faul tstring>WSDoAll Receiver:
cannot convert into document; nested exception is:
org.xml.sax.SAX ParseException: Element type &quot;ns4:wsse& quot; must be
followed by either attribute specifications, &quot;&gt;&quot ; or
&quot;/&gt;&quot;.</faultstring><de tail><ns1:hostn ame
xmlns:ns1="http ://xml.apache.org/axis/">FSSP085</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelop e>

=============== ===== MY SCRIPTS =============== =============== ==========
require_once('S OAP/Client.php');

/* Create a new SOAP client using PEAR::SOAP's SOAP_Client-class: */
$client = new
SOAP_Client('ht tps://xxxxxx.xx.xxxxx .com/services/Echo',false,443 );
$client->setOpt('curl ', CURLOPT_VERBOSE , 1);
$client->setOpt('curl ', CURLOPT_SSL_VER IFYPEER, 0);
$client->setOpt('curl ', CURLOPT_SSL_VER IFYHOST, 1);
$client->setOpt('curl', CURLOPT_PROXY, '10.0.4.90:8080 ');
$client->setOpt('curl', CURLOPT_PROXYUS ERPWD, 'xxxx.xxxxx:sdh ksdjfs');

//new
SOAP_Header('ws se:UsernameToke n',array('usern ame'=>'isp','pa ssword'=>'passw ord'));

$soapheader = new SOAP_Header("ws se:Security", "object",
array("wsse:Use rnameToken" =>
new
Soap_Value("{ht tp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}wsse:Us ernameToken",
"object",
array( "Username" => new Soap_Value("wss e:Username", "string", "isp"),
"Password" => new Soap_Value("wss e:Password", "string", "password")))), 1);
$client->addHeader($soa pheader);
$method = 'getEcho';
$params = array();
$namespace="htt p://echo.help.webse rvices.xxxxx.xx xxxx.com";
$response = $client->call($method );
print_r($respon se);
print("######## ###########".$c lient->getEcho());
thanks for the Help, and excuse me for my bad english

Info
May 24 '06 #1
0 5607

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4406
by: Arne Kösling | last post by:
Hi ! I am new to Web Services. Therefore I ve set up a PHP Installation on Windows (PHP 4.3.2 and Apache 1.3.29). I have tested PHP alone and then installed PEAR. Now I am stuck there (Before that, I had many problems with the PHP-dlls) I've set up several SOAP Testscripts that I found on WebSites and in PHP-Books to get a PHP Client and a PHP Server communicate over Web Services (using PEAR::SOAP).
0
1913
by: Jimmy Jim | last post by:
OK, I am so frustrated with PEAR SOAP, I have it working, but it seems when I include a file and in that file is a function with global variables, those globals are not set. Anyone have ANY knowledge of this?? Here is an example: file: server.php ...... function test() { include_once(age.php);
0
2384
by: Arne Kösling | last post by:
Hi, PEAR:SOAP is not working. I've tried so many examples now and the only one that works, is that amazon example, which is too complex for me to understand. I am so reliant on the Web Services with SOAP .... and I can t get it work. :'-(
0
823
by: Doug Farrell | last post by:
Hi all, I'm trying to make use of PEAR::SOAP am and having problems. I've tried a number examples I've found on the web, but to no avail. I've set things up so I have to separate servers on my machine, the server at port 1100 and the client at port 1101. However, no luck getting anything to talk. Whenever the client goes into the 'call' function of the SOAP/Client.php class, it never returns. So, basically I'm asking if anyone could...
0
4093
by: Henrik Brautaset Aronsen | last post by:
I am having problems converting from Pear SOAP to PHP5 SOAP, especially when it comes to complex types. I would be grateful for any help on how this should be translated: require_once("SOAP/Client.php"); $wsdlurl = "http://myserver/myservices/mypage.php?wsdl"; $wsdl = new SOAP_WSDL($wsdlurl, array("timeout" => 360));
3
7244
by: junkmail | last post by:
on a win 2k server apparantly it is saying i dont have it. or it cant find it. im using mySQL 4.1 php 4.3.x apache 3.0.53 im new to php and am doing some tutorials, but when i run the sripts it tells mea it can not run pear/soap, because it can not be found.the book im learning form does not tell me how to install or configure this extension. so now im looking for help.
0
1464
by: Alexander Waldmann | last post by:
Hi, i have PEAR::SOAP installed correctly (beta, all dependent packages are installed). When i try out the following simple Script <?php print "Include is ... "; include_once("SOAP/Server.php"); print " ok!"; ?>
0
1914
by: Samuel Zallocco | last post by:
Hi all, I've a problem with PHP5 + PEAR::SOAP. I Have the following 2 script that implements a simple web service: The Server Code running on WinXP + PHP5 + Apache 2.x: ---------------------------------------------------- <?php require_once('SOAP/Server.php'); require_once('SOAP/Disco.php');
0
1353
by: wagemage.pt | last post by:
I'm having some trouble with PEAR soap and a response from a webservice when the number of results is one or more than one. Versions are PHP 4.4.2-1build1, PEAR-1.4.6, SOAP-0.9.4 running in Linux (Ubuntu Dapper) When we have multiple items in the result, all goes well, and I can use the result straight away (I do some JSON translation afterwards, but that's beyond the scope of my question).
0
9291
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9217
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9158
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8160
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4535
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4799
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2698
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2171
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.