Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 23rd, 2006, 1:53 PM   #1
melisand
Newbie
 
Join Date: Jun 2006
Location: Lisbon, Portugal
Posts: 2
Rep Power: 0 melisand is on a distinguished road
Angry Caught an exception SOAP-ENV:Client,Error parsing HTTP status line "": java

I'm trying to program a web service with soap.
I have a client and a server! My server is implemented in java. It has to interact with other classes. I must deploy the services that server offers.
I test client and server and they ran ok. When I invoke the server's services it gives me this error:

Caught an exception SOAP-ENV:Client,Error parsing HTTP status line "": java.util.NoSuchElementException

I don't know what it is. Does anybody know?
melisand is offline   Reply With Quote
Old Jun 23rd, 2006, 2:56 PM   #2
melbolt
Professional Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 254
Rep Power: 4 melbolt is on a distinguished road
http://tns-www.lcs.mit.edu/manuals/j...Exception.html
__________________
I have never let my schooling interfere with my education. -Mark Twain-

Xbox live gamertag: melbolt

Last edited by melbolt; Jun 23rd, 2006 at 3:19 PM.
melbolt is offline   Reply With Quote
Old Jun 23rd, 2006, 3:03 PM   #3
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
can you post your code?
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Jun 23rd, 2006, 3:08 PM   #4
melisand
Newbie
 
Join Date: Jun 2006
Location: Lisbon, Portugal
Posts: 2
Rep Power: 0 melisand is on a distinguished road
package samples.dspace;

import java.io.*;
import java.util.*;
import java.net.*;
import org.w3c.dom.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

public class Client{

   public Client(){}

    public void chamada(String c){
	
	URL url=null;

	try{
	    url = new URL("http://localhost:8082/soap/servlet/rpcrouter");
	}catch(Exception e){
	    e.printStackTrace();
	}

	Call call=new Call();

	//Name of the service

	call.setTargetObjectURI("urn:DSpaceTest");

//name of the method
	call.setMethodName("teste");
	call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
	Vector params = new Vector();

	//Declaracao dos parametros

	params.addElement(new Parameter("teste",String.class,c,null));
	call.setParams(params);

	System.out.println("call object: "+call);

	//Fazer a chamada
	Response resp=null;

	try{
	    System.out.println("Going to call invoke(url, \"\")");
	    resp=call.invoke(url, "");

	}catch(SOAPException e){

	    System.err.println("Caught an exception "+e.getFaultCode()+ "," + e.getMessage());
	    System.exit(-1);
	}

	//Devolve resposta

	if(!resp.generatedFault()){
	    Parameter ret = resp.getReturnValue();
	    Object value=ret.getValue();
	    System.out.println(value);
	}
	else{
	    Fault fault = resp.getFault();
	    System.err.println("Generated fault: ");
	    System.out.println("Fault Code = "+fault.getFaultCode());
	    //	    System.out.println("Fault Code = "+fault.toString());
	    System.out.println("Fault String = "+ fault.getFaultString());
	}
	System.out.println("\n FINISHING...");

    }


    public static void main(String args[]){

	Cliente cliente=new Cliente();
	cliente.chamada("dora");
	}
}
__________________
D.P.
melisand is offline   Reply With Quote
Old Jun 23rd, 2006, 4:28 PM   #5
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
It seems that the client isn't getting back a valid HTTP response from what I've been reading. Download a packet sniffer such as Ethereal or Ettercap to see what is being exchanged between them.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:42 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC