AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: За рубежом > DAX in English
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 16.07.2013, 13:06   #1  
ist is offline
ist
Участник
 
60 / 10 (1) +
Регистрация: 29.07.2007
AX 2009 consuming services
Hello guys,

I am going to use InventService to interact with AX. In the Virtual directory I can see InventService.svc and the coresponding schema. How can I generate wsdl file that can be used as an endpoint?

10x
Миниатюры
Нажмите на изображение для увеличения
Название: item_service.png
Просмотров: 579
Размер:	43.2 Кб
ID:	8334  
Старый 16.07.2013, 20:33   #2  
EVGL is offline
EVGL
Banned
Соотечественники
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
 
4,445 / 3001 (0) ++++++++++
Регистрация: 09.07.2002
Адрес: Parndorf, AT
A sustainable way to consume services in AX is to implement a [C# assembly] wrapper and call it from AX:

http://msdn.microsoft.com/EN-US/library/hh500185.aspx


But I'm afraid you are talking of something else: providing AX logic as a service. Since when is AX2009 able to expose services?

Последний раз редактировалось EVGL; 16.07.2013 в 20:37.
Старый 16.07.2013, 23:09   #4  
Vadik is offline
Vadik
Модератор
Аватар для Vadik
Лучший по профессии 2017
Лучший по профессии 2015
 
3,631 / 1849 (69) ++++++++
Регистрация: 18.11.2002
Адрес: гражданин Москвы
Цитата:
Сообщение от EVGL Посмотреть сообщение
Since when is AX2009 able to expose services?
Since the beginning, I think
Dynamics AX 2009 - Consume Web Services
ist, are you sure you require a WSDL file ? What for ? Why don't you add a service URL as a Service reference to your solution (in case you are using Visual Studio, can't tell for other IDEs) ?
P.S. To get the service's WSDL, just 'Browse' the .svc file from IIS Manager console
__________________
-ТСЯ или -ТЬСЯ ?
Старый 17.07.2013, 02:35   #5  
ist is offline
ist
Участник
 
60 / 10 (1) +
Регистрация: 29.07.2007
Цитата:
=P.S. To get the service's WSDL, just 'Browse' the .svc file from IIS Manager console
I have no web experience and in particular with IIS,
Our customer is going to consume AX service, so I have deployed standard AX AIF Services following the AX manual for that purpose. The customer wants an endpoints for service invocation, something like that:

http://myserver/someservice/endpoint1 - for service invocation
http://myserver/someservice/endpoint1?wsdl - for WSDL

p.s. I found some examples how AX services to be consumed using Visual Studio.Unfortunately the customer doesn't want to use Visual Studio!

Regards,


Regards,
Старый 22.07.2013, 10:36   #6  
Maximin is offline
Maximin
NavAx
NavAx Club
 
412 / 346 (12) ++++++
Регистрация: 09.10.2002
Адрес: Москва
It is possible to consume AX service from any environment, capable of interfacing with SOAP services (i.e. MS WCF service is kind of that).
For example, PHP with it's standard library.
I can provide you an example in PHP, if you'd interested, but at MSK evening.
__________________
Жизнь прекрасна! Если, конечно, правильно подобрать антидепрессанты...
Старый 23.07.2013, 01:00   #7  
ist is offline
ist
Участник
 
60 / 10 (1) +
Регистрация: 29.07.2007
Thanks, please provide me with a php example.
Our customer use Java, but obviously we can't provide Java solution!
10x
Старый 23.07.2013, 13:37   #8  
Maximin is offline
Maximin
NavAx
NavAx Club
 
412 / 346 (12) ++++++
Регистрация: 09.10.2002
Адрес: Москва
There's an example to a simple AX service client, using two access methods of trivial AX service:
- getOrder with one string argument - orderId, returning some set of orderIds;
- setCost with multiple argumens - some of the values of order, that must be set.

All of this is operating under some kind of WS_Security, so there's shown also a way to set appropriate header values. Althrough this is obviously not a complete example, as complying with real WS_Security and SSL needs much more actions. I just left there this setting of headers as some piece of useful code.

You can find a way more sophisticated example at http://www.sis.utoronto.ca/web_servi...lient.php.html.

Be sure, that you have uncommented in your php.ini php_soap.dll extension prior to start playing with PHP as SOAP service client.

X++:
<?php 

$login = "login";
$password = "password";
class argumentObject
{
	public $number = "";
	public $number_string = "";
	public $cost = 0.0;
	public $discount = 0.0;
	public $discount2 = 0.0;
	public $status = "";
}
try {
	$cl = new SoapClient('YOUR_URL_TO_WSDL');
	$cl->__setSoapHeaders(array(new SoapHeader('namespace_name', 'security_token', array($login, $password), 1)));
	$result = $cl->getOrder("Some_order_id");
	print($result->orders[0]->number);
	$placementArray = array();
	$argumentObject = new argumentObject();
	$argumentObject->number=$result->orders[0]->number;
	$argumentObject->number_string=$result->orders[0]->number_string;
	$argumentObject->cost=0;
	$argumentObject->status="Status_name";
	$argumentArray[0]=$placement;	
	$cl->setCost($argumentArray);

} catch (SoapFault $fault) {
    print("Fault string: " . $fault->faultstring . "\n");
    print("Fault code: " . $fault->detail->WebServiceException->code . "\n");
}

?>
__________________
Жизнь прекрасна! Если, конечно, правильно подобрать антидепрессанты...

Последний раз редактировалось Maximin; 23.07.2013 в 13:40.
Теги
ax2009, service, wsdl

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
semanticax: Dynamics AX 2009 Installation - Application Blog bot DAX Blogs 0 22.12.2010 08:11
emeadaxsupport: List of fixes that improve performance of certain features in Dynamics AX 2009 Blog bot DAX Blogs 0 13.10.2009 19:06
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 10:19.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.