Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ gsoap wsdl2h在wcf wsdl文件上失败_C++_Linux_Wcf_Gsoap - Fatal编程技术网

C++ gsoap wsdl2h在wcf wsdl文件上失败

C++ gsoap wsdl2h在wcf wsdl文件上失败,c++,linux,wcf,gsoap,C++,Linux,Wcf,Gsoap,我在一个wsdl文件上使用gsoap工具wsdl2h,该文件是在VisualStudio中为WCF服务添加服务引用时由windows客户端自动生成的 wsdl2h -o service.h service.wsdl ** The gSOAP WSDL/Schema processor for C and C++, wsdl2h release 2.8.9 ** Copyright (C) 2000-2012 Robert van Engelen, Genivia Inc. ** All

我在一个wsdl文件上使用gsoap工具wsdl2h,该文件是在VisualStudio中为WCF服务添加服务引用时由windows客户端自动生成的

wsdl2h -o service.h service.wsdl

**  The gSOAP WSDL/Schema processor for C and C++, wsdl2h release 2.8.9
**  Copyright (C) 2000-2012 Robert van Engelen, Genivia Inc.
**  All Rights Reserved. This product is provided "as is", without any warranty.
**  The wsdl2h tool is released under one of the following two licenses:
**  GPL or the commercial license by Genivia Inc. Use option -l for details.

Saving service.h

Cannot open file 'typemap.dat'
Problem reading type map file 'typemap.dat'.
Using internal type definitions for C++ instead.


Reading file 'service.wsdl'...

Connecting to 'http://tempuri.org/' to retrieve schema...
Connected, receiving...
Redirected to 'http://www.tempuri.org/'...

Connecting to 'http://www.tempuri.org/' to retrieve schema...
Connected, receiving...

An error occurred while parsing schema from ''
Error 3 fault: SOAP-ENV:Client [no subcode]
"Validation constraint violation: tag name or namespace mismatch in element 'html'"
Detail: [no detail]
HTTP/1.1 200 OK
Date: Tue, 04 Sep 2012 15:01:27 GMT
Server: Apache
Last-Modified: Sat, 01 Sep 2012 12:46:28 GMT
ETag: "16ca6ab-441-4c0d3100"
Accept-Ranges: bytes
Content-Length: 1089
Connection: close
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en-US">
<!-- ** HERE ** -->

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tempuri</title>
<link rel="stylesheet" href="/style.css" type="text/css" media="screen" /></head>

<body>

<div id="wrap">
<div id="topnavbar">
</div>

<div id="header">
        <div class="headerleft">
                <h4><a href="/">Tempuri</a></h4>
        </div>
</div>

<div id="navbar">

<div id="navbarleft">
<ul id="nav">
<li><a href="/">Startseite</a></li></ul>
</div>
<div id="navbarright">
</div>

</div>
<div class="clear"></div>

<div id="content">


<div id="sidebar">


        <ul id="sidebarwidgeted">
                                <li class="widget widget_recent_entries"><span>Menü</span><ul>
                                <li><a href="/">Startseite</a></li></ul>
                </li></ul>
</div>
<div id="contentleft"><div class="postarea">
</div></div>
</div>
<div class="clear"></div>

<div id="footer">

        <p></p>

</div>
</div></body>
</html

If this schema namespace is considered "built-in", then add
  namespaceprefix = <namespaceURI>
to typemap.dat.
wsdl2h-o service.h service.wsdl
*C和C++的GSOAP WSDL/schema处理器,WSDL2H版本2.89
**版权所有(C)2000-2012罗伯特·范恩格伦,Genivia公司。
**版权所有。本产品按“原样”提供,无任何保修。
**wsdl2h工具根据以下两个许可证之一发布:
**GPL或Genivia Inc.的商业许可证。有关详细信息,请使用选项-l。
储蓄服务
无法打开文件“typemap.dat”
读取类型映射文件“typemap.dat”时出现问题。
使用C++内部类型定义。
正在读取文件“service.wsdl”。。。
连接到'http://tempuri.org/'要检索架构。。。
已连接,正在接收。。。
重定向到'http://www.tempuri.org/'...
连接到'http://www.tempuri.org/'要检索架构。。。
已连接,正在接收。。。
从“”分析架构时出错
错误3错误:SOAP-ENV:客户端[无子代码]
“验证约束冲突:元素'html'中的标记名或命名空间不匹配”
细节:[无细节]
HTTP/1.1200ok
日期:2012年9月4日星期二15:01:27 GMT
服务器:Apache
最后修改:2012年9月1日星期六12:46:28 GMT
ETag:“16ca6ab-441-4c0d3100”
接受范围:字节
内容长度:1089
连接:关闭
内容类型:text/html;字符集=UTF-8
坦普里
  • Men\195¼


我已将以下内容添加到

它现在生成一个头文件

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TycoFileDownload" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsp:Policy wsu:Id="WSHttpBinding_ITycoFileDownload_policy">
    <wsp:ExactlyOne>
      <wsp:All>
        <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <wsp:Policy>
            <sp:ProtectionToken>
              <wsp:Policy>
                <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
                  <wsp:Policy>
                    <sp:RequireDerivedKeys />
                    <sp:BootstrapPolicy>
                      <wsp:Policy>
                        <sp:SignedParts>
                          <sp:Body />
                          <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
                          <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
                          <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
                          <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
                          <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
                          <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
                          <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
                        </sp:SignedParts>
                        <sp:EncryptedParts>
                          <sp:Body />
                        </sp:EncryptedParts>
                        <sp:SymmetricBinding>
                          <wsp:Policy>
                            <sp:ProtectionToken>
                              <wsp:Policy>
                                <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
                                  <wsp:Policy>
                                    <sp:RequireDerivedKeys />
                                  </wsp:Policy>
                                </sp:SpnegoContextToken>
                              </wsp:Policy>
                            </sp:ProtectionToken>
                            <sp:AlgorithmSuite>
                              <wsp:Policy>
                                <sp:Basic256 />
                              </wsp:Policy>
                            </sp:AlgorithmSuite>
                            <sp:Layout>
                              <wsp:Policy>
                                <sp:Strict />
                              </wsp:Policy>
                            </sp:Layout>
                            <sp:IncludeTimestamp />
                            <sp:EncryptSignature />
                            <sp:OnlySignEntireHeadersAndBody />
                          </wsp:Policy>
                        </sp:SymmetricBinding>
                        <sp:Wss11>
                          <wsp:Policy />
                        </sp:Wss11>
                        <sp:Trust10>
                          <wsp:Policy>
                            <sp:MustSupportIssuedTokens />
                            <sp:RequireClientEntropy />
                            <sp:RequireServerEntropy />
                          </wsp:Policy>
                        </sp:Trust10>
                      </wsp:Policy>
                    </sp:BootstrapPolicy>
                  </wsp:Policy>
                </sp:SecureConversationToken>
              </wsp:Policy>
            </sp:ProtectionToken>
            <sp:AlgorithmSuite>
              <wsp:Policy>
                <sp:Basic256 />
              </wsp:Policy>
            </sp:AlgorithmSuite>
            <sp:Layout>
              <wsp:Policy>
                <sp:Strict />
              </wsp:Policy>
            </sp:Layout>
            <sp:IncludeTimestamp />
            <sp:EncryptSignature />
            <sp:OnlySignEntireHeadersAndBody />
          </wsp:Policy>
        </sp:SymmetricBinding>
        <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <wsp:Policy />
        </sp:Wss11>
        <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <wsp:Policy>
            <sp:MustSupportIssuedTokens />
            <sp:RequireClientEntropy />
            <sp:RequireServerEntropy />
          </wsp:Policy>
        </sp:Trust10>
        <wsaw:UsingAddressing />
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsp:Policy wsu:Id="WSHttpBinding_ITycoFileDownload_GetUpdate_Input_policy">
    <wsp:ExactlyOne>
      <wsp:All>
        <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <sp:Body />
          <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
        </sp:SignedParts>
        <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <sp:Body />
        </sp:EncryptedParts>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsp:Policy wsu:Id="WSHttpBinding_ITycoFileDownload_GetUpdate_output_policy">
    <wsp:ExactlyOne>
      <wsp:All>
        <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <sp:Body />
          <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
        </sp:SignedParts>
        <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <sp:Body />
        </sp:EncryptedParts>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsp:Policy wsu:Id="WSHttpBinding_ITycoFileDownload_GetLicenseAgreement_Input_policy">
    <wsp:ExactlyOne>
      <wsp:All>
        <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <sp:Body />
          <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
        </sp:SignedParts>
        <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <sp:Body />
        </sp:EncryptedParts>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsp:Policy wsu:Id="WSHttpBinding_ITycoFileDownload_GetLicenseAgreement_output_policy">
    <wsp:ExactlyOne>
      <wsp:All>
        <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <sp:Body />
          <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" />
          <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
        </sp:SignedParts>
        <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <sp:Body />
        </sp:EncryptedParts>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsdl:types>
    <xsd:schema targetNamespace="http://tempuri.org/Imports">
      <xsd:import namespace="http://tempuri.org/" />
      <xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
      <xsd:import namespace="http://schemas.microsoft.com/Message" />
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="ITycoFileDownload_GetUpdate_InputMessage">
    <wsdl:part name="parameters" element="tns:GetUpdate" />
  </wsdl:message>
  <wsdl:message name="ITycoFileDownload_GetUpdate_OutputMessage">
    <wsdl:part name="parameters" element="tns:GetUpdateResponse" />
  </wsdl:message>
  <wsdl:message name="ITycoFileDownload_GetLicenseAgreement_InputMessage">
    <wsdl:part name="parameters" element="tns:GetLicenseAgreement" />
  </wsdl:message>
  <wsdl:message name="ITycoFileDownload_GetLicenseAgreement_OutputMessage">
    <wsdl:part name="parameters" element="tns:GetLicenseAgreementResponse" />
  </wsdl:message>
  <wsdl:portType name="ITycoFileDownload">
    <wsdl:operation name="GetUpdate">
      <wsdl:input wsaw:Action="http://tempuri.org/ITycoFileDownload/GetUpdate" message="tns:ITycoFileDownload_GetUpdate_InputMessage" />
      <wsdl:output wsaw:Action="http://tempuri.org/ITycoFileDownload/GetUpdateResponse" message="tns:ITycoFileDownload_GetUpdate_OutputMessage" />
    </wsdl:operation>
    <wsdl:operation name="GetLicenseAgreement">
      <wsdl:input wsaw:Action="http://tempuri.org/ITycoFileDownload/GetLicenseAgreement" message="tns:ITycoFileDownload_GetLicenseAgreement_InputMessage" />
      <wsdl:output wsaw:Action="http://tempuri.org/ITycoFileDownload/GetLicenseAgreementResponse" message="tns:ITycoFileDownload_GetLicenseAgreement_OutputMessage" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="WSHttpBinding_ITycoFileDownload" type="tns:ITycoFileDownload">
    <wsp:PolicyReference URI="#WSHttpBinding_ITycoFileDownload_policy" />
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetUpdate">
      <soap12:operation soapAction="http://tempuri.org/ITycoFileDownload/GetUpdate" style="document" />
      <wsdl:input>
        <wsp:PolicyReference URI="#WSHttpBinding_ITycoFileDownload_GetUpdate_Input_policy" />
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsp:PolicyReference URI="#WSHttpBinding_ITycoFileDownload_GetUpdate_output_policy" />
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetLicenseAgreement">
      <soap12:operation soapAction="http://tempuri.org/ITycoFileDownload/GetLicenseAgreement" style="document" />
      <wsdl:input>
        <wsp:PolicyReference URI="#WSHttpBinding_ITycoFileDownload_GetLicenseAgreement_Input_policy" />
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <wsp:PolicyReference URI="#WSHttpBinding_ITycoFileDownload_GetLicenseAgreement_output_policy" />
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="TycoFileDownload">
    <wsdl:port name="WSHttpBinding_ITycoFileDownload" binding="tns:WSHttpBinding_ITycoFileDownload">
      <soap12:address location="http://localhost:8733/Design_Time_Addresses/TycoUpdateServerLibrary/Service1/" />
      <wsa10:EndpointReference>
        <wsa10:Address>http://localhost:8733/Design_Time_Addresses/TycoUpdateServerLibrary/Service1/</wsa10:Address>
        <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
          <Dns>localhost</Dns>
        </Identity>
      </wsa10:EndpointReference>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"