2

I'm trying to use SOAP to call the SQLPLusWebService on an IP21 server. I noticed in the POST message schema there is no user credentials mentioned. For the IP21 system I am attempting to connect to user credentials seem to be required.

> POST /SQLPlusWebService/SQLplusWebService.asmx HTTP/1.1 Host:
> us1sawn03292 Content-Type: text/xml; charset=utf-8 Content-Length:
> length SOAPAction:
> "http://www.aspentech.com/SQLplus.WebService/ExecuteSQL"
> 
> <?xml version="1.0" encoding="utf-8"?> <soap:Envelope
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   <soap:Body>
>     <ExecuteSQL xmlns="http://www.aspentech.com/SQLplus.WebService/">
>       <command>string</command>
>     </ExecuteSQL>   </soap:Body> </soap:Envelope>

I am trying to reach the IP21 WSDL via SOAPUI but am having issues connecting after entering my credentials for the WSDL. I am confirmed that I am able to access the web service with my credentials, but not successfully via SOAP

SOAP Error

Increasingly Idiotic
  • 5,700
  • 5
  • 35
  • 73
Spladel
  • 21
  • 2
  • I know it has been a while, but perhaps this will help you ? https://stackoverflow.com/questions/54970364/aspentech-infoplus-21-how-to-connect-and-query-data – Madgui Aug 01 '19 at 10:10

1 Answers1

0

I know this is an old thread, but I came across it when trying to access the Aspen APRM and IP21 Historian WebServices via POSTMAN.

I eventually managed to get the connection working, so thought I'd leave a note incase anyone is looking in the future as Aspen information is very limited on the Web and not very good within the Aspen eSupport system.

When trying to access the APRM interface via POSTMAN, set the URL to http:// 'ServerName' /Batch21ws/Aspentech.Batch21.Web.Services.dll?Handler=Default

Request type: POST
Authorisation : Basic Auth
Header: SOAPAction: ""
Body: (text/xml)
For the RAW text in the body, use the following format:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"             xmlns:tns="urn:AspentechBatch21WebServices" xmlns:types="urn:AspentechBatch21WebServices/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <tns:xml>
            <inputXml xsi:type="xsd:string">
                <Datasource xmlns='Aspentech.Batch21' name='<ServerName>'> 
                    <Area name='Batch'>
                        <BatchQuery mostRecentBatches="2"/>
                    </Area>;
                </Datasource>
            </inputXml>
        </tns:xml>
    </soap:Body>
</soap:Envelope>

Basically, you can use the APRM Test Tool to test the query and can also generate the XML file from the BatchQuery Tool which gives you the DATASOURCE code, but when using POSTMAN you need to surround this with the Envelope, Body, tns:xml and inputXml code.

When Accessing the IP21 data you use a different method:

URL: http:// <ServerName> /sqlpluswebservice/sqlpluswebservice.asmx/ExecuteSQL
Request type: POST
Authentication: Basic Auth
Body: x-www-form-urlencoded
Body key: command
Body Value: <SQL query>

I'm hoping that this helps the next person trying to access the Aspen Web Interfaces.

Mac Nash
  • 1
  • 1