1

我目前正在处理一项任务,我需要连接到一个肥皂服务并调用一个方法。但我总是得到错误:

“预定义类型不存在。请手动选择类型”

这是soap xml部分的样子:

<soapenv:Body>
  <v2:create>
     <!--Optional:-->
   <v2:data>
    <creator>CREATOR</creator>
    <topicName>TOPICNAME</topicName>
    <typeName>TYPENAME</typeName>
    <variable>
        <technicalName>ArticleNumber</technicalName>
        <value>testpltd1</value>
    </variable>
    <variable>
        <technicalName>cdb_bezeichnung_</technicalName>
        <value>testtd1</value>
    </variable>  
    <variable>
        <technicalName>JobName</technicalName>
        <value>testtd1</value>
    </variable>
    <workflowTypeName>WORKFLOW</workflowTypeName>
     </v2:data>
  </v2:create>

这是我的代码:

DsePortTypeV2Client s = new DsePortTypeV2Client();

s.ClientCredentials.UserName.UserName = USERNAME;
s.ClientCredentials.UserName.Password = PASSWORD;

SetCertificatePolicy();

descriptionDto desc = new descriptionDto();
desc.creator = CREATOR;
desc.topicName = TOPICNAME;
desc.typeName = TYPENAME;
desc.workflowTypeName = WORKFLOW;

variableDto ArticleNumber = new variableDto();
variableDto cdb_bezeichnung_ = new variableDto();
variableDto JobName = new variableDto();

ArticleNumber.technicalName = "ArticleNumber";
ArticleNumber.value = r.id;

cdb_bezeichnung_.technicalName = "cdb_bezeichnung_";
cdb_bezeichnung_.value = r.bezeichnung;

JobName.technicalName = "JobName";
JobName.value = r.bezeichnung;

desc.variable = new variableDto[] { ArticleNumber, cdb_bezeichnung_ , JobName }; 
result res = s.createV2(desc);

或者我是否有可能在通过 ssl 加密之前捕获发送到服务器的命令?

4

1 回答 1

0

我只是调用了错误的方法,远程方法是 s.create 而不是 createV2 所以我的描述当然丢失了。

于 2015-08-17T11:13:31.277 回答