小编Dav*_*e C的帖子

PHP Soap非WSDL调用:如何传递参数?

我正在尝试在PHP(5.2.5)中进行非WSDL调用.我确定我错过了一些简单的事情.此调用有一个参数,一个名为"timezone"的字符串:

    $URL = 'http://www.nanonull.com/TimeService/TimeService.asmx';

    $client = new SoapClient(null, array(
        'location' => $URL,
        'uri'      => "http://www.Nanonull.com/TimeService/",
        'trace'    => 1,
        ));

// First attempt:
// FAILS: SoapFault: Object reference not set to an instance of an object
   $return = $client->__soapCall("getTimeZoneTime",
       array(new SoapParam('ZULU', 'timezone')),
       array('soapaction' => 'http://www.Nanonull.com/TimeService/getTimeZoneTime')
    );

// Second attempt:
// FAILS: Generated soap Request uses "param0" instead of "timezone"
   $return = $client->__soapCall("getTimeZoneTime",
       array('timezone'=>'ZULU' ),
       array('soapaction' => 'http://www.Nanonull.com/TimeService/getTimeZoneTime')
   );
Run Code Online (Sandbox Code Playgroud)

谢谢你的任何建议 -
戴夫

php soap web-services

10
推荐指数
3
解决办法
4万
查看次数

dockerfile:如何从基本图像中使用CMD或ENTRYPOINT

我有几个不属于我的基础docker图像(所以我不能修改它们).但是,我正在创建新的图像,并安装了其他内容.

我无法弄清楚的是如何告诉dockerfile复制基本图像的CMD(或ENTRYPOINT).像这样的东西:

FROM other:latest
RUN my-extra-install
CMD <use-the-CMD-from-base-image>
Run Code Online (Sandbox Code Playgroud)

我不认为CMD命令有任何直接的语法来做我想要的.我想知道是否有解决方法.

docker dockerfile docker-build

10
推荐指数
2
解决办法
6100
查看次数

Apache HttpClient and PEM certificate files

I'd like to programmatically access a site that requires Client certificates, which I have in PEM files. In this application I don't want to add them to my keystore, use keytool, or openssl if I can avoid doing so. I need to deal with them directly in code.

    HttpClient httpclient = new DefaultHttpClient();
    HttpGet httpget = new HttpGet("https://my.secure.site.com/url");

    // TODO: Specify ca.pem and client.pem here?

    HttpResponse response = httpclient.execute(httpget);
    HttpEntity entity = response.getEntity();

    if (entity != null) {
        entity.consumeContent();
    } …
Run Code Online (Sandbox Code Playgroud)

java pem apache-httpclient-4.x

7
推荐指数
1
解决办法
7167
查看次数

如何从VS 2008命令行更新Web引用?

我们的VS 2008解决方案中有Web引用.我们不签入生成的文件.我需要在巡航控制服务器上更新生成的文件 - 所以我需要一个命令行方法来更新Web引用.有没有办法强迫devenv这样做?

visual-studio

6
推荐指数
1
解决办法
2889
查看次数

Exchange Web服务在哪里:定义了ExtendedPropertyDefinition ID?

在研究如何使用Exchange Web服务时,我看到了这样的示例

Dim PR_DELETED_ON As New ExtendedPropertyDefinition(26255, MapiPropertyType.SystemTime)
Dim PR_SEARCH_KEY As New ExtendedPropertyDefinition(12299, MapiPropertyType.Binary)
Run Code Online (Sandbox Code Playgroud)

第一个参数是一个表示属性ID的int.任何人都可以给我一个指向这些ID号定义位置的指针吗?

exchange-server web-services exchangewebservices

5
推荐指数
2
解决办法
3005
查看次数

如何更改.net SOAP请求的日期格式?

我正在使用一个WSDL,它期望其中一个方法的DateTime参数.当.NET序列化我的调用时,它会创建一个这样的日期参数:

2010-1-1T10:00:00.00

这看起来像序列化程序使用日期格式"s".我需要一种不同的格式,即具有时区偏移的格式:

2010-1-1T10:00:00.00 -4:00

如何指定我希望序列化程序使用的日期格式?(C#或VB.NET)

.net soap

5
推荐指数
1
解决办法
3733
查看次数

PHP Soap Client:如何使用Derived类调用WebService作为参数?

我正在使用PHP 5,并且想要调用定义如下的web服务:

webmethod ( AbstractBase obj );
Run Code Online (Sandbox Code Playgroud)

我正在使用SoapClient(基于wsdl).Web方法期待AbstractBase 的子类.然而,在PHP中,调用soap方法会给我带来这个错误:

    Server was unable to read request. 
        ---> There is an error in XML document  
        ---> The specified type is abstract: name='AbstractBase'

我很确定问题是我必须在Soap调用中指定obj参数的类型- 但我似乎无法找到神奇的词来实现它.

    $client = new SoapClient($WSDL, $soapSettings);
    $obj = array(
        'internal_id' => $internalId,
        'external_id' => $externald,
    );
    $params = array(
        'obj'      => $obj  // How do I say it is of type: DerivedClass?
    );

    $response = $client->webmethod($params);
Run Code Online (Sandbox Code Playgroud)

php soap web-services

2
推荐指数
1
解决办法
7617
查看次数