FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Trouble connecting to a PHP SoapServer module
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Trouble connecting to a PHP SoapServer module [message #184558] Fri, 10 January 2014 21:00 Go to next message
KASmith is currently offline  KASmith
Messages: 2
Registered: January 2014
Karma: 0
Junior Member
I have developed a Soap server program, index.php, written in PHP,
using the PHP built-in SoapServer. I am running this on my development
laptop using Apache and the XAMPP stack. This program loads a
pre-defined WSDL file that defines the Soap locations as:

<wsdl:service name="CB_Server">
<wsdl:port name="CB_ServerSoap" binding="tns:CB_ServerSoap">
<soap:address location="http://localhost/CB_ServerSoap"/>
</wsdl:port>
</wsdl:service>

I am sending requests to it from SoapServer using the address as:
http://localhost/CB_Server/index.php I am also able to edit this
section of the WSDL and have tried quite a few variations on these
values, but always with the results described below.


Each time I try the request, SoapUI shows me the response as the HTML
that Apache sends when it does not recognize the file request. I get:
--other stuff--
<body>
<h1>Object not found!</h1>
<p>The requested URL was not found on this server.


It seems that I am not using the correct address for the Soap request.
I have tried many variations of the address above, as suggested by
various blog messages:
http://localhost/CB_Server/index.php
http://localhost/CB_Server/
http://localhost/CB_Server
http://localhost/index.php
http://localhost/index

I have also loaded this program into a remote server and repeated this
test. I also get the same results, that the server program sends back
a 404 type error," URL was not found on this server".


I wrote an extremely minimal test server and client program and got
the same results from this pair. This led me to concluded that the
problem is not related to using SoapUI. I am completely confused.


Can anyone suggest what the correct address should be?

Or, is there some other factor that could be producing this result?

Is theret a reason that testing using local-host and SoapUI would not
work?


Any insight would be greatly appreciated.


(I would be pleased to post any of these files, or email them to any
interested parties, if that would help in getting this resolved.)

Thanks for thinking about this.
Re: Trouble connecting to a PHP SoapServer module [message #184575 is a reply to message #184558] Sun, 12 January 2014 01:02 Go to previous messageGo to next message
Michael Vilain is currently offline  Michael Vilain
Messages: 88
Registered: September 2010
Karma: 0
Member
In article <73n0d9l0915a27b1i78fcf2kk0k68fmtra(at)4ax(dot)com>,
KASmith <kasmithgroup(at)gmail(dot)com> wrote:

> I have developed a Soap server program, index.php, written in PHP,
> using the PHP built-in SoapServer. I am running this on my development
> laptop using Apache and the XAMPP stack. This program loads a
> pre-defined WSDL file that defines the Soap locations as:
>
> <wsdl:service name="CB_Server">
> <wsdl:port name="CB_ServerSoap" binding="tns:CB_ServerSoap">
> <soap:address location="http://localhost/CB_ServerSoap"/>
> </wsdl:port>
> </wsdl:service>
>
> I am sending requests to it from SoapServer using the address as:
> http://localhost/CB_Server/index.php I am also able to edit this
> section of the WSDL and have tried quite a few variations on these
> values, but always with the results described below.
>
>
> Each time I try the request, SoapUI shows me the response as the HTML
> that Apache sends when it does not recognize the file request. I get:
> --other stuff--
> <body>
> <h1>Object not found!</h1>
> <p>The requested URL was not found on this server.
>
>
> It seems that I am not using the correct address for the Soap request.
> I have tried many variations of the address above, as suggested by
> various blog messages:
> http://localhost/CB_Server/index.php
> http://localhost/CB_Server/
> http://localhost/CB_Server
> http://localhost/index.php
> http://localhost/index
>
> I have also loaded this program into a remote server and repeated this
> test. I also get the same results, that the server program sends back
> a 404 type error," URL was not found on this server".
>
>
> I wrote an extremely minimal test server and client program and got
> the same results from this pair. This led me to concluded that the
> problem is not related to using SoapUI. I am completely confused.
>
>
> Can anyone suggest what the correct address should be?
>
> Or, is there some other factor that could be producing this result?
>
> Is theret a reason that testing using local-host and SoapUI would not
> work?
>
>
> Any insight would be greatly appreciated.
>
>
> (I would be pleased to post any of these files, or email them to any
> interested parties, if that would help in getting this resolved.)
>
> Thanks for thinking about this.

What do localhost's server logs show?

Try running a simple page with only

<?php phpinfo(); ?>

in it. Does it display the text or a page of information on your php
setup?

Have you edited Apache's configuration to enable php and restarted
apache?

--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
Re: Trouble connecting to a PHP SoapServer module [message #184597 is a reply to message #184575] Sun, 12 January 2014 16:23 Go to previous messageGo to next message
KASmith is currently offline  KASmith
Messages: 2
Registered: January 2014
Karma: 0
Junior Member
On Sat, 11 Jan 2014 17:02:58 -0800, Michael Vilain
<vilain(at)NOspamcop(dot)net> wrote:

> In article <73n0d9l0915a27b1i78fcf2kk0k68fmtra(at)4ax(dot)com>,
> KASmith <kasmithgroup(at)gmail(dot)com> wrote:
>
>> I have developed a Soap server program, index.php, written in PHP,
>> using the PHP built-in SoapServer. I am running this on my development
>> laptop using Apache and the XAMPP stack. This program loads a
>> pre-defined WSDL file that defines the Soap locations as:
>>
>> <wsdl:service name="CB_Server">
>> <wsdl:port name="CB_ServerSoap" binding="tns:CB_ServerSoap">
>> <soap:address location="http://localhost/CB_ServerSoap"/>
>> </wsdl:port>
>> </wsdl:service>
>>
>> I am sending requests to it from SoapServer using the address as:
>> http://localhost/CB_Server/index.php I am also able to edit this
>> section of the WSDL and have tried quite a few variations on these
>> values, but always with the results described below.
>>
>>
>> Each time I try the request, SoapUI shows me the response as the HTML
>> that Apache sends when it does not recognize the file request. I get:
>> --other stuff--
>> <body>
>> <h1>Object not found!</h1>
>> <p>The requested URL was not found on this server.
>>
>>
>> It seems that I am not using the correct address for the Soap request.
>> I have tried many variations of the address above, as suggested by
>> various blog messages:
>> http://localhost/CB_Server/index.php
>> http://localhost/CB_Server/
>> http://localhost/CB_Server
>> http://localhost/index.php
>> http://localhost/index
>>
>> I have also loaded this program into a remote server and repeated this
>> test. I also get the same results, that the server program sends back
>> a 404 type error," URL was not found on this server".
>>
>>
>> I wrote an extremely minimal test server and client program and got
>> the same results from this pair. This led me to concluded that the
>> problem is not related to using SoapUI. I am completely confused.
>>
>>
>> Can anyone suggest what the correct address should be?
>>
>> Or, is there some other factor that could be producing this result?
>>
>> Is theret a reason that testing using local-host and SoapUI would not
>> work?
>>
>>
>> Any insight would be greatly appreciated.
>>
>>
>> (I would be pleased to post any of these files, or email them to any
>> interested parties, if that would help in getting this resolved.)
>>
>> Thanks for thinking about this.
>
> What do localhost's server logs show?
>
> Try running a simple page with only
>
> <?php phpinfo(); ?>
>
> in it. Does it display the text or a page of information on your php
> setup?
>
> Have you edited Apache's configuration to enable php and restarted
> apache?

Michael,

Thanks for the suggestions.

My problem is specifically with the SoapServer operation. As I
understand it, when SoapServer is instantiated, Apache (the web server
I am using) creates a "child process" which runs separately from the
normal Apache process of serving up HTML pages (which continues
normally).

Apparently, when I send a SOAP message into Apache, it is being
handled by the normal HTML server, not being sent to the SOAP server.
That is what I am trying to figure out.

I took your suggestion and reviewed the server logs. They show a
number of warning messages, but after reading about them, I don't
think they show anything sinister.

Yes, php is enabled in Apache, as the SoapServer program does run.

I am now looking for an understanding of how the incoming Soap
messages get routed to the "child process" that is supposed to handle
them. That seems to be my problem.
Re: Trouble connecting to a PHP SoapServer module [message #184633 is a reply to message #184597] Mon, 13 January 2014 15:22 Go to previous message
Jonathan Stein is currently offline  Jonathan Stein
Messages: 43
Registered: September 2010
Karma: 0
Member
Den 12-01-2014 17:23, KASmith skrev:

> My problem is specifically with the SoapServer operation. As I
> understand it, when SoapServer is instantiated, Apache (the web server
> I am using) creates a "child process" which runs separately from the
> normal Apache process of serving up HTML pages (which continues
> normally).

If you're using SOAP over HTTP, a SOAP message is no different from any
other HTTP request.

Basically, Apache forwards the request to the PHP interpreter, and the
response is sent back to the client - just as any other request to a PHP
page.

> Yes, php is enabled in Apache, as the SoapServer program does run.

How do you conclude that the SoapServer program runs?

When you have this line:
<soap:address location="http://localhost/CB_ServerSoap"/>
in your WSDL, you must of course run the server and the client on the
same machine.

But on the local machine, you should also be able to browse to
http://localhost/CB_ServerSoap
(the SOAP server will respond with an error message about an invalid
SOAP call, but you should not get a "404 Not found" error).

Regards

Jonathan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Switch question
Next Topic: php.ini loading
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 03:03:14 GMT 2024

Total time taken to generate the page: 0.02337 seconds