cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with OSI PI WCF Web Service with wshttpbinding

Former Member
0 Likes
729

Hi Experts,

System Details:

SAP MII 14 SP4

OSI PI Web Service: PITimeSeries

I am having issue when trying to call OSI PI web service using http post. it is returning status 0 when i am using exception handler in BLS.

Same web service works fine with basichttpbinding (SOAP 1.1)  but with wshttpbinding (SOAP 1.2) it is giving error.

Following are Web config binding details for web service.

      <wsHttpBinding>

        <binding name="wsBinding_2011" sendTimeout="00:01:00" receiveTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">

          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />

          <security mode="Message">

            <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />

          </security>

        </binding>

      </wsHttpBinding>

I am not sure it could be the issue with passing windows credentials.

Did anybody consumed WCF web service with wshttpbinding with security mode as Message and clientCredentialType as Windows.

Also i was trying to pass MYSAPSSO2 SSO token to service in http post but first i am not sure if this is correct windows token and second which header property of service should be mapped and i am not sure that I am going into correct direction or not.

Please let me know what i am missing.

I have tried following other options and tools:

SOAP UI: basichttpbinding works fine for wshttpbinding receiving Internal Server error in log and Response as

                  The security context token is expired or is not valid.

MII Web Service Action Block: basichttpbinding works fine for wshttpbinding not able to configure url through wizard because as per                                                                              my discussion with other MII experts MII does not support SOAP1.2. that is one reason for using http post.


WCF Storm: both bindings works fine (There is option to select windows authentication and Impersonation level as delegation)

WCF Test Client: Both bindings works fine

Any help is appreciated.

Thanks & Regards,

Manoj Bilthare

Accepted Solutions (0)

Answers (2)

Answers (2)

salvatore_castro
Product and Topic Expert
Product and Topic Expert
0 Likes

What do you see in the StatusCode, StatusText and ResponseAsString fields for the HTTP Post action?

Please also share the URL details and also what you have set in the "RequestProperties" map field (if any).

Sam

Former Member
0 Likes

Hi Sam,

URL: http://<server:port>/PIWebServices/PITimeSeries.svc?wsdl

Request Property using map:

Operation: GetProductVersion or GetPIArchieveData

SOAPAction: http://xml.osisoft.com/services/IPITimeSeries/GetProductVersion or http://xml.osisoft.com/services/IPITimeSeries/GetPIArchieveData

Additional Details:

without SSO setting: Status Code = 0 and Status Text = Blank

with SSO setting: Status Code = 400 and Status Text = Bad request

I tried by passing Credentials/ User Name and Password but same errors.

Please let me know if more details required.

Thanks & Regards,

Manoj Bilthare

salvatore_castro
Product and Topic Expert
Product and Topic Expert
0 Likes

Yes, what do you see in the ResponseAsString field of the action?  This will show the response body and additional details about the "Bad Request" error you see in the status text.


Sam

Former Member
0 Likes

Hi Sam,

Sorry I missed ResposeAsString in my post its blank for both cases.

The action block is failing with uncaught exception I am getting status code and test using catch.

Thanks & Regards,

Manoj Bilthare

salvatore_castro
Product and Topic Expert
Product and Topic Expert
0 Likes

No worries Manoj and have you been able to verify that the services are indeed valid ones...I recommend using a developer tool like SOAP UI ( SoapUI - The Home of Functional Testing) to test and verify the SOAP service is even working properly.

Then from here, if it does work, I can help you to translate what SOAP UI is doing to the MII action blocks.


Sam

Former Member
0 Likes

Hi Sam,

The web service is valid following are details of testing on various tools.

SOAP UI: basichttpbinding works fine for wshttpbinding receiving Internal Server error in log and Response as The security context token is expired or is not valid.

MII Web Service Action Block: basichttpbinding works fine for wshttpbinding not able to configure url through wizard because as per my discussion with other MII experts MII does not support SOAP1.2. that is one reason for using http post.


WCF Storm: both bindings works fine (There is option to select windows authentication and Impersonation level as delegation)


WCF Test Client: Both bindings works fine


Please let me know if additional details required.


Thanks & Regards,

Manoj Bilthare

Former Member
0 Likes

Hi Experts,

In addition to this I tried following configuration in http post now i am receiving Bad Request Error.

Thanks & Regards,

Manoj Bilthare