I'm really struggling here, after writing all of my service implementations using approaches discussed in previous threads in this list, I found I was not actually WS-I Compliant as my services were reliant upon the SOAPAction header, which the WS-I 1.1 Profile says I must not do.   So, I tried moving to a real document/wrapped convention, where I have a different document level element for each operation.  This has effectively broken my handling of my SOAP header, however, and when I do include a SOAP Header explicitly in each message, it breaks the unwrapping of my document element and no longer do I get the method signature I desire.

I am of course using WSDL2Java

What I want to get is, for the example I have attached (unfortunately my implementation is a *lot* bigger than this and encompases many operations):

public Account createAccount (Credentials credentials, Account account) {
}

What I get instead:

public Account createAccount (Account account) {
}

*OR*

public Account createAccount (CreateAccount createAccount, Credentials credentials) {
}


--- Am I forced to do the unwrapping myself or live without actually having my soap header passed?  How in the heck do I do this?

Thanks,
    Scott S. McCoy
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!--
    This WSDL is for generation only.  It is not WS-I compliant, and actually
    in some spots might even been poorly formed WSDL.  This however makes it
    easier to read, maintain, reduces duplication, and doesn't matter:  The
    WSDL here is used only for code and further markup generation.  A WS-I
    Compliant WSDL should then be generated from the code generated from this
    WSDL, by Axis, automatically.
  -->

<wsdl:definitions name="urn:Account"
             targetNamespace="http://plapi.enhance.com/service/account";
             xmlns:tns="http://plapi.enhance.com/service/account";
             xmlns:typens="http://plapi.enhance.com/service/account";
             xmlns:authns="http://plapi.enhance.com/credentials";
             xmlns:xsd="http://www.w3.org/2001/XMLSchema";
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>

    <wsdl:types>
        <xsd:schema targetNamespace="http://plapi.enhance.com/service/account";>
            <xsd:include schemaLocation="account.xsd"/>
            <xsd:import namespace="http://plapi.enhance.com/credentials";
                        schemaLocation="credentials.xsd"/>
        </xsd:schema>
    </wsdl:types>

<!--
    <wsdl:import namespace="http://plapi.enhance.com/service/account";
                 location="account.xsd"/>
    <wsdl:import namespace="http://plapi.enhance.com/credentials";
                 location="credentials.xsd"/> -->

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

    <wsdl:message name="createAccountRequest">
        <wsdl:part name="createAccount" element="tns:createAccount"/>
    </wsdl:message>

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

    <wsdl:portType name="AccountService">
        <wsdl:operation name="createAccount">
            <wsdl:input message="tns:createAccountRequest"/>
            <wsdl:output message="tns:createAccountResponse"/>
        </wsdl:operation>
    </wsdl:portType>

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

        <wsdl:operation name="createAccount">
          <soap:operation soapAction=""/>
          <wsdl:input name="createAccountRequest">
            <soap:header use="literal" part="credentials" message="tns:Credentials"/>
            <soap:body use="literal" parts="createAccount"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="AccountWebService">
        <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