Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

axis fault (401)Unauthorized

843834Sep 27 2004 — edited Apr 26 2007
I want to use methods of a webservice deployed on remote server,i have downloaded the wsdl file and generated client side stubs by wsdl file also,

steps i followed

1) generated stubs by using wscompile tool of jwsdp1.4, the cmd is
wscompile -gen:client -d build -classpath build config-wsdl.xml
and config-wsdl.xml file is
#########
<?xml version="1.0" encoding="UTF-8"?>

<!--
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->

<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<wsdl
location="RealTime.wsdl"
packageName="rpctest" />
</configuration>
##########
this step is done well.

2)now the sample client program provided by webservice provider uses apache axis 1.0 and i want to compile and run the client,

the client involves http authentication also.to build the client (stand alone java application) i used ant build and this step created class file of client program also.


3) running the client

to execute i am using ant -emacs
and in client prgram i am giving user name and pwd as given by webservice provider.but client program is getting terminated with exception


#########

Buildfile: build.xml

build:

run-client:
failure: (401)Unauthorized
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultString: (401)Unauthorized
faultActor: null
faultDetail:
null: return code: 401
<html><head><title>Apache Tomcat/4.1.29 - Error report</tit
le><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white
;background-color : #0086b2;} H3{font-family : sans-serif,Arial,Tahoma;color : w
hite;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;col
or : black;background-color : white;} B{color : white;background-color : #0086b2
;} HR{color : #0086b2;} --></STYLE> </head><body><h1>
HTTP Status 401 - </h1><HR size="1" noshade><p><b
type</b> Status report</p><p><b>message</b> &l
t;u></u></p><p><b>description</b> <u>This
request requires HTTP authentication ().</u></p><HR size="1
" noshade><h3>Apache Tomcat/4.1.29</h3></body></htm
l>

(401)Unauthorized
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.j
ava:630)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:131)

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:182)
at org.apache.axis.client.Call.invokeEngine(Call.java:2113)
at org.apache.axis.client.Call.invoke(Call.java:2102)
at org.apache.axis.client.Call.invoke(Call.java:1851)
at org.apache.axis.client.Call.invoke(Call.java:1777)
at org.apache.axis.client.Call.invoke(Call.java:1315)
at rpctest.xyz.sendRequest(Unknown Source)
at rpctest.xyz.process(Unknown Source)
at rpctest.xyz.main(Unknown Source)

BUILD SUCCESSFUL
Total time: 19 seconds
####################

any help on where the things are going wrong and how to fix the things will be helpful.


thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2007
Added on Sep 27 2004
7 comments
3,948 views