You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by MY <me...@naryaz.com.tr> on 2006/10/11 09:36:08 UTC
basic http authentication
Hi,
I am using Eclipse 3.0.1 and axis_1.1. With a plugin, I made wsdl2java
successfully. The webservice I am trying to connect to uses "basic http
authentication" and has a root certificate. I installed the certificate to
"Trusted Root Certification Authorities". I also added this certificate to a
keystore by using the keytool in my jre installation path.
To test the web service client, I wrote the following code:
public static void main(String[] args) {
System.setProperty("javax.net.ssl.trustStore","C:\\Program
Files\\Java\\jre1.5.0_06\\bin\\truststore");
System.setProperty("javax.net.ssl.trustStorePassword","123456");
// Make a service
WelfWebServisleriService service = new WelfWebServisleriServiceLocator();
// Use the service to get a stub which implements the SDI.
WelfWebServisleri port = service.getWelfWebServisleri();
WelfWebServisleriSoapBindingStub stub =
(WelfWebServisleriSoapBindingStub)port;
stub._setProperty(WelfWebServisleriSoapBindingStub.USERNAME_PROPERTY,
"29000937000");
stub._setProperty(WelfWebServisleriSoapBindingStub.PASSWORD_PROPERTY,
"123456");
...
// Call a method of the web service
port.muayeneKayit();
}
Now I get the following error. What should I do?
(By the way, when my username and password are incorrect, I get a
"(401)Unauthorized" error. So I guess I am providing the username and
password in a correct way but I am still missing something.)
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(Unknown
Source)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:246)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at
tr.gov.ssk.esaglik.webservis.WelfWebServisleriSoapBindingStub.muayeneKayit(W
elfWebServisleriSoapBindingStub.java:1651)
at tr.gov.ssk.main.MuaKayit.muayeneKayit(MuaKayit.java:226)
at tr.gov.ssk.main.MuaKayit.main(MuaKayit.java:99)
java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
at org.apache.axis.client.Call.invoke(Call.java:2251)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at
tr.gov.ssk.esaglik.webservis.WelfWebServisleriSoapBindingStub.muayeneKayit(W
elfWebServisleriSoapBindingStub.java:1651)
at tr.gov.ssk.main.MuaKayit.muayeneKayit(MuaKayit.java:226)
at tr.gov.ssk.main.MuaKayit.main(MuaKayit.java:99)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(Unknown
Source)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:246)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
... 5 more
--
Meltem
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org