Hello Scott,

Axis should detect the collision and name the classes as follows:
SEI: Account_PortType
Javabean: Account_Element

If it does not, I think it's a bug.

Furthermore, you might like to try running your WSDL through a validating parser. - In element 'card' there's an xsd:attribute 'number' with a attribute called 'value'. This attribute is not allowed here. Did you mean 'type'? - The name of your wsdl:definitions element 'urn:Account' is not a valid NCName

Axis does not validate your WSDL and it works with many invalid WSDL files, though.

Regards,
Dies


Scott McCoy wrote:
Actually I seem to have solved that too, I cannot have a port type and an
element of the same name, otherwise one overwrites the other apparently.

Thanks,

    Scott S. McCoy

On 2/14/06, Scott McCoy <[EMAIL PROTECTED]> wrote:
Thanks Dies,
    That totally solved my problem.

    I have another problem though, after your suggested changes (and
before, for that matter) AccountSOAPBindingImpl becomes a class that
implements the Account class generated.

    The obvious problem with that, is that you cannot implement a class in
Java, only an interface.

    Any idea what I've still got screwed up?

    Thanks,
    Scott S. McCoy

On 2/14/06, Dies Koper <[EMAIL PROTECTED]> wrote:
Hello Scott,

In your wsdl:portType definition, you have the same message for the
operation's input and output. Therefore, the parts' names are the same.
So you are telling Axis that you want it to be an IN/OUT parameter and
it should use a Holder class as parameter.

If you do not want to use a Holder, you should point the operation's
output to another message, one with a different part name, in this case
referring to a ComplexType with no elements (void wrapper).

Something like:

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

     <wsdl:message name="empty">
         <wsdl:part name="empty" element="tns:emptyElement"/>
     </wsdl:message>

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

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

With in your types section or XSD something like:

     <xsd:element name="emptyElement">
       <xsd:complexType>
         <sequence/>
       </xsd:complexType>
     </xsd:element>

BTW: It is not recommended (WS-I BP1.0) to use wsdl:import to import XSD
files. Use the commented way (but with import) instead.

Regards,
Dies


Scott McCoy wrote:
The attached WSDL and XSD are giving me this method signature.

public class AccountSOAPBindingImpl implements
tufte.model.service.account.Accou
nt{
    public void createAccount(
tufte.model.service.account.holders.AccountHolder account) throws
java.rmi.RemoteException {
    }

    public void updateAccount(
tufte.model.service.account.holders.AccountHolder account) throws
java.rmi.RemoteException {
    }

}

I'm expecting:

public void updateAccount(tufte.model.service.account.Account account)
throws java.rmi.RemoteException { }

Not this.

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: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:message name="AccountDetails">
        <wsdl:part name="account" element="tns:account"/>
    </wsdl:message>

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

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

    <wsdl:binding name="AccountSOAPBinding" type="tns:Account">
        <soap:binding style="document"
                      transport=" http://schemas.xmlsoap.org/soap/http
"/>
        <wsdl:operation name="createAccount">
          <soap:operation soapAction="createAccount"/>
          <wsdl:input>
            <soap:body use="literal"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>

        <wsdl:operation name="updateAccount">
          <soap:operation soapAction="createAccount"/>
          <wsdl:input>
<!--        <soap:body use="encoded"
                       namespace="
http://plm.marchex.com/service/account";
                       encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"/>
                       -->
            <soap:body use="literal"/>
          </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="Account" binding="tns:AccountSOAPBinding">
            <soap:address
                location="http://localhost:8080/axis/services/Account
"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
--
Dies KOPER <[EMAIL PROTECTED]> (changed on 1 July 2005)
Fujitsu Ltd - MWPF1  (changed from MWPF3 on 21 Nov 2005)
2-15-16, Shin-Yokohama, Kouhoku-ku, Yokohama, 222-0033, Japan
Tel. +81(45)-475-5605  (internal 7181-4217)




--
Dies KOPER <[EMAIL PROTECTED]> (changed on 1 July 2005)
Fujitsu Ltd - MWPF1  (changed from MWPF3 on 21 Nov 2005)
2-15-16, Shin-Yokohama, Kouhoku-ku, Yokohama, 222-0033, Japan
Tel. +81(45)-475-5605  (internal 7181-4217)

Reply via email to