Some problems with your WSDL:

1- You need to add a <schema> definition to your <types> section and
import the schemas into it rather than directly into the <types>
section:

<wsdl:types>
    <xsd:schema tragetNamespace="http://127.0.0.1:8080/axis/services/test";>
         <xsd:import
            namespace="urn:oasis:names:tc:SAML:1.0:protocol"
            schemaLocation="oasis-sstc-saml-schema-protocol-1.1.xsd"/>
         <xsd:import
            namespace="urn:oasis:names:tc:SAML:1.0:assertion"
            schemaLocation="oasis-sstc-saml-schema-assertion-1.1.xsd"/>
    </xsd:schema>
  </wsdl:types>

2- You must remove the namespace attributes from your <soap:body>
definitions. (You should only use this attribute when using "rpc"
style.) If you want to override the namespaces in the imported
schemas, the you must define a schema that does so.

The reason that you are experiencing duplicate attributes is that the
SAML schema uses <choice> groups. For example, SubjectType is
described as:

<complexType name="SubjectType">
  <choice>
    <sequence>
      <element ref="saml:NameIdentifier"/>
      <element ref="saml:SubjectConfirmation" minOccurs="0"/>
    </sequence>
    <element ref="saml:SubjectConfirmation"/>
  </choice>
</complexType>

Axis 1.1 does not support document/literal with choice groups. (In
fact, it doesn't support document/literal very well, with or without
choice groups.) You might try upgrading to Axis 1.2, but I think there
are still problems with Axis 1.2 and choice groups. I suspect that you
will have to use custom serialization.

- Anne

On Mon, 28 Feb 2005 18:34:01 +0900 (JST), ææ äé
<[EMAIL PROTECTED]> wrote:
> Hi,
> I am developing SAML authority services on AXIS.
> When I try to generate stub codes with the attached
> wsdl by WSDL2Java, I have some problems.
> 
> One of the problems is that some classes have
> duplicated attributes. For example the class
> SubjectType has two SubjectConfirmationType attributes.
> 
> Is there any miss on my wsdl?
> I am using AXIS 1.1.
> 
> public class SubjectType  implements java.io.Serializable
> {
>     private org.w3c.saml.SubjectConfirmationType
> subjectConfirmation;
>     private org.w3c.saml.SubjectConfirmationType
> subjectConfirmation;
> }
> 
> --- wsdl here ---
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
> targetNamespace="http://127.0.0.1:8080/axis/services/test";
>  xmlns="http://schemas.xmlsoap.org/wsdl/";
>  xmlns:apachesoap="http://xml.apache.org/xml-soap";
>  xmlns:impl="http://127.0.0.1:8080/axis/services/test";
>  xmlns:intf="http://127.0.0.1:8080/axis/services/test";
>  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
>  xmlns:tns1="http://soap.osm.info.nri.co.jp";
>  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
>  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>  xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"
> >
>  <wsdl:types>
>         <xsd:import
> namespace="urn:oasis:names:tc:SAML:1.0:protocol"
> schemaLocation="oasis-sstc-saml-schema-protocol-1.1.xsd"/>
>         <xsd:import
> namespace="urn:oasis:names:tc:SAML:1.0:assertion"
> schemaLocation="oasis-sstc-saml-schema-assertion-1.1.xsd"/>
>  </wsdl:types>
>  <wsdl:message name="invokeRequest">
>     <wsdl:part element="samlp:Request" name="part"/>
>   </wsdl:message>
>   <wsdl:message name="invokeResponse">
>     <wsdl:part element="samlp:Response"
> name="invokeReturn"/>
>   </wsdl:message>
>   <wsdl:portType name="test">
>     <wsdl:operation name="invoke">
>       <wsdl:input message="impl:invokeRequest"
> name="invokeRequest"/>
>       <wsdl:output message="impl:invokeResponse"
> name="invokeResponse"/>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="testSoapBinding" type="impl:test">
>     <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="invoke">
>       <wsdlsoap:operation soapAction=""/>
>       <wsdl:input name="invokeRequest">
>         <wsdlsoap:body
> namespace="http://soap.osm.info.nri.co.jp"; use="literal"/>
>       </wsdl:input>
>       <wsdl:output name="invokeResponse">
>         <wsdlsoap:body
> namespace="http://127.0.0.1:8080/axis/services/test";
> use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="testService">
>     <wsdl:port binding="impl:testSoapBinding" name="test">
>       <wsdlsoap:address
> location="http://127.0.0.1:8080/axis/services/test"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
> 
> __________________________________
> Let's Celebrate Together!
> Yahoo! JAPAN
> http://pr.mail.yahoo.co.jp/so2005/
> 
>

Reply via email to