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 Jian Zhang <jz...@symcor.com> on 2002/10/03 21:10:21 UTC
An invalid XML character (Unicode: 0x1)
Actually I am using Soap implementation 2.3.1.
I just want to try my luck here with AXIS.
I need to resolve the problem as soon as possible, so please
accept my apology for sending this email to axis user list.
I got the following error message from the server:
--------------------------------------------------------------
Caught SOAPException (SOAP-ENV:Client): Parsing error, response was:
An invalid XML character (Unicode: 0x1) was found in the element content of
the
document.
--------------------------------------------------------------
The service have several methods, logon(), openFolder(), search(), and
getdoc().
logon(), openFolder(), search() exchange regular types (String, etc.).
but getdoc() returns an image (byte[]) as class member. The jpeg image I got
is correct
as I can show it with browser.
Intersting thing is once I call the gedoc(), I get this error if I call
search().
But I can call openFolder(). So I guess that the search() method might have
problem.
Here is the JavaBean that are used to call search() methods:
I appreciate any suggestions from you.
Thanks,
=================================
package com.symcor.od.common.soap.message;
import java.util.*;
/**
* <p>Title: </p>
* <p>Description: this class represents a search criteria where its name is
the
* criterion value where its search value will be given by an application
user. </p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
*/
public final class Criterion implements java.lang.Cloneable,
java.io.Serializable {
public final static int OPEQUAL = 1;
public final static int OPBETWEEN = OPEQUAL + 1;
public final static int TYPE_LIST = OPBETWEEN + 1;
public final static int TYPE_NON_LIST = TYPE_LIST + 1;
public final static String VALUE_LIST_ALL = "** All **";
// Fields
private String name;
private int searchOp;
/** currently unused. If used, they need to be converted to Criterion
operand constants. */
// private int[] validOps;
private int type; // seems that char type is not supported by
BeanSerializer
// perhaps that char type is not supported by XML
schema.
private String[] fixedValues;
private String[] defaultValues; // default values set by the
administrator, equal to ODCriterion.getValues().
private String[] searchValues;
public static final String KEYWORD_IS_REQUIRED = "Required";
// Constructors
public Criterion(String name)
{
this.name = name;
};
public Criterion()
{
};
// Methods
public String getName() { return name; };
public void setName (String name) { this.name = name; };
public int getOperand() { return searchOp; };
public void setOperand(int searchOp) { this.searchOp = searchOp; };
public int getType() {return type; };
public void setType(int type) {this.type = type;};
public String[] getFixedValues() {return fixedValues; };
public void setFixedValues(String[] fixedValues) {this.fixedValues =
fixedValues; };
public String[] getSearchValues() {return this.searchValues; };
public void setSearchValues(String[] searchValues) {this.searchValues
= searchValues; };
// default values;
public String[] getDefaultValues() { return defaultValues; };
public void setDefaultValues(String[] defaultValues)
{this.defaultValues = defaultValues;};
public Object clone () {
try {
return super.clone();
} catch (CloneNotSupportedException e) {
throw new java.lang.Error ("JVM error, check up your JVM
version." );
}
}
public static void main (String[] args) {
Criterion c1 = new Criterion("Processing Date [YYYY-MM-DD)
[Required]");
System.exit(0);
c1.setDefaultValues(new String[] {"default 000", "default 111"});
c1.setFixedValues(new String[] {"fixed 000", "fixed 111"});
c1.setSearchValues(new String[] {"search 000"});
Vector v = new Vector();
Criterion c2 = (Criterion)c1.clone();
c2.setName("c two");
v.add(c2);
System.out.println(v);
}
}