SOAP 文字 WSDL 请求 JDEdwards

SOAP Literal WSDL request JDEdwards

在我的客户升级了他公司的 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 端点的一部分。
我的问题是,更新后,定义丢失了,我只有 "Literal" 东西。尝试了几种方法,并以:

结束
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 主体。

在空闲时间尝试了几次后,我设法解决了这个问题。

JDEdwars 已升级到另一个 "standard"(WS 标准)。并且在不同的文件中定义了类型(我没有注意到)

<types>
    <xsd:schema>
        <xsd:import 
            namespace="http://oracle.e1.bssv.JP5F0013/"
            schemaLocation="https://domain.x/CreateSalesOrderManager?xsd=1"
        />
    </xsd:schema>
</types>

问题通过更改区分大小写得到解决。例如 AddressNumber 变成了 addressNumber 并且 在这种情况下很重要。