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 "Ross L. Wayland" <rl...@virginia.edu> on 2002/08/17 21:43:19 UTC
Newbie question re simple Client using axis beta3
Hi,
I'm still somewhat new to axis and was hoping someone could point out
what I'm missing in this simple TestClient example. The
Serializers/Deserializers for the type MIMETypedStream were generated
using the wsdl2java emitter so I know they exist and are in the
classpath when running the TestClient but I still get an error
indicating that the appropriate Deserializer can't be found. Is there
some additional step required to tell axis where to locate the
deserializer class? thanks in advance for any pointers....
Ross
import javax.xml.namespace.QName;
import org.apache.axis.client.Service;
import org.apache.axis.client.Call;
import java.util.Calendar;
public class TestClient
{
public TestClient()
{
}
public static void main(String[] args)
{
String PID = "uva-lib:1220";
String bDefPID = "uva-bdef-stdimg:8";
String qName1 = "http://www.fedora.info/definitions/1/0/api/" ;
String qName2 = "http://www.fedora.info/definitions/1/0/types/" ;
String endpoint = "http://localhost:8080/fedora/access/soap" ;
Calendar asOfDate = null;
try
{
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new javax.xml.namespace.QName(qName1,
"GetBehaviorMethods") );
call.setReturnType(new javax.xml.namespace.QName(qName2,
"MIMETypedStream"), fedora.server.types.MIMETypedStream.class);
--> fedora.server.types.MIMETypedStream methodDefs =
(fedora.server.types.MIMETypedStream) call.invoke( new Object[] { PID,
bDefPID, asOfDate} );
String mime = methodDefs.getMIMEType();
System.out.println("MIME: "+mime);
} catch (Exception e)
{
System.err.println(e.toString());
}
}
}
- Exception:
org.xml.sax.SAXException: Deserializing parameter 'response': could not
find deserializer for type {
http://www.fedora.info/definitions/1/0/types/ }MIMETypedStream
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:231)
at
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.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:235)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:259)
at org.apache.axis.client.Call.invoke(Call.java:1806)
at org.apache.axis.client.Call.invoke(Call.java:1711)
at org.apache.axis.client.Call.invoke(Call.java:1251)
at fedora.server.access.TestClient.main(TestClient.java:41)
org.xml.sax.SAXException: Deserializing parameter 'response': could not
find deserializer for type {
http://www.fedora.info/definitions/1/0/types/ }MIMETypedStream
--
________________________________________________________________________
Ross Wayland
Email: rlw@virginia.edu University of Virginia
Phone: 434-924-0746 Alderman Library - Systems Office
FAX: 434-924-1431 Charlottesville, VA 22903-2498
--
________________________________________________________________________
Ross Wayland
Email: rlw@virginia.edu University of Virginia
Phone: 434-924-0746 Alderman Library - Systems Office
FAX: 434-924-1431 Charlottesville, VA 22903-2498