Richard,
According to your WSDL, you have five request messages that have
identical signatures:
- ArticleUpdateNotificationRequest
- UnsetLicenseRequest
- ViewLicenseRequest
- LicenseStatusRequest
- RequestFileDetailsRequest
A SOAP message signature is determined by the child element of the
<soap:Body>. When using document style, that message signature element
is the element referenced in the <wsdl:part> definition. Therefore,
for the following definition:
<wsdl:message name="ArticleUpdateNotificationRequest">
<wsdl:part element="tns:SingleGUID"
name="ArticleUpdateNotificationRequest"/>
</wsdl:message>
will produce a message on the wire looks like this:
<soap:Envelope xmlns:soap="...">
<soap:Body xmlns:ns1="...">
<ns1:SingleGUID>...</ns1:SingleGUID>
</soap:Body>
</soap:Envelope>
But you have four other request messages that look exactly the same.
There is absolutely no way for Axis to determine which operation you
want to invoke, therefore it always invokes the first operation. So
as I said in my first response, you must define unique signatures for
each operation -- that means that each operation request message must
reference a unique element name in its message part.
I recommend that you define a type called "singleGuidType" and then
define five separate elements, each with a name corresponding to the
method name, e.g.:
<xsd:complexType name="singleGuidType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="guid" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="ArticleUpdateNotification" type="singleGuidType"/>
<wsdl:message name="ArticleUpdateNotificationRequest">
<wsdl:part element="tns:ArticleUpdateNotification"
name="body"/>
</wsdl:message>
Anne
On 8/14/06, Richard Jones <[EMAIL PROTECTED]> wrote:
Hi Anne,
> Please post the WSDL.
Please find attached. This was written in Eclipse using the Web Tools
plugin.
Thanks for your help,
Richard
>> Hi Folks,
>>
>> I am starting to really get to grips with my web services now, with much
>> thanks to Axis. This morning, though, I have encountered a problem
>> which I can't work out whether is my fault (likely) or a potential
>> problem.
>>
>> I have two requests defined (in the scope of this problem):
>>
>> public void requestFileDetails(String guid)
>> throws ServiceException, RemoteException
>> {
>> // make the request
>> SpiralTestSoapService service = getService();
>> SingleGUID sguid = new SingleGUID(guid);
>> RequestFileDetailsResponse response =
>> service.requestFileDetails(sguid);
>> }
>>
>> public void articleUpdateNotification(String guid)
>> throws ServiceException, RemoteException
>> {
>> // make the request
>> SpiralTestSoapService service = getService();
>> SingleGUID sguid = new SingleGUID(guid);
>> service.articleUpdateNotification(sguid);
>> }
>>
>> these in turn call the relevant operations on the port type (The
>> xxx_BindingImpl class).
>>
>> When either of the above methods are called in the client, the server
>> /always/ processes the request to "requestFileDetails". I discovered
>> that I could fix this so that it always processed the request to
>> "articleUpdateNotification" by reversing the order that these two
>> operations are specified in the server-config.wsdd:
>>
>> <operation name="articleUpdateNotification"
>> qname="ArticleUpdateNotification" mep="oneway" >
>> <parameter qname="pns:SingleGUID"
>> xmlns:pns="http://[...]/SpiralWebService/" type="tns:>SingleGUID"
>> xmlns:tns="http://[...]/SpiralWebService/"/>
>> </operation>
>> <operation name="requestFileDetails" qname="RequestFileDetails"
>> returnQName="retNS:RequestFileDetailsResponse"
>> xmlns:retNS="http://[...]/SpiralWebService/"
>> returnType="rtns:>RequestFileDetailsResponse"
>> xmlns:rtns="http://[...]/SpiralWebService/" >
>> <parameter qname="pns:SingleGUID"
>> xmlns:pns="http://[...]/SpiralWebService/"
>> type="tns:>SingleGUID"
>> xmlns:tns="http://[...]/SpiralWebService/"/>
>> </operation>
>>
>> I upped log4j to DEBUG, and observed that the body of the request seems
>> only to contain the data type, not the operation name:
>>
>> 2006-08-11 12:39:00,795 DEBUG org.apache.axis.providers.java.RPCProvider
>> @ body is <SingleGUID xmlns="http://[...]/SpiralWebService/"><guid
>> xmlns="">1234567890</guid></SingleGUID>
>>
>> The two above methods both take the SingleGUID data type as an argument,
>> so I defined this type in the WSDL and re-used it all over the place.
>> My current guess (and it is only a guess) is that Axis is just looking
>> for the first operation that takes this data type, and executing it, no
>> matter which operation it was intended for.
>>
>> Can anyone see what I might have done wrong? Am I misappropriating the
>> data types and the way that axis uses them, or have I missed something
>> in the way to call the web service, or is there something else?
>>
>> Any help much appreciated,
>>
>> Cheers
>>
>> --
>> Richard
>> -------
>> Richard Jones
>> Web and Database Technology Specialist
>> Imperial College London
>> t: +44 (0)20 759 41815
>> e: [EMAIL PROTECTED]
--
Richard
-------
Richard Jones
Web and Database Technology Specialist
Imperial College London
t: +44 (0)20 759 41815
e: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]