In .Net we usually use the Add Service Reference feature to generate the web proxy in the Visual Studio. However it is a little different approach, when we consume the Oracle Fushion Application web service. we will use the WebHttpRequest instead of the Proxy.
the Oracle Fushion Developer Relation Blog provide a excellent example for kick start.
Integrating With Fusion Application Using Services (.Net: HttpWebRequest)
a blog to share Microsoft technologies Azure, DotNet, SharePoint, SQL Server,JavaScript Framework: Node.JS, Angular, React
Showing posts with label WebService. Show all posts
Showing posts with label WebService. Show all posts
Wednesday, January 27, 2016
Thursday, April 30, 2015
how to quickly enble impersonated current user to consume the Dynamic AX web service?
My web app is running under the Application Pool assoicated with a specific account, it is perfectly fine to consume the Dynamic AX web serivce.
However, the records were created in the Dynamic AX by the service account after we call the web service to send data to Dynamic AX. if we want to show the record was created the people who run the web application. we can use LogonAsUser property from the CallContext Object. we have to modify the web application by adding following line of code. i highlighted this line of code in Bold
FreeTextInvoiceService2012Http.CallContext context = new FreeTextInvoiceService2012Http.CallContext();
context.LogonAsUser = "YourDomain\\userName";
textInvoiceService.ClientCredentials.Windows.ClientCredential.UserName = GetAppSettingsValue("UserName"); //which is the serivce account that allow to consume the dax web service
textInvoiceService.ClientCredentials.Windows.ClientCredential.Password = GetAppSettingsValue("Password");
in the Dynamic side,we must configure this service account to be allow impersonation. and grant the user name a role that allow to access the Dynamic AX.
when you check the TextFreeInvoice Tabale in dynamic AX, you should be able to see the user ID instead of the service account ID in the CreatedBy columns
Happy Programming.
However, the records were created in the Dynamic AX by the service account after we call the web service to send data to Dynamic AX. if we want to show the record was created the people who run the web application. we can use LogonAsUser property from the CallContext Object. we have to modify the web application by adding following line of code. i highlighted this line of code in Bold
FreeTextInvoiceService2012Http.CallContext context = new FreeTextInvoiceService2012Http.CallContext();
context.LogonAsUser = "YourDomain\\userName";
textInvoiceService.ClientCredentials.Windows.ClientCredential.UserName = GetAppSettingsValue("UserName"); //which is the serivce account that allow to consume the dax web service
textInvoiceService.ClientCredentials.Windows.ClientCredential.Password = GetAppSettingsValue("Password");
in the Dynamic side,we must configure this service account to be allow impersonation. and grant the user name a role that allow to access the Dynamic AX.
when you check the TextFreeInvoice Tabale in dynamic AX, you should be able to see the user ID instead of the service account ID in the CreatedBy columns
Happy Programming.
Thursday, November 10, 2011
How to Fix Error "The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047" that deploy Customer Web Service in Sharepoint 2010
i try to follow Rob Windsor's Blog Posting to create a Custom Web Service in Sharepoint 2010.
Walkthrough: Creating a Custom ASP.NET (ASMX) Web Service in SharePoint 2010
it looks straight Forward. since the configuration is quite simple. I was with the following erorr.
Parser Error Message: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
Source Error:
Line 1: <%@ WebService CodeBehind="MyCustomWebService.asmx.cs" Class="WebServiceDemo.MyCustomWebService, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=85b819cd95d3fe73" %>
when i google with the Error message. some solutio suggest that we should modify the trust level to be Full
this is a very risky approach to fix an issue. fortunately this is a solution. the root cause of this issue sterm from missing an element from the strong name of web service class. After i properly set the strong name of WebService Class. the web service link render successfully
the format of the strong name of web service class is
Class="ClassName with full path, Assembly Name, Version, Culture, PublicKeyToken"
here is specific for my web service.
<%@ WebService CodeBehind="MyCustomWebService.asmx.cs" Class="WebServiceDemo.MyCustomWebService,WebServiceDemo, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=85b819cd95d3fe73" %>
Walkthrough: Creating a Custom ASP.NET (ASMX) Web Service in SharePoint 2010
it looks straight Forward. since the configuration is quite simple. I was with the following erorr.
Parser Error Message: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
Source Error:
Line 1: <%@ WebService CodeBehind="MyCustomWebService.asmx.cs" Class="WebServiceDemo.MyCustomWebService, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=85b819cd95d3fe73" %>
when i google with the Error message. some solutio suggest that we should modify the trust level to be Full
this is a very risky approach to fix an issue. fortunately this is a solution. the root cause of this issue sterm from missing an element from the strong name of web service class. After i properly set the strong name of WebService Class. the web service link render successfully
the format of the strong name of web service class is
Class="ClassName with full path, Assembly Name, Version, Culture, PublicKeyToken"
here is specific for my web service.
<%@ WebService CodeBehind="MyCustomWebService.asmx.cs" Class="WebServiceDemo.MyCustomWebService,WebServiceDemo, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=85b819cd95d3fe73" %>
Subscribe to:
Posts (Atom)