Re: RE: SOAP connect error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11 February 2010 16:04, Eric Lommatsch <EricL@xxxxxxxxxxxx> wrote:
>
>>Are you using wsdl? If so, does the WSDL file contain the information that
> the port to use for the requests is on port 8080?
>>
>>--
>>-----
>>Richard Quadling
>>"Standing on the shoulders of some very clever giants!"
>>EE : http://www.experts-exchange.com/M_248814.html
>>EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
>>Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
>>ZOPA : http://uk.zopa.com/member/RQuadling
>
> First, I am sorry for not getting back to this yesterday. I had some other
> things come up.
>
> As far as I know this website is using WSDL. I know that one of the early
> issues I ran into in trying to get this to work was not having the wsdl.php
> file in the path.
>
> That having been said are you talking about the wsdl file on the server that
> is providing the service or are you talking about the wsdl file on the system
> hosting the webpage.
>
> I can get everything to work correctly when I am working from our internal
> development server. But when I attempt to put the file on the hosted site our
> clients would ultimately be using I am getting the connect error.
>
> I have compared the wsdl.php files on these two servers and neither of them
> have specific information about the port in them.
>
> Here is the code that I am using to connect to the webservice:
>
>        $webservices_uri =
> "http://xx.xx.xx.xx:8080/jasperserver/services/repository";;
>
> Here is the code where I am trying to connect:
>
>        function ws_checkUsername($username, $password)
>        {
>                $connection_params = array("user" => $username, "pass" =>
> $password);
>                $info = new SOAP_client($GLOBALS["webservices_uri"], false,
> false, $connection_params);
>
>                $op_xml = "<request
> operationName=\"list\"><resourceDescriptor name=\"\" wsType=\"folder\"
> uriString=\"\" isNew=\"false\">".
>                "<label></label></resourceDescriptor></request>";
>
>                $params = array("request" => $op_xml );
>                $response = $info->call("list",$params,array('namespace' =>
> $GLOBALS["namespace"]));
>
>                return $response;
>        }
>
> This is working when I use the IP address of the server behind the firewall,
> but when I try to use the address that is open through the firewall it is not
> connecting. I can connect to the external IP address by entering it into the
> browser and it does ask for the username and password.
>
> Thank you
>
> Eric H. Lommatsch
> Programmer
> 360 Business
> 2087 South Grant Street
> Denver, CO 80210
> Tel 303-777-8939 Ext 23
> Fax 888-282-9927
>
> ericl@xxxxxxxx
>

Run this at the command line ...

php -r "echo file_get_contents('http://www.google.com');"

Do you get the google home page?

I suspect your browser is using a proxy, but your default gateway is
set to something different


There should only be 1 WSDL url. That is the URL of the WSDL file
associated with the service you are using.

It may be cached to a physical file.

Either way, it probably doesn't know that YOU are behind a firewall.

So. You need to proxy the calls.

You can use the default stream context.

Take a look at my user note on
http://www.php.net/manual/en/function.stream-context-get-default.php.
The site it relates to is probably dead now.

You may be able to assign the proxy details to the SOAPClient.

"For HTTP authentication, the login and password options can be used
to supply credentials. For making an HTTP connection through a proxy
server, the options proxy_host, proxy_port, proxy_login and
proxy_password are also available. For HTTPS client certificate
authentication use local_cert and passphrase options. An
authentication may be supplied in the authentication option. The
authentication method may be either SOAP_AUTHENTICATION_BASIC
(default) or SOAP_AUTHENTICATION_DIGEST."
(http://www.php.net/manual/en/soapclient.soapclient.php#soapclient.soapclient.parameters)


Does any of that help?

-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux