web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Making WSDL on IIS Server - using 3rd Party Schema

(0) ShareShare
ReportReport
Posted on by 3,850

I'm working for a customer who provide web services. But they do not provide WSDL URL so I can call automaticly on the service and see what the service include.

Most projects that I have worked with have live WSDL URL like http://www.customs.com/CSServices.wsdl - by addint Service Reference in VS C# Project I can see all that service include. In that chases it's all OK to work with it in C#

But, the provider just send me an two XSD Schemas who is HUGE (about 23.000 elements) :(

Here below I describe some demonstration from MS book 80416 about AIF Services in AX. and I think I need to do something like this.

This project:

I create a Service and ServiceGroup and Deploy as an inbound port and that is activated and OK

  1. I create AX class with only one string input parameter
  2. I create Service named Greeting.
  3. And also ServiceGroup named GreetingGroup
  4. Implement the service Greeting into the GreetingGroup ServiceGroup
  5. Then Right-Click the ServiceGroup and choose Deploy Service Group
  6. I confirm the activation and working InboundPort - so that is OK.
  7. I create VS C# Console Application.
  8. Inport Service Reference from the InboundPort and paste the WSDL URL http://AX2012R2A:8101/DynamicsAx/Services/GreetingsGroup
  9. And I just write some code to generate the string in the AX Class and get some response from Console Window in C# Project.

-But the XSD files are about 23.000 element total - so there is a hell lot of work to generate that.

I need to generate all the element in the XSD into AX Classes so I can work with them in AX, put the variables (who is generated from XSD element) into UserInterfaces or Report. 

The provider only represent one URL like https://www.cusoms.com/lib2b.dll?ProcessXML where ProcessXML will take all functions from these XSD files and process them in and out (sending and receiving).

Is some automatically way to create necessary classes and other objects against the XSD files? 

In Document QueryWizard I can't see any options to import XSD to generate the classes.

What can I do? Do I have to create the classes manually?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    You said that the customer provide web services, so I thought you would want to call them. But then you described how you created a new custom service in AX, which sounds like the opposite direction. What did I get wrong?

    The document query wizard is, as its name suggests, based on a query to AX tables. It can't take XSD as input.

    I see two reasonable ways:

    • Create/reuse a document service and implement XSLT transformation between those two schemas. You can find tools that generates sample XML files from XSD (or simply ask the customer for samples). If you never worked with XSLT, it may be a bit difficult for a while, but there's a first time for everything.
    • You can generate C# classes from XSD (XML Schema Definition Tool, xsd2code) and use .NET Interop for communication between .NET and AX. You would have to implement logic in AX by yourself or to combine it with an AIF document.

    I can't say which options is better for you - it depends on concrete requirements.

  • Suggested answer
    Sandri Profile Picture
    3,850 on at

    Hi

    I have google some info based on this information and I think that is the view that I need.

    Thanks a lot.

  • Sandri Profile Picture
    3,850 on at

    Thanks Martin you are so kind to give your time to answer me.

    But can you tell me two more things:

    I have decided to go second way (use .NET interop) but the links you gave me swwms to work only for older vers. of Visual Studio.

    I use VS 2013 Ultimate and in Demo VM for Dynamics is using VS 2010

    Can you link to me some article about changing XSD to classes in this versions?

  • Verified answer
    Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    Which tool are you talking about? I mentioned:

    • xsd2code 3.4 - Visual Studio 2010, 2012, 2013.
    • xsd.exe - a separate tool included in Windows SDK (not dependent on, but also distributed with Visual Studio 2013).

    Use your favorite search engine to find more information about these tools or additional tools.

  • Sandri Profile Picture
    3,850 on at

    Thanks a lot!.

  • Sandri Profile Picture
    3,850 on at

    Hi Martin. Thanks for your answer.

    You said you see two options here. XSLT and .NET

    As I understand what's gonna come with AX 2015 - are you agree with me that .NET implementation is more practical from the less-recoding point of view when 2015 is released?

  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    Sorry, I don't know how it will look like in the next version of AX. And even if I knew, I would be allowed to discuss it.

    If it keeps using XML, therefore you'll transform between two XML files, XSTL is a natural choice. And imperative code has much tighter coupling, i.e. potentially much more work if any schema changes.

    I think both solutions have their advantages and I would base the decision on actual requirements, not on guessing about future versions.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans