Hi !!!
I am starting from wsdl.I have my service published with the proper url in the wsdl( i had gone wrong here before)
1> ant xrpcc-server
2> ant install
my wsdl file is:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="InsuranceService" targetNamespace="
http://dilipe:8080/jaxrpc-insurance/server/InsuranceService.wsdl" xmlns:tns="
http://dilipe:8080/jaxrpc-insurance/server/InsuranceService.wsdl" xmlns="
http://schemas.xmlsoap.org/wsdl/" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:ns2="
http://simplebean-hello.org/types">
<types>
<schema targetNamespace="
http://simplebean-hello.org/types" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="
http://simplebean-hello.org/types" xmlns:soap-enc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" xmlns="
http://www.w3.org/2001/XMLSchema">
<complexType name="ArrayOfstring">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType" wsdl:arrayType="string[]"/></restriction></complexContent></complexType></schema></types>
<message name="getInsRate">
<part name="arrayOfString_1" type="ns2:ArrayOfstring"/></message>
<message name="getInsRateResponse">
<part name="result" type="ns2:ArrayOfstring"/></message>
<portType name="insIF">
<operation name="getInsRate">
<input message="tns:getInsRate"/>
<output message="tns:getInsRateResponse"/></operation></portType>
<binding name="insIFBinding" type="tns:insIF">
<operation name="getInsRate">
<input>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://dilipe:8080/jaxrpc-insurance/server/InsuranceService.wsdl"/></input>
<output>
<soap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="
http://dilipe:8080/jaxrpc-insurance/server/InsuranceService.wsdl"/></output>
<soap:operation soapAction=""/></operation>
<soap:binding transport="
http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
<service name="Insurance">
<port name="insIFPort" binding="tns:insIFBinding">
<soap:address location="
http://dilipe:8080/jaxrpc-insurance/jaxrpc/insIF"/></port></service></definitions>
.and this is what i do to access the web service.
3> xrpcc -client configX.xml
configX.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="
http://java.sun.com/jax-rpc-ri/xrpcc-config">
<wsdl name="InsuranceService" location="
http://dilipe:8080/jaxrpc-insurance/server/InsuranceService.wsdl" packageName="Client">
</wsdl>
</configuration>
my client file is:
package Client;
public class insClient
{
public static void main(String[] args)
{
try
{
insClient cl = new insClient();
String endpoint = "
http://dilipe:8080/jaxrpc-insurance/jaxrpc/insIFPort";
InsIFPort_Stub stub = cl.getStub(endpoint);
cl.demoArray(stub);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
public InsIFPort_Stub getStub(String endpoint)
{
InsIFPort_Stub stub = null;
try
{
stub =(InsIFPort_Stub)(new Insurance_Impl().getInsIFPort());
//stub._setProperty(
// javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
// endpoint);
}
catch (Exception ex)
{
ex.printStackTrace();
}
return stub;
}
public void demoArray(InsIFPort_Stub stub)
{
try
{
String[] var =
{
"Ho3","03/28/2002","126000","63000","100,000","1,000",
"2%","true","1,000","true","0","0","Frame","1980",
"Secondary","7","034","10","C","C","A","A","19","false"
};
String[] str = stub.getInsRate(var);
for(int i=0;i<str.length;i++)
{
System.out.println(str[i]);
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
}
i then compile the client file, i get the errors
C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\INS>java Client.insClient
java.rmi.RemoteException: received fault: "Missing port information" (code: "Server" namespace: "
http://schemas.xmlsoap.org/soap/envelope/"); nested exception is:
received fault: "Missing port information" (code: "Server" namespace: "
http://schemas.xmlsoap.org/soap/envelope/")
at Client.InsIFPort_Stub.getInsRate(Unknown Source)
at Client.insClient.demoArray(insClient.java:54)
at Client.insClient.main(insClient.java:15)
Caused by: received fault: "Missing port information" (code: "Server" namespace:
"
http://schemas.xmlsoap.org/soap/envelope/")
at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.ja
va:321)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:211
)
... 3 more
can anyone help??? please
thanx a lot in adv
dilip