-1

我一直在使用 GSoap API,并且基于 OS + GSoap 组合有不同的响应。对于 GSoap gsoap_2.8.26,我运行一个已开发的独立 GSoap 服务器并在执行时得到以下信息:http://22.22.222.222:8075/?conmony.wsdl,我得到:

>     <definitions xmlns:tns="urn:monyServer" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:am="urn:conmony"
> xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:HTTP="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
> xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
> xmlns="http://schemas.xmlsoap.org/wsdl/" name="conmony"
> targetNamespace="urn:monyServer"> <types> <schema
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:am="urn:conmony"
> xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:conmony"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> <complexType name="struct-DBJOBSRET"> <!--  am__struct_DBJOBSRET  -->
> <sequence> <element name="TENANTID" type="xsd:int" minOccurs="1"
> maxOccurs="1"/> <!--  am__struct_DBJOBSRET::TENANTID  --> <element
> name="CustomerID" type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::CustomerID  --> <element name="ServiceAddrID"
> type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::ServiceAddrID  --> <element name="JobID"
> type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::JobID  --> <element name="GeneratedJobNo"
> type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::GeneratedJobNo  --> <element name="Purpose"
> type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> <!-- 
> am__struct_DBJOBSRET::Purpose  --> <element name="JobReferenceID"
> type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::JobReferenceID  --> <element
> name="SpecialInstructions" type="xsd:string" minOccurs="0"
> maxOccurs="1" nillable="true"/> <!-- 
> am__struct_DBJOBSRET::SpecialInstructions  --> <element
> name="IsArchived" type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::IsArchived  --> <element name="RecLockType"
> type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::RecLockType  --> <element name="RecLockID"
> type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::RecLockID  --> <element name="RecLockHost"
> type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> <!-- 
> am__struct_DBJOBSRET::RecLockHost  --> <element name="RecLockPID"
> type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::RecLockPID  --> <element name="RecLockTS"
> type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> <!-- 
> am__struct_DBJOBSRET::RecLockTS  --> <element name="ReturnCode"
> type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::ReturnCode  --> <element name="KeyID"
> type="xsd:double" minOccurs="1" maxOccurs="1"/> <!-- 
> am__struct_DBJOBSRET::KeyID  --> <element name="Message"
> type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> <!-- 
> am__struct_DBJOBSRET::Message  --> </sequence> </complexType>
> <complexType name="JOBSRETItems"> <!--  am__JOBSRETItems  -->
> <sequence> <element name="item" type="am:struct-DBJOBSRET"
> minOccurs="0" maxOccurs="unbounded" nillable="false"/> </sequence>
> </complexType> <!--  operation request element  --> <element
> name="scheduleCreateFirst"> <complexType> <sequence> <element
> name="in-TENANTID" type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 
> am__scheduleCreateFirst::in_TENANTID  --> <element
> name="in-CustomerID" type="xsd:int" minOccurs="1" maxOccurs="1"/> <!--
> am__scheduleCreateFirst::in_CustomerID  --> <element
> name="in-ServiceAddrID" type="xsd:int" minOccurs="1" maxOccurs="1"/>
> <!--  am__scheduleCreateFirst::in_ServiceAddrID  --> <element
> name="in-Purpose" type="xsd:string" minOccurs="0" maxOccurs="1"
> nillable="true"/> <!--  am__scheduleCreateFirst::in_Purpose  -->
> <element name="in-SpecialInstructions" type="xsd:string" minOccurs="0"
> maxOccurs="1" nillable="true"/> <!-- 
> am__scheduleCreateFirst::in_SpecialInstructions  --> <element
> name="in-CrewToDoWorkID" type="xsd:int" minOccurs="1" maxOccurs="1"/>
> <!--  am__scheduleCreateFirst::in_CrewToDoWorkID  --> <element
> name="in-DateTaskScheduled" type="xsd:string" minOccurs="0"
> maxOccurs="1" nillable="true"/> <!-- 
> am__scheduleCreateFirst::in_DateTaskScheduled  --> <element
> name="in-CancelUpToDate" type="xsd:string" minOccurs="0" maxOccurs="1"
> nillable="true"/> <!--  am__scheduleCreateFirst::in_CancelUpToDate 
>     --> <element name="in-InvoicePref" type="xsd:int" minOccurs="1" maxOccurs="1"/> <!-- 

am__scheduleCreateFirst::in_InvoicePref -->

函数 am__scheduleCreateFirst 的服务定义 gSOAP 2.8.26 生成的服务定义

但是当我在 Ubuntu 16.04 上使用相同的代码和 Ubuntu 16.04 上的 GSoap 2.8.45 时,我得到以下信息: 这似乎是某种 505 错误。完全相同的代码就是这种情况

在消息交换中出现错误 505:不支持 HTTP 505 HTTP 版本

这是请求和响应标头


不工作

> Request headers:
> 
>    Accept: text/html, application/xhtml+xml, image/jxr, */*   
> Accept-Encoding: gzip, deflate    Accept-Language: en-US   
> Connection: Keep-Alive    Host: 45.76.234.222:8075    User-Agent:
> Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
> like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
> 
> Response Headers:
> 
>    Connection: close    Content-Length: 417    Content-Type: text/xml;
> charset=utf-8    Server: gSOAP/2.8

在职的

> Request Headers:
> 
>    Accept: text/html, application/xhtml+xml, image/jxr, */*   
> Accept-Encoding: gzip, deflate    Accept-Language: en-US   
> Connection: Keep-Alive    Host: 99.48.224.222:8075    User-Agent:
> Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
> like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
> 
> Response:
> 
>    Connection: keep-alive    Content-Length: 6849    Content-Type:
> text/xml    Server: gSOAP/2.8

TIA

4

1 回答 1

0

虚惊。无视帖子。我发现这是由于在编码中寻找环境变量的特定设置。模组,如果你能删除这篇文章那就太好了:-)

于 2017-04-12T15:10:58.700 回答