Hi,
This Exception (fault) is because of missing authentication details.
You can set authentication details by setting username and password before invoking the webservice.
That can be done by,
MyWebService webservice = new MyWebService ServiceLocator(
org.apache.axis.
stub.setUsername(
stub.setPassword(
webservice .callAService(
I think this could help you.
Thanks,
Thirupathi B.
--- In completeJava@
>
> Hi all,
>
> I need some help w.r.t web services in java. I have a wsdl file and i
> need to send and receive calls to this wsdl url or file through java
> program. This url needs authentication (user name and pwd). So for
> this, i have used the wsdl2java tool(by downloading xerces,axis and
> installing tomcat) to convert the wsdl into java classes and i wrote a
> small client program to call this java classes. I am having a problem
> now. The client program compiles succesfully but the when i run it, it
> gives a "missing authentication header" exception. Actually from the
> wsdl file i have, there is a class called AuthenticationHeade
> also generated. I called setUsername and setPassword methods available
> on this class to set the username and password for the wsdl url but
> this does not help. I don't understand if this is the right way to do
> it. The complete exception details are:
>
>
>
> Exception in thread "main" AxisFault
> faultCode: {http://schemas.
> faultSubcode:
> faultString: Missing authentication header.
> faultActor:
> faultNode:
> faultDetail:
> {http://xml.
> header.
> at
> org.apache.axis.
> .java:222)
> at
> org.apache.axis.
> java:129)
> at
> org.apache.axis.
> ationContext.
> at
> org.apache.xerces.
> )
> at
> org.apache.xerces.
> n Source)
> at
> org.apache.xerces.
> Dispatcher.dispatch
> at
> org.apache.xerces.
> known Source)
> at org.apache.xerces.
> Source)
> at org.apache.xerces.
> Source)
> at org.apache.xerces.
> at org.apache.xerces.
> Source)
> at
> org.apache.xerces.
> ce)
> at org.apache.xerces.
> at
> org.apache.axis.
> Context.java:
> at org.apache.axis.
> at org.apache.axis.
> at
> org.apache.axis.
> tandChecker.
> at org.apache.axis.
> at org.apache.axis.
> at org.apache.axis.
> at org.apache.axis.
> at org.apache.axis.
> at org.apache.axis.
> at
> new5.wsdl.VMware_
> Soap_BindingStub.
> 0020_interfaceSoap_
> at Client.main(
>
> {http://xml.
>
> Missing authentication header.
> at
> org.apache.axis.
> .java:222)
> at
> org.apache.axis.
> java:129)
> at
> org.apache.axis.
> ationContext.
> at
> org.apache.xerces.
> )
> at
> org.apache.xerces.
> n Source)
> at
> org.apache.xerces.
> Dispatcher.dispatch
> at
> org.apache.xerces.
> known Source)
> at org.apache.xerces.
> Source)
> at org.apache.xerces.
> Source)
> at org.apache.xerces.
> at org.apache.xerces.
> Source)
> at
> org.apache.xerces.
> ce)
> at org.apache.xerces.
> at
> org.apache.axis.
> Context.java:
> at org.apache.axis.
> at org.apache.axis.
> at
> org.apache.axis.
> tandChecker.
> at org.apache.axis.
> at org.apache.axis.
> at org.apache.axis.
> at org.apache.axis.
> at org.apache.axis.
> at org.apache.axis.
> at
> new5.wsdl.VMware_
> Soap_BindingStub.
> 0020_interfaceSoap_
> at Client.main(
>
>
> Any help would be really appreciated regardng this. Many thanks in advance
>
Earn your degree in as few as 2 years - Advance your career with an AS, BS, MS degree - College-Finder.net.
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
No comments:
Post a Comment