如何从Windows主机

时间:2017-02-08 14:09:26

标签: php soap proxy wsdl

我在localhost中有一个php项目,我可以从http://localhost:8000访问,我有一个在docker容器中运行的服务,我可以从http://192.168.56.100:8080访问它。要访问http://192.168.56.100:8080我必须在这样的手动代理下配置我的浏览器(这是来自firefox配置)

http proxy: proxy.comp.mycompanyname.com
No proxy for: localhost, 127.0.0.1,192.168.56.0/24

如果我在上面配置浏览器,那么我可以从浏览器访问此服务http://192.168.56.100:8080

现在的问题是,我想从windows机器中的localhost连接我的php项目中的服务。我试过这个

$client = new Soapclient("http://192.168.56.100:8080");

这给了我错误

PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'SoapFault: Could not connect to host"

我想我在某处遗漏了一些代理配置,但不知道在哪里。怎么解决这个问题?

运行以下命令给我这个

$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER    ERRORS
default   *        virtualbox   Running   tcp://192.168.56.100:2376           v1.12.3

我的码头工人撰写文件

version: '2'
services:
  idtool3-mysql-gpas:
      image: mysql:5.7
      container_name: tmf-gpas-1.7.8-mysql
      environment:
        MYSQL_RANDOM_ROOT_PASSWORD: "gpas_2016"
      volumes:
        - ./gpas/sqls:/docker-entrypoint-initdb.d
      labels:
        - "service-name:gpas"
        - "service-type:db-srv"
        - "environment:test"

  idtool3-gpas-wildfly:
    image: tmfev/gpas:1.7.8
    container_name: tmf-gpas-1.7.8-wildfly
    links:
      - "idtool3-mysql-gpas:mysqldb"
    ports:
      - "8080:8080"
    depends_on:
      - idtool3-mysql-gpas
    labels:
      - "service-name:gpas"
      - "service-type:app-srv"
      - "environment:test"
    entrypoint: /bin/bash
    command: -c "/opt/wait-for-it.sh mysqldb:3306 -t 120 && /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0"

0 个答案:

没有答案