axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: BP2113 warning on WS-Interoperability test
Date Tue, 29 Jan 2008 13:49:10 GMT
Does your service use RPC/literal style? Axis has a little trouble
dealing with RPC style messages and document style headers and faults.
(WS-I requires that all header and fault messages use the document
style.) I strongly encourage you to switch to doc/literal with the
wrapped convention. (Axis WSDD style="wrapped").

It might also help if you keep the named type that you had in your
original schema rather than creating an anonymous type. i.e., In place
of this:

<element name="ServiceProcessException">
  <complexType>
    <sequence>
     <element name="faultCode" type="xsd:int" maxOccurs="1"
minOccurs="1"/>
     <element name="supportMessage" nillable="true" type="xsd:string"
maxOccurs="1" minOccurs="0"/>
     <element name="userMessage" nillable="true" type="xsd:string"
maxOccurs="1" minOccurs="0"/>
    </sequence>
   </complexType>
</element>

Do this:

<element name="ServiceProcessException" type="impl:ServiceProcessException"/>

<complexType name="ServiceProcessException">
    <sequence>
     <element name="faultCode" type="xsd:int" maxOccurs="1"
minOccurs="1"/>
     <element name="supportMessage" nillable="true" type="xsd:string"
maxOccurs="1" minOccurs="0"/>
     <element name="userMessage" nillable="true" type="xsd:string"
maxOccurs="1" minOccurs="0"/>
    </sequence>
</complexType>

Anne

On Jan 28, 2008 3:20 PM, Kevin Dean <Kevin.Dean@datadevelopment.com> wrote:
> The WSDL is now fully compliant, but now Axis wsdl2java is causing
> problems.  Using the element definition provided, wsdl2java creates a
> file called ServiceProcessException_Element.java with the correct
> definition, but all of the methods that declare the exception declare it
> as ServiceProcessException, not ServiceProcessException_Element:
>
> public interface ProductAPI_V1Soap extends java.rmi.Remote {
>     public String signOn(String userId, String password, int companyId,
> String partnerUserId) throws java.rmi.RemoteException,
> ServiceProcessException;
> }
>
> This, naturally, generates compile-time errors.  How do I get wsdl2java
> to generate the correct type names?
>
> -----Original Message-----
> From: Andreas Veithen [mailto:andreas.veithen@skynet.be]
>
> Sent: January 28, 2008 14:28
> To: axis-user@ws.apache.org
> Subject: Re: BP2113 warning on WS-Interoperability test
>
> Kevin,
>
> In your XSD, you also need to convert the named type into an element:
>
> <element name="ServiceProcessException">
>    <complexType>
>      <sequence>
>       <element name="faultCode" type="xsd:int" maxOccurs="1"
> minOccurs="1"/>
>       <element name="supportMessage" nillable="true" type="xsd:string"
> maxOccurs="1" minOccurs="0"/>
>       <element name="userMessage" nillable="true" type="xsd:string"
> maxOccurs="1" minOccurs="0"/>
>      </sequence>
>     </complexType>
> </element>
>
> Andreas
>
> On 28 Jan 2008, at 20:20, Kevin Dean wrote:
>
> > How do I change the definition?  Changing it to:
> >
> > <wsdl:part name="fault" element="impl:ServiceProcessException"/>
> >
> > or:
> >
> > <wsdl:part name="fault" element="ServiceProcessException"/>
> >
> > generates errors in the validator, saying that it must refer to valid
> > values defined in a schema.  How do I determine what the valid values
> > are?
> >
> > -----Original Message-----
> > From: Andreas Veithen [mailto:andreas.veithen@skynet.be]
> > Sent: January 28, 2008 14:13
> > To: axis-user@ws.apache.org
> > Subject: Re: BP2113 warning on WS-Interoperability test
> >
> > Kevin,
> >
> > Probably the warning means that you should define the fault in the XSD
> > using an element rather than a type. In this case, you have to use the
> > "element" attribute instead of the "type" attribute in wsdl:part;
> > that's why the message refers to "not defined using only the element
> > attribute".
> >
> > Regards,
> >
> > Andreas
> >
> >
> > On 28 Jan 2008, at 15:45, Kevin Dean wrote:
> >
> >> It looks like this:
> >>
> >>  <wsdl:message name="ServiceProcessException">
> >>     <wsdl:part name="fault" type="impl:ServiceProcessException"/>
> >>  </wsdl:message>
> >>
> >> -----Original Message-----
> >> From: Anne Thomas Manes [mailto:atmanes@gmail.com]
> >> Sent: January 28, 2008 09:39
> >> To: axis-user@ws.apache.org
> >> Subject: Re: BP2113 warning on WS-Interoperability test
> >>
> >> What does the <wsdl:message> description that refers to this fault
> >> look
> >> like?
> >>
> >> Anne
> >>
> >> On Jan 28, 2008 8:42 AM, Kevin Dean <Kevin.Dean@datadevelopment.com>
> >> wrote:
> >>>
> >>> I'm working my way through the various WS-I warnings on a WSDL file
> >>> generated by java2wsdl.  I'm getting close, but I've got warning
> >> BP2113 (The
> >>> soapbind:header, soapbind:headerfault or soapbind:fault elements
> >>> refer
> >> to
> >>> wsd:part element(s) that are not defined using only the "element"
> >> attribute)
> >>> showing up and it makes no sense to me.  The only thing that appears
> >> to
> >>> match the warning is the fault, which is defined as follows:
> >>>
> >>>
> >>>
> >>>  <complexType name="ServiceProcessException">
> >>>
> >>>   <sequence>
> >>>
> >>>    <element name="faultCode" type="xsd:int" maxOccurs="1"
> >> minOccurs="1"/>
> >>>
> >>>    <element name="supportMessage" nillable="true" type="xsd:string"
> >>> maxOccurs="1" minOccurs="0"/>
> >>>
> >>>    <element name="userMessage" nillable="true" type="xsd:string"
> >>> maxOccurs="1" minOccurs="0"/>
> >>>
> >>>   </sequence>
> >>>
> >>>  </complexType>
> >>>
> >>>
> >>>
> >>> Is there something wrong with this definition, or am I looking in
> >>> the
> >> wrong
> >>> place?
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message