Mr. Grün,

 

I followed your suggestion.

Here is my unsuccessful attempt.

The request is failing on SOAPAction that should be a SOAP operation.

Our Web Service has multiple operations.

 

let $uri := 'https://…/”

 

return http:send-request(

  <http:request method="POST" href="{$uri}" timeout='120'>

    <http:header name="SOAPAction" value="getArrestReportsForExport"/>

    <http:body media-type='application/xml'>

        <soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:miam="http://miamiarrest.ws.ts";>

         <soapenv:Header/>

         <soapenv:Body>

            <miam:getArrestReportsForExport>

               <miam:agencyId>000</miam:agencyId>

               <miam:passphrase> password </miam:passphrase>

               <miam:fromDate>2022-08-12T06:35:01</miam:fromDate>

            </miam:getArrestReportsForExport>

         </soapenv:Body>

      </soapenv:Envelope>

    </http:body>

  </http:request>

)

 

Getting back the following error:

   <faultstring>no SOAPAction header!</faultstring>

 

Here is full response:

 

<http:response xmlns:http="http://expath.org/ns/http-client"; status="500" 
message="Internal Server Error">
  <http:header name="connection" value="close"/>
  <http:header name="content-language" value="en-US"/>
  <http:header name="content-security-policy" value="default-src *; style-src * 
'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; media-src *; 
img-src * data:"/>
  <http:header name="content-type" value="text/xml; charset=utf-8"/>
  <http:header name="date" value="Fri, 12 Aug 2022 18:57:02 GMT"/>
  <http:header name="set-cookie" 
value="NSC_bgpsnqse.njbnjebef.hpw_TTM=ffffffff09da352b45525d5f4f58455e445a4a42378b;expires=Fri,
 12-Aug-2022 19:13:41 GMT;path=/;secure;httponly"/>
  <http:header name="strict-transport-security" value="max-age=31536000; 
includeSubDomains"/>
  <http:header name="transfer-encoding" value="chunked"/>
  <http:header name="x-content-type-options" value="nosniff"/>
  <http:header name="x-forwarded-for" value="10.5.34.112"/>
  <http:header name="x-frame-options" value="SAMEORIGIN"/>
  <http:header name="x-powered-by" value="Servlet/3.0"/>
  <http:header name="x-xss-protection" value="1; mode=block"/>
  <http:body media-type="text/xml"/>
</http:response>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode 
xmlns:ns1="http://xml.apache.org/axis/";>ns1:Client.NoSOAPAction</faultcode>
   <faultstring>no SOAPAction header!</faultstring>
   <detail>
    <ns2:hostname 
xmlns:ns2="http://xml.apache.org/axis/";>s0144517</ns2:hostname>
   </detail>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope> 

 

Regards,
Yitzhak Khabinsky

 

From: Christian Grün <christian.gr...@gmail.com> 
Sent: Friday, August 12, 2022 11:56 AM
To: Yitzhak Khabinsky <ykhab...@bellsouth.net>
Cc: BaseX <basex-talk@mailman.uni-konstanz.de>
Subject: Re: [basex-talk] BaseX 10.0 as a SOAP client

 

SOAP calls are nothing else than simple HTTP requests using the POST method and 
XML payloads. You can have a look at the following example [1]. You'll need to 
adjust the target URI and the body (the user/password attributes can possibly 
be dropped if the SOAP server does not require basic or digest authentication).

 

Hope this helps

Christian

 

[1] https://docs.basex.org/wiki/HTTP_Client_Module#POST_Request

 

 

<ykhab...@bellsouth.net <mailto:ykhab...@bellsouth.net> > schrieb am Fr., 12. 
Aug. 2022, 17:48:

Mr. Grün,

The documentation is covering just the REST calls.
I need to make SOAP call.
It seems that it is not coverd in the HTTP_Client_Module documentation.

It is not clear how to specify an operation/method on a SOAP service.

Here is a sample of the request exposed via SoapUI.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:miam="http://miamiarrest.ws.ts";>
   <soapenv:Header/>
   <soapenv:Body>
      <miam:getArrestReportsForExport>
         <miam:agencyId>000</miam:agencyId>
         <miam:passphrase>password</miam:passphrase>
         <miam:fromDate>2022-08-02T06:35:01</miam:fromDate>
      </miam:getArrestReportsForExport>
   </soapenv:Body>
</soapenv:Envelope>



Regards,
Yitzhak Khabinsky

-----Original Message-----
From: Christian Grün <christian.gr...@gmail.com 
<mailto:christian.gr...@gmail.com> > 
Sent: Friday, August 12, 2022 7:41 AM
To: Yitzhak Khabinsky <ykhab...@bellsouth.net <mailto:ykhab...@bellsouth.net> >
Cc: BaseX <basex-talk@mailman.uni-konstanz.de 
<mailto:basex-talk@mailman.uni-konstanz.de> >
Subject: Re: [basex-talk] BaseX 10.0 as a SOAP client

Hi Yitzhak,

> Is it possible to make calls to SOAP Web Service from the BaseX 10.0?

That’s no problem; you can use the HTTP Client Module for that [1].

Best,
Christian

[1] https://docs.basex.org/wiki/HTTP_Client_Module

Reply via email to