Results 1 to 3 of 3
  1. #1
    presto is offline Member
    Join Date
    Aug 2007
    Rep Power

    Arrow partial XML validation against xsd


    The scene: :o

    I've a webservice defined in a wsdl. For each port, there is an xsd file defining its type. Ok, now I want to validate this xml against this xsd.

    The problem: :confused:

    My xsd's has no root element. They just define a type of node. for instance:
    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="..." xmlns:bons0="..." targetNamespace="...">
    	<xsd:complexType name="MyServiceRequest">
    			<xsd:element minOccurs="1" name="MyElement" type="xsd:string">

    but my xml has a root element that is a "MyServiceRequest" node:
    Java Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
        <MyElement>my element value</MyElement>

    How can I validate just the "internal" part of the root node against my xsd? or my full xml against the wsdl, if there is a way...


  2. #2
    Menre is offline Member
    Join Date
    Feb 2008
    Rep Power


    It may help if you use some PHP code to validate your XML and xsd. Read the article below and see if you can apply the techniques to your work.

    Validating XML in PHP

    I hope this helps.

  3. #3
    presto is offline Member
    Join Date
    Aug 2007
    Rep Power


    Thanks for the reply Menre!
    I'll take a look at this!

    I forgot to say, but I'm using jsp and servlets (java 5 xml packages -> javax.xml.*.*).


Similar Threads

  1. Display partial file contents in JTextArea
    By tmoehlman in forum New To Java
    Replies: 0
    Last Post: 11-03-2009, 12:03 AM
  2. VAlidation
    By chetna1982 in forum New To Java
    Replies: 2
    Last Post: 12-11-2008, 08:08 AM
  3. Input Validation
    By kickflipper1087 in forum New To Java
    Replies: 5
    Last Post: 11-03-2008, 06:47 AM
  4. HELP: Trouble with partial filled arrays
    By daigre7 in forum New To Java
    Replies: 1
    Last Post: 04-07-2008, 03:05 AM

Tags for this Thread

Posting Permissions

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