You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Srinath Perera <he...@vijayaba.cse.mrt.ac.lk> on 2003/10/31 10:51:27 UTC

DOM->JAXME(HELP NEEDED)

On Thu, 2003-10-30 at 20:30, Jochen Wiedmann wrote:
> Your schema files are referring to types defined elsewhere. For example
> s:schema or soap-enc:array. Whilst the former may assumed to be known to
> the parser (that's again something I have to clarify), I am quite sure
> that a standard XML Schema parser is not expected to know about the
> schema related files.
> 
> A possible solution on your side might be not to parse the actual schema,
> but to create an outer schema, that imports the WSDL types and then the
> real schema. How's that?

to adress above issue of wsdl defined but not schema defined types we 
thought of importing the soap encoding schema(attached) to the schema.

to import the schema we use following code to add a import element to
the elemnt we going to parsed with JAXME !!.

public void createImportNode(Element e){
  Element element =    
	doc.createElementNS("http://www.w3.org/2001/XMLSchema","import");
		
  Attr attr1 = doc.createAttribute("namespace");
  attr1.setValue("http://schemas.xmlsoap.org/soap/encoding/");
	
  Attr attr2 = doc.createAttribute("schemaLocation");
  attr2.setValue("./schema/schemas.xmlsoap.org.xml");
		
  element.setAttributeNode(attr1);
  element.setAttributeNode(attr2);
		
  e.insertBefore(element,e.getFirstChild());
}

but the parsing failed with error
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
element 'schema'.
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

but the both schema taken alone work fine with JAXME.

1) is this something wrong with JAXME or have I make a mistake?
2) anybody knows better way to adress this

thanks for your time

regards

Srinath



DOM->JAXME(RFC)

Posted by Srinath Perera <he...@vijayaba.cse.mrt.ac.lk>.
Hi Dims, All;

* About method signatures we have changed, what do you think of wrap the
SAX exception inside a  RuntimeException. It look nicer (to me :) ) and
practically there is nothing the programmer can do if JAXME throw SAX
exception than graceful exit.  (I will fix it ASAP.)


I am going though error list when I got parsing all WSDL in axis
test/wsdl

1)  {http://soapinterop.org/types}*,
{http://java.sun.com/jax-rpc-ri/internal}* does this types are inbuild
to WSDL2Java?? it seem it consider so! do we need to support them. (I
got http://schemas.xmlsoap.org/soap/encoding/ types working:) ).

2) DO we need to support the 1999 Schema type's. (if so need bit fixing
ax jaxme side.)

thanks for your time (will come back after analyis error report for
other. But there are only few left :) hope fully we can go though .. )

regards

Srinath


Re: DOM->JAXME(HELP NEEDED)

Posted by Jochen Wiedmann <jo...@ispsoft.de>.
Srinath Perera wrote:

> but the parsing failed with error
> org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
> element 'schema'.
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 
> but the both schema taken alone work fine with JAXME.

Turn the parsers validation off. The error message indicates, that
the schema being parsed (./schema/schemas.xmlsoap.org.xml) does
contain a DOCTYPE declaration.


Jochen