You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by David Martinez <dm...@food.com> on 2002/08/05 19:55:43 UTC
Bad Types (null -> class...)
Hello,
I am trying to write a simple webservice that will be accessed from MS.Net.
Passing xsd primitives works okay, but passing any bean type breaks with
"Bad Types (null-> class MyBeanClass ).
You will find the WSDL attached. Here is the relevant server-config.wsdd
section:
<service name="CatalogServicePort" provider="java:RPC">
<parameter name="className"
value="proto.food.websvc.CatalogRetrievalService"/>
<parameter name="allowedMethods" value="retrieveXMLDataSet"/>
</service>
I'm running the axis servlet under JBoss 3's jetty. Other services (passing
simple strings) work just fine.
Any help would be greatly appreciated.
- David Martinez
---------- Request ----------------
POST /foodws/services/CatalogServicePort HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 1.0.3705.0)
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 963
Expect: 100-continue
Host: dmartinez09
HTTP/1.1 100 Continue
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://localhost:8080/foodws/services/CatalogServicePort/foodws/s
ervices/CatalogServicePort"
xmlns:types="http://localhost:8080/foodws/services/CatalogServicePort/foodws
/services/CatalogServicePort/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:retrieveXMLDataSet>
<catalogName xsi:type="xsd:string">TIMEZONES</catalogName>
<authInfo href="#id1" />
</tns:retrieveXMLDataSet>
<q1:AuthInfo id="id1" xsi:type="q1:AuthInfo"
xmlns:q1="http://messages.websvc.food.proto">
<serviceUserName
xsi:type="xsd:string">sampleuser</serviceUserName>
<servicePassword
xsi:type="xsd:string">samplepassword</servicePassword>
</q1:AuthInfo>
</soap:Body>
</soap:Envelope>
----------- Response ---------------
HTTP/1.0 500 Internal Server Error
Date: Mon, 05 Aug 2002 17:32:41 GMT
Server: Jetty/4.0.1 (Windows 2000 5.0 x86)
Servlet-Engine: Jetty/1.1 (Servlet 2.3; JSP 1.2; java 1.4.0_01)
Content-Type: text/xml; charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode
xmlns:ns1="http://xml.apache.org/axis/">ns1:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: Bad types (null -> class
proto.food.websvc.messages.AuthInfo)</faultstring>
<detail>
<ns2:stackTrace xmlns:ns2="http://xml.apache.org/axis/">
org.xml.sax.SAXException: Bad types (null -> class
proto.food.websvc.messages.AuthInfo)
at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:207)
at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserializa
tionContextImpl.java:857)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:199)

at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
644)
at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:201)
at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:259)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:1
61)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:289)&#x
d;
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.server.AxisServer.invoke(AxisServer.java:312)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:577)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:371)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:607)
;
at org.mortbay.http.HttpContext.handle(HttpContext.java:1387)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1326)
at org.mortbay.http.HttpServer.service(HttpServer.java:757)
at org.jboss.jetty.Jetty.service(Jetty.java:527)
at
org.mortbay.http.HttpConnection.service(HttpConnection.java:742)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:915)
at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:757)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:151)&#x
d;
at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
at
org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:715)
at java.lang.Thread.run(Thread.java:536)
</ns2:stackTrace>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>