org.xml.sax.SAXParseException - Unexpected element: CDATA

nopePlan

Grünschnabel
hallo,
wenn ich meinen Code ausführe erhalte ich diese Fehlermeldung.
org.xml.sax.SAXParseException - Unexpected element: CDATA

kann mir jemand helfen ? o_O bin blutiger anfänger ..^^

Welcome.jsp
Code:
<body>
<f:view>
	<f:loadBundle basename="Hello_World.bundle.messages" var="msg"/>
	<h:form>
		<h:outputLabel value="Welcome #{loginView.username}"></h:outputLabel>
		<br/>
		<h:outputLabel value="#{msg.Proxy}"></h:outputLabel>
			<h:panelGrid columns="2">
				<h:outputLabel value="#{msg.loginID_proxy}"></h:outputLabel>
				<h:inputText value="#{proxy_var.loginID_proxy}"></h:inputText>
				<h:outputLabel value="#{msg.loginPW_proxy}"></h:outputLabel>
				<h:inputText value="#{proxy_var.loginPW_proxy}"></h:inputText>
				<h:outputLabel value="#{msg.port_proxy}"></h:outputLabel>
				<h:inputText value="#{proxy_var.port_proxy}"></h:inputText>
				<h:outputLabel value="#{msg.address_proxy}"></h:outputLabel>
				<h:inputText value="#{proxy_var.address_proxy}"></h:inputText>
			</h:panelGrid>
		<h:commandButton action="#{proxy_var.submit_var}" value="Submit"></h:commandButton>
	</h:form>
</f:view>
</body>

Proxy_var.java
Code:
package Hello_World.model;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;
import org.apache.xmlbeans.XmlAnySimpleType;
import org.apache.xmlbeans.XmlException;
import roche2Axeda.cLink.rig.roche.Roche2AxedaDocument;
import roche2Axeda.cLink.rig.roche.Roche2AxedaDocument.Roche2Axeda;
import roche2Axeda.cLink.rig.roche.Roche2AxedaDocument.Roche2Axeda.Proxy;

public class Proxy_var {
	private String mLoginPW_proxy;
	private String mLoginID_proxy;
	private int mPrort_proxy;
	private String mAddress_proxy;
	
	public void setLoginPW_proxy(String LoginPW)
	{
		this.mLoginPW_proxy = LoginPW;
	}
	public String getLoginPW_proxy()
	{
		return mLoginPW_proxy;
	}
	
	public void setLoginID_proxy(String LoginID)
	{
		this.mLoginID_proxy = LoginID;
	}	
	public String getLoginID_proxy()

	{
		return mLoginID_proxy;
	}
	
	public void setPort_proxy(int Port)
	{
		this.mPrort_proxy = Port;
	}
	public int getPort_proxy()
	{
		return mPrort_proxy;
	}
	
	public void setAddress_proxy(String Address)
	{
		this.mAddress_proxy = Address;
	}
	public String getAddress_proxy()
	{
		return mAddress_proxy;
	}
	
	public String submit_var() throws XmlException, IOException
	{
		
		//XML File Create
		Roche2AxedaDocument xmlDoc = Roche2AxedaDocument.Factory.newInstance();
		Roche2Axeda roche2axeda = xmlDoc.addNewRoche2Axeda();
		
		//BigDecimal wird erstellt für version
		BigDecimal big = BigDecimal.valueOf(1.0);
		roche2axeda.setVersion(big);

		Proxy xmlProxy = roche2axeda.addNewProxy(); //Proxy Element
		//XmlAnySimpleType LoginPW = XmlAnySimpleType.Factory.parse(getLoginPW_proxy()); .
		XmlAnySimpleType LoginName = XmlAnySimpleType.Factory.parse(getLoginID_proxy());
		
		xmlProxy.setLoginname(LoginName);
		xmlProxy.setPort(getPort_proxy());
		xmlProxy.setAddress(getAddress_proxy());
				
		System.out.println(xmlDoc.toString());
		FileWriter outFile = new FileWriter("C:/TFS/DP.RSS/Development/RSG/Source/Hello_World/test.xml");
		PrintWriter out = new PrintWriter(outFile);
		out.print(xmlDoc.toString());
		out.close();
		return "OK";
	}

}

danke für eure hilfe
 
Zurück