Okay,
    I have a hand-crafted WSDL I'm using to generate Java with WSDL2Java and I'm using the deployment descriptor generated by WSDL2Java to generate a server-config.wsdd, which I package in a war and deploy to my tomcat server.

    This has all been working fine and dandy, util today, when I added a new method that uses (an element and message I had already used before)...But I'm ending up with this error:
Fault - Bean attribute password is of type 
java.lang.String, which is not a simple type

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: Bean attribute password is of type java.lang.String, which is not a simple type
faultActor:
faultNode:
faultDetail:
{ http://xml.apache.org/axis/}hostname:sludge.marchex.com
    The only thing that really makes me scratch my head here is that I thought xsd:string *was* a simple type?  I've got the WSDL and XSDs generating the code in question attached to this message.


    Thanks,
    Scott S. McCoy
<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions name="urn:Account"
             targetNamespace="http://plm.marchex.com/service/account";
             xmlns:tns="http://plm.marchex.com/service/account";
             xmlns:typens="http://plm.marchex.com/service/account";
             xmlns:authns="http://plm.marchex.com/credentials";
             xmlns:xsd="http://www.w3.org/1999/XMLSchema";
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
<!--
    <wsdl:types>
        <xsd:schema targetNamespace="http://plm.marchex.com/services/account";
                    xmlns:xsd="http://www.w3.org/1999/XMLSchema";>
            <xsd:include schemaLocation="account.xsd"/>
        </xsd:schema>
    </wsdl:types>
-->

    <wsdl:import namespace="http://plm.marchex.com/service/account";
                 location="account.xsd"/>
    <wsdl:import namespace="http://plm.marchex.com/credentials";
                 location="credentials.xsd"/>

    <wsdl:message name="CredentialsOnly">
        <wsdl:part name="credentials" element="authns:credentials"/>
    </wsdl:message>

    <wsdl:message name="AccountList">
        <wsdl:part name="accounts" element="tns:accounts"/>
    </wsdl:message>

    <wsdl:message name="AccountDetails">
        <wsdl:part name="credentials" element="authns:credentials"/>
        <wsdl:part name="account" element="tns:account"/>
    </wsdl:message>

    <wsdl:message name="UserDetails">
        <wsdl:part name="credentials" element="authns:credentials"/>
        <wsdl:part name="user" element="tns:user"/>
    </wsdl:message>

    <!-- we need to return a different message than we accept -->
    <wsdl:message name="AccountResponse">
        <wsdl:part name="accountlist" element="tns:account"/>
    </wsdl:message>

    <wsdl:message name="UserResponse">
        <wsdl:part name="userlist" element="tns:user"/>
    </wsdl:message>

    <wsdl:message name="empty"/>

    <wsdl:portType name="AccountPortType">
        <wsdl:operation name="createAccount">
            <wsdl:input message="tns:AccountDetails"/>
            <wsdl:output message="tns:AccountResponse"/>
        </wsdl:operation>

        <wsdl:operation name="updateAccount">
            <wsdl:input message="tns:AccountDetails"/>
            <wsdl:output message="tns:empty"/>
        </wsdl:operation>

        <wsdl:operation name="listAccounts">
            <wsdl:input message="tns:CredentialsOnly"/>
            <wsdl:output message="tns:AccountList"/>
        </wsdl:operation>

        <wsdl:operation name="cancelAccount">
            <wsdl:input message="tns:AccountDetails"/>
            <wsdl:output message="tns:empty"/>
        </wsdl:operation>

        <wsdl:operation name="createUser">
            <wsdl:input message="tns:UserDetails"/>
            <wsdl:output message="tns:UserResponse"/>
        </wsdl:operation>

        <wsdl:operation name="updateUser">
            <wsdl:input message="tns:UserDetails"/>
            <wsdl:output message="tns:empty"/>
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="AccountSOAPBinding" type="tns:AccountPortType">
        <soap:binding style="wrapped"
                      transport="http://schemas.xmlsoap.org/soap/http"/>

        <wsdl:operation name="createAccount">
          <soap:operation soapAction="createAccount"/>
          <wsdl:input>
          <!-- In theory, this should explicitly specify the following goes
          through the Header only -->
            <soap:header use="literal" part="credentials"/>
            <soap:body use="literal" part="account"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="updateAccount">
          <soap:operation soapAction="createAccount"/>
          <wsdl:input>
            <soap:header use="literal" part="credentials"/>
            <soap:body use="literal" part="account"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="listAccounts">
          <soap:operation soapAction="listAccounts"/>
          <wsdl:input>
            <soap:header use="literal"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="cancelAccount">
          <soap:operation soapAction="cancelAccount"/>
          <wsdl:input>
            <soap:header use="literal" part="credentials"/>
            <soap:body use="literal" part="account"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="createUser">
          <soap:operation soapAction="createUser"/>
          <wsdl:input>
            <soap:header use="literal" part="credentials"/>
            <soap:body use="literal" part="user"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="updateUser">
          <soap:operation soapAction="updateUser"/>
          <wsdl:input>
            <soap:header use="literal" part="credentials"/>
            <soap:body use="literal" part="user"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="AccountService">
<!--    <wsdl:requestFlow>  No such thing exists, this is just to remind me to
                            use a custom deploy.wsdd
            <wsdl:handler
                type="java:tufte.model.service.handlers.AuthenHandler"/>
        </wsdl:requestFlow> -->
        <wsdl:port name="AccountPort" binding="tns:AccountSOAPBinding">
            <soap:address
                location="http://localhost:8080/axis/services/Account"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Attachment: account.xsd
Description: Binary data

Attachment: credentials.xsd
Description: Binary data

Reply via email to