我在他的公司升级了JDEdwards ERP系统之后,从我的客户那里接受了wsdl(仅为了清晰起见,只是粘贴了部分内容)。
<message name="createSalesOrder2C">
<part name="createSalesOrder2C" element="tns:createSalesOrder2C"/>
</message>
<message name="createSalesOrder2CResponse">
<part name="createSalesOrder2CResponse" element="tns:createSalesOrder2CResponse"/>
</message>
<message name="BusinessServiceException">
<part name="fault" element="tns:BusinessServiceException"/>
</message>
<portType name="CreateSalesOrderManager">
<operation name="createSalesOrder2C">
<input wsam:Action="http://oracle.e1.bssv.JP5F0013/CreateSalesOrderManager/createSalesOrder2CRequest" message="tns:createSalesOrder2C"/>
<output wsam:Action="http://oracle.e1.bssv.JP5F0013/CreateSalesOrderManager/createSalesOrder2CResponse" message="tns:createSalesOrder2CResponse"/>
<fault message="tns:BusinessServiceException" name="BusinessServiceException" wsam:Action="http://oracle.e1.bssv.JP5F0013/CreateSalesOrderManager/createSalesOrder2C/Fault/BusinessServiceException"/>
</operation>
</portType>
<binding name="CreateSalesOrderManagerPortBinding" type="tns:CreateSalesOrderManager">
<wsp:PolicyReference URI="#bssvpolicy"/>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="createSalesOrder2C">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="BusinessServiceException">
<soap:fault name="BusinessServiceException" use="literal"/>
</fault>
</operation>
</binding>
<service name="CreateSalesOrderManagerService">
<port name="CreateSalesOrderManagerPort" binding="tns:CreateSalesOrderManagerPortBinding">
<soap:address location="https://domain_removed/CreateSalesOrderManager"/>
</port>
</service>
它是Oracle JDEdwards ERP终端的一部分 我的问题是,更新后,定义丢失了,我只有“文字”的东西。尝试了几种方法,并以:
结束try{
$soap = new WSSoapClient2($wsdl,[
'cache_wsdl' => WSDL_CACHE_NONE,
'stream_context' => $context,
'trace' => true,
'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL,
'location' => 'https://xxx/CreateSalesOrderManager',
]);
$request = array(
'AddressNumber' => 1,
'ShipToNumber' => 1,
'Reference1' => 'ORDER1234',
'RequestedDate' => '2018-03-26T09:00:00',
'Items' => array(
array(
'Quantity' => 5,
'UnitOfMeasure' => 'SZ', // SZ - sztuka - Case Sentitive
'ItemNumber' => '0705',
),
array(
'Quantity' => 14,
'UnitOfMeasure' => 'SZ', // SZ - sztuka - Case Sentitive
'ItemNumber' => '0715',
),
array(
'Quantity' => 17,
'UnitOfMeasure' => 'SZ', // SZ - sztuka - Case Sentitive
'ItemNumber' => '0750',
)
),
);
$response = $soap->createSalesOrder2C($request);
} catch (SoapFault $e){ }
这给了我 Reqest 结果,如
<SOAP-ENV:Body>
<ns1:createSalesOrder2C/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
不知道,为什么它是空的。我在JD Upgrade之前的版本中拥有的WSDL具有所有定义和请求,我提供了创建适当的soap body。
答案 0 :(得分:0)
在空闲时间尝试了几次后,我设法解决了这个问题。
JDEdwars升级到另一个&#34;标准&#34; (WS标准)。并且在不同的文件中定义了类型(我没有注意到)
<types>
<xsd:schema>
<xsd:import
namespace="http://oracle.e1.bssv.JP5F0013/"
schemaLocation="https://domain.x/CreateSalesOrderManager?xsd=1"
/>
</xsd:schema>
</types>
通过改变区分大小写来解决问题。例如,AddressNumber
成为addressNumber
, DOES 在这种情况下很重要。