Hi friends !!!

I am writing an application using jax-rpc:
I am trying to call a webservice.
The code of the client is:
___________________________________
URL urlWsdl = new URL("http://localhost:8080/axis/services/urn:xmltoday-delayed-services?wsdl";);


String nameSpaceUri = "urn:xmltoday-delayed-services";

String serviceName = "TravelAgency";

String portName = "TravelAgency";

ServiceFactory serviceFactory = ServiceFactory.newInstance();

javax.xml.rpc.Service service
= serviceFactory.createService(urlWsdl, new QName(nameSpaceUri, serviceName) );


TravelAgencyInterface myProxy = (TravelAgencyInterface) service.getPort(new
QName(nameSpaceUri, portName), TravelAgencyInterface.class );
_______________________


And , when the program execute the instruction serviceFactory.createService(... ) the error is :

samples.fede.GetQuote:addPerson: Exception >>javax.xml.rpc.ServiceException<<
samples.fede.GetQuote:addPerson: Message >>Error processing WSDL document:
javax.xml.rpc.ServiceException: Error processing WSDL document:
javax.xml.rpc.ServiceException: Cannot find service: {urn:xmltoday-delayed-services}TravelAgency<<


What can I do ? Any help is well received !!
In advance thanks,


Ricardo DE LA ROSA
IMAG - Grenoble - France

PD:  The WSDL is in the following page.
____________________________________
One part of the WSDL is:

<?xml version="1.0" ?>

<definitions name="urn:TravelAgency"
            targetNamespace="urn:xmltoday-delayed-services"
            xmlns:tns="urn:xmltoday-delayed-services"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema";
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
            xmlns="http://schemas.xmlsoap.org/wsdl/";>

<!-- message declns http://xml.apache.org/xml-soap -->

<wsdl:types>
<schema targetNamespace="http://xml.apache.org/xml-soap"; xmlns="http://www.w3.org/2001/XMLSchema";>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="Person">
<sequence>
<element name="Name" nillable="true" type="xsd:string"/>
<element name="Age" type="xsd:int"/>
</sequence>
</complexType>


</schema>
.....
<wsdl:message name="addPersonResponse">
<wsdl:part name="addPersonReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="addPersonRequest">
<wsdl:part name="in0" type="typens:Person"/>
</wsdl:message>
......
<portType name="TravelAgency">
.....
<wsdl:operation name="addPerson" parameterOrder="in0">
<wsdl:input name="addPersonRequest" message="impl:addPersonRequest"/>
<wsdl:output name="addPersonResponse" message="impl:addPersonResponse"/>
</wsdl:operation>
</portType>
......
<binding name="TravelAgencyBinding" type="tns:TravelAgency">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>


........
     <operation name="addPerson">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="addPersonRequest">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:xmltoday-delayed-services"/>

</wsdl:input>

<wsdl:output name="addPersonResponse">

<wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:xmltoday-delayed-services"/>

</wsdl:output>

</operation>

 </binding>
....
</definitions>






Reply via email to