axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@us.ibm.com
Subject Re: bad types
Date Tue, 03 Sep 2002 20:57:19 GMT
Is it possible that null is being returned by the service implementation
(use tcpmon to see the messages)?  Your code sets the return type to
XSD_STRING, but XSD_STRING cannot be null.  Try SOAP_STRING, which CAN be
null.  Or make sure null is not being returned.

Russell Butek
butek@us.ibm.com


"Mahmood Mohammed" <mahmood@insevo.com> on 09/03/2002 03:46:54 PM

Please respond to axis-user@xml.apache.org

To:    <axis-user@xml.apache.org>
cc:
Subject:    bad types



Hi

I wrote to execute a sample client problem, It through the following Bad
types error,


// Set up serialization encoding for the Widget object
qname = new QName( NAMESPACE_URI, "address" );
call.registerTypeMapping( Address.class, qname,
  new AddressSerFactory(),
  new AddressDeserFactory() );

call.addParameter( "arg1", qname, ParameterMode.IN );
call.setReturnType( Constants.XSD_STRING );

Address addr = new Address();
addr.setName( "my name" );
addr.setStreet( "my street" );
addr.setCity( "my city");
addr.setState( "ca");
addr.setZip( "99899");
addr.setCountry( "USA" );

response = ( String )call.invoke( new Object[]{addr} ); // response is
name( string ).


============== ERROR =====================
org.xml.sax.SAXException: Bad types (null -> class java.lang.String)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.jav
a:135)      at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseriali
zationContextImpl.java:904)   at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser
.java:559)  at
org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespaceB
inder.java:853)   at
org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.
java:643)

I am trying to figure out what is wrong in the client problem?
Any input is appreciated?


Thanks
 mohammed



Mime
View raw message