• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems with Web Services  RSS feed

Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all.

I have created an application in java, that it build a file PDF. This works correctly.

Now, my objective is that this application works in a web service.
When I compile the web service, I don't obtain compilation errors.
I don't have problems to deploy the SERVICE. But when I execute the client, I have exceptions:

[java] Endpoint address = http://localhost:8080/preinscripcion/preinscripcion
[java] java.rmi.ServerException: JAXRPC.JAXRPCSERVLET.28: Missing port information
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:372)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:224)
[java] at client_preinscripcion.ServicioIF_Stub.preinscribir(ServicioIF_Stub.java:68)
[java] at client_preinscripcion.cliente.main(Unknown Source)



The code is:

import java.io.FileOutputStream;
import java.io.IOException;

import com.lowagie.text.*;
import com.lowagie.text.pdf.PdfWriter;

public class generatePDF
public void buildPDF(String Convocatoria)
String Message;

Document document = new Document();
PdfWriter.getInstance(document, new FileOutputStream("c:/generatePDF.pdf"));
document.add(new Paragraph("Hello World"));
catch(DocumentException de) { Message="Error"; }
catch(IOException ioe) { Message="Error"; }

}//Fin de buildPDF


I use iText for convert to PDF.

I hope somebody can help me

Thank to all.
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

the interisting point would be the client-code an the location of your wsdl-file on the server.
In your client you should define a service like this:

Service service = serviceFactory.createService(new QName(uri, serviceName));

i guess, you have set a wrong value for uri, which should be a String which "shows" the path to aour wsdl-file on the server

z.b. String uri = "http://yourserver:8080/axis/services/yourservice?wsdl";

hope it helps

antonio rodriguez ayuso
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Christine,

the uri of the wsdl is good.I explain to you:

My web service has two parts. In the first part, the web service save the data in one database. In the second part, the web service make one .pdf file with the data.

When run client, I have the exceptions, but the data are saved in the database.

The source code of the client is:

package cliente_preinscripcion;

import javax.xml.rpc.Stub;

public class cliente {

private String endpointAddress;

public static void main(String[] args) {

System.out.println("Endpoint address = " + args[0]);
try {
Stub stub = createProxy();
stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, args[0]);
ServicioIF preinscripcion = (ServicioIF)stub;
preinscripcion.preinscribir("76256","Rodriguez","Ayuso","Antonio","Jose Menendez Pidal","2","2A","Merida","Badajoz","06800","M",
"6841159","antonio.rgz@ya.com","SI"," "," "," ","No"," ","Universidad de Extremadura","Cient�fico-Tecnolog�as",
} catch (Exception ex) {

private static Stub createProxy() {

return (Stub)(new PreinscripcionService_Impl().getServicioIFPort());

The function preinscribir (service), call to the functions than save the data in database and make the pdf file.

thank you, and I'm sorry, my english is very bad.
[ November 18, 2004: Message edited by: antonio rodriguez ayuso ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!