File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes getting exception access webservice located xmethods.net Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "getting exception access webservice located xmethods.net " Watch "getting exception access webservice located xmethods.net " New topic
Author

getting exception access webservice located xmethods.net

maha laxmi
Ranch Hand

Joined: Sep 23, 2005
Posts: 68
see this

http://www.mindreef.net/tide/scopeit/start.do?referer=xmethods&url=http://www.dataaccess.nl/wk2006/footballpoolwebservice.wso?WSDL

I am using axis i have writen client code to access webservice located at xmethods.net but i am getting exception;Is it it right to acess??

18:23:31,737 INFO [STDOUT] SOAPException= Error processing request: Unexpected
parameter 'arg0'



String WS_ENDPOINT = "http://www.dataaccess.nl/wk2006/footballpoolwebservice.wso" ;


Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new URL(WS_ENDPOINT) );
call.setOperationName(new QName("http://www.dataaccess.nl/wk2006", "PlayedAtWorldCup") );

String country ="ENGLAND";
try
{
System.out.println( "invoke service\n" + " URL= " + WS_ENDPOINT );
Object[] ret1 = (Object[]) call.invoke( new Object[] { country } );
}
catch( Exception e ) // call could not be sent properly
{
System.err.println( "SOAPException= " +
e.getMessage() );
}
maha laxmi
Ranch Hand

Joined: Sep 23, 2005
Posts: 68
i created stubs using WSDL but when i run the client i am getting below exception;what is this meaning??


log4j:WARN No appenders could be found for logger (org.apache.axis.descriptio
perationDesc).
log4j:WARN Please initialize the log4j system properly.
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (405)Method not allowed
faultActor:
faultNode:
faultDetail:
{}:return code: 405
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html dir=ltr>

<head>
<style>
a:link {font:8pt/11pt verdana; color:FF0000}
a:visited {font:8pt/11pt verdana; color:#4e4e4e}
</style>

<META NAME="ROBOTS" CONTENT="NOINDEX">

<title>The page cannot be displayed</title>

<META HTTP-EQUIV="Content-Type" Content="text-html; charset
ndows-1252">
</head>

<script>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm

//For testing use DocURL = "res://shdocvw.dll/http_404.htm#https
www.microsoft.com/bar.htm"
DocURL=document.URL;

//this is where the http or https will be, as found by searching for
but skipping the res://
protocolIndex=DocURL.indexOf("://",4);

//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/",protocolIndex + 3);

//for the href, we need a valid URL to the domain. We search for the
ymbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL value.
use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL,serverIndex);

//for display, we need to skip after http://, and go to the next slas
displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
InsertElementAnchor(urlresult, displayresult);
}

function HtmlEncode(text)
{
return text.replace(/&/g, '&amp').replace(/'/g, '&quot;').rep
e(/</g, '&lt;').replace(/>/g, '&gt;');
}

function TagAttrib(name, value)
{
return ' '+name+'="'+HtmlEncode(value)+'"';
}

function PrintTag(tagName, needCloseTag, attrib, inner){
document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
if (needCloseTag) document.write( '</' + tagName +'>' );
}

function URI(href)
{
IEVer = window.navigator.appVersion;
IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );

return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
encodeURI(href) :
escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
}

function InsertElementAnchor(href, text)
{
PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
}

//-->
</script>

<body bgcolor="FFFFFF">

<table width="410" cellpadding="3" cellspacing="5
ot;>

<tr>
<td align="left" valign="middle" width="360&q
;>
<h1 style="COLOR:000000; FONT: 13pt/15pt verdana"><
-Problem-->The page cannot be displayed</h1>
</td>
</tr>

<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 8pt/11pt verdana">Th
age you are looking for cannot be displayed because the page address is incor
t.</font> </td>
</tr>

<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 8pt/11pt verdana">

<hr color="#C0C0C0" noshade>

<p>Please try the following:</p>

<ul>
<li>If you typed the page address in the Address bar, check that
is entered correctly.<br>
</li>

<li>Open the

<script>
<!--
if (!((window.navigator.userAgent.indexOf("MSIE" > 0
amp;& (window.navigator.appVersion.charAt(0) == "2" ))
{
Homepage();
}
//-->
</script>

home page and then look for links to the information you want.<
>
</ul>

<h2 style="COLOR:000000; FONT: 8pt/11pt verdana">HTTP 405
Resource not
allowed<br>
Internet Information Services</h2>

<hr color="#C0C0C0" noshade>

<p>Technical Information (for support personnel)</p>

<ul>
<li>More information:<br>
<a href="http://www.microsoft.com/ContentRedirect.asp?prd=iis&sbp
mp;pver=5.0&pid=&ID=405&cat=web&os=&over=&hrd=&Op
&Opt2=&Opt3=" target="_blank">Microsoft Support<
gt;
</li>
</ul>

</font></td>
</tr>

</table>
</body>
</html>

{http://xml.apache.org/axis/}HttpErrorCode:405

(405)Method not allowed
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSende
ava:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:1

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStra
y.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
There's a problem with the RPC: (405)Method not allowed
Watsh Rajneesh
Ranch Hand

Joined: Apr 17, 2006
Posts: 110
When the WSDL is available then its always easier to develop a generated stub type client. To further ease the effort involved you can use the support of an IDE (like netbeans 5.0) to generate the WSDL client stub from within the IDE and write your client application quickly.


SCJP 5.0 (90%), SCDJWS 1.4 (88%), SCWCD 1.4 (82%), SCBCD 1.3 (85%)
maha laxmi
Ranch Hand

Joined: Sep 23, 2005
Posts: 68
Originally posted by Watsh Rajneesh:
When the WSDL is available then its always easier to develop a generated stub type client. To further ease the effort involved you can use the support of an IDE (like netbeans 5.0) to generate the WSDL client stub from within the IDE and write your client application quickly.



i created stubs using WSDL2Java command now i am able to run it
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: getting exception access webservice located xmethods.net