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 "Phil Suh (JIRA)" <ax...@ws.apache.org> on 2006/08/04 23:38:14 UTC
[jira] Commented: (AXIS-2433) When AXIS make deserialization of
complex structure it raise SAXException: Invalid element in ...
[ http://issues.apache.org/jira/browse/AXIS-2433?page=comments#action_12425871 ]
Phil Suh commented on AXIS-2433:
--------------------------------
Seems to be related to AXIS-1603 and AXIS-1761. AXIS-1761 has some analysis and a workaround that I could not figure out.
> When AXIS make deserialization of complex structure it raise SAXException: Invalid element in ...
> -------------------------------------------------------------------------------------------------
>
> Key: AXIS-2433
> URL: http://issues.apache.org/jira/browse/AXIS-2433
> Project: Apache Axis
> Issue Type: Bug
> Components: Serialization/Deserialization
> Affects Versions: 1.3
> Environment: Host OS - Windows, Java 2 sdk1.4.2_04, Axis-1.3, xerces-2_7_1
> Reporter: Alex Komarov
>
> WSDL - http://www.swsoft.com/webservices/vza/3.0.3/VZA.wsdl
> When AXIS make deserialization of complex structure VeType in call :
> VeType[] ves = vem.ve_info(veids, new Boolean(true), conf); /* see code below */
> it raise SAXException: Invalid element in com.swsoft.www.webservices.vza._3_0_3.vem.VeType - state
> Stack call :
> at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
> at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
> at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
> at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
> at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
> at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
> at org.apache.axis.client.Call.invoke(Call.java:2467)
> at org.apache.axis.client.Call.invoke(Call.java:2366)
> at org.apache.axis.client.Call.invoke(Call.java:1812)
> at com.swsoft.www.webservices.vza.WSDL._3_0_3.vem.VemBindingStub.ve_info(VemBindingStub.java:6996)
> ----------------------------- MyVZATest.java --------------------------------
> import com.swsoft.www.webservices.vza._3_0_3.vem.*;
> import com.swsoft.www.webservices.vza._3_0_3.service.VemLocator;
> import com.swsoft.www.webservices.vza._3_0_3.service.TicketmLocator;
> import com.swsoft.www.webservices.vza._3_0_3.types.Ve_configTypeQos;
> import com.swsoft.www.webservices.vza.WSDL._3_0_3.vem.*;
> import com.swsoft.www.webservices.vza.WSDL._3_0_3.ticketm.*;
> import org.apache.axis.client.Stub;
> import org.apache.axis.AxisFault;
> import org.apache.axis.message.SOAPHeaderElement;
> import javax.xml.rpc.ServiceException;
> import javax.xml.soap.SOAPElement;
> import java.rmi.RemoteException;
> public class MyVZATest {
> public static void main(String[] args) throws RemoteException, ServiceException {
> try {
> System.out.println("Starting...");
> //use fake trust manager to trust all certificates
> System.setProperty("org.apache.axis.components.net.SecureSocketFactory", "org.apache.axis.components.net.SunFakeTrustSocketFactory");
> String m_url = "http://localhost:8081/";
> TicketmLocator ticketmLoc = new TicketmLocator();
> ticketmLoc.setticketmSoapEndpointAddress( m_url );
> TicketmPort ticketm = ticketmLoc.getticketmSoap();
> String user = "username";
> String pwd = "password";
> String session = ticketm.login("", user, pwd.getBytes());
> VemLocator locator = new VemLocator();
> locator.setvemSoapEndpointAddress( m_url );
> VemPort vem = locator.getvemSoap();
> //set session's ticket to a packet header
> Stub s = (Stub) vem;
> SOAPHeaderElement el = new SOAPHeaderElement("", "packet_header");
> SOAPElement sel = el.addChildElement("session");
> sel.addTextNode("");
> sel.setValue(session);
> s.setHeader(el);
> long[] veids = {1, 101};
> Ve_infoConfig conf = new Ve_infoConfig();
> conf.setBase_set(new Boolean("true"));
> conf.setHostname(new Boolean("true"));
> conf.setQos(new Boolean("true"));
> Ve_info inf = new Ve_info();
> inf.setVeid(veids);
> inf.setStatus(new Boolean("true"));
> inf.setConfig(conf);
> try {
> VeType[] ves = vem.ve_info(veids, new Boolean(true), conf);
> for (int i = 0; i < ves.length; i++) {
> VeType ve = ves[i];
> String str = "veid: " + ve.getVeid().toString()
> + " state: " + ve.getStatus().getState().toString()
> + " baseset: " + ve.getConfig().getBase_set()
> + " hostname: " + ve.getConfig().getHostname() + "\n";
> Ve_configTypeQos[] qos = ve.getConfig().getQos();
> System.out.println(qos.length);
> for (int j = 0; j < qos.length; j++) {
> str = str + "QoS:" + qos[j].getId() +
> " SOFT:" + qos[j].getSoft() +
> " HARD:" + qos[j].getHard() + "\n";
> }
> System.out.println(str);
> }
> } catch (AxisFault f)
> {
> System.out.println("FAULT CODE: " + f.getFaultCode());
> System.out.println("FAULT REASON: " + f.getFaultReason());
> System.out.println("FAULT STRING: " + f.getFaultString());
> for (int j = 0; j < f.getFaultDetails().length; j++) {
> System.out.println("DETAILS:" + f.getFaultDetails()[j].toString());
> }
> }
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> ----------------------------- END MyVZATest.java --------------------------------
> recieved SOAP Envelope:
> -----------------------------------
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soap:Header>
> <packet_header xmlns="http://www.swsoft.com/webservices/vza/3.0.3/protocol" time="2006-03-13T13:36:47+0000" priority="0" version="3.0.3">
> <origin>vem</origin>
> <session>vzagent0.30003.4f0c44157542t767d</session>
> <target>vzclient30</target>
> <dst>
> <director>servd</director>
> </dst>
> <cookie>ve_info</cookie>
> <auth>
> <ve_list xmlns:types="http://www.swsoft.com/webservices/vza/3.0.3/types">
> <types:veid>1</types:veid>
> </ve_list>
> </auth>
> <src>
> <director>opd</director>
> </src>
> </packet_header>
> </soap:Header>
> <soap:Body>
> <ve_infoResponse xmlns="http://www.swsoft.com/webservices/vza/3.0.3/vem">
> <ve>
> <veid>1</veid>
> <status xmlns:types="http://www.swsoft.com/webservices/vza/3.0.3/types">
> <types:state>running</types:state>
> </status>
> <config xmlns:types="http://www.swsoft.com/webservices/vza/3.0.3/types">
> <types:qos>
> <types:id>cpuunits</types:id>
> <types:hard>1000</types:hard>
> </types:qos>
> <types:qos>
> <types:id>numproc</types:id>
> <types:hard>0</types:hard>
> </types:qos>
> <types:qos>
> <types:id>vprvmem</types:id>
> <types:hard>0</types:hard>
> </types:qos>
> <types:qos>
> <types:id>numsessions</types:id>
> <types:hard>4294967295</types:hard>
> </types:qos>
> <types:qos>
> <types:id>diskspace</types:id>
> <types:hard>1000000</types:hard>
> </types:qos>
> <types:hostname>VPS1</types:hostname>
> <types:base_set>w2k3/00000000</types:base_set>
> </config>
> </ve>
> </ve_infoResponse>
> </soap:Body>
> </soap:Envelope>
> -----------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org