List Info

Thread: ezmlm warning




ezmlm warning
user name
2007-11-06 20:36:24
Hi! This is the ezmlm program. I'm managing the
userxmlbeans.apache.org mailing list.


Messages to you from the user mailing list seem to
have been bouncing. I've attached a copy of the first
bounce
message I received.

If this message bounces too, I will send you a probe. If the
probe bounces,
I will remove your address from the user mailing list,
without further notice.


I've kept a list of which messages from the user mailing
list have 
bounced from your address.

Copies of these messages may be in the archive.
To retrieve a set of messages 123-145 (a maximum of 100 per
request),
send a short message to:
   <user-get.123_145xmlbeans.apache.org>

To receive a subject and author list for the last 100 or so
messages,
send a short message to:
   <user-indexxmlbeans.apache.org>

Here are the message numbers:

   4926
   4927
   4928
   4929
   4930
   4931
   4932
   4933
   4934
   4935
   4936
   4937
   4938
   4939
   4940
   4941
   4942

--- Enclosed is a copy of the bounce message I received.

Return-Path: <>
Received: (qmail 84759 invoked by uid 99); 26 Oct 2007
11:17:26 -0000
Received: from athena.apache.org (HELO athena.apache.org)
(140.211.11.136)
    by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct
2007 04:17:26 -0700
X-ASF-Spam-Status: No, hits=-0.0 required=10.0
	tests=SPF_HELO_PASS
X-Spam-Check-By: apache.org
Received: from [66.98.192.98] (HELO starfire.yahoo.com)
(66.98.192.98)
    by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct
2007 11:17:27 +0000
Received: by starfire.yahoo.com (Postfix)
	id A87522081A4; Fri, 26 Oct 2007 06:17:06 -0500 (CDT)
Date: Fri, 26 Oct 2007 06:17:06 -0500 (CDT)
From: MAILER-DAEMONyahoo.com (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: user-return-4926-bond=yahoo.comxmlbeans.apache.org
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report;
report-type=delivery-status;
	boundary="3343E20822A.1193397426/starfire.yahoo.com&qu
ot;
Content-Transfer-Encoding: 8bit
Message-Id: <20071026111706.A87522081A4starfire.yahoo.com>
X-Virus-Checked: Checked by ClamAV on apache.org

This is a MIME-encapsulated message.

--3343E20822A.1193397426/starfire.yahoo.com
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii

This is the mail system at host starfire.yahoo.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached
below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<bondyahoo.com>: cannot update mailbox /var/mail/bond
for user bond. error
    writing message: File too large

--3343E20822A.1193397426/starfire.yahoo.com
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; starfire.yahoo.com
X-Postfix-Queue-ID: 3343E20822A
X-Postfix-Sender: rfc822;
user-return-4926-bond=yahoo.comxmlbeans.apache.org
Arrival-Date: Fri, 26 Oct 2007 06:17:06 -0500 (CDT)

Final-Recipient: rfc822; bondyahoo.com
Original-Recipient: rfc822;bondyahoo.com
Action: failed
Status: 5.2.2
Diagnostic-Code: x-unix; input/output error

--3343E20822A.1193397426/starfire.yahoo.com
Content-Description: Undelivered Message
Content-Type: message/rfc822
Content-Transfer-Encoding: 8bit

X-Virus-Scanned: amavisd-new at yahoo.com
Received: from starfire.yahoo.com ([127.0.0.1])
	by localhost (starfire.yahoo.com [127.0.0.1]) (amavisd-new,
port 10024)
	with ESMTP id iwEHmJu+kALy for <bondyahoo.com>;
	Fri, 26 Oct 2007 06:16:59 -0500 (CDT)
Received: from mail.apache.org (hermes.apache.org
[140.211.11.2])
	by starfire.yahoo.com (Postfix) with SMTP id 9D60B2081A4
	for <bondyahoo.com>; Fri, 26 Oct 2007 06:16:57
-0500 (CDT)
Received: (qmail 84240 invoked by uid 500); 26 Oct 2007
11:16:42 -0000
Mailing-List: contact user-helpxmlbeans.apache.org; run by
ezmlm
Precedence: bulk
List-Post: <mailto:userxmlbeans.apache.org>
List-Help: <mailto:user-helpxmlbeans.apache.org>
List-Unsubscribe: <mailto:user-unsubscribexmlbeans.apache.org>
Reply-To: userxmlbeans.apache.org
List-Id: <user.xmlbeans.apache.org>
Delivered-To: mailing list userxmlbeans.apache.org
Received: (qmail 84229 invoked by uid 99); 26 Oct 2007
11:16:42 -0000
Received: from athena.apache.org (HELO athena.apache.org)
(140.211.11.136)
    by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct
2007 04:16:42 -0700
X-ASF-Spam-Status: No, hits=-0.0 required=10.0
	tests=SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (athena.apache.org: local policy)
Received: from [147.102.222.220] (HELO diomedes.noc.ntua.gr)
(147.102.222.220)
    by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct
2007 11:16:43 +0000
Received: from ektor.telecom.ece.ntua.gr
(ektor.telecom.ece.ntua.gr [147.102.7.1])
	by diomedes.noc.ntua.gr (8.14.0/8.14.0) with ESMTP id
l9QBGJC2090323
	for <userxmlbeans.apache.org>; Fri, 26 Oct 2007
14:16:20 +0300 (EEST)
	(envelope-from psoroulastelecom.ntua.gr)
X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter
version 0.91.2 on diomedes.noc.ntua.gr
X-Virus-Scanned: Clam AntiVirus on
ektor.telecom.ece.ntua.gr
Received: from ektor.telecom.ece.ntua.gr ([127.0.0.1])
	by localhost (ektor.telecom.ece.ntua.gr [127.0.0.1])
(amavisd-new, port 10024)
	with ESMTP id NWkwNu5bTCAX for <userxmlbeans.apache.org>;
	Fri, 26 Oct 2007 14:15:48 +0300 (EEST)
Received: from my.telecom.ntua.gr
(localhost.telecom.ece.ntua.gr [127.0.0.1])
	by ektor.telecom.ece.ntua.gr (Postfix) with ESMTP id
952A78A46B
	for <userxmlbeans.apache.org>; Fri, 26 Oct 2007
14:15:48 +0300 (EEST)
Received: from 194.30.216.99
        (SquirrelMail authenticated user psoroulas)
        by my.telecom.ntua.gr with HTTP;
        Fri, 26 Oct 2007 14:15:48 +0300 (EEST)
Message-ID: <62448.194.30.216.99.1193397348.squirrelmy.telecom.ntua.gr>
Date: Fri, 26 Oct 2007 14:15:48 +0300 (EEST)
Subject: selectPath problem
From: "Psoroulas John" <psoroulastelecom.ntua.gr>
To: userxmlbeans.apache.org
User-Agent: SquirrelMail/1.5.1
MIME-Version: 1.0
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: 8bit
X-Greylist: Sender IP whitelisted, not delayed by
milter-greylist-3.0 (diomedes.noc.ntua.gr
[147.102.222.220]); Fri, 26 Oct 2007 14:16:20 +0300 (EEST)
X-Virus-Status: Clean
X-Virus-Checked: Checked by ClamAV on apache.org

Dear All,

I have the following problem:

I want retrieve data from a document which includes elements
from various
namespaces. As far as I am concerned, I have two basic
options considering
the xpath expression that I could use. The first option is
to locate an
element via its qualified name, and the second, is to use
the local-name()
xpath function in order to access an element irrespective of
the namespace
that belongs to.

I have implemented the following scenario (the source code,
xsd and the
respective xml are included at the end of the email):

I create the appropriate document type object (e.g. root)
(parsing the
respective xml file), and I retrieve the top-level element
(e.g. message).

When I apply the selectPath() method in the message object
using the
following xpath expressions (EXP1 and EXP2), all works fine



EXP1
~~~~~~~~~~~~
declare namespace ns1='urn:customurn';$this/ns1:firstname

EXP2
~~~~~~~~~~~~
declare namespace
any='##local';$this/*[local-name()='firstname']





BUT, when I apply the selectpath method to a “copy” of
the object message
(using the XmlObject copy() method), the EXP2 fails
triggering the
following error:




ERROR
~~~~~
Unsupported node type in DOM! 11 instance
org.apache.xmlbeans.impl.store.Xobj$DocumentFragXobj1807ca8





I really appreciate any help,

Thanks in advance,

John







XSD
~~~
<?xml version="1.0"
encoding="UTF-8"?>
<xs:schema xmlnss=&qu
ot;http://www.w3.
org/2001/XMLSchema"
		xmlns:myfoons="urn:customurn"
 		targetNamespace="urn:customurn"
elementFormDefault="qualified">

	<xs:element name="info"
type="myfoons:information"/>

	<xs:complexType name="information">
		<xs:sequence>
				<xs:element name="firstname"
type="myfoons:Max32Text"/>
				<xs:element name="lastname"
type="myfoons:Max32Text"/>
				<xs:element name="address"
type="myfoons:Max32Text"/>
			</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="Max32Text">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="32"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>







XML
~~~
<?xml version="1.0"
encoding="UTF-8"?>
<myfoons:info xmlns:myfoons="urn:customurn"
xmlnssi=&q
uot;http:
//www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:customurn
simpleSchema.xsd">
 
<myfoons:firstname>fooName</myfoons:firstname>
 
<myfoons:lastname>foolastname</myfoons:lastname>

  <myfoons:address>fooaddress</myfoons:address>
</myfoons:info>



config.xsdconfig
~~~~~~~~~~~~~~~~
<xb:config  xmlnsb=&qu
ot;htt
p://www.bea.com/2002/09/xbean/config">
        		<!--<xb:namespace
uri="##local">-->
        		<xb:namespace
uri="urn:customurn">
           
		<xb:package>com.test.bug</xb:package>
        		</xb:namespace>
</xb:config>



SOURCE CODE
~~~~~~~~~~~

package testXmlBug;


import java.io.File;
import java.util.ArrayList;

import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
import org.apache.xmlbeans.XmlValidationError;

import com.test.bug.InfoDocument;
import com.test.bug.Information;


public class TestXmlBeans {
	public static void main(String[] args) {
		TestXmlBeans t = new TestXmlBeans();
		t.test();
	}



public void test() {


		InfoDocument root = null;
		try {


			File msg = new
File("src/testXmlBug/simpleXml.xml");

			root = InfoDocument.Factory.parse(msg);

			Information message = root.getInfo();

			//PLAYS WITH and WITHOUT copy()
//			String xpath = "declare namespace
ns1='urn:customurn';" +
//				"$this/ns1:firstname";

			//PLAYS WITHOUT copy
//			String xpath = "declare namespace
any='##local';" +
//			"$this/*[local-name()='firstname']";

			String xpath = "declare namespace
any='##local';" +
			"$this/*[local-name()='firstname']";


			XmlOptions opts = new XmlOptions();

			//XmlObject res[] = message.selectPath(xpath, opts);
			XmlObject res[] = message.copy().selectPath(xpath,
opts);


			System.out.println("~~~RESULTS~~~: " +
res.length);
			for(int i=0; i<res.length; i++) {
				System.out.println("res: " + res[i]);
			}

		} catch (Exception e) {
			System.err.println(e.getMessage());
			System.exit(1);
		}

		ArrayList errors = validate(root); // This function call
validates the
message.
		System.err.println("Message is
"+((errors.isEmpty())?
"valid.":"invalid."));


	}




public final ArrayList validate(XmlObject message){
	ArrayList errors = new ArrayList();
	XmlOptions xmlOptions = new XmlOptions();
	xmlOptions.setErrorListener(errors);
	message.validate(xmlOptions);
	ArrayList ret = new ArrayList();

	for(int i=0; i<errors.size(); i++){
		XmlValidationError error =
(XmlValidationError)errors.get(i);
		ret.add(error.getMessage());
	}
	return ret;
}
}





------------------------------------------------------------
---------
To unsubscribe, e-mail: user-unsubscribexmlbeans.apache.org
For additional commands, e-mail: user-helpxmlbeans.apache.org


--3343E20822A.1193397426/starfire.yahoo.com--

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )