Hi all,

I call my Axis services from Oracle's pl/sql.

If I know my message's size and set the Content-length header of the message everything is works weel. Here is the code:

   http_req := utl_http.begin_request(url, 'POST','HTTP/1.0');
   utl_http.set_header(http_req, 'Content-Type', 'text/xml');
   utl_http.set_header(http_req, 'Content-Length', length(env));
   utl_http.set_header(http_req, 'SOAPAction', req.method);
   utl_http.write_text(http_req, env);
   http_resp := utl_http.get_response(http_req);
   utl_http.read_text(http_resp, env);
   utl_http.end_response(http_resp);
   ...

If I don't know myt message's size I have to use the 'Transfer-Encoding', 'chunked' header. In this case I get the following error from the Axis:

<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXParseException: Content is not allowed in prolog.</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>


code:

   utl_http.set_header(http_req, 'Transfer-Encoding', 'chunked');
   utl_http.set_header(http_req, 'Content-Type', 'text/xml');
   utl_http.set_header(http_req, 'SOAPAction', req.method);
   utl_http.write_text(http_req, env);
   http_resp := utl_http.get_response(http_req);
   utl_http.read_text(http_resp, env);
   utl_http.end_response(http_resp);

Any idea?

thanks




Reply via email to