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]
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://[...]/SpiralWebService/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SpiralWebService"
targetNamespace="http://[...]/SpiralWebService/">
<wsdl:types>
<xsd:schema
targetNamespace="http://[...]/SpiralWebService/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://[...]/SpiralWebService/">
<xsd:element name="RequestFileDetailsResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RequestFileDetailsResult"
maxOccurs="1" minOccurs="1">
<xsd:complexType>
<xsd:sequence>
<xsd:any />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SingleGUID">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="guid" type="xsd:string" minOccurs="1" maxOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SuccessFailResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="guid"
type="xsd:string" minOccurs="1" maxOccurs="1">
</xsd:element>
<xsd:element name="success"
type="xsd:boolean" minOccurs="1" maxOccurs="1">
</xsd:element>
<xsd:element name="message"
type="xsd:string" minOccurs="0" maxOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SetLicenceRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="guid"
type="xsd:string" minOccurs="1" maxOccurs="1">
</xsd:element>
<xsd:element name="LicenceMets" minOccurs="1" maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
<xsd:any />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ViewLicenceResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="LicenceMets" minOccurs="1" maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
<xsd:any></xsd:any>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="LicenceStatusResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="guid"
type="xsd:string" minOccurs="1" maxOccurs="1">
</xsd:element>
<xsd:element name="status"
type="xsd:string" minOccurs="1" maxOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="LicencedStatusResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="guid"
type="xsd:string" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="LicencedStatusRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="LastModified"
type="xsd:dateTime" minOccurs="0" maxOccurs="1">
</xsd:element>
<xsd:element name="status"
type="xsd:string" minOccurs="1" maxOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="RequestFileDetailsResponse">
<wsdl:part name="RequestFileDetailsResponse"
element="tns:RequestFileDetailsResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="RequestFileDetailsRequest">
<wsdl:part name="RequestFileDetailsRequest"
element="tns:SingleGUID">
</wsdl:part>
</wsdl:message>
<wsdl:message name="ArticleUpdateNotificationRequest">
<wsdl:part name="ArticleUpdateNotificationRequest"
element="tns:SingleGUID">
</wsdl:part>
</wsdl:message>
<wsdl:message name="SetLicenceResponse">
<wsdl:part name="SetLicenceResponse"
element="tns:SuccessFailResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="SetLicenceRequest">
<wsdl:part name="SetLicenceRequest"
element="tns:SetLicenceRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="ViewLicenceResponse">
<wsdl:part name="ViewLicenceResponse"
element="tns:ViewLicenceResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="ViewLicenceRequest">
<wsdl:part name="ViewLicenceRequest"
element="tns:SingleGUID">
</wsdl:part>
</wsdl:message>
<wsdl:message name="UnsetLicenceResponse">
<wsdl:part name="UnsetLicenceResponse"
element="tns:SuccessFailResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="UnsetLicenceRequest">
<wsdl:part name="UnsetLicenceRequest"
element="tns:SingleGUID">
</wsdl:part>
</wsdl:message>
<wsdl:message name="LicenceStatusResponse">
<wsdl:part name="LicenceStatusResponse"
element="tns:LicenceStatusResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="LicenceStatusRequest">
<wsdl:part name="LicenceStatusRequest"
element="tns:SingleGUID">
</wsdl:part>
</wsdl:message>
<wsdl:message name="LicencedStatusResponse">
<wsdl:part name="LicencedStatusResponse"
element="tns:LicencedStatusResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="LicencedStatusRequest">
<wsdl:part name="LicencedStatusRequest"
element="tns:LicencedStatusRequest">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="SpiralSoap">
<wsdl:operation name="RequestFileDetails">
<wsdl:input message="tns:RequestFileDetailsRequest"></wsdl:input>
<wsdl:output message="tns:RequestFileDetailsResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="ArticleUpdateNotification">
<wsdl:input
message="tns:ArticleUpdateNotificationRequest">
</wsdl:input>
</wsdl:operation>
<wsdl:operation name="SetLicence">
<wsdl:input message="tns:SetLicenceRequest"></wsdl:input>
<wsdl:output message="tns:SetLicenceResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="ViewLicence">
<wsdl:input message="tns:ViewLicenceRequest"></wsdl:input>
<wsdl:output message="tns:ViewLicenceResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="UnsetLicence">
<wsdl:input message="tns:UnsetLicenceRequest"></wsdl:input>
<wsdl:output message="tns:UnsetLicenceResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="LicenceStatus">
<wsdl:input message="tns:LicenceStatusRequest"></wsdl:input>
<wsdl:output message="tns:LicenceStatusResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="LicencedStatus">
<wsdl:input message="tns:LicencedStatusRequest"></wsdl:input>
<wsdl:output message="tns:LicencedStatusResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SpiralSoap" type="tns:SpiralSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="RequestFileDetails">
<soap:operation />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ArticleUpdateNotification">
<soap:operation />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
</wsdl:operation>
<wsdl:operation name="SetLicence">
<soap:operation />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ViewLicence">
<soap:operation />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="UnsetLicence">
<soap:operation />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="LicenceStatus">
<soap:operation />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="LicencedStatus">
<soap:operation />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SpiralWebService">
<wsdl:port name="SpiralSoap" binding="tns:SpiralSoap">
<soap:address location="http://[...]/soap/SpiralSoap" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]