Regarding target namespace and the elementFormDefault issues...

Interestingly the package-info.java approach doesn't seem to work.
Whilst this sets the default element form to qualified, each element is
then generated with the form="unqualified" attribute set. D'oh! I guess
I'll have to use the XmlElement approach. Will let you know what
happens.

I've also set the XmlSchema namespace as you have suggested, and have
explicitly set the @WebService(targetNamespace) to the same value but I
still get a WSDL targetNamespace derived from the package name. How do I
override this behaviour?

The package-info.java has:

@javax.xml.bind.annotation.XmlSchema(
        namespace = "http://com.volantis.xmlns/2008/01/mss/user-module";,
        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package com.volantis.openapi.mss.usermodule;

and the SEI interface has:

@WebService(name = "UserModule",
            targetNamespace = 
"http://com.volantis.xmlns/2008/01/mss/user-module";)
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
             use = SOAPBinding.Use.LITERAL,
             parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public interface UserModule {
    ...
    List<User> getSubscribers(
            @WebParam(name = "application")
            final String applicationID,
            @WebParam(name = "subscription")
            final String subscriptionID,
            @WebParam(name = "includeExtensionParameters")
            final boolean includeExtensionParameters,
            @WebParam(name = "includeSubscriptions")
            final boolean includeSubscriptions) throws PersistenceException;
    ...

but the WSDL is generated with:

<wsdl:definitions name="UserModuleService"
                  targetNamespace="http://com.volantis.openapi.mss.usermodule";
                  xmlns:ns1="http://com.volantis.xmlns/2008/01/mss/user-module";
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
                  xmlns:tns="http://com.volantis.openapi.mss.usermodule";
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";>
    <wsdl:types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
                   xmlns:tns="http://com.volantis.xmlns/2008/01/mss/user-module";
                   attributeFormDefault="unqualified"
                   elementFormDefault="qualified"
                   
targetNamespace="http://com.volantis.xmlns/2008/01/mss/user-module";>
            ...
            <xs:complexType name="getSubscribersResponse">
                <xs:sequence>
                    <xs:element form="unqualified" maxOccurs="unbounded"
                                minOccurs="0" name="return" type="xs:anyType"/>
                </xs:sequence>
            </xs:complexType>
            ...
        </xs:schema>
    </wsdl:types>

    <wsdl:message name="getSubscribersResponse">
        <wsdl:part name="parameters" element="ns1:getSubscribersResponse">
        </wsdl:part>
    </wsdl:message>
    ...

What I want to see is:

      * the WSDL targetNamespace matching the ns1 URI
      * the elements generated with form "qualified"
      * the sequence returned by getSubscribersResponse using the
        generated schema type for User.

Any suggestions?

Phil :n(

On Mon, 2008-01-28 at 10:31 -0500, Daniel Kulp wrote:
> 2) Create a package-info.java class in the package containing the
> beans.  
> It would look like:
> 
> @javax.xml.bind.annotation.XmlSchema(
>      namespace = "http://the.namespace.to.use";, 
>      elementFormDefault =
> javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
> package the package;

Reply via email to