Data Replication 2
Results 1 to 2 of 2

Thread: Checking AIS web services

  1. #1
    Join Date
    Sep 2006
    Posts
    233
    Rep Power
    10

    Checking AIS web services

    AIS Provides an Apache AXIS provider to enable web services on top of AIS's application integration framework.

    When installed in Tomcat and depoyed via the AIS Studio, the easiest way to try the generated web services is with the WebService Studio tool by Microsoft. However, this tool was built using .NET framework version 1 and has quite a number of problems when activating non-trivial web services (see here). As a result, one may get the impression that some services are not working properly when in fact they are. A slightly slower method is to build a test project to invoke the web service. Use the Visual Studio .Net 2005 (you can download a free version from Microsoft - see Visual Studio Express edition at Microsoft). There you need to follow these steps after the web service is deployed and ready in Tomcat:
    1. Create a new project (can be a simple console application project)
    2. From the Project menu, select "Add web reference" and enter the URL for your web service where its WSDL is available, for example: []http://127.0.0.1:8080/axis/services/test1?wsdl[/]
    3. Add code to create a service object and invoke it. For example:
    // Create a service instance
    WebReference.test1Service ts = new WebReference.test1Service();

    // Create new input record to the web service
    WebReference.INREC inrec = new WebReference.INREC();

    // Populate input record with data
    inrec.ACCOUNT_NO = Decimal.Parse("123456");
    inrec.ACCOUNT_NOSpecified = true;

    // Invoke the web service
    WebReference.OUTREC orec = ts.CUSTDIRS(inrec);

    // Use the result (here you can examine orec in the debugger)
    By Dror Harari

    To Find Out more About Attunity Technology:
    Attunity
    or:
    Contact Us

  2. #2
    Join Date
    Sep 2006
    Posts
    233
    Rep Power
    10
    As a side comment, the kind of problems WebService Studio has include various local exceptions that depend on value or length of data. For example, in the example in this post, the values of up to 3 digits usually work while larger (such as 12345) dont. The exception one gets looks similar to:

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
    at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitesp ace()
    at System.Xml.XmlTextReaderImpl.ParseDocumentContent( )
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
    at System.Xml.XmlDocument.Load(XmlReader reader)
    at System.Xml.XmlDocument.LoadXml(String xml)
    at System.Xml.XmlDocument.set_InnerXml(String value)
    at WebServiceStudio.MessageTracer.ReadMessage(Stream from, Int32 len, String contentType)
    at WebServiceStudio.WSSWebResponse.DumpResponse(WebRe sponse response)
    ...
    By Dror Harari

    To Find Out more About Attunity Technology:
    Attunity
    or:
    Contact Us

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •