Thank you for your response.

Below is my WSDL file (I cut out the parts not dealing with my 2
problematic methods.
Below that is the SOAP response. I think that is what you wanted? I
set the log4j properties to DEBUG on the client side and dumped the
output.

Thank you.

WSDL
-----
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:axis2="http://ws.core.serv";
xmlns:ns1="http://org.apache.axis2/xsd";
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl";
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
xmlns:ns0="http://ws.core.serv/xsd";
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
targetNamespace="http://ws.core.serv";>
    <wsdl:types>
        <xs:schema xmlns:xsd="http://ws.core.tipsws/xsd";
attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://ws.core.serv/xsd";>
            <xs:element name="getCustomClasses">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0"
name="GenericStructMessage" nillable="true" type="xs:base64Binary"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="getCustomClassesResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return"
nillable="true" type="xs:base64Binary"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="getOtherCustomClasses">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="GenericStruct"
nillable="true" type="xs:base64Binary"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="getOtherCustomClassesResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return"
nillable="true" type="xs:base64Binary"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="getOtherCustomClassesRequest">
        <wsdl:part name="parameters" element="ns0:getOtherCustomClasses"/>
    </wsdl:message>
    <wsdl:message name="getOtherCustomClassesResponse">
        <wsdl:part name="parameters"
element="ns0:getOtherCustomClassesResponse"/>
    </wsdl:message>
    <wsdl:message name="getCustomClassesRequest">
        <wsdl:part name="parameters" element="ns0:getCustomClasses"/>
    </wsdl:message>
    <wsdl:message name="getCustomClassesResponse">
        <wsdl:part name="parameters" element="ns0:getCustomClassesResponse"/>
    </wsdl:message>
    <wsdl:portType name="CoreServicePortType">
        <wsdl:operation name="getOtherCustomClasses">
            <wsdl:input message="axis2:getOtherCustomClassesRequest"
wsaw:Action="urn:getOtherCustomClasses"/>
            <wsdl:output message="axis2:getOtherCustomClassesResponse"
wsaw:Action="urn:getOtherCustomClassesResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getCustomClasses">
            <wsdl:input message="axis2:getCustomClassesRequest"
wsaw:Action="urn:getCustomClasses"/>
            <wsdl:output message="axis2:getCustomClassesResponse"
wsaw:Action="urn:getCustomClassesResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="CoreServiceSOAP11Binding"
type="axis2:CoreServicePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>
        <wsdl:operation name="getOtherCustomClasses">
            <soap:operation soapAction="urn:getOtherCustomClasses"
style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getCustomClasses">
            <soap:operation soapAction="urn:getCustomClasses" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="CoreServiceSOAP12Binding"
type="axis2:CoreServicePortType">
        <soap12:binding
transport="http://schemas.xmlsoap.org/soap/http"; style="document"/>
        <wsdl:operation name="getOtherCustomClasses">
            <soap12:operation soapAction="urn:getOtherCustomClasses"
style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getCustomClasses">
            <soap12:operation soapAction="urn:getCustomClasses"
style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="CoreServiceHttpBinding"
type="axis2:CoreServicePortType">
        <http:binding verb="POST"/>
        <wsdl:operation name="getOtherCustomClasses">
            <http:operation location="CoreService/getOtherCustomClasses"/>
            <wsdl:input>
                <mime:content type="text/xml" part="getOtherCustomClasses"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="text/xml" part="getOtherCustomClasses"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getCustomClasses">
            <http:operation location="CoreService/getCustomClasses"/>
            <wsdl:input>
                <mime:content type="text/xml" part="getCustomClasses"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="text/xml" part="getCustomClasses"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="CoreService">
        <wsdl:port name="CoreServiceSOAP11port_http"
binding="axis2:CoreServiceSOAP11Binding">
            <soap:address
location="http://localhost:8080/axis2/services/CoreService"/>
        </wsdl:port>
        <wsdl:port name="CoreServiceSOAP12port_http"
binding="axis2:CoreServiceSOAP12Binding">
            <soap12:address
location="http://localhost:8080/axis2/services/CoreService"/>
        </wsdl:port>
        <wsdl:port name="CoreServiceHttpport"
binding="axis2:CoreServiceHttpBinding">
            <http:address
location="http://localhost:8080/axis2/services/CoreService"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>


RESPONSE
----
INFO   (ModuleDeployer.java:72) - Deploying module: addressing-1.3
DEBUG  (DefaultHttpParams.java:150) - Set parameter http.useragent =
Jakarta Commons-HttpClient/3.0.1
DEBUG  (DefaultHttpParams.java:150) - Set parameter
http.protocol.version = HTTP/1.1
DEBUG  (DefaultHttpParams.java:150) - Set parameter
http.connection-manager.class = class
org.apache.commons.httpclient.SimpleHttpConnectionManager
DEBUG  (DefaultHttpParams.java:150) - Set parameter
http.protocol.cookie-policy = rfc2109
DEBUG  (DefaultHttpParams.java:150) - Set parameter
http.protocol.element-charset = US-ASCII
DEBUG  (DefaultHttpParams.java:150) - Set parameter
http.protocol.content-charset = ISO-8859-1
DEBUG  (DefaultHttpParams.java:150) - Set parameter
http.method.retry-handler =
[EMAIL PROTECTED]
DEBUG  (DefaultHttpParams.java:150) - Set parameter
http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE,
dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy
HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z,
EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE
dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd MMM yy
HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z, EEE,
dd-MM-yyyy HH:mm:ss z]
DEBUG  (HttpClient.java:71) - Java version: 1.6.0_02
DEBUG  (HttpClient.java:72) - Java vendor: Sun Microsystems Inc.
DEBUG  (HttpClient.java:73) - Java class path: C:\Documents and
Settings\george\workspace-EE\serv\build\classes;C:\Sun\SDK\lib\appserv-rt.jar;C:\Sun\SDK\lib\javaee.jar;C:\Sun\SDK\lib\mail.jar;C:\Sun\SDK\lib\appserv-ws.jar;C:\Sun\SDK\lib\appserv-jstl.jar;C:\Sun\SDK\lib\appserv-tags.jar;C:\Sun\SDK\lib\activation.jar;Y:\axis2\codegen\annogen-0.1.0.jar;Y:\axis2\codegen\ant-1.7.0.jar;Y:\axis2\codegen\axiom-api-1.2.5.jar;Y:\axis2\codegen\axiom-dom-1.2.5.jar;Y:\axis2\codegen\axiom-impl-1.2.5.jar;Y:\axis2\codegen\axis2-1.3.jar;Y:\axis2\codegen\commons-codec-1.3.jar;Y:\axis2\codegen\commons-httpclient-3.0.1.jar;Y:\axis2\codegen\commons-logging-1.1.jar;Y:\axis2\codegen\geronimo-activation_1.1_spec-1.0-M1.jar;Y:\axis2\codegen\jibx-bind-1.1.5.jar;Y:\axis2\codegen\log4j-1.2.14.jar;Y:\axis2\codegen\neethi-2.0.2.jar;Y:\axis2\codegen\stax-api-1.0.1.jar;Y:\axis2\codegen\woden-1.0-incubating-M7b.jar;Y:\axis2\codegen\wsdl4j-1.6.2.jar;Y:\axis2\codegen\wstx-asl-3.2.1.jar;Y:\axis2\codegen\xbean-2.2.0.jar;Y:\axis2\codegen\XmlSchema-1.3.2.jar;Y:\serv\serv-common
 .jar
DEBUG  (HttpClient.java:74) - Operating system name: Windows XP
DEBUG  (HttpClient.java:75) - Operating system architecture: x86
DEBUG  (HttpClient.java:76) - Operating system version: 5.1
DEBUG  (HttpClient.java:81) - SUN 1.6: SUN (DSA key/parameter
generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509
certificates; JKS keystore; PKIX CertPathValidator; PKIX
CertPathBuilder; LDAP, Collection CertStores, JavaPolicy Policy;
JavaLoginConfig Configuration)
DEBUG  (HttpClient.java:81) - SunRsaSign 1.5: Sun RSA signature provider
DEBUG  (HttpClient.java:81) - SunJSSE 1.6: Sun JSSE provider(PKCS12,
SunX509 key/trust factories, SSLv3, TLSv1)
DEBUG  (HttpClient.java:81) - SunJCE 1.6: SunJCE Provider (implements
RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE,
Diffie-Hellman, HMAC)
DEBUG  (HttpClient.java:81) - SunJGSS 1.0: Sun (Kerberos v5, SPNEGO)
DEBUG  (HttpClient.java:81) - SunSASL 1.5: Sun SASL
provider(implements client mechanisms for: DIGEST-MD5, GSSAPI,
EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI,
CRAM-MD5)
DEBUG  (HttpClient.java:81) - XMLDSig 1.0: XMLDSig (DOM
XMLSignatureFactory; DOM KeyInfoFactory)
DEBUG  (HttpClient.java:81) - SunPCSC 1.6: Sun PC/SC provider
DEBUG  (HttpClient.java:81) - SunMSCAPI 1.6: Sun's Microsoft Crypto API provider
DEBUG  (DefaultHttpParams.java:150) - Set parameter
http.connection.timeout = 30000
DEBUG  (DefaultHttpParams.java:150) - Set parameter http.socket.timeout = 30000
DEBUG  (DefaultHttpParams.java:150) - Set parameter http.socket.timeout = 30000
DEBUG  (MultiThreadedHttpConnectionManager.java:390) -
HttpConnectionManager.getConnection:  config =
HostConfiguration[host=http://appserv.company.com:8080], timeout = 0
DEBUG  (MultiThreadedHttpConnectionManager.java:739) - Allocating new
connection, hostConfig=HostConfiguration[host=http://appserv.company.com:8080]
DEBUG  (HttpConnection.java:691) - Open connection to appserv.company.com:8080
DEBUG  (Wire.java:69) - >> "POST /axis2/services/CoreService HTTP/1.1[\r][\n]"
DEBUG  (HttpMethodBase.java:1235) - Adding Host request header
DEBUG  (Wire.java:69) - >> "Content-Type: application/soap+xml;
charset=UTF-8; action="urn:getCustomClasses"[\r][\n]"
DEBUG  (Wire.java:69) - >> "User-Agent: Axis2[\r][\n]"
DEBUG  (Wire.java:69) - >> "Host: appserv.company.com:8080[\r][\n]"
DEBUG  (Wire.java:69) - >> "Transfer-Encoding: chunked[\r][\n]"
DEBUG  (Wire.java:69) - >> "[\r][\n]"
DEBUG  (EntityEnclosingMethod.java:504) - Request body sent
DEBUG  (Wire.java:69) - << "HTTP/1.1 200 OK[\r][\n]"
DEBUG  (Wire.java:69) - << "X-Powered-By: Servlet/2.5[\r][\n]"
DEBUG  (Wire.java:69) - << "Content-Type: application/soap+xml;
action="urn:getCustomClassesResponse";charset=UTF-8[\r][\n]"
DEBUG  (Wire.java:69) - << "Transfer-Encoding: chunked[\r][\n]"
DEBUG  (Wire.java:69) - << "Date: Wed, 10 Oct 2007 08:28:22 GMT[\r][\n]"
DEBUG  (Wire.java:69) - << "Server: Sun Java System Application Server
Platform Edition 9.0_01[\r][\n]"
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement return
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
        at serv.core.ws.CoreServiceStub.fromOM(CoreServiceStub.java:10032)
        at 
serv.core.ws.CoreServiceStub.getCustomClasses(CoreServiceStub.java:675)
        at 
serv.core.client.CoreServiceClient.getCustomClasses(CoreServiceClient.java:403)
        at serv.core.client.CoreServiceClient.main(CoreServiceClient.java:585)
Caused by: java.lang.Exception:
org.apache.axis2.databinding.ADBException: Unexpected subelement
return
        at 
serv.core.ws.CoreServiceStub$GetCustomClassesResponse$Factory.parse(CoreServiceStub.java:7156)
        at serv.core.ws.CoreServiceStub.fromOM(CoreServiceStub.java:9930)
        ... 3 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected
subelement return
        at 
serv.core.ws.CoreServiceStub$GetCustomClassesResponse$Factory.parse(CoreServiceStub.java:7152)
        ... 4 more

On 10/10/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote:
> Can you send your wsdl and response?
>
>
> On 10/9/07, George H <[EMAIL PROTECTED]> wrote:
> >
> > I have created a webservice and client using the Axis2 eclipse
> > plugin tools v1.3.0. Using Eclipse (J2EE) Version: 3.3.0 Build id:
> > I20070621-1340.
> > Axis2 v1.3
> >
> > I have a webservice with many methods. Some reaturn boolean some
> > return an custom
> > class serialized as an array of bytes. They all work, except for all the
> methods
> > that have only 1 thing in common. They both return a Vector of that
> > custom class.
> > That vector is serialized into bytes and sent back like all the others,
> but it
> > always fails with "Unexpected subelement return" error.
> >
> > The wsdl file is generated by the tools and so are the stub classes.
> > Thanks in advance to anyone who can help me figure out the problem.
> >
> > The code calling the service
> > ---
> > Vector<CustomClass> customClasses = null;
> >
> > try {
> >         byte[] barray = serializeToBytes(myMessage);
> >         ByteArrayDataSource byteDataSource = new
> ByteArrayDataSource(barray);
> >         DataHandler dh = new DataHandler(byteDataSource);
> >
> >         CoreServiceStub.GetCustomClasses
> getCustomClassesParam = new
> > CoreServiceStub.GetCustomClasses();
> >         getCustomClassesParam.setCustomClass (dh);
> >
> >         CoreServiceStub stub = new
> CoreServiceStub(TARGET_ENDPOINT);
> >         CoreServiceStub.GetCustomClassesResponse response
> =
> > stub.getCustomClasses(getCustomClassesParam);
> >
> >         DataHandler dh2 = response.get_return();
> >         Object obj = deserializeFromBytes(dh2);
> >         if(obj instanceof Vector) {
> >                 customClasses = (Vector<CustomClass>)obj;
> >         }
> > }
> > catch(Exception ex) {
> >         ex.printStackTrace();
> > }
> >
> >
> >
> > The stack trace, identical each time it is run.
> > ---
> > org.apache.axis2.AxisFault:
> org.apache.axis2.databinding.ADBException:
> > Unexpected subelement return
> >         at
> org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> >         at
> serv.core.ws.CoreServiceStub.fromOM(CoreServiceStub.java:10032)
> >         at
> serv.core.ws.CoreServiceStub.getCustomClasses(CoreServiceStub.java:675)
> >         at
> serv.core.client.CoreServiceClient.getCustomClasses.CoreServiceClient.java:403)
> >         at
> serv.core.client.CoreServiceClient.main(CoreServiceClient.java:583)
> > Caused by: java.lang.Exception:
> > org.apache.axis2.databinding.ADBException : Unexpected
> subelement
> > return
> >         at
> serv.core.ws.CoreServiceStub$GetCustomClassesResponse$Factory.parse(CoreServiceStub.java:7156)
> >         at
> serv.core.ws.CoreServiceStub.fromOM(CoreServiceStub.java:9930)
> >         ... 3 more
> > Caused by: org.apache.axis2.databinding.ADBException:
> Unexpected
> > subelement return
> >         at
> serv.core.ws.CoreServiceStub$GetCustomClassesResponse$Factory.parse(CoreServiceStub.java:7152)
> >         ... 4 more
> > --
> > George H
> > [EMAIL PROTECTED]
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to