Invoking windchill SOAP call from VB.NET
‎Aug 31, 2011
03:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Aug 31, 2011
03:02 PM
Invoking windchill SOAP call from VB.NET
Hello All,
We deployed a SOAP call for retrieving the ECN information.
We deployed a simple java client for invoking the SOAP call and able to retrieve the ECN information. When we attempt to retrieve the information using VB.NET, we get authorization required (401) exception. We used the same username and password credentials for both the cases.
The following WSDL url
We deployed a SOAP call for retrieving the ECN information.
We deployed a simple java client for invoking the SOAP call and able to retrieve the ECN information. When we attempt to retrieve the information using VB.NET, we get authorization required (401) exception. We used the same username and password credentials for both the cases.
The following WSDL url
Labels:
- Labels:
-
Other
7 REPLIES 7
‎Aug 31, 2011
03:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Aug 31, 2011
03:16 PM
Hi,
you need to autheniticate the browser:
aBaseSession.AuthenticateBrowser(userName, userPassword)
‎Aug 31, 2011
03:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Aug 31, 2011
03:28 PM
Well,
what I wrote in last email is true if you are invoking from a ProE session but if not then maybe this will be of help:
Dim myCredCache As New CredentialCache()
myCredCache.Add(New Uri("http://some.site.com"), "Basic", New NetworkCredential(userName, userPassword))
client.Credentials = myCredCache
‎Aug 31, 2011
03:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Aug 31, 2011
03:53 PM
Hello All,
We tried with C# also for invoke the web service call and find the below snippets. The VB code will be basically the same minus the semi-colons. Any help would be appreciated.
com.vce.plm.IESoapServlet t = new com.vce.plm.IESoapServlet();
string tFoo = t.jwsinterface("10-0891", ", ","wt.change2.WTChangeOrder2");
Thanks,
We tried with C# also for invoke the web service call and find the below snippets. The VB code will be basically the same minus the semi-colons. Any help would be appreciated.
com.vce.plm.IESoapServlet t = new com.vce.plm.IESoapServlet();
string tFoo = t.jwsinterface("10-0891", ", ","wt.change2.WTChangeOrder2");
Thanks,
‎Aug 31, 2011
04:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Aug 31, 2011
04:08 PM
Hello All,
Please find the below full C# code.
com.vce.plm.IESoapServlet t = new com.vce.plm.IESoapServlet();
t.UseDefaultCredentials = true;
System.Net.NetworkCredential tCreds = (System.Net.NetworkCredential)t.Credentials;
tCreds.UserName = "ws_test";
tCreds.Password = "ws_test";
t.UseDefaultCredentials = false;
t.Credentials = tCreds;
string tFoo = t.jwsinterface("10-0891", ", ","wt.change2.WTChangeOrder2");
We get authorization required (401) exception. Any help would be appreciated.
Thanks,
Please find the below full C# code.
com.vce.plm.IESoapServlet t = new com.vce.plm.IESoapServlet();
t.UseDefaultCredentials = true;
System.Net.NetworkCredential tCreds = (System.Net.NetworkCredential)t.Credentials;
tCreds.UserName = "ws_test";
tCreds.Password = "ws_test";
t.UseDefaultCredentials = false;
t.Credentials = tCreds;
string tFoo = t.jwsinterface("10-0891", ", ","wt.change2.WTChangeOrder2");
We get authorization required (401) exception. Any help would be appreciated.
Thanks,
‎Sep 01, 2011
02:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Sep 01, 2011
02:30 PM
HttpWebRequest request = (HttpWebRequest .Create(pubMonUrl);
UTF8Encoding
request.Headers["Authorization" .ToBase64String(credentialBuffer);
// execute the request
)request.GetResponse();
~Jamie
‎Sep 02, 2011
08:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Sep 02, 2011
10:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Sep 02, 2011
10:31 AM
Thank you for all your reply.
The below code works for me.
IESoapServlet tProxy = new IESoapServlet();
tProxy.PreAuthenticate = true;
tProxy.UseDefaultCredentials = false;
System.Net.CredentialCache cache = new System.Net.CredentialCache();
cache.Add(new Uri(tProxy.Url), "Basic", new System.Net.NetworkCredential("ws_test", "ws_test", "));
tProxy.Credentials = cache;
string tFoo = tProxy.jwsinterface("10-0891", ", ", "wt.change2.WTChangeOrder2");
Thanks,
The below code works for me.
IESoapServlet tProxy = new IESoapServlet();
tProxy.PreAuthenticate = true;
tProxy.UseDefaultCredentials = false;
System.Net.CredentialCache cache = new System.Net.CredentialCache();
cache.Add(new Uri(tProxy.Url), "Basic", new System.Net.NetworkCredential("ws_test", "ws_test", "));
tProxy.Credentials = cache;
string tFoo = tProxy.jwsinterface("10-0891", ", ", "wt.change2.WTChangeOrder2");
Thanks,