antelder 2003/01/03 06:40:46 Modified: java/test/interop InteropDocTest.java Added: java/test/interop/wsifserviceWrapped ComplexDocument_Type.java ComplexDocumentResponse.java Doc_Test_BindingStub.java InteropDocSvcTestCase.java InteropDocSvc.java SimpleDocumentResponse.java SingleTagResponse.java Doc_TestPortType.java SingleTag_ElemType.java InteropDocSvcLocator.java ComplexDocument_ElemType.java SimpleDocument_ElemType.java ArrayOfSimpleDocument.java SingleTag_Type.java ChildDocument.java SimpleDocument_Type.java java/test/interop InteropDocWrappedTest.java Log: Add testcases interop doc style tests using stubs Revision Changes Path 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/ComplexDocument_Type.java Index: ComplexDocument_Type.java =================================================================== /** * ComplexDocument_Type.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class ComplexDocument_Type implements java.io.Serializable { private interop.wsifserviceWrapped.ArrayOfSimpleDocument simpleDoc; private interop.wsifserviceWrapped.ChildDocument child; private java.lang.String anAttribute; // attribute public ComplexDocument_Type() { } public interop.wsifserviceWrapped.ArrayOfSimpleDocument getSimpleDoc() { return simpleDoc; } public void setSimpleDoc(interop.wsifserviceWrapped.ArrayOfSimpleDocument simpleDoc) { this.simpleDoc = simpleDoc; } public interop.wsifserviceWrapped.ChildDocument getChild() { return child; } public void setChild(interop.wsifserviceWrapped.ChildDocument child) { this.child = child; } public java.lang.String getAnAttribute() { return anAttribute; } public void setAnAttribute(java.lang.String anAttribute) { this.anAttribute = anAttribute; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ComplexDocument_Type)) return false; ComplexDocument_Type other = (ComplexDocument_Type) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((simpleDoc==null && other.getSimpleDoc()==null) || (simpleDoc!=null && simpleDoc.equals(other.getSimpleDoc()))) && ((child==null && other.getChild()==null) || (child!=null && child.equals(other.getChild()))) && ((anAttribute==null && other.getAnAttribute()==null) || (anAttribute!=null && anAttribute.equals(other.getAnAttribute()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getSimpleDoc() != null) { _hashCode += getSimpleDoc().hashCode(); } if (getChild() != null) { _hashCode += getChild().hashCode(); } if (getAnAttribute() != null) { _hashCode += getAnAttribute().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(ComplexDocument_Type.class); static { org.apache.axis.description.FieldDesc field = new org.apache.axis.description.AttributeDesc(); field.setFieldName("anAttribute"); field.setXmlName(new javax.xml.namespace.QName("", "AnAttribute")); field.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); typeDesc.addFieldDesc(field); field = new org.apache.axis.description.ElementDesc(); field.setFieldName("simpleDoc"); field.setXmlName(new javax.xml.namespace.QName("http://soapinterop.org/", "simpleDoc")); field.setXmlType(new javax.xml.namespace.QName("http://soapinterop.org/", "ArrayOfSimpleDocument")); field.setMinOccursIs0(true); typeDesc.addFieldDesc(field); field = new org.apache.axis.description.ElementDesc(); field.setFieldName("child"); field.setXmlName(new javax.xml.namespace.QName("http://soapinterop.org/", "child")); field.setXmlType(new javax.xml.namespace.QName("http://soapinterop.org/", "ChildDocument")); field.setMinOccursIs0(true); typeDesc.addFieldDesc(field); }; /** * 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); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/ComplexDocumentResponse.java Index: ComplexDocumentResponse.java =================================================================== /** * ComplexDocumentResponse.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class ComplexDocumentResponse implements java.io.Serializable { private interop.wsifserviceWrapped.ComplexDocument_Type complexDocument; public ComplexDocumentResponse() { } public interop.wsifserviceWrapped.ComplexDocument_Type getComplexDocument() { return complexDocument; } public void setComplexDocument(interop.wsifserviceWrapped.ComplexDocument_Type complexDocument) { this.complexDocument = complexDocument; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ComplexDocumentResponse)) return false; ComplexDocumentResponse other = (ComplexDocumentResponse) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((complexDocument==null && other.getComplexDocument()==null) || (complexDocument!=null && complexDocument.equals(other.getComplexDocument()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getComplexDocument() != null) { _hashCode += getComplexDocument().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(ComplexDocumentResponse.class); static { org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc(); field.setFieldName("complexDocument"); field.setXmlName(new javax.xml.namespace.QName("http://soapinterop.org/", "ComplexDocument")); field.setXmlType(new javax.xml.namespace.QName("http://soapinterop.org/", "ComplexDocument")); field.setMinOccursIs0(true); typeDesc.addFieldDesc(field); }; /** * 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); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/Doc_Test_BindingStub.java Index: Doc_Test_BindingStub.java =================================================================== /** * Doc_Test_BindingStub.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class Doc_Test_BindingStub extends org.apache.axis.client.Stub implements interop.wsifserviceWrapped.Doc_TestPortType { 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(); public Doc_Test_BindingStub() throws org.apache.axis.AxisFault { this(null); } public Doc_Test_BindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { this(service); super.cachedEndpoint = endpointURL; } public Doc_Test_BindingStub(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; } 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; java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; qName = new javax.xml.namespace.QName("http://soapinterop.org/", ">ComplexDocument"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.ComplexDocument_ElemType.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("http://soapinterop.org/", ">SingleTagResponse"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.SingleTagResponse.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("http://soapinterop.org/", "ArrayOfSimpleDocument"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.ArrayOfSimpleDocument.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("http://soapinterop.org/", "SingleTag"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.SingleTag_Type.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("http://soapinterop.org/", "ComplexDocument"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.ComplexDocument_Type.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("http://soapinterop.org/", "ChildDocument"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.ChildDocument.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("http://soapinterop.org/", ">SimpleDocumentResponse"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.SimpleDocumentResponse.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("http://soapinterop.org/", ">SimpleDocument"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.SimpleDocument_ElemType.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("http://soapinterop.org/", "SimpleDocument"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.SimpleDocument_Type.class; cachedSerClasses.add(cls); cachedSerFactories.add(simplesf); cachedDeserFactories.add(simpledf); qName = new javax.xml.namespace.QName("http://soapinterop.org/", ">SingleTag"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.SingleTag_ElemType.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("http://soapinterop.org/", ">ComplexDocumentResponse"); cachedSerQNames.add(qName); cls = interop.wsifserviceWrapped.ComplexDocumentResponse.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); } private org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { try { org.apache.axis.client.Call _call = (org.apache.axis.client.Call) super.service.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(); if(_call.isPropertySupported(key)) _call.setProperty(key, super.cachedProperties.get(key)); else _call.setScopedProperty(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.setEncodingStyle(null); 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.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); } } } return _call; } catch (java.lang.Throwable t) { throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t); } } public interop.wsifserviceWrapped.SingleTagResponse singleTag(interop.wsifserviceWrapped.SingleTag_ElemType parameters) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.addParameter(new javax.xml.namespace.QName("http://soapinterop.org/", "SingleTag"), new javax.xml.namespace.QName("http://soapinterop.org/", ">SingleTag"), interop.wsifserviceWrapped.SingleTag_ElemType.class, javax.xml.rpc.ParameterMode.IN); _call.setReturnType(new javax.xml.namespace.QName("http://soapinterop.org/", ">SingleTagResponse"), interop.wsifserviceWrapped.SingleTagResponse.class); _call.setUseSOAPAction(true); _call.setSOAPActionURI("http://soapinterop.org/SingleTag"); _call.setEncodingStyle(null); _call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setScopedProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setOperationStyle("document"); _call.setOperationName(new javax.xml.namespace.QName("http://soapinterop.org/", "SingleTag")); java.lang.Object _resp = _call.invoke(new java.lang.Object[] {parameters}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { try { return (interop.wsifserviceWrapped.SingleTagResponse) _resp; } catch (java.lang.Exception _exception) { return (interop.wsifserviceWrapped.SingleTagResponse) org.apache.axis.utils.JavaUtils.convert(_resp, interop.wsifserviceWrapped.SingleTagResponse.class); } } } public interop.wsifserviceWrapped.SimpleDocumentResponse simpleDocument(interop.wsifserviceWrapped.SimpleDocument_ElemType parameters) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.addParameter(new javax.xml.namespace.QName("http://soapinterop.org/", "SimpleDocument"), new javax.xml.namespace.QName("http://soapinterop.org/", ">SimpleDocument"), interop.wsifserviceWrapped.SimpleDocument_ElemType.class, javax.xml.rpc.ParameterMode.IN); _call.setReturnType(new javax.xml.namespace.QName("http://soapinterop.org/", ">SimpleDocumentResponse"), interop.wsifserviceWrapped.SimpleDocumentResponse.class); _call.setUseSOAPAction(true); _call.setSOAPActionURI("http://soapinterop.org/SimpleDocument"); _call.setEncodingStyle(null); _call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setScopedProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setOperationStyle("document"); _call.setOperationName(new javax.xml.namespace.QName("http://soapinterop.org/", "SimpleDocument")); java.lang.Object _resp = _call.invoke(new java.lang.Object[] {parameters}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { try { return (interop.wsifserviceWrapped.SimpleDocumentResponse) _resp; } catch (java.lang.Exception _exception) { return (interop.wsifserviceWrapped.SimpleDocumentResponse) org.apache.axis.utils.JavaUtils.convert(_resp, interop.wsifserviceWrapped.SimpleDocumentResponse.class); } } } public interop.wsifserviceWrapped.ComplexDocumentResponse complexDocument(interop.wsifserviceWrapped.ComplexDocument_ElemType parameters) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.addParameter(new javax.xml.namespace.QName("http://soapinterop.org/", "ComplexDocument"), new javax.xml.namespace.QName("http://soapinterop.org/", ">ComplexDocument"), interop.wsifserviceWrapped.ComplexDocument_ElemType.class, javax.xml.rpc.ParameterMode.IN); _call.setReturnType(new javax.xml.namespace.QName("http://soapinterop.org/", ">ComplexDocumentResponse"), interop.wsifserviceWrapped.ComplexDocumentResponse.class); _call.setUseSOAPAction(true); _call.setSOAPActionURI("http://soapinterop.org/ComplexDocument"); _call.setEncodingStyle(null); _call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setScopedProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setOperationStyle("document"); _call.setOperationName(new javax.xml.namespace.QName("http://soapinterop.org/", "ComplexDocument")); java.lang.Object _resp = _call.invoke(new java.lang.Object[] {parameters}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { try { return (interop.wsifserviceWrapped.ComplexDocumentResponse) _resp; } catch (java.lang.Exception _exception) { return (interop.wsifserviceWrapped.ComplexDocumentResponse) org.apache.axis.utils.JavaUtils.convert(_resp, interop.wsifserviceWrapped.ComplexDocumentResponse.class); } } } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/InteropDocSvcTestCase.java Index: InteropDocSvcTestCase.java =================================================================== /** * InteropDocSvcTestCase.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class InteropDocSvcTestCase extends junit.framework.TestCase { public InteropDocSvcTestCase(java.lang.String name) { super(name); } public void test1interopDocPortSingleTag() { interop.wsifserviceWrapped.Doc_TestPortType binding; try { binding = new interop.wsifserviceWrapped.InteropDocSvcLocator().getinteropDocPort(); } catch (javax.xml.rpc.ServiceException jre) { if(jre.getLinkedCause()!=null) jre.getLinkedCause().printStackTrace(); throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { interop.wsifserviceWrapped.SingleTagResponse value = null; value = binding.singleTag(new interop.wsifserviceWrapped.SingleTag_ElemType()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test2interopDocPortSimpleDocument() { interop.wsifserviceWrapped.Doc_TestPortType binding; try { binding = new interop.wsifserviceWrapped.InteropDocSvcLocator().getinteropDocPort(); } catch (javax.xml.rpc.ServiceException jre) { if(jre.getLinkedCause()!=null) jre.getLinkedCause().printStackTrace(); throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { interop.wsifserviceWrapped.SimpleDocumentResponse value = null; value = binding.simpleDocument(new interop.wsifserviceWrapped.SimpleDocument_ElemType()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test3interopDocPortComplexDocument() { interop.wsifserviceWrapped.Doc_TestPortType binding; try { binding = new interop.wsifserviceWrapped.InteropDocSvcLocator().getinteropDocPort(); } catch (javax.xml.rpc.ServiceException jre) { if(jre.getLinkedCause()!=null) jre.getLinkedCause().printStackTrace(); throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { interop.wsifserviceWrapped.ComplexDocumentResponse value = null; value = binding.complexDocument(new interop.wsifserviceWrapped.ComplexDocument_ElemType()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/InteropDocSvc.java Index: InteropDocSvc.java =================================================================== /** * InteropDocSvc.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public interface InteropDocSvc extends javax.xml.rpc.Service { public java.lang.String getinteropDocPortAddress(); public interop.wsifserviceWrapped.Doc_TestPortType getinteropDocPort() throws javax.xml.rpc.ServiceException; public interop.wsifserviceWrapped.Doc_TestPortType getinteropDocPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/SimpleDocumentResponse.java Index: SimpleDocumentResponse.java =================================================================== /** * SimpleDocumentResponse.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class SimpleDocumentResponse implements java.io.Serializable { private interop.wsifserviceWrapped.SimpleDocument_Type simpleDocument; public SimpleDocumentResponse() { } public interop.wsifserviceWrapped.SimpleDocument_Type getSimpleDocument() { return simpleDocument; } public void setSimpleDocument(interop.wsifserviceWrapped.SimpleDocument_Type simpleDocument) { this.simpleDocument = simpleDocument; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof SimpleDocumentResponse)) return false; SimpleDocumentResponse other = (SimpleDocumentResponse) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((simpleDocument==null && other.getSimpleDocument()==null) || (simpleDocument!=null && simpleDocument.equals(other.getSimpleDocument()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getSimpleDocument() != null) { _hashCode += getSimpleDocument().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(SimpleDocumentResponse.class); static { org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc(); field.setFieldName("simpleDocument"); field.setXmlName(new javax.xml.namespace.QName("http://soapinterop.org/", "SimpleDocument")); field.setXmlType(new javax.xml.namespace.QName("http://soapinterop.org/", "SimpleDocument")); field.setMinOccursIs0(true); typeDesc.addFieldDesc(field); }; /** * 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); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/SingleTagResponse.java Index: SingleTagResponse.java =================================================================== /** * SingleTagResponse.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class SingleTagResponse implements java.io.Serializable { private interop.wsifserviceWrapped.SingleTag_Type singleTag; public SingleTagResponse() { } public interop.wsifserviceWrapped.SingleTag_Type getSingleTag() { return singleTag; } public void setSingleTag(interop.wsifserviceWrapped.SingleTag_Type singleTag) { this.singleTag = singleTag; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof SingleTagResponse)) return false; SingleTagResponse other = (SingleTagResponse) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((singleTag==null && other.getSingleTag()==null) || (singleTag!=null && singleTag.equals(other.getSingleTag()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getSingleTag() != null) { _hashCode += getSingleTag().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(SingleTagResponse.class); static { org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc(); field.setFieldName("singleTag"); field.setXmlName(new javax.xml.namespace.QName("http://soapinterop.org/", "SingleTag")); field.setXmlType(new javax.xml.namespace.QName("http://soapinterop.org/", "SingleTag")); field.setMinOccursIs0(true); typeDesc.addFieldDesc(field); }; /** * 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); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/Doc_TestPortType.java Index: Doc_TestPortType.java =================================================================== /** * Doc_TestPortType.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public interface Doc_TestPortType extends java.rmi.Remote { public interop.wsifserviceWrapped.SingleTagResponse singleTag(interop.wsifserviceWrapped.SingleTag_ElemType parameters) throws java.rmi.RemoteException; public interop.wsifserviceWrapped.SimpleDocumentResponse simpleDocument(interop.wsifserviceWrapped.SimpleDocument_ElemType parameters) throws java.rmi.RemoteException; public interop.wsifserviceWrapped.ComplexDocumentResponse complexDocument(interop.wsifserviceWrapped.ComplexDocument_ElemType parameters) throws java.rmi.RemoteException; } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/SingleTag_ElemType.java Index: SingleTag_ElemType.java =================================================================== /** * SingleTag_ElemType.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class SingleTag_ElemType implements java.io.Serializable { private interop.wsifserviceWrapped.SingleTag_Type singleTag; public SingleTag_ElemType() { } public interop.wsifserviceWrapped.SingleTag_Type getSingleTag() { return singleTag; } public void setSingleTag(interop.wsifserviceWrapped.SingleTag_Type singleTag) { this.singleTag = singleTag; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof SingleTag_ElemType)) return false; SingleTag_ElemType other = (SingleTag_ElemType) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((singleTag==null && other.getSingleTag()==null) || (singleTag!=null && singleTag.equals(other.getSingleTag()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getSingleTag() != null) { _hashCode += getSingleTag().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(SingleTag_ElemType.class); static { org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc(); field.setFieldName("singleTag"); field.setXmlName(new javax.xml.namespace.QName("http://soapinterop.org/", "SingleTag")); field.setXmlType(new javax.xml.namespace.QName("http://soapinterop.org/", "SingleTag")); field.setMinOccursIs0(true); typeDesc.addFieldDesc(field); }; /** * 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); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/InteropDocSvcLocator.java Index: InteropDocSvcLocator.java =================================================================== /** * InteropDocSvcLocator.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class InteropDocSvcLocator extends org.apache.axis.client.Service implements interop.wsifserviceWrapped.InteropDocSvc { // Use to get a proxy class for interopDocPort private final java.lang.String interopDocPort_address = "http://www.whitemesa.net/interopdoc"; public java.lang.String getinteropDocPortAddress() { return interopDocPort_address; } // The WSDD service name defaults to the port name. private java.lang.String interopDocPortWSDDServiceName = "interopDocPort"; public java.lang.String getinteropDocPortWSDDServiceName() { return interopDocPortWSDDServiceName; } public void setinteropDocPortWSDDServiceName(java.lang.String name) { interopDocPortWSDDServiceName = name; } public interop.wsifserviceWrapped.Doc_TestPortType getinteropDocPort() throws javax.xml.rpc.ServiceException { java.net.URL endpoint; try { endpoint = new java.net.URL(interopDocPort_address); } catch (java.net.MalformedURLException e) { return null; // unlikely as URL was validated in WSDL2Java } return getinteropDocPort(endpoint); } public interop.wsifserviceWrapped.Doc_TestPortType getinteropDocPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException { try { interop.wsifserviceWrapped.Doc_Test_BindingStub _stub = new interop.wsifserviceWrapped.Doc_Test_BindingStub(portAddress, this); _stub.setPortName(getinteropDocPortWSDDServiceName()); return _stub; } catch (org.apache.axis.AxisFault e) { return null; } } /** * 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 (interop.wsifserviceWrapped.Doc_TestPortType.class.isAssignableFrom(serviceEndpointInterface)) { interop.wsifserviceWrapped.Doc_Test_BindingStub _stub = new interop.wsifserviceWrapped.Doc_Test_BindingStub(new java.net.URL(interopDocPort_address), this); _stub.setPortName(getinteropDocPortWSDDServiceName()); 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 { 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://soapinterop.org/", "interopDocSvc"); } 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("interopDocPort")); } return ports.iterator(); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/ComplexDocument_ElemType.java Index: ComplexDocument_ElemType.java =================================================================== /** * ComplexDocument_ElemType.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class ComplexDocument_ElemType implements java.io.Serializable { private interop.wsifserviceWrapped.ComplexDocument_Type complexDocument; public ComplexDocument_ElemType() { } public interop.wsifserviceWrapped.ComplexDocument_Type getComplexDocument() { return complexDocument; } public void setComplexDocument(interop.wsifserviceWrapped.ComplexDocument_Type complexDocument) { this.complexDocument = complexDocument; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ComplexDocument_ElemType)) return false; ComplexDocument_ElemType other = (ComplexDocument_ElemType) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((complexDocument==null && other.getComplexDocument()==null) || (complexDocument!=null && complexDocument.equals(other.getComplexDocument()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getComplexDocument() != null) { _hashCode += getComplexDocument().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(ComplexDocument_ElemType.class); static { org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc(); field.setFieldName("complexDocument"); field.setXmlName(new javax.xml.namespace.QName("http://soapinterop.org/", "ComplexDocument")); field.setXmlType(new javax.xml.namespace.QName("http://soapinterop.org/", "ComplexDocument")); field.setMinOccursIs0(true); typeDesc.addFieldDesc(field); }; /** * 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); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/SimpleDocument_ElemType.java Index: SimpleDocument_ElemType.java =================================================================== /** * SimpleDocument_ElemType.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class SimpleDocument_ElemType implements java.io.Serializable { private interop.wsifserviceWrapped.SimpleDocument_Type simpleDocument; public SimpleDocument_ElemType() { } public interop.wsifserviceWrapped.SimpleDocument_Type getSimpleDocument() { return simpleDocument; } public void setSimpleDocument(interop.wsifserviceWrapped.SimpleDocument_Type simpleDocument) { this.simpleDocument = simpleDocument; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof SimpleDocument_ElemType)) return false; SimpleDocument_ElemType other = (SimpleDocument_ElemType) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((simpleDocument==null && other.getSimpleDocument()==null) || (simpleDocument!=null && simpleDocument.equals(other.getSimpleDocument()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getSimpleDocument() != null) { _hashCode += getSimpleDocument().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(SimpleDocument_ElemType.class); static { org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc(); field.setFieldName("simpleDocument"); field.setXmlName(new javax.xml.namespace.QName("http://soapinterop.org/", "SimpleDocument")); field.setXmlType(new javax.xml.namespace.QName("http://soapinterop.org/", "SimpleDocument")); field.setMinOccursIs0(true); typeDesc.addFieldDesc(field); }; /** * 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); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/ArrayOfSimpleDocument.java Index: ArrayOfSimpleDocument.java =================================================================== /** * ArrayOfSimpleDocument.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class ArrayOfSimpleDocument implements java.io.Serializable { private interop.wsifserviceWrapped.SimpleDocument_Type[] simpleDocument; public ArrayOfSimpleDocument() { } public interop.wsifserviceWrapped.SimpleDocument_Type[] getSimpleDocument() { return simpleDocument; } public void setSimpleDocument(interop.wsifserviceWrapped.SimpleDocument_Type[] simpleDocument) { this.simpleDocument = simpleDocument; } public interop.wsifserviceWrapped.SimpleDocument_Type getSimpleDocument(int i) { return simpleDocument[i]; } public void setSimpleDocument(int i, interop.wsifserviceWrapped.SimpleDocument_Type value) { this.simpleDocument[i] = value; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ArrayOfSimpleDocument)) return false; ArrayOfSimpleDocument other = (ArrayOfSimpleDocument) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((simpleDocument==null && other.getSimpleDocument()==null) || (simpleDocument!=null && java.util.Arrays.equals(simpleDocument, other.getSimpleDocument()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getSimpleDocument() != null) { for (int i=0; i<java.lang.reflect.Array.getLength(getSimpleDocument()); i++) { java.lang.Object obj = java.lang.reflect.Array.get(getSimpleDocument(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); } } } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(ArrayOfSimpleDocument.class); static { org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc(); field.setFieldName("simpleDocument"); field.setXmlName(new javax.xml.namespace.QName("http://soapinterop.org/", "SimpleDocument")); field.setMinOccursIs0(true); typeDesc.addFieldDesc(field); }; /** * 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); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/SingleTag_Type.java Index: SingleTag_Type.java =================================================================== /** * SingleTag_Type.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class SingleTag_Type implements java.io.Serializable { public SingleTag_Type() { } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof SingleTag_Type)) return false; SingleTag_Type other = (SingleTag_Type) obj; 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(SingleTag_Type.class); /** * 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, null); } /** * 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, null); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/ChildDocument.java Index: ChildDocument.java =================================================================== /** * ChildDocument.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class ChildDocument implements java.io.Serializable { private interop.wsifserviceWrapped.ArrayOfSimpleDocument childSimpleDoc; public ChildDocument() { } public interop.wsifserviceWrapped.ArrayOfSimpleDocument getChildSimpleDoc() { return childSimpleDoc; } public void setChildSimpleDoc(interop.wsifserviceWrapped.ArrayOfSimpleDocument childSimpleDoc) { this.childSimpleDoc = childSimpleDoc; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ChildDocument)) return false; ChildDocument other = (ChildDocument) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((childSimpleDoc==null && other.getChildSimpleDoc()==null) || (childSimpleDoc!=null && childSimpleDoc.equals(other.getChildSimpleDoc()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getChildSimpleDoc() != null) { _hashCode += getChildSimpleDoc().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(ChildDocument.class); static { org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc(); field.setFieldName("childSimpleDoc"); field.setXmlName(new javax.xml.namespace.QName("http://soapinterop.org/", "childSimpleDoc")); field.setXmlType(new javax.xml.namespace.QName("http://soapinterop.org/", "ArrayOfSimpleDocument")); field.setMinOccursIs0(true); typeDesc.addFieldDesc(field); }; /** * 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); } } 1.1 xml-axis-wsif/java/test/interop/wsifserviceWrapped/SimpleDocument_Type.java Index: SimpleDocument_Type.java =================================================================== /** * SimpleDocument_Type.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package interop.wsifserviceWrapped; public class SimpleDocument_Type implements java.io.Serializable, org.apache.axis.encoding.SimpleType { private java.lang.String value; public SimpleDocument_Type() { } // Simple Types must have a String constructor public SimpleDocument_Type(java.lang.String value) { this.value = new java.lang.String(value); } // Simple Types must have a toString for serializing the value public java.lang.String toString() { return value == null ? null : value.toString(); } public java.lang.String getValue() { return 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 SimpleDocument_Type)) return false; SimpleDocument_Type other = (SimpleDocument_Type) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((value==null && other.getValue()==null) || (value!=null && value.equals(other.getValue()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; 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(SimpleDocument_Type.class); static { org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc(); field.setFieldName("value"); field.setXmlName(new javax.xml.namespace.QName("", "value")); field.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); typeDesc.addFieldDesc(field); }; /** * 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.SimpleSerializer( _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.SimpleDeserializer( _javaType, _xmlType, typeDesc); } } 1.2 +11 -27 xml-axis-wsif/java/test/interop/InteropDocTest.java Index: InteropDocTest.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/test/interop/InteropDocTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- InteropDocTest.java 3 Jan 2003 10:41:41 -0000 1.1 +++ InteropDocTest.java 3 Jan 2003 14:40:46 -0000 1.2 @@ -57,12 +57,14 @@ package interop; -import interop.wsifservice.ArrayOfSimpleDocument; -import interop.wsifservice.ChildDocument; -import interop.wsifservice.ComplexDocument_Type; -import interop.wsifservice.SimpleDocument_Type; -import interop.wsifservice.SingleTag_Type; -import java.io.StringReader; +import interop.wsifserviceWrapped.ArrayOfSimpleDocument; +import interop.wsifserviceWrapped.ChildDocument; +import interop.wsifserviceWrapped.ComplexDocument_Type; +import interop.wsifserviceWrapped.Doc_TestPortType; +import interop.wsifserviceWrapped.SimpleDocument_Type; +import interop.wsifserviceWrapped.SingleTagResponse; +import interop.wsifserviceWrapped.SingleTag_ElemType; +import interop.wsifserviceWrapped.SingleTag_Type; import java.io.StringWriter; import junit.framework.Test; @@ -75,19 +77,11 @@ import org.apache.wsif.WSIFPort; import org.apache.wsif.WSIFService; import org.apache.wsif.WSIFServiceFactory; -import org.apache.xerces.parsers.DOMParser; import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.XMLSerializer; import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; import util.TestUtilities; -import docStyle.wsifservice.ZipCodeResolverSoap; -import docStyle.zipCodeNW.ShortZipCode; -import docStyle.zipCodeNW.ShortZipCodeResponse; - /** * Junit test to test out the AXIS provider docstyle support * @@ -95,7 +89,6 @@ * effort described at http://www.whitemesa.net/. The WSDL is * available online at http://www.whitemesa.net/wsdl/interopdoc.wsdl * - * TODO: tests using wrapped parts * TODO: tests using stubs * TODO: tests using messaging * @@ -321,7 +314,7 @@ WSIFMessage faultMsg = operation.createFaultMessage(); ComplexDocument_Type cdt = makeComplexDocument(); - testComplexDocument(cdt); + checkComplexDocument(cdt); inMsg.setObjectPart("ComplexDocument", cdt); @@ -343,7 +336,7 @@ assertTrue( "response part has wrong type: " + o.getClass(), ComplexDocument_Type.class.isAssignableFrom(o.getClass())); - testComplexDocument((ComplexDocument_Type)o); + checkComplexDocument((ComplexDocument_Type)o); } catch (Exception ex) { ex.printStackTrace(); @@ -380,7 +373,7 @@ return cdt; } - private void testComplexDocument(ComplexDocument_Type cdt) { + private void checkComplexDocument(ComplexDocument_Type cdt) { ArrayOfSimpleDocument asd = cdt.getSimpleDoc(); assertTrue("asd is null!!!", asd != null); @@ -406,13 +399,4 @@ } - - private void printElement(Element e) throws Exception { - OutputFormat of = new OutputFormat(e.getOwnerDocument(), "UTF-8", true); - XMLSerializer xmls = new XMLSerializer(of); - StringWriter sw = new StringWriter(); - xmls.setOutputCharStream(sw); - xmls.serialize(e); - System.err.println("element=" + sw.toString()); - } } 1.1 xml-axis-wsif/java/test/interop/InteropDocWrappedTest.java Index: InteropDocWrappedTest.java =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "WSIF" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation and was * originally based on software copyright (c) 2001, 2002, International * Business Machines, Inc., http://www.apache.org. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package interop; import interop.wsifserviceWrapped.ArrayOfSimpleDocument; import interop.wsifserviceWrapped.ChildDocument; import interop.wsifserviceWrapped.ComplexDocumentResponse; import interop.wsifserviceWrapped.ComplexDocument_ElemType; import interop.wsifserviceWrapped.ComplexDocument_Type; import interop.wsifserviceWrapped.Doc_TestPortType; import interop.wsifserviceWrapped.SimpleDocument_ElemType; import interop.wsifserviceWrapped.SimpleDocument_Type; import interop.wsifserviceWrapped.SingleTagResponse; import interop.wsifserviceWrapped.SingleTag_ElemType; import interop.wsifserviceWrapped.SingleTag_Type; import interop.wsifserviceWrapped.SimpleDocumentResponse; import java.io.StringWriter; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.wsif.WSIFException; import org.apache.wsif.WSIFMessage; import org.apache.wsif.WSIFOperation; import org.apache.wsif.WSIFPort; import org.apache.wsif.WSIFService; import org.apache.wsif.WSIFServiceFactory; import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.XMLSerializer; import org.w3c.dom.Element; import util.TestUtilities; /** * Junit test to test out the AXIS provider docstyle support using wrapped parts * * This test is part of the SOAP Builders interoperability testing * effort described at http://www.whitemesa.net/. The WSDL is * available online at http://www.whitemesa.net/wsdl/interopdoc.wsdl * * @author Ant Elder <[EMAIL PROTECTED]> */ public class InteropDocWrappedTest extends TestCase { String wsdlLocation = TestUtilities.getWsdlPath("java\\test\\interop\\wsifservice") + "interopdoc.wsdl"; // + "interopdocLocal.wsdl"; // "http://www.whitemesa.net/wsdl/interopdoc.wsdl"; public InteropDocWrappedTest(String name) { super(name); } public static void main(String[] args) { // TestUtilities.startListeners( // TestUtilities.ADDRESSBOOK_LISTENER // | TestUtilities.ASYNC_LISTENER // | TestUtilities.NATIVEJMS_LISTENER); junit.textui.TestRunner.run(suite()); // TestUtilities.stopListeners(); } public static Test suite() { return new TestSuite(InteropDocWrappedTest.class); } public void setUp() { TestUtilities.setUpExtensionsAndProviders(); } public void testSingleTagDII() { doitSingleTagDII("interopDocPort", "axis"); } public void testSimpleDocumentDII() { doitSimpleDocumentDII("interopDocPort", "axis"); } public void testComplexDocumentDII() { doitComplexDocumentDII("interopDocPort", "axis"); } public void testSingleTagStub() { doitSingleTagStub("interopDocPort", "axis"); } public void testSimpleDocumentStub() { doitSimpleDocumentStub("interopDocPort", "axis"); } public void testComplexDocumentStub() { doitComplexDocumentStub("interopDocPort", "axis"); } private void doitSingleTagDII(String portName, String protocol) { if (portName.toUpperCase().indexOf("JMS") != -1 && !TestUtilities.areWeTesting("jms")) return; TestUtilities.setProviderForProtocol(protocol); try { WSIFServiceFactory factory = WSIFServiceFactory.newInstance(); WSIFService service = factory.getService( wsdlLocation, null, null, "http://soapinterop.org/", "Doc_TestPortType"); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", ">SingleTag"), SingleTag_ElemType.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "SingleTag"), SingleTag_Type.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "SingleTagResponse"), SingleTagResponse.class ); WSIFPort port = service.getPort(portName); WSIFOperation operation = port.createOperation("SingleTag"); WSIFMessage inMsg = operation.createInputMessage(); WSIFMessage outMsg = operation.createOutputMessage(); WSIFMessage faultMsg = operation.createFaultMessage(); SingleTag_ElemType stet = new SingleTag_ElemType(); stet.setSingleTag(new SingleTag_Type()); inMsg.setObjectPart("parameters", stet); boolean ok = operation.executeRequestResponseOperation( inMsg, outMsg, faultMsg); assertTrue("operation returned false!!", ok); Object o = null; try { o = outMsg.getObjectPart("outputDoc"); assertTrue("response is null!!!", o != null); } catch (WSIFException e) { assertTrue("response part 'outputDoc' not found in output message!!!", false); } assertTrue( "response part has wrong type: " + o.getClass(), SingleTagResponse.class.isAssignableFrom(o.getClass())); SingleTagResponse response = (SingleTagResponse) o; assertNotNull("response singleTag is null!!!", response.getSingleTag()); } catch (Exception ex) { ex.printStackTrace(); assertTrue( "InteropDocTest.doitSingleTagDII(" + portName + ") caught exception " + ex.getLocalizedMessage(), false); } } private void doitSimpleDocumentDII(String portName, String protocol) { if (portName.toUpperCase().indexOf("JMS") != -1 && !TestUtilities.areWeTesting("jms")) return; TestUtilities.setProviderForProtocol(protocol); try { WSIFServiceFactory factory = WSIFServiceFactory.newInstance(); WSIFService service = factory.getService( wsdlLocation, null, null, "http://soapinterop.org/", "Doc_TestPortType"); service.mapPackage("http://soapinterop.org/", "interop.wsifserviceWrapped"); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", ">SimpleDocument"), SimpleDocument_ElemType.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "SimpleDocument"), SimpleDocument_Type.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "SimpleDocumentResponse"), SimpleDocumentResponse.class ); WSIFPort port = service.getPort(portName); WSIFOperation operation = port.createOperation("SimpleDocument"); WSIFMessage inMsg = operation.createInputMessage(); WSIFMessage outMsg = operation.createOutputMessage(); WSIFMessage faultMsg = operation.createFaultMessage(); SimpleDocument_ElemType sdtet = new SimpleDocument_ElemType(); SimpleDocument_Type sdt = new SimpleDocument_Type(); sdt.setValue("petra"); sdtet.setSimpleDocument(sdt); inMsg.setObjectPart("parameters", sdtet); boolean ok = operation.executeRequestResponseOperation( inMsg, outMsg, faultMsg); assertTrue("operation returned false!!", ok); Object o = null; try { o = outMsg.getObjectPart("outputDoc"); assertTrue("response is null!!!", o != null); } catch (WSIFException e) { assertTrue("response part 'outputDoc' not found in output message!!!", false); } assertTrue( "response part has wrong type: " + o.getClass(), SimpleDocumentResponse.class.isAssignableFrom(o.getClass())); SimpleDocumentResponse response = (SimpleDocumentResponse) o; SimpleDocument_Type sdtResponse = response.getSimpleDocument(); assertNotNull("response SimpleDocument is null!!!", sdtResponse); assertTrue( "document value wrong: " + sdtResponse.getValue(), sdt.getValue().equals(sdtResponse.getValue())); } catch (Exception ex) { ex.printStackTrace(); assertTrue( "InteropDocTest.doitSimpleDocumentDII(" + portName + ") caught exception " + ex.getLocalizedMessage(), false); } } private void doitComplexDocumentDII(String portName, String protocol) { if (portName.toUpperCase().indexOf("JMS") != -1 && !TestUtilities.areWeTesting("jms")) return; TestUtilities.setProviderForProtocol(protocol); try { WSIFServiceFactory factory = WSIFServiceFactory.newInstance(); WSIFService service = factory.getService( wsdlLocation, null, null, "http://soapinterop.org/", "Doc_TestPortType"); service.mapPackage("http://soapinterop.org/", "interop.wsifserviceWrapped"); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", ">ComplexDocument"), ComplexDocument_ElemType.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "ComplexDocument"), ComplexDocument_Type.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "ArrayOfSimpleDocument"), ArrayOfSimpleDocument.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "SimpleDocument"), SimpleDocument_Type.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "ChildDocument"), ChildDocument.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "ComplexDocumentResponse"), ComplexDocumentResponse.class ); WSIFPort port = service.getPort(portName); WSIFOperation operation = port.createOperation("ComplexDocument"); WSIFMessage inMsg = operation.createInputMessage(); WSIFMessage outMsg = operation.createOutputMessage(); WSIFMessage faultMsg = operation.createFaultMessage(); ComplexDocument_ElemType cdtet = new ComplexDocument_ElemType(); ComplexDocument_Type cdt = makeComplexDocument(); checkComplexDocument(cdt); cdtet.setComplexDocument(cdt); inMsg.setObjectPart("parameters", cdtet); boolean ok = operation.executeRequestResponseOperation( inMsg, outMsg, faultMsg); assertTrue("operation returned false!!", ok); Object o = null; try { o = outMsg.getObjectPart("outputDoc"); assertTrue("response is null!!!", o != null); } catch (WSIFException e) { assertTrue("response part 'outputDoc' not found in output message!!!", false); } assertTrue( "response part has wrong type: " + o.getClass(), ComplexDocumentResponse.class.isAssignableFrom(o.getClass())); ComplexDocumentResponse response = (ComplexDocumentResponse) o; ComplexDocument_Type cdtResponse = response.getComplexDocument(); assertNotNull("response ComplexDocument is null!!!", cdtResponse); checkComplexDocument(cdtResponse); } catch (Exception ex) { ex.printStackTrace(); assertTrue( "InteropDocTest.doitComplexDocumentDII(" + portName + ") caught exception " + ex.getLocalizedMessage(), false); } } private void doitSingleTagStub(String portName, String protocol) { if (portName.toUpperCase().indexOf("JMS") != -1 && !TestUtilities.areWeTesting("jms")) return; TestUtilities.setProviderForProtocol(protocol); try { WSIFServiceFactory factory = WSIFServiceFactory.newInstance(); WSIFService service = factory.getService( wsdlLocation, null, null, "http://soapinterop.org/", "Doc_TestPortType"); service.mapPackage("http://soapinterop.org/", "interop.wsifserviceWrapped"); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", ">SingleTag"), SingleTag_ElemType.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "SingleTag"), SingleTag_Type.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "SingleTagResponse"), SingleTagResponse.class ); Doc_TestPortType stub = (Doc_TestPortType) service.getStub(portName, Doc_TestPortType.class); SingleTag_ElemType stet = new SingleTag_ElemType(); stet.setSingleTag(new SingleTag_Type()); SingleTagResponse response = stub.singleTag(stet); assertNotNull("response is null!!!", response); assertNotNull("response singleTag is null!!!", response.getSingleTag()); } catch (Exception ex) { ex.printStackTrace(); assertTrue( "InteropDocTest.doitSingleTagDII(" + portName + ") caught exception " + ex.getLocalizedMessage(), false); } } private void doitSimpleDocumentStub(String portName, String protocol) { if (portName.toUpperCase().indexOf("JMS") != -1 && !TestUtilities.areWeTesting("jms")) return; TestUtilities.setProviderForProtocol(protocol); try { WSIFServiceFactory factory = WSIFServiceFactory.newInstance(); WSIFService service = factory.getService( wsdlLocation, null, null, "http://soapinterop.org/", "Doc_TestPortType"); service.mapPackage("http://soapinterop.org/", "interop.wsifserviceWrapped"); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", ">SimpleDocument"), SimpleDocument_ElemType.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "SimpleDocument"), SimpleDocument_Type.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "SimpleDocumentResponse"), SimpleDocumentResponse.class ); Doc_TestPortType stub = (Doc_TestPortType) service.getStub(portName, Doc_TestPortType.class); SimpleDocument_ElemType sdtet = new SimpleDocument_ElemType(); SimpleDocument_Type sdt = new SimpleDocument_Type(); sdt.setValue("petra"); sdtet.setSimpleDocument(sdt); SimpleDocumentResponse response = stub.simpleDocument(sdtet); assertNotNull("response is null!!!", response); SimpleDocument_Type sdtResponse = response.getSimpleDocument(); assertNotNull("response simpleDocument is null!!!", sdtResponse); assertTrue( "simpleDocument value wrong: " + sdtResponse.getValue(), sdt.getValue().equals(sdtResponse.getValue())); } catch (Exception ex) { ex.printStackTrace(); assertTrue( "InteropDocTest.doitSimpleDocumentDII(" + portName + ") caught exception " + ex.getLocalizedMessage(), false); } } private void doitComplexDocumentStub(String portName, String protocol) { if (portName.toUpperCase().indexOf("JMS") != -1 && !TestUtilities.areWeTesting("jms")) return; TestUtilities.setProviderForProtocol(protocol); try { WSIFServiceFactory factory = WSIFServiceFactory.newInstance(); WSIFService service = factory.getService( wsdlLocation, null, null, "http://soapinterop.org/", "Doc_TestPortType"); service.mapPackage("http://soapinterop.org/", "interop.wsifserviceWrapped"); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", ">ComplexDocument"), ComplexDocument_ElemType.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "ComplexDocument"), ComplexDocument_Type.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "ArrayOfSimpleDocument"), ArrayOfSimpleDocument.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "SimpleDocument"), SimpleDocument_Type.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "ChildDocument"), ChildDocument.class ); service.mapType( new javax.xml.namespace.QName( "http://soapinterop.org/", "ComplexDocumentResponse"), ComplexDocumentResponse.class ); Doc_TestPortType stub = (Doc_TestPortType) service.getStub(portName, Doc_TestPortType.class); ComplexDocument_ElemType cdtet = new ComplexDocument_ElemType(); ComplexDocument_Type cdt = makeComplexDocument(); checkComplexDocument(cdt); cdtet.setComplexDocument(cdt); ComplexDocumentResponse response = stub.complexDocument(cdtet); assertNotNull("response is null!!!", response); ComplexDocument_Type cdtResponse = response.getComplexDocument(); assertNotNull("response complexDocument is null!!!", cdtResponse); checkComplexDocument(cdtResponse); } catch (Exception ex) { ex.printStackTrace(); assertTrue( "InteropDocTest.doitComplexDocumentDII(" + portName + ") caught exception " + ex.getLocalizedMessage(), false); } } private ComplexDocument_Type makeComplexDocument() { ComplexDocument_Type cdt = new ComplexDocument_Type(); ArrayOfSimpleDocument asd = new ArrayOfSimpleDocument(); SimpleDocument_Type[] adt = new SimpleDocument_Type[2]; adt[0] = new SimpleDocument_Type("petra"); adt[1] = new SimpleDocument_Type("ant"); asd.setSimpleDocument(adt); cdt.setSimpleDoc(asd); ChildDocument cd = new ChildDocument(); asd = new ArrayOfSimpleDocument(); adt = new SimpleDocument_Type[1]; adt[0] = new SimpleDocument_Type("sue"); asd.setSimpleDocument(adt); cd.setChildSimpleDoc(asd); cdt.setChild(cd); cdt.setAnAttribute("together"); return cdt; } private void checkComplexDocument(ComplexDocument_Type cdt) { ArrayOfSimpleDocument asd = cdt.getSimpleDoc(); assertTrue("asd is null!!!", asd != null); SimpleDocument_Type[] adt = asd.getSimpleDocument(); boolean b = "petra".equals(adt[0]); assertTrue("adt is null!!!", adt != null); assertTrue("adt length not 2, is: " + adt.length, adt.length == 2); assertTrue("child adt[0] not 'petra', is: " + adt[0], "petra".equals(adt[0].getValue())); assertTrue("child adt[1] not 'ant', is: " + adt[0], "ant".equals(adt[1].getValue())); ChildDocument cd = cdt.getChild(); asd = cd.getChildSimpleDoc(); assertTrue("child asd is null!!!", asd != null); adt = asd.getSimpleDocument(); assertTrue("child adt is null!!!", adt != null); assertTrue("child adt length not 1, is: " + adt.length, adt.length == 1); assertTrue("child adt[0] not 'sue', is: " + adt[0], "sue".equals(adt[0].getValue())); String s = cdt.getAnAttribute(); assertTrue("attribute not 'together' is: " + s, "together".equals(s)); } }