HI,
I'm using axis 1.4 and the latest download of tomcat, and am trying to
send a tree structure as soap. This has been causing me lots of
problems, so I tried doing a simplified version of the idea, to see if I
could locate the problem, however I can't get this to work either.
If I send just a leaf it works fine, however if I send the second
(commented out) data structure I get the error at the end of this
message. The soap that was sent is included after the error. After
experimenting, I am coming to the conclusion that axis is trying to
build abstract classes! What can I do to get round this? All the WSDL,
serialises and the client stub where generated using the axis tools. Any
help with sorting this would be greatly appreciated, I have included the
all the code for this example.
Daniel
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: No object was found for class
type class axisTest.Tree
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:userpc55.comlab.ox.ac.uk
org.xml.sax.SAXException: No object was found for class type class
axisTest.Tree
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at
axisTest.client.AxisTestSoapBindingStub.print(AxisTestSoapBindingStub.java:161)
at axisTest.Client.<init>(Client.java:20)
at axisTest.Client.main(Client.java:10)
<?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><ns1:print
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://axisTest"><t href="#id0"/></ns1:print><multiRef
id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:node"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="axisTest"><left href="#id1"/><right
href="#id2"/></multiRef><multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:node" xmlns:ns3="axisTest"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><left
href="#id3"/><right href="#id4"/></multiRef><multiRef id="id2"
soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns4:leaf" xmlns:ns4="axisTest"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><value
xsi:type="xsd:string">C</value></multiRef><multiRef id="id3"
soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns5:leaf" xmlns:ns5="axisTest"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><value
xsi:type="xsd:string">A</value></multiRef><multiRef id="id4"
soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns6:leaf" xmlns:ns6="axisTest"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><value
xsi:type="xsd:string">B</value></multiRef></soapenv:Body></soapenv:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://localhost:8080/axis/services/AxisTest" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/axis/services/AxisTest" xmlns:intf="http://localhost:8080/axis/services/AxisTest" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="axisTest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema targetNamespace="axisTest" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType abstract="true" name="tree">
<sequence/>
</complexType>
<complexType name="leaf">
<complexContent>
<extension base="tns1:tree">
<sequence>
<element name="value" nillable="true" type="xsd:string"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="node">
<complexContent>
<extension base="tns1:tree">
<sequence>
<element name="left" nillable="true" type="tns1:tree"/>
<element name="right" nillable="true" type="tns1:tree"/>
</sequence>
</extension>
</complexContent>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="printRequest">
<wsdl:part name="t" type="tns1:tree"/>
</wsdl:message>
<wsdl:message name="printResponse">
<wsdl:part name="printReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="TestService">
<wsdl:operation name="print" parameterOrder="t">
<wsdl:input message="impl:printRequest" name="printRequest"/>
<wsdl:output message="impl:printResponse" name="printResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AxisTestSoapBinding" type="impl:TestService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="print">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="printRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://axisTest" use="encoded"/>
</wsdl:input>
<wsdl:output name="printResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/services/AxisTest" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestServiceService">
<wsdl:port binding="impl:AxisTestSoapBinding" name="AxisTest">
<wsdlsoap:address location="http://localhost:8080/axis/services/AxisTest"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
package axisTest;
import axisTest.client.TestService;
import axisTest.client.TestServiceServiceLocator;
public class Client {
public static void main(String[] args) throws Exception {
new Client();
}
public Client() throws Exception
{
//Tree t = new Leaf("A");
Tree t = new Node( new Node(new Leaf("A"), new Leaf("B")), new
Leaf("C"));
System.out.println(t.print());
TestService testService = new
TestServiceServiceLocator().getAxisTest();
String result = testService.print(t);
System.out.println(result);
}
}
/**
* Leaf.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
*/
package axisTest;
public class Leaf extends axisTest.Tree implements java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 2645462104070585112L;
private java.lang.String value;
public Leaf() {
}
public Leaf(
java.lang.String value) {
this.value = value;
}
public String print() {
return value;
}
/**
* Gets the value value for this Leaf.
*
* @return value
*/
public java.lang.String getValue() {
return value;
}
/**
* Sets the value value for this Leaf.
*
* @param value
*/
public void setValue(java.lang.String value) {
this.value = value;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof Leaf)) return false;
Leaf other = (Leaf) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj) &&
((this.value==null && other.getValue()==null) ||
(this.value!=null &&
this.value.equals(other.getValue())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getValue() != null) {
_hashCode += getValue().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(Leaf.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("axisTest", "leaf"));
org.apache.axis.description.ElementDesc elemField = new
org.apache.axis.description.ElementDesc();
elemField.setFieldName("value");
elemField.setXmlName(new javax.xml.namespace.QName("", "value"));
elemField.setXmlType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
/**
* Node.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
*/
package axisTest;
public class Node extends axisTest.Tree implements java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 8309838118752032821L;
private axisTest.Tree left;
private axisTest.Tree right;
public Node() {
}
public Node(
axisTest.Tree left,
axisTest.Tree right) {
this.left = left;
this.right = right;
}
public String print()
{
String out ="(";
if(left != null)
out = out + left.print();
out = out + ",";
if(right!=null)
out = out + right.print();
return out + ")";
}
/**
* Gets the left value for this Node.
*
* @return left
*/
public axisTest.Tree getLeft() {
return left;
}
/**
* Sets the left value for this Node.
*
* @param left
*/
public void setLeft(axisTest.Tree left) {
this.left = left;
}
/**
* Gets the right value for this Node.
*
* @return right
*/
public axisTest.Tree getRight() {
return right;
}
/**
* Sets the right value for this Node.
*
* @param right
*/
public void setRight(axisTest.Tree right) {
this.right = right;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof Node)) return false;
Node other = (Node) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj) &&
((this.left==null && other.getLeft()==null) ||
(this.left!=null &&
this.left.equals(other.getLeft()))) &&
((this.right==null && other.getRight()==null) ||
(this.right!=null &&
this.right.equals(other.getRight())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getLeft() != null) {
_hashCode += getLeft().hashCode();
}
if (getRight() != null) {
_hashCode += getRight().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(Node.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("axisTest", "node"));
org.apache.axis.description.ElementDesc elemField = new
org.apache.axis.description.ElementDesc();
elemField.setFieldName("left");
elemField.setXmlName(new javax.xml.namespace.QName("", "left"));
elemField.setXmlType(new javax.xml.namespace.QName("axisTest", "tree"));
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("right");
elemField.setXmlName(new javax.xml.namespace.QName("", "right"));
elemField.setXmlType(new javax.xml.namespace.QName("axisTest", "tree"));
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
package axisTest;
public class TestService {
public String print(Tree t)
{
return t.print();
}
}
/**
* Tree.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
*/
package axisTest;
public abstract class Tree implements java.io.Serializable {
public Tree() {
}
public abstract String print();
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof Tree)) return false;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true;
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(Tree.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("axisTest", "tree"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
/**
* AxisTestSoapBindingStub.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
*/
package axisTest.client;
public class AxisTestSoapBindingStub extends org.apache.axis.client.Stub
implements axisTest.client.TestService {
private java.util.Vector cachedSerClasses = new java.util.Vector();
private java.util.Vector cachedSerQNames = new java.util.Vector();
private java.util.Vector cachedSerFactories = new java.util.Vector();
private java.util.Vector cachedDeserFactories = new java.util.Vector();
static org.apache.axis.description.OperationDesc [] _operations;
static {
_operations = new org.apache.axis.description.OperationDesc[1];
_initOperationDesc1();
}
private static void _initOperationDesc1(){
org.apache.axis.description.OperationDesc oper;
org.apache.axis.description.ParameterDesc param;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("print");
param = new org.apache.axis.description.ParameterDesc(new
javax.xml.namespace.QName("", "t"),
org.apache.axis.description.ParameterDesc.IN, new
javax.xml.namespace.QName("axisTest", "tree"), axisTest.Tree.class, false,
false);
oper.addParameter(param);
oper.setReturnType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
oper.setReturnClass(java.lang.String.class);
oper.setReturnQName(new javax.xml.namespace.QName("", "printReturn"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[0] = oper;
}
public AxisTestSoapBindingStub() throws org.apache.axis.AxisFault {
this(null);
}
public AxisTestSoapBindingStub(java.net.URL endpointURL,
javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
this(service);
super.cachedEndpoint = endpointURL;
}
public AxisTestSoapBindingStub(javax.xml.rpc.Service service) throws
org.apache.axis.AxisFault {
if (service == null) {
super.service = new org.apache.axis.client.Service();
} else {
super.service = service;
}
((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
java.lang.Class cls;
javax.xml.namespace.QName qName;
java.lang.Class beansf =
org.apache.axis.encoding.ser.BeanSerializerFactory.class;
java.lang.Class beandf =
org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
qName = new javax.xml.namespace.QName("axisTest", "leaf");
cachedSerQNames.add(qName);
cls = axisTest.Leaf.class;
cachedSerClasses.add(cls);
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);
qName = new javax.xml.namespace.QName("axisTest", "node");
cachedSerQNames.add(qName);
cls = axisTest.Node.class;
cachedSerClasses.add(cls);
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);
qName = new javax.xml.namespace.QName("axisTest", "tree");
cachedSerQNames.add(qName);
cls = axisTest.Tree.class;
cachedSerClasses.add(cls);
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);
}
protected org.apache.axis.client.Call createCall() throws
java.rmi.RemoteException {
try {
org.apache.axis.client.Call _call = super._createCall();
if (super.maintainSessionSet) {
_call.setMaintainSession(super.maintainSession);
}
if (super.cachedUsername != null) {
_call.setUsername(super.cachedUsername);
}
if (super.cachedPassword != null) {
_call.setPassword(super.cachedPassword);
}
if (super.cachedEndpoint != null) {
_call.setTargetEndpointAddress(super.cachedEndpoint);
}
if (super.cachedTimeout != null) {
_call.setTimeout(super.cachedTimeout);
}
if (super.cachedPortName != null) {
_call.setPortName(super.cachedPortName);
}
java.util.Enumeration keys = super.cachedProperties.keys();
while (keys.hasMoreElements()) {
java.lang.String key = (java.lang.String) keys.nextElement();
_call.setProperty(key, super.cachedProperties.get(key));
}
// All the type mapping information is registered
// when the first call is made.
// The type mapping information is actually registered in
// the TypeMappingRegistry of the service, which
// is the reason why registration is only needed for the first call.
synchronized (this) {
if (firstCall()) {
// must set encoding style before registering serializers
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
for (int i = 0; i < cachedSerFactories.size(); ++i) {
java.lang.Class cls = (java.lang.Class)
cachedSerClasses.get(i);
javax.xml.namespace.QName qName =
(javax.xml.namespace.QName)
cachedSerQNames.get(i);
java.lang.Object x = cachedSerFactories.get(i);
if (x instanceof Class) {
java.lang.Class sf = (java.lang.Class)
cachedSerFactories.get(i);
java.lang.Class df = (java.lang.Class)
cachedDeserFactories.get(i);
_call.registerTypeMapping(cls, qName, sf, df,
false);
}
else if (x instanceof
javax.xml.rpc.encoding.SerializerFactory) {
org.apache.axis.encoding.SerializerFactory sf =
(org.apache.axis.encoding.SerializerFactory)
cachedSerFactories.get(i);
org.apache.axis.encoding.DeserializerFactory df =
(org.apache.axis.encoding.DeserializerFactory)
cachedDeserFactories.get(i);
_call.registerTypeMapping(cls, qName, sf, df,
false);
}
}
}
}
return _call;
}
catch (java.lang.Throwable _t) {
throw new org.apache.axis.AxisFault("Failure trying to get the Call
object", _t);
}
}
public java.lang.String print(axisTest.Tree t) throws
java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[0]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://axisTest",
"print"));
setRequestHeaders(_call);
setAttachments(_call);
try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {t});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (java.lang.String) _resp;
} catch (java.lang.Exception _exception) {
return (java.lang.String)
org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
}
}
} catch (org.apache.axis.AxisFault axisFaultException) {
throw axisFaultException;
}
}
}
/**
* TestService.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
*/
package axisTest.client;
public interface TestService extends java.rmi.Remote {
public java.lang.String print(axisTest.Tree t) throws
java.rmi.RemoteException;
}
/**
* TestServiceService.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
*/
package axisTest.client;
public interface TestServiceService extends javax.xml.rpc.Service {
public java.lang.String getAxisTestAddress();
public axisTest.client.TestService getAxisTest() throws
javax.xml.rpc.ServiceException;
public axisTest.client.TestService getAxisTest(java.net.URL portAddress)
throws javax.xml.rpc.ServiceException;
}
/**
* TestServiceServiceLocator.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
*/
package axisTest.client;
public class TestServiceServiceLocator extends org.apache.axis.client.Service
implements axisTest.client.TestServiceService {
/**
*
*/
private static final long serialVersionUID = 1297371341051737604L;
public TestServiceServiceLocator() {
}
public TestServiceServiceLocator(org.apache.axis.EngineConfiguration
config) {
super(config);
}
public TestServiceServiceLocator(java.lang.String wsdlLoc,
javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
super(wsdlLoc, sName);
}
// Use to get a proxy class for AxisTest
private java.lang.String AxisTest_address =
"http://localhost:8081/axis/services/AxisTest";
public java.lang.String getAxisTestAddress() {
return AxisTest_address;
}
// The WSDD service name defaults to the port name.
private java.lang.String AxisTestWSDDServiceName = "AxisTest";
public java.lang.String getAxisTestWSDDServiceName() {
return AxisTestWSDDServiceName;
}
public void setAxisTestWSDDServiceName(java.lang.String name) {
AxisTestWSDDServiceName = name;
}
public axisTest.client.TestService getAxisTest() throws
javax.xml.rpc.ServiceException {
java.net.URL endpoint;
try {
endpoint = new java.net.URL(AxisTest_address);
}
catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
return getAxisTest(endpoint);
}
public axisTest.client.TestService getAxisTest(java.net.URL portAddress)
throws javax.xml.rpc.ServiceException {
try {
axisTest.client.AxisTestSoapBindingStub _stub = new
axisTest.client.AxisTestSoapBindingStub(portAddress, this);
_stub.setPortName(getAxisTestWSDDServiceName());
return _stub;
}
catch (org.apache.axis.AxisFault e) {
return null;
}
}
public void setAxisTestEndpointAddress(java.lang.String address) {
AxisTest_address = address;
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws
javax.xml.rpc.ServiceException {
try {
if
(axisTest.client.TestService.class.isAssignableFrom(serviceEndpointInterface)) {
axisTest.client.AxisTestSoapBindingStub _stub = new
axisTest.client.AxisTestSoapBindingStub(new java.net.URL(AxisTest_address),
this);
_stub.setPortName(getAxisTestWSDDServiceName());
return _stub;
}
}
catch (java.lang.Throwable t) {
throw new javax.xml.rpc.ServiceException(t);
}
throw new javax.xml.rpc.ServiceException("There is no stub
implementation for the interface: " + (serviceEndpointInterface == null ?
"null" : serviceEndpointInterface.getName()));
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class
serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
if (portName == null) {
return getPort(serviceEndpointInterface);
}
java.lang.String inputPortName = portName.getLocalPart();
if ("AxisTest".equals(inputPortName)) {
return getAxisTest();
}
else {
java.rmi.Remote _stub = getPort(serviceEndpointInterface);
((org.apache.axis.client.Stub) _stub).setPortName(portName);
return _stub;
}
}
public javax.xml.namespace.QName getServiceName() {
return new
javax.xml.namespace.QName("http://localhost:8080/axis/services/AxisTest",
"TestServiceService");
}
private java.util.HashSet ports = null;
public java.util.Iterator getPorts() {
if (ports == null) {
ports = new java.util.HashSet();
ports.add(new
javax.xml.namespace.QName("http://localhost:8080/axis/services/AxisTest",
"AxisTest"));
}
return ports.iterator();
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(java.lang.String portName, java.lang.String
address) throws javax.xml.rpc.ServiceException {
if ("AxisTest".equals(portName)) {
setAxisTestEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint
Address for Unknown Port" + portName);
}
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(javax.xml.namespace.QName portName,
java.lang.String address) throws javax.xml.rpc.ServiceException {
setEndpointAddress(portName.getLocalPart(), address);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<globalConfiguration>
<parameter name="sendMultiRefs" value="true"/>
<parameter name="disablePrettyXML" value="true"/>
<parameter name="adminPassword" value="admin"/>
<parameter name="attachments.Directory" value="/usr/axis-test/webapps/axis/WEB-INF/attachments"/>
<parameter name="dotNetSoapEncFix" value="true"/>
<parameter name="enableNamespacePrefixOptimization" value="false"/>
<parameter name="sendXMLDeclaration" value="true"/>
<parameter name="sendXsiTypes" value="true"/>
<parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
<requestFlow>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="session"/>
</handler>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="request"/>
<parameter name="extension" value=".jwr"/>
</handler>
</requestFlow>
</globalConfiguration>
<handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
<handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
<handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
<service name="AdminService" provider="java:MSG">
<parameter name="allowedMethods" value="AdminService"/>
<parameter name="enableRemoteAdmin" value="false"/>
<parameter name="className" value="org.apache.axis.utils.Admin"/>
<namespace>http://xml.apache.org/axis/wsdd/</namespace>
</service>
<service name="Version" provider="java:RPC">
<parameter name="allowedMethods" value="getVersion"/>
<parameter name="className" value="org.apache.axis.Version"/>
</service>
<service name="AxisTest" provider="java:RPC">
<parameter name="allowedMethods" value="*"/>
<parameter name="scope" value="Application"/>
<parameter name="className" value="axisTest.TestService"/>
<beanMapping languageSpecificType="java:axisTest.Node" qname="ns1:node" xmlns:ns1="axisTest"/>
<beanMapping languageSpecificType="java:axisTest.Leaf" qname="ns2:leaf" xmlns:ns2="axisTest"/>
<beanMapping languageSpecificType="java:axisTest.Tree" qname="ns3:tree" xmlns:ns3="axisTest"/>
</service>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
<handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
<parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
<parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
</transport>
<transport name="local">
<responseFlow>
<handler type="LocalResponder"/>
</responseFlow>
</transport>
</deployment>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]