You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by "Milburn, Christopher FIL" <ch...@uk.fid-intl.com> on 2001/04/24 11:52:41 UTC
Proxy server can not perform operation.
I am having a problem when I try to invoke a web service, the error message
I get from the proxy
server is :-
[SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response
content type "text/html", must be: "text/xml". Response was:
<HTML>
<HEAD><TITLE>Error</TITLE></HEAD>
<BODY>
<H1>Error</H1>
<BLOCKQUOTE><B>
<HR SIZE=4><P>
The requested operation could not be performed by the proxy.<P>
Document contains no data<P>
<HR SIZE=4>
</B></BLOCKQUOTE>
The code is.......
SOAPHTTPConnection conn = new SOAPHTTPConnection();
conn.setProxyHost("http.proxy.uk.fid-intl.com");
conn.setProxyPort( 8000 );
URL newUrl = new URL("http://services.xmethods.net:80/soap");
String urn = "urn:xmethods-CurrencyExchange";
Call call = new Call(); // prepare the service invocation
call.setSOAPTransport(conn);
// Set encoding style. Use the standard SOAP encoding
String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
call.setEncodingStyleURI( encodingStyleURI );
// Set service locator parameters
call.setTargetObjectURI( urn );
call.setMethodName( "getRate");
// Create the input parameter vector
Vector params = new Vector ();
params.addElement( new Parameter("country1", String.class, country1,
null));
params.addElement( new Parameter("country2", String.class, country2,
null));
call.setParams( params);
// Invoke the service ...
Response resp = call.invoke( newUrl,"");
any ideas gratefully received,
Chris MM
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org