1
複合クラスパラメータをwsdlに送信する際に例外が発生しています。KSOAPで複合パラメータを送信する際の問題
私の応答では、私は、このログを取得しています:ここで
Exception: SoapFault - faultcode: 'S:Server' faultstring: 'javax.xml.bind.UnmarshalException - with linked exception:[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,471]Message: Element type "systemGenerated" must be followed by either attribute specifications, ">" or "/>".]' faultactor: 'null' detail: [email protected]:::::::::::::::::::::::::::::::::::0Access00000000 BuyLimitLimit02233.000000001000.00.00.0 Response>>>>>>>in exceptionnnn>>>>>>>>>>S:Serverjavax.xml.bind.UnmarshalException - with linked exception:[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,471]Message: Element type "systemGenerated" must be followed by either attribute specifications, ">" or "/>".]javax.xml.bind.UnmarshalException - with linked exception:
は、そのための私のコードスニペットです。メンバーは私にそれのための解決策を提供してください。
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
MarshalDouble md = new MarshalDouble();// **this class is made to parse the double values**
md.register(envelope);
SoapObject rpc = new SoapObject(serviceNamespace, "getTradeOrderTotal");
envelope.dotNet = false;
envelope.setOutputSoapObject(rpc);
envelope.encodingStyle = SoapSerializationEnvelope.XSD;
envelope.addMapping(serviceNamespace, "MTradeOrder", new MTradeOrder().getClass());
MTradeOrder mt = new MTradeOrder(); //This is my complex class implementing kvmserializable.
/* mt.portfolioName=AppScreen.name2;
mt.securityName=AppScreen.symbol11; // These are the parameters that i am setting to my complex class
mt.orderType=AppScreen.ordertype;
mt.priceType=AppScreen.Pricetype;
mt.quantityRequested=AppScreen.quantity1;
mt.orderTermName=ActiveTradeOrder.orderterm;
mt.limitPrice=AppScreen.limitprice;*/
PropertyInfo pi = new PropertyInfo();
// pi.type=MarshalDouble.class;
rpc.addProperty("arg0", new MTradeOrder());
HttpTransportBasicAuth ht = new HttpTransportBasicAuth(serviceUrl, AppScreen.wsunS, AppScreen.wspwdS);
ht.debug = true;
String result;
try
{
ht.call(soapAction, envelope);
result = (envelope.getResponse()).toString();
System.out.println("Request::::::dump::::::::::::::::::::::::::::: \n" + ht.requestDump);
System.out.println("Response>>>>>>>>>>>>>>>>> \n" + ht.responseDump);
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run()
{
Dialog.alert("Login Successful!");
}
});
}
catch (Exception ex)
{
result = ex.toString();
System.out.println("Exception: " + result);
System.out.println("Request::::::::::::::::::::::::::::::::::: \n" + ht.requestDump);
System.out.println("Response>>>>>>>in exceptionnnn>>>>>>>>>> \n" + ht.responseDump);
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run()
{
Dialog.alert("Login Unsuccessful!\nPlease try again.");
}
});
}
}