AIF Create Basic Port in AX 2012
1. Create new class and method in AOT and following code:-
Public class Test
{
}
[SysEntryPointAttribute(true)]
public int sqr(int a)
{
return a*a;
}
|
2. Create
new service. Go to AOT-> Services.
3. Right
Click on Services and click on New
Service.
4. Right
Click on New Service and go to
properties and set Class property to
the name of class which you created in previous step.
5. Expand
newly created services and right click on Operations
and click on Add operations.
6. Go
to the property of newly created operations and set Method property to the name of method which you created in previous
class.
7. Right
click on AOT-> Service Groups and
create new service group.
8. Expand
newly created service group and drag your service which you created in previous
step inside your service group.
9. Deploy
your newly created service group and it should be deploy successfully.
10. Now
go to System Administration-> Setup->
Services and Application Integration Framework-> Inbound Ports and make
sure that in inbound port form your previously created service group should be
available and it should be Activate.
11. Now
copy the WSDL URI for your Service Group from Inbound ports form.
Steps for creating Windows Project in Visual Studio 2010:-
1. Open
Visual Studio 2010.
2. Go
to File-> New-> Project.
3. Select Visual C# from Installed Templates option
and Select Windows forms Application
and click on OK button.
4. Design
your form like below:-
5 Open
Solution Explorer and expand your
project.
6. Right
Click on References and click on Add Service References.
7. In
Address text box in Add Service Reference form paste WSDL URI which you copied from Inbound
Port form in previous step and click on GO
button.
8. When
your service group name will be
displayed in Add Service Reference
form in Services area click on OK button.
9. Double click on Square button and add following code:-
|
110. Run your form and enter value for Value 1 field and click on Square button.
No comments:
Post a Comment