我正在尝试使用来自 PL/SQL 的 SOAP Web 服务请求。在 SoapUI 中使用相同的信封时,它是成功的。
这是代码:
CREATE OR REPLACE PROCEDURE WEBSERVICE_CALL AUTHID CURRENT_USER AS
req utl_http.req;
RESP UTL_HTTP.RESP;
value VARCHAR2(1024);
P_DATA_TYPE VARCHAR2(6000):= 'application/soap+xml;';
p_data_in VARCHAR2(6000) := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://www.oracle.com/retail/sim/integration/services/StoreFulfillmentOrderService/v1" xmlns:v11="http://www.oracle.com/retail/integration/base/bo/FulfilOrdColDesc/v1" xmlns:v12="http://www.oracle.com/retail/integration/base/bo/FulfilOrdDesc/v1" xmlns:v13="http://www.oracle.com/retail/integration/base/bo/FulfilOrdCustDesc/v1" xmlns:v14="http://www.oracle.com/retail/integration/base/bo/LocOfFulfilOrdCustDesc/v1" xmlns:v15="http://www.oracle.com/retail/integration/localization/bo/BrFulfilOrdCustDesc/v1" xmlns:v16="http://www.oracle.com/retail/integration/custom/bo/EOfBrFulfilOrdCustDesc/v1" xmlns:v17="http://www.oracle.com/retail/integration/base/bo/FulfilOrdDtl/v1">
<soapenv:Header/>
<soapenv:Body>
<v18:createFulfilOrdColDesc xmlns:v18="http://www.oracle.com/retail/rms/integration/services/FulfillOrderService/v1">
<!--Optional:-->
<v11:FulfilOrdColDesc>
<v11:collection_size>1</v11:collection_size>
<!--Zero or more repetitions:-->
<v12:FulfilOrdDesc>
<v12:customer_order_no>SA00469775001</v12:customer_order_no>
<v12:fulfill_order_no>1</v12:fulfill_order_no>
<v12:fulfill_loc_type>S</v12:fulfill_loc_type>
<v12:fulfill_loc_id>19010</v12:fulfill_loc_id>
<v12:partial_delivery_ind>Y</v12:partial_delivery_ind>
<!--Optional:-->
<v12:delivery_type>C</v12:delivery_type>
<v12:consumer_delivery_date>2015-03-30T05:48:37+05:30</v12:consumer_delivery_date>
<!--Optional:-->
<v12:comments>Transfer Testing</v12:comments>
<!--Optional:-->
<v13:FulfilOrdCustDesc>
<!--Optional:-->
<v13:deliver_first_name>Waqas</v13:deliver_first_name>
<!--Optional:-->
<v13:deliver_last_name>Saeed</v13:deliver_last_name>
<!--Optional:-->
<v13:deliver_add1>eXtra Main Building, IT Department</v13:deliver_add1>
<!--Optional:-->
<v13:deliver_county>Saudi Arabia</v13:deliver_county>
<!--Optional:-->
<v13:deliver_city>AL Bahah</v13:deliver_city>
<!--Optional:-->
<v13:deliver_state>01</v13:deliver_state>
<!--Optional:-->
<v13:deliver_country_id>SA</v13:deliver_country_id>
<!--Optional:-->
<v13:deliver_phone>00966506406381</v13:deliver_phone>
<!--Optional:-->
<v13:bill_first_name>Muhammad</v13:bill_first_name>
<!--Optional:-->
<v13:bill_last_name>Makhaly</v13:bill_last_name>
<!--Optional:-->
<v13:bill_add1>eXtra Main Building, IT Department</v13:bill_add1>
<!--Optional:-->
<v13:bill_county>Saudi Arabia</v13:bill_county>
<!--Optional:-->
<v13:bill_city>JEDDAH</v13:bill_city>
<!--Optional:-->
<v13:bill_state>01</v13:bill_state>
<!--Optional:-->
<v13:bill_country_id>SA</v13:bill_country_id>
<!--Optional:-->
<v13:bill_phone>00966581156699</v13:bill_phone>
<!--Optional:-->
</v13:FulfilOrdCustDesc>
<!--1 or more repetitions:-->
<v17:FulfilOrdDtl>
<v17:item>00166517</v17:item>
<v17:order_qty_suom>1.00</v17:order_qty_suom>
<v17:standard_uom>EA</v17:standard_uom>
<v17:transaction_uom>EA</v17:transaction_uom>
<v17:substitute_ind>N</v17:substitute_ind>
<!--Optional:-->
<v17:unit_retail>799.00</v17:unit_retail>
<!--Optional:-->
<v17:retail_curr>SAR</v17:retail_curr>
</v17:FulfilOrdDtl>
</v12:FulfilOrdDesc>
</v11:FulfilOrdColDesc>
</v18:createFulfilOrdColDesc>
</soapenv:Body>
</soapenv:Envelope>';
BEGIN
REQ := UTL_HTTP.BEGIN_REQUEST('http://exvm-cnvrmsapp01.extrastores.com:7118/FulfillOrderBean/FulfillOrderService?WSDL', 'POST');
utl_http.set_header(req, 'SOAPAction', '');
utl_http.set_header(req, 'content-type', p_data_type);
utl_http.set_header(req, 'content-length', length(p_data_in));
utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
utl_http.write_text(req, p_data_in);
resp := utl_http.get_response(req);
DBMS_OUTPUT.PUT_LINE ('status code: ' || RESP .STATUS_CODE);
DBMS_OUTPUT.PUT_LINE ('reason phrase: ' || RESP .REASON_PHRASE);
LOOP
utl_http.read_line(resp, value, TRUE);
dbms_output.put_line(value);
END LOOP;
utl_http.end_response(resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
UTL_HTTP.END_RESPONSE(RESP);
END;
在执行上述过程时,我收到以下错误:状态代码:415 原因短语:不支持的媒体类型
这里有什么问题?j