Hi community,
I have a problem with a Soap client written in php.
I have a local server (coded in c and a client in c too, it works fine), but i want to test client in php, and i have an error (I'm not sure to understand it...) : - SoapFault exception: [SOAP-ENV:Client] Method 'ns1:getMetadataRequest' not implemented: method name or namespace not recognized in beta_2/soap.php:26
-
Stack trace:
-
#0 /root/src/rxtxws/beta_2/soap.php(26): SoapClient->__soapCall('getMetadata', Array)
-
#1 {main}
And when I run the server, I have this: -
Socket connection successful: master socket = 3
-
SOAP 1.1 fault: SOAP-ENV:Client [no subcode]
-
"Method 'ns1:getMetadataRequest' not implemented: method name or namespace not recognized"
-
Detail: [no detail]
-
My wsdl file seems well: -
<?xml version="1.0" encoding="UTF-8"?>
-
<!-- partie 1 : Definitions -->
-
<wsdl:definitions
-
targetNamespace="http://192.168.0.16:8080"
-
xmlns:typens="http://192.168.0.16:8080"
-
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
-
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-
xmlns="http://schemas.xmlsoap.org/wsdl/">
-
-
<!-- partie 2 : Types-->
-
<wsdl:types>
-
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://192.168.0.16:8080">
-
<xsd:element name="getMetadataRequest">
-
<xsd:complexType>
-
<xsd:sequence>
-
<xsd:element name="oldname" type="xsd:string" />
-
<xsd:element name="newname" type="xsd:string" />
-
</xsd:sequence>
-
</xsd:complexType>
-
</xsd:element>
-
-
<xsd:element name="getMetadataResponse">
-
<xsd:complexType>
-
<xsd:sequence>
-
<xsd:element name="answer" type="xsd:string"/>
-
</xsd:sequence>
-
</xsd:complexType>
-
</xsd:element>
-
</xsd:schema>
-
</wsdl:types>
-
-
<!-- partie 3 : Message -->
-
<wsdl:message name="getMetadataRequestMessage">
-
<wsdl:part name="input" element="typens:getMetadataRequest"/>
-
</wsdl:message>
-
<wsdl:message name="getMetadataResponseMessage">
-
<wsdl:part name="output" element="typens:getMetadataResponse"/>
-
</wsdl:message>
-
-
-
<!-- partie 4 : Port Type -->
-
<wsdl:portType name="WebServicesPortType">
-
<!-- partie 5 : Operation -->
-
<wsdl:operation name="getMetadata">
-
<wsdl:input message="typens:getMetadataRequestMessage"/>
-
<wsdl:output message="typens:getMetadataResponseMessage"/>
-
</wsdl:operation>
-
</wsdl:portType>
-
-
<!-- partie 6 : Binding -->
-
<binding name="WebServicesBinding" type="typens:WebServicesPortType">
-
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
-
<wsdl:operation name="getMetadata">
-
<soap:operation soapAction="getMetadata"/>
-
<wsdl:input><soap:body use="literal"/></wsdl:input>
-
<wsdl:output><soap:body use="literal"/></wsdl:output>
-
</wsdl:operation>
-
</binding>
-
-
<!-- partie 7 : Service -->
-
<wsdl:service name="WebServices">
-
<!-- partie 8 : Port -->
-
<wsdl:port name="WebServicesPort" binding="typens:WebServicesBinding">
-
<soap:address location="http://192.168.0.16:8080"/>
-
</wsdl:port>
-
</wsdl:service>
-
</wsdl:definitions>
-
So I think my problem is in client.php, but, i don't find it: - <?php
-
require_once 'SOAP/Client.php';
-
ini_set("soap.wsdl_cache_enabled", FALSE);
-
$wsdl_file = 'file.wsdl';
-
-
class getMetadataRequest
-
{
-
public $oldname;
-
public $newname;
-
public function __construct( $oldname, $newname )
-
{
-
$this->oldname = $oldname;
-
$this->newname = $newname;
-
}
-
-
}
-
-
try {
-
$classmap = array('getMetadataRequest' => 'oldname', 'getMetadataRequest' => 'newname');
-
$soapClient = new SoapClient($wsdl_file, array('classmap' => $classmap, 'exception' => true, 'trace' => true));
-
-
$oldname = "oldname";
-
$newname = "newname";
-
-
$getMetadataRequest = new getMetadataRequest($oldname, $newname );
-
$getMetadataResponse = $soapClient->__soapCall(getMetadata, array($getMetadataRequest));
-
/* $getMetadataResponse = $soapClient->getMetadata($getMetadataRequest); */
-
$result = $getMetadataResponse->answer;
-
echo $result;
-
}
-
catch (SoapFault $fault)
-
{
-
echo $fault."\n";
-
}
-
-
?>
-
A test with nc show me some informations are received, but... -
$nc -l -p 8080
-
POST / HTTP/1.1
-
Host: 192.168.0.16:8080
-
Connection: Keep-Alive
-
User-Agent: PHP-SOAP/5.2.0-8+etch11
-
Content-Type: text/xml; charset=utf-8
-
SOAPAction: "getMetadata"
-
Content-Length: 307
-
-
<?xml version="1.0" encoding="UTF-8"?>
-
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://192.168.0.16:8080"><SOAP-ENV:Body><ns1:getMetadataRequest><oldname>oldname</oldname><newname>newname</newname></ns1:getMetadataRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
-
If you have any ideas, suggestions, I'll take it
Thanks in advance
--regards
Greg
4 12054
arg, shame on me.
Don't forget to check nsmap file. If ip/host aren't consistent, it can't work....
Sorry for that.
--
regards
Greg
good day, i have problem too, but the error is "method not implemented or namespace not recognized".. does this have something to do with nsmap? by the way what is nsmap? can you detail me the solution? thanks..
Dormilich 8,658
Recognized Expert Moderator Expert
I’m not doing much SOAP, but the nsmap refers to (I think) to the namespace mapping (one of the features of XML), if both parties (sender/receiver) don’t use the same namespaces, the XML just won’t match.
oks, thanks to all.. i got now what im looking for, gcharbon helped a lot
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: snowdrop |
last post by:
Hi folks,
try the SOAP library written in C. Using csoap you can also implement a SOAP
server in C. This library depends on libxml2.
Homepage: http://csoap.sourceforge.net
Example client using CSOAP
----------------------------------------------
|
by: Ken Allen |
last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other
languages and done some COM work for a number of years. I am attempting to
understand how to map an older program architecture into .Net -- not looking
to do it at this time, just to understand how I would achieve it.
In the old environment, we had two classes, a client and a server class,
that managed a data object. The server object knew how to interface with the...
|
by: Salina |
last post by:
I am new in C#.Net and going to write a window
client/server application.
my database is mysql and the data will update every min.
what i need to do is push the up-to-date data to clients
from server directly. Clients just need to read the data,
not neccessary for modification.
Can anyone recommend me what method I should use? DataSet
or Threading or anything else? Any samples?
Please help
|
by: Alexandre (www.pointnetsolutions.com) |
last post by:
I am looking at building a distributed system,
and i have been looking at many different options,
in some cases i was thinking of a client server relation
where a client would send a string to the system as a command.
i also looked at the GOF Command pattern which i could somewhat use
with
|
by: Julio Delgado |
last post by:
Hi:
I am new to try to programm an application accesing a SOAP Server. The only
information I have about the server is the http://servername/rfid and that
it is running on port 50002 . How can I access this SOAP server. I try to
add a web reference on VS2003 and I get the following error The proxy
settings on this computer are not configured correctly for web discovery. I
know I can access the web services from Google site. Any...
| |
by: Pieter Coucke |
last post by:
Hi,
Which technology's are used to make Windows Forms (Fat) Client - Server
application with VB.NET (2.0)?
- XML Webservices, Remoting, DCOM, ... are there others?
- Which are used the most and why?
- Pro's and cons?
Any help or usefull links would be really appreciated!
|
by: johnmiloo |
last post by:
Can some one get me started with a working SOAP server that works over
https. (SSL)?
I have M2Crypto installed and found the following sample, but something
is wrong in ssl_context = SSL.Context()
Any help or tutorial appreciated?
from SOAPpy import SOAPServer
|
by: gezerpunta |
last post by:
Hi
I have to find a soap client to be able to connet to java apache soap
server.And I must send a file and envelope xml.I found nusoap but I
can t achieve to communicate it.
Does anybody knows anything about it?
thks.
|
by: shreedhan |
last post by:
hi i am trying to write a simple client server chat program.
the code of server program is:
#define PORT 9999
int main()
{
struct sockaddr_in server_addr,client_addr;
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
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...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
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...
| |