You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ivan Venuti <i....@caribel.pisa.it> on 2004/08/04 11:30:59 UTC

Need help: org.xml.sax.SAXException: Invalid element in XYZ

Hi,

I have a WSDL file (you can see it, wsdlModuloIR.xml attached to this
email). From it I have generated server side code to implement the described
services.
I have also generated client side code in order to access it.
Doing so I've got this exception:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXException: Invalid element in
it.pisa.caribel.search.Caller - Id
 faultActor:
 faultNode:
 faultDetail:
	{http://xml.apache.org/axis/}stackTrace: AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXException: Invalid element in
it.pisa.caribel.search.Caller - Id
 faultActor:
 faultNode:
 faultDetail:

org.xml.sax.SAXException: Invalid element in it.pisa.caribel.search.Caller -
Id
	at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2
60)
	at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:16
9)
	at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:1015)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.content(Unknown Source)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.content(Unknown Source)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
	at org.apache.crimson.parser.Parser2.parse(Unknown Source)
	at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:242)
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
	at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
	at org.apache.axis.client.Call.invoke(Call.java:2553)
	at org.apache.axis.client.Call.invoke(Call.java:2248)
	at org.apache.axis.client.Call.invoke(Call.java:2171)
	at org.apache.axis.client.Call.invoke(Call.java:1691)
	at
it.pisa.caribel.search.RTSearchPortSoapBindingStub.getStatus(RTSearchPortSoa
pBindingStub.java:614)
	at it.pisa.caribel.search.testIvan.main(testIvan.java:41)


org.xml.sax.SAXException: Invalid element in it.pisa.caribel.search.Caller -
Id
	at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2
60)
	at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:16
9)
	at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:1015)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.content(Unknown Source)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.content(Unknown Source)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
	at org.apache.crimson.parser.Parser2.parse(Unknown Source)
	at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:242)
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
	at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
	at org.apache.axis.client.Call.invoke(Call.java:2553)
	at org.apache.axis.client.Call.invoke(Call.java:2248)
	at org.apache.axis.client.Call.invoke(Call.java:2171)
	at org.apache.axis.client.Call.invoke(Call.java:1691)
	at
it.pisa.caribel.search.RTSearchPortSoapBindingStub.getStatus(RTSearchPortSoa
pBindingStub.java:614)
	at it.pisa.caribel.search.testIvan.main(testIvan.java:41)

I have also tried to get the WSDL from the deployed service: using it I'm
not able to generated client code (I'm using Eclipse 2.x + Lomboz plugin).
Also that file is attached to the email (RTSearchPort.xml).

anyone can help in identify the problem?
Thanks in advance

-- Ivan

Re: Need help: org.xml.sax.SAXException: Invalid element in XYZ

Posted by Dhanush Gopinath <dh...@mahindrabt.com>.
WSDL is the medium through which u define your Web Service Methods,  How u access them ( data encoding and protocols) and where the service is located .

In short it describes the Web Service .. hence the name web service description language  :)

Dhanush
  ----- Original Message -----
  From: Ivan Venuti
  To: axis-user@ws.apache.org
  Sent: Thursday, August 05, 2004 1:45 PM
  Subject: R: Need help: org.xml.sax.SAXException: Invalid element in XYZ


  you are right: this is the problem!
  I've changed it in my java code and it works. Many Thanks!!

  Anyone have an idea about the difference between WSDL and service?
  I remember that the service is generated from WSDL via Axis 1.1


  -- Ivan

  > -----Messaggio originale-----
  > Da: Anne Thomas Manes [mailto:anne@manes.net]
  > Inviato: mercoledi 4 agosto 2004 15.26
  > A: axis-user@ws.apache.org
  > Oggetto: RE: Need help: org.xml.sax.SAXException: Invalid element in XYZ
  >
  >
  > I suspect the problem is caused by the fact that your source WSDL has an
  > element in the Caller type called "Id", but the service is expecting an
  > element called "id".
  >
  > I'm not sure why your service changed the element definition.
  >
  > Anne



*********************************************************
Disclaimer:         

This message (including any attachments) contains
confidential information intended for a specific
individual and purpose, and is protected by law.
If you are not the intended recipient, you should
delete this message and are hereby notified that
any disclosure, copying, or distribution of this
message, or the taking of any action based on it,
is strictly prohibited.

*********************************************************
Visit us at http://www.mahindrabt.com

Best practice for retrieve configuration parameters

Posted by Ivan Venuti <i....@caribel.pisa.it>.
Hi,

I'd like to kwnow what is the better way to retrieve configuration
parameters in classes deployted as Axis Web Services.
I could use properties file on file system, but I don't know if there is a
better way (I need to retrieve connection parameters for accessing my DB).

Thanks in advance

-- Ivan



R: Need help: org.xml.sax.SAXException: Invalid element in XYZ

Posted by Ivan Venuti <i....@caribel.pisa.it>.
you are right: this is the problem!
I've changed it in my java code and it works. Many Thanks!!

Anyone have an idea about the difference between WSDL and service?
I remember that the service is generated from WSDL via Axis 1.1


-- Ivan

> -----Messaggio originale-----
> Da: Anne Thomas Manes [mailto:anne@manes.net]
> Inviato: mercoledi 4 agosto 2004 15.26
> A: axis-user@ws.apache.org
> Oggetto: RE: Need help: org.xml.sax.SAXException: Invalid element in XYZ
> 
> 
> I suspect the problem is caused by the fact that your source WSDL has an
> element in the Caller type called "Id", but the service is expecting an
> element called "id". 
> 
> I'm not sure why your service changed the element definition. 
> 
> Anne



RE: Need help: org.xml.sax.SAXException: Invalid element in XYZ

Posted by Anne Thomas Manes <an...@manes.net>.
I suspect the problem is caused by the fact that your source WSDL has an
element in the Caller type called "Id", but the service is expecting an
element called "id". 

I'm not sure why your service changed the element definition. 

Anne

-----Original Message-----
From: Ivan Venuti [mailto:i.venuti@caribel.pisa.it] 
Sent: Wednesday, August 04, 2004 5:31 AM
To: Axis
Subject: Need help: org.xml.sax.SAXException: Invalid element in XYZ


Hi,

I have a WSDL file (you can see it, wsdlModuloIR.xml attached to this
email). From it I have generated server side code to implement the described
services.
I have also generated client side code in order to access it.
Doing so I've got this exception:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXException: Invalid element in
it.pisa.caribel.search.Caller - Id
 faultActor:
 faultNode:
 faultDetail:
	{http://xml.apache.org/axis/}stackTrace: AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXException: Invalid element in
it.pisa.caribel.search.Caller - Id
 faultActor:
 faultNode:
 faultDetail:

org.xml.sax.SAXException: Invalid element in it.pisa.caribel.search.Caller -
Id
	at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2
60)
	at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:16
9)
	at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:1015)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.content(Unknown Source)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.content(Unknown Source)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
	at org.apache.crimson.parser.Parser2.parse(Unknown Source)
	at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:242)
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
	at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
	at org.apache.axis.client.Call.invoke(Call.java:2553)
	at org.apache.axis.client.Call.invoke(Call.java:2248)
	at org.apache.axis.client.Call.invoke(Call.java:2171)
	at org.apache.axis.client.Call.invoke(Call.java:1691)
	at
it.pisa.caribel.search.RTSearchPortSoapBindingStub.getStatus(RTSearchPortSoa
pBindingStub.java:614)
	at it.pisa.caribel.search.testIvan.main(testIvan.java:41)


org.xml.sax.SAXException: Invalid element in it.pisa.caribel.search.Caller -
Id
	at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2
60)
	at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:16
9)
	at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:1015)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.content(Unknown Source)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.content(Unknown Source)
	at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
	at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
	at org.apache.crimson.parser.Parser2.parse(Unknown Source)
	at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:242)
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
	at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
	at org.apache.axis.client.Call.invoke(Call.java:2553)
	at org.apache.axis.client.Call.invoke(Call.java:2248)
	at org.apache.axis.client.Call.invoke(Call.java:2171)
	at org.apache.axis.client.Call.invoke(Call.java:1691)
	at
it.pisa.caribel.search.RTSearchPortSoapBindingStub.getStatus(RTSearchPortSoa
pBindingStub.java:614)
	at it.pisa.caribel.search.testIvan.main(testIvan.java:41)

I have also tried to get the WSDL from the deployed service: using it I'm
not able to generated client code (I'm using Eclipse 2.x + Lomboz plugin).
Also that file is attached to the email (RTSearchPort.xml).

anyone can help in identify the problem?
Thanks in advance

-- Ivan