No top level accessor provided for conversion

I’m exposing a sequence as a Web Service via the Mediator XML Gateway. I’m able to invoke the sequence correctly, but I get an error when the Gateway receives the response from the sequence. The error I get in the Gateway is:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“XML Schema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
soapenv:Body
soapenv:Fault
soapenv:Server.userException
javax.resource.ResourceException: no top level accessor provided for conversion; nested exception is:
com.softwareag.fresno.resourceadapter.managed.ManagedAdapterException: no top level accessor provided for conversion

<ns1:stackTrace xmlns:ns1=“http://xml.apache.org/axis/”>AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.resource.ResourceException: no top level accessor provided for conversion; nested exception is:
com.softwareag.fresno.resourceadapter.managed.ManagedAdapterException: no top level accessor provided for conversion
faultActor:
faultNode:
faultDetail:

javax.resource.ResourceException: no top level accessor provided for conversion; nested exception is:
com.softwareag.fresno.resourceadapter.managed.ManagedAdapterException: no top level accessor provided for conversion
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:559)
at org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespaceBinder.java:853)
at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:643)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:2978)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:918)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDocumentFragmentScannerImpl.java:1145)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:988)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1446)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:529)
at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:585)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1148)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:675)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:1672)
at com.softwareag.fresno.webapps.fresno.ConnectorClient.invoke(ConnectorClient.java:340)
at com.softwareag.fresno.webapps.fresno.ConnectorClient.invoke(ConnectorClient.java:264)
at com.softwareag.fresno.argus.agent.XMLGatewaysAgent.job_ws_test_impl(XMLGatewaysAgent.java:1616)
at com.softwareag.fresno.argus.agent.XMLGatewaysAgent.job_ws_test(XMLGatewaysAgent.java:1557)
at com.softwareag.fresno.argus.agent.XMLGatewaysAgent.getDetail(XMLGatewaysAgent.java:5563)
at com.softwareag.systemmanagementhub.base.ArgAgent.dispatchRunMode(ArgAgent.java:195)
at com.softwareag.fresno.argus.agent.XMLGatewaysAgent.dispatchRunMode(XMLGatewaysAgent.java:207)
at com.softwareag.systemmanagementhub.base.ArgAgent.runAgent(ArgAgent.java:175)
at com.softwareag.systemmanagementhub.base.ArgAgent.(ArgAgent.java:144)
at com.softwareag.fresno.argus.agent.XMLGatewaysAgent.(XMLGatewaysAgent.java:157)
at com.softwareag.fresno.webapps.agentserver.XMLGatewaysServerServlet.XMLGatewaysAgent(XMLGatewaysServerServlet.java:167)
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:324)
at com.softwareag.fresno.webapps.agentserver.GSBaseServlet.dispatch(GSBaseServlet.java:60)
at com.softwareag.fresno.webapps.agentserver.GSBaseServlet.doGetOrPost(GSBaseServlet.java:35)
at com.softwareag.fresno.webapps.agentserver.GSBaseServlet.doPost(GSBaseServlet.java:26)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
</ns1:stackTrace>

</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

I’m not sure what the reason for this error is or what I can do to fix it. I know it is relatedt to the output message I defined in the Gateway.

Attached you will find an export of my Gateway Repository. Any suggestions on how to fix the problem will be greatly appreciated.

Regards
Theo
weather.war.zip (5.96 MB)

Hi Theo,

You input and output message definitions don’t look right. You need to import the message definitions for the Mediator Gateway from a schema or a DTD.

Jason

Hi Jason,

I have done as you suggested and I made some progress. The messages are sent to the Sequence and I receive the proper response. I have encountered a new problem however. When using XMLSpy to create a SOAP Request, the message is not created properly. The SOAP Request document contains no child nodes, only the empty SOAP Envelope.

The SOAP Request document created from the WSDL file looks as follows:

<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“XML Schema”>
SOAP-ENV:Body
<m:InputDocument xmlns:m=“404”/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Somehow the input message structure is not mapped in the WSDL file.

Am I doing something wrong when I create the input message for the Gateway? I did import the schema I created for the document into the Gateway in order to create the input message.

Attached you will find the schema I used.

Theo
Gateway_Get_Info_By_Zipcode.xsd (442 Bytes)

Hi Theo,

Please try this with version 7.2.2

Jason

The problem was not due to the version of the Gateways, but rather to a user error! :rolleyes:

I created the XML schema (which I used to create the Gateway message) from the XML document. This resulted in an “incorrect” definition of the elements within XML schema. Once I changed the XML Schema everything worked fine. Below is an example of what I corrected.

Incorrect Schema

<?xml version="1.0" encoding="UTF-8"?>
" TARGET=_blank>http://www.xmlspy.com)–>
<xs:schema elementFormDefault=“qualified” xmlns:xs=“XML Schema”>
<xs:element name=“Get_Info_By_Zipcode”>
xs:complexType
xs:sequence
<xs:element ref=“Zipcode”/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name=“Zipcode”>
xs:complexType/
</xs:element>
</xs:schema>

Correct Schema

<?xml version="1.0" encoding="UTF-8"?>
" TARGET=_blank>http://www.xmlspy.com)–>
<xs:schema elementFormDefault=“qualified” xmlns:xs=“XML Schema”>
<xs:element name=“Get_Info_By_Zipcode”>
xs:complexType
xs:sequence
<xs:element name=“Zipcode” type=“xs:string”/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>


Cheers
Theo