Hi Guys,
I can't figure out why I'm getting this error; is there something wrong with
the service's XML output?
ServiceClient client;
client = new ServiceClient();
Options options = new Options();
options.setTo(new
EndpointReference("https://apasproxy.athabascau.ca/axis/services/APASQueueService"));
client.setOptions(options);
OMElement request;
OMFactory factory;
factory = OMAbstractFactory.getOMFactory();
request = factory.createOMElement(new
QName("http://APASProxy.DataTypes/2007/04/", "GetHostInstitution"));
OMElement response;
response = client.sendReceive(request);
System.out.println(response.toString());
<GetHostInstitutionResponse
xmlns="http://APASProxy.DataTypes/2007/04/"><ns1:GetHostInstitutionResult
xmlns:ns1="http://APASProxy.DataTypes/2007/04"><ns1:SourceId>48002000</ns1:SourceId><ns1:EducationalInstitutionName>Athabasca
University</ns1:EducationalInstitutionName></ns1:GetHostInstitutionResult></GetHostInstitutionResponse>
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement GetHostInstitutionResult
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
servicecontracts.apasproxy._2007._04.APASQueueServiceStub.fromOM(APASQueueServiceStub.java:35302)
at
servicecontracts.apasproxy._2007._04.APASQueueServiceStub.GetHostInstitution(APASQueueServiceStub.java:2467)
at ca.athabascau.apas.APAS.main(APAS.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException:
Unexpected subelement GetHostInstitutionResult
at
servicecontracts.apasproxy._2007._04.APASQueueServiceStub$GetHostInstitutionResponse$Factory.parse(APASQueueServiceStub.java:12645)
at
servicecontracts.apasproxy._2007._04.APASQueueServiceStub.fromOM(APASQueueServiceStub.java:35226)
... 7 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement
GetHostInstitutionResult
at
servicecontracts.apasproxy._2007._04.APASQueueServiceStub$GetHostInstitutionResponse$Factory.parse(APASQueueServiceStub.java:12639)
... 8 more
Process finished with exit code 0
Trenton D. Adams
Systems Analyst/Web Software Engineer
Navy Penguins at your service!
Athabasca University
(780) 675-6195
:wq!
__
This communication is intended for the use of the recipient to whom it
is addressed, and may contain confidential, personal, and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take
action relying on it. Any communications received in error, or
subsequent reply, should be deleted or destroyed.
---