axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Clinton" <James.Clin...@ins-sure.com>
Subject RE: * AXIS 1.2 - Stub invokes wrong operation on server side * -- reply -- thanks
Date Wed, 11 Jan 2006 15:55:54 GMT
I see -many thanks Anne.

In light of this, I've rebuilt the servce to be of type wrapped (as I
believe its best practice) and will now build the signatures like so
which I *hope* will solve the problem.

**** TYPE (just input param shown for brevity

<xsd:complexType name="ConflictOfInterestRequestWrapper">
  <xsd:sequence>
	<xsd:element name="param0"
type="request:ConflictOfInterestRequest"/>
  </xsd:sequence>
</xsd:complexType>

<!-- Parameter definitions -->
<xsd:element name="declareConflictOfInterest"
type="request:ConflictOfInterestRequestWrapper" />
<xsd:element name="validateConflictOfInterest"
type="request:ConflictOfInterestRequestWrapper" />

**** MESSAGE

<wsdl:message name="declareConflictOfInterestResponse">
	<wsdl:part name="return"
element="response:declareConflictOfInterestResponse" />
 </wsdl:message>
<wsdl:message name="declareConflictOfInterest">
	<wsdl:part name="parameters"
element="request:declareConflictOfInterest" />
</wsdl:message>

<wsdl:message name="validateConflictOfInterestResponse">
	<wsdl:part name="return"
element="response:validateConflictOfInterestResponse" />
</wsdl:message>
<wsdl:message name="validateConflictOfInterest">
	<wsdl:part name="parameters"
element="request:validateConflictOfInterest" />
</wsdl:message>

Useful Resources:
http://www.fawcette.com/javapro/2003_03/online/wsdl_kjones_03_10_03/
http://www.fawcette.com/javapro/2003_02/online/WSDL_kjones_02_27_03/

Regards, James

-----Original Message-----
From: Anne Thomas Manes [mailto:atmanes@gmail.com] 
Sent: 11 January 2006 13:46
To: axis-user@ws.apache.org
Subject: Re: * AXIS 1.2 - Stub invokes wrong operation on server side *


That's the way it works. Each operation must have a unique signature,
where the signature is the QName of the child element of the SOAP Body.
In your case, the two operations have identical signatures:
<request:ConflictOfInterestRequest>.

In all cases the request will be routed to the first operation. You must
define different input elements for each operation.

Anne


On 1/11/06, James Clinton <James.Clinton@ins-sure.com> wrote:
Hello Everyone,

I have a problem with one of my operations I'd like some advice on.

For some reason after invoking operation
'validateConflictOfInterestResponse' via the stub results in the wrong
operation 'declareConflictOfInterestResponse' receiving the request! 

The incorrect receiving operation is:

(1) the first operation declared in the binding
(2) similar to the target operation in that they both take the same
single parameter transfer object type. But that it all. 

They return different objects and have different faults.

If I swap the order of the operations I get different results.

If I make a new complex type with a new name which is basically a clone
of the existing input transfer object and make this the new input to the

second operation, the correct target operation is located...very odd!

It seems to me that the process of selecting the target operation is
done by pattern matching the signature but not including the operation 
name or faults. (this is just a guess)

Has anyone else come across this?

Example of my problem WSDL below.

        <!-- MESSAGE SIGS without FAULTS -->

        <wsdl:message name="declareConflictOfInterestResponse"> 
                <wsdl:part name="return"
element="response:ConflictOfInterestScreen" />
        </wsdl:message>
        <wsdl:message name="declareConflictOfInterestRequest"> 
                <wsdl:part name="request"
element="request:ConflictOfInterestRequest" />           <!-- SAME INPUT
TYPE -->
        </wsdl:message>


        <wsdl:message name="validateConflictOfInterestResponse"> 
                <wsdl:part name="return"
element="response:ValidateConflictOfInterestScreen" />
        </wsdl:message>
        <wsdl:message name="validateConflictOfInterestRequest"> 
                <wsdl:part name="request"
element="request:ConflictOfInterestRequest" />           <!-- SAME INPUT
TYPE -->
        </wsdl:message>


        <!-- PORT TYPES --> 

        <wsdl:operation name="declareConflictOfInterest">
                <wsdl:input
message="intf:declareConflictOfInterestRequest" />
                <wsdl:output
message="intf:declareConflictOfInterestResponse" />
                <wsdl:fault ... />
        </wsdl:operation>

        <wsdl:operation name="validateConflictOfInterest"> 
                <wsdl:input
message="intf:validateConflictOfInterestRequest"  />
                <wsdl:output
message="intf:validateConflictOfInterestResponse"  />
                <wsdl:fault ... /> 
        </wsdl:operation>

        <!-- BINDING -->

        <wsdl:operation name="declareConflictOfInterest">
                <wsdlsoap:operation soapAction="" style="document" />
                <wsdl:input>
                        <wsdlsoap:body use="literal" />
                </wsdl:input>
                <wsdl:output>
                        <wsdlsoap:body use="literal" />
                </wsdl:output>
                <wsdl:fault ..>
        </wsdl:operation>

        <wsdl:operation name="validateConflictOfInterest"> 
                <wsdlsoap:operation soapAction="" style="document" />
                <wsdl:input>
                        <wsdlsoap:body use="literal" />
                </wsdl:input>
                <wsdl:output>
                        <wsdlsoap:body use="literal" />
                </wsdl:output>
                <wsdl:fault ..>
        </wsdl:operation>

Any help/advice would be greatly appreciated!!

regards

James


-----------------------------------------------------
THE INFORMATION IN THIS E-MAIL AND IN ANY ATTACHMENTS IS CONFIDENTIAL

AND MAY BE PRIVILEGED OR OTHERWISE PROTECTED FROM DISCLOSURE.
IF YOU ARE NOT THE INTENDED RECIPIENT AND HAVE RECEIVED IT IN ERROR YOU
ARE ON NOTICE OF ITS STATUS. 
PLEASE NOTIFY THE SENDER IMMEDIATELY BY RETURN EMAIL AND THEN DELETE
THIS EMAIL AND ANY ATTACHMENT FROM YOUR SYSTEM.
YOU MUST NOT RETAIN, COPY OR USE THIS E-MAIL OR ANY ATTACHMENT FOR ANY
PURPOSE, NOR DISCLOSE ALL OR ANY PART OF ITS CONTENTS TO ANY OTHER
PERSON:

TO DO SO COULD BE A BREACH OF CONFIDENCE

EMAIL MAY BE SUSCEPTIBLE TO DATA CORRUPTION, INTERCEPTION AND
UNAUTHORISED AMENDMENT,
AND WE DO NOT ACCEPT LIABILITY FOR ANY SUCH CORRUPTION, INTERCEPTION OR
AMENDMENT OR THE CONSEQUENCES THEREOF. 

WE MAY MONITOR THE CONTENT OF EMAILS SENT AND RECEIVED VIA OUR NETWORK
FOR VIRUSES OR UNAUTHORISED USE AND FOR OTHER LAWFUL BUSINESS PURPOSES.
WE DO NOT ACCEPT RESPONSIBILITY FOR ANY LOSS OR DAMAGE ARISING FROM A
VIRUS IN ANY EMAIL OR ATTACHMENT.

----------------------------------------------- 
postmaster@ins-sure.com

Mime
View raw message