on 03-23-2011 7:12 PM
Hello:
I am attempting to invoke a web service that resides in our corporate PI 7.11 EhP3 environment, from another web service that resides outside of PI. Our PI environment is set up to require credentials (globally) for invoking web services, and the PI web service itself is expecting parameters in a SOAP/XML structure.
I have successfully invoked the PI web service from within Microsoft VB 6 and Active Server Pages, using the XMLHttp object and supplying credentials when opening the object and then supplying the parameters via send:
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.3.0")
With objXMLHTTP
.setTimeouts 0, 0, 0, 0
.Open "POST", g_strBaseURLPI, False, g_strUser, g_strPWD
.setRequestHeader "Content-Type", "text/xml"
.setRequestHeader "Connection", "close"
.setRequestHeader "SOAPAction", g_strSOAPAction
.send p_strRequest
strResponseHeaders = .getAllResponseHeaders
strResponse = .responseText
End With
The Base URL is the one which is revealed when executing the web service via WSNavigator.
This logic returns the results I expect. However, when I apply the identical invocation logic into another web service within our corporate network (created in Microsoft Visual Studio.Net 2003) I do not get the same results. I've tried various options, including using "GET", applying the input parameters as part of a URL querystring, etc. But I'm still not able to get a successful invocation.
Can anyone assist with this question? Thanks in advance,
-- Chris
I've been shown by a colleague (who is more experienced in .Net than am I) that this can be achieved by adding the target web service's WSDL to my invoking web service as a Web Reference. The original logic I was using, though working from VB 6 and Active Server Pages, can be simplified through the use of the WSDL definition for implementation in .Net.
Thank you for your responses,
-- Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please advise what is the returning exception with the HTTP headers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What's the invoking error?
How are you passing the parameters?
You have to pass parameters login, by adding at the url the string "&sap-user=<user>&sap-password=<password>"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.