Forum Discussion

Alp_Timurhan_Çe's avatar
16 years ago

Schema Validation in Mock services

Hello,

First, I would like to thank you for this great product. I ve been using it for a while and it really is a must for web service development. Versions prior to 2.5 had some bugs, but 2.5 has really improved usability.

I am using mock services to give the client applications something to test while developing the services, using a wsdl first approach. During this scenario, it is required to check the requests for the schema syntax, as the service is a mock, the other ways to validate the incoming are painful.

Is it possible to validate request (using wsdl used to create the services) with mock services ?

Thank you,
Alp

7 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Alp,

    Thanks for your support! There is no simple way to do this, but I wrote a blog-entry (http://www.eviware.com/blogs/oleblog/?p=7) on how this could be done with xmlbeans and some groovy scripts, maybe that is enough for your requirements?

    regards!

    /Ole
    eviware.com
  • Todor_Mollov's avatar
    Todor_Mollov
    Occasional Contributor
    I replied to this in the blog.
    I have problems with the temp directory.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    judging from the output it seems xmlbeans can not find and schemas in your WSDL.. can you attach the WSDL here so I can have a go?

    regards!

    /Ole
    eviware.com
  • Todor_Mollov's avatar
    Todor_Mollov
    Occasional Contributor
    I thought that the problem is that I used Java6, but now I tried with Java5 and it is the same thing. Cannot find the sources:
    Running XmlBeans for [NewBusinessTrackingMediationExport_NewBusinessTrackingV01HttpBinding]
    directory: C:\SDP\xmlbeans-2.4.0\bin
    command: [cmd.exe, /C, scomp.cmd, -out, C:\tmp\out.jar, -dl, -javasource, 1.5, -compiler, C:\SDP\Java\Java5\bin\javac, C:\tmp\tempdir30540.tmp\NewBusinessTrackingMediationExport_NewBusinessTrackingV01Http_Service_1.wsdl]
    Time to build schema type system: 1.031 seconds
    Time to generate code: 0.016 seconds
    javac: no source files
    Usage: javac
    where possible options include:
      -g                        Generate all debugging info
      -g:none                    Generate no debugging info
      -g:{lines,vars,source}    Generate only some debugging info
      -nowarn                    Generate no warnings
      -verbose                  Output messages about what the compiler is doing
      -deprecation              Output source locations where deprecated APIs are used
      -classpath           Specify where to find user class files
      -cp                 Specify where to find user class files
      -sourcepath         Specify where to find input source files
      -bootclasspath       Override location of bootstrap class files
      -extdirs             Override location of installed extensions
      -endorseddirs       Override location of endorsed standards path
      -d             Specify where to place generated class files
      -encoding       Specify character encoding used by source files
      -source           Provide source compatibility with specified release
      -target           Generate class files for specific VM version
      -version                  Version information
      -help                      Print a synopsis of standard options
      -X                        Print a synopsis of nonstandard options
      -J                  Pass directly to the runtime system


    BUILD FAILED
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    sorry for the delay.. I played around a bit here.. it seems xmlbeans can not import WSDL's that don't contain any schemas, which is the case of your "top-level" wsdl as it imports another wsdl which contains the schemas. Unfortunately though when trying to import the that WSDL instead I get an error parsing the schemas themselves, I'll try to dig deeper later today..

    regards,

    /Ole
    eviware.com