Discussions

XML & Web services: How to validate a SOAP XML request against a WSDL?

  1. How to validate a SOAP XML request against a WSDL? (1 messages)

    Anyone knows a way to validate a SOAP XML request against a WSDL defined web services?

    I am using Apache Axis's WSDL2Java tool to generate java code based on a given WSDL. However, in some use cases I kept getting a "Invalid SOAP Request" error from the web services. I searched the web for days but couldn't find any tool that can validate the generated SOAP XML request to help me pinpoint the problem. I have tried these tools:

    XML Spy
    Oxygen
    IBM's ETTK

    Thanks for any pointers!

    Qingshan Luo
    Talaris Corporation
    1400 Fashion Island Blvd, Suite 150
    San Mateo, CA 94404
    qluo at talaris dot com
    Phone: 1-650-212-8473
    FAX: 1-650-212-8499
  2. You may have hit a bug in the wsdl2java tool if you consistently get the errors against certain kinds of services.

    If you don't know through logs what the Soap document is that's being sent, I would use something like Axis's SOAPMonitor or TCPMon to intercept them, or if you're not using Axis, a network packet analysis tool like Ethereal, and examine the Soap going across the wire to see if it is valid for the service type (i.e., document/literal or whatever).

    If you find such a tool, please let us all know. It would be very handy.