posted 8 years ago
Hello,
I'm developing a J2ME application to communicate with a Web Service.
When I run the midlet, i got the error:
javax.xml.rpc.JAXRPCException: javax.microedition.pki.CertificateException: Subject alternative name did not match site name
at com.sun.j2mews.xml.rpc.OperationImpl.invoke(+220)
at service_now.incidents.ServiceNowSoap_Stub.getKeys(+540)
...
Following is my code:
protected void startApp() throws MIDletStateChangeException {
try {
ServiceNowSoap_Stub proxy = new ServiceNowSoap_Stub();
proxy._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, "https://demo.service-now.com/incident.do?SOAP");
proxy._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, "abc");
proxy._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, "abc");
proxy._setProperty(javax.xml.rpc.Stub.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
GetKeys getInc = new GetKeys();
getInc.setActive(Boolean.TRUE);
getInc.setCategory("hardware");
GetKeysResponse resp = new GetKeysResponse();
resp = proxy.getKeys(getInc);
String[] keys = resp.getSys_id();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
The error appear at the line: resp = proxy.getKeys(getInc);
I tried to make an application in J2EE to communicate with this web service and everything was fine, I didn't have any error.
I set the same properties to the Stub such as: ENDPOINT_ADDRESS_PROPERTY, USERNAME_PROPERTY, PASSWORD_PROPERTY.
Could someone please tell me what is wrong?
I really need your help!
Thank you very much for replying.
I'm developing a J2ME application to communicate with a Web Service.
When I run the midlet, i got the error:
javax.xml.rpc.JAXRPCException: javax.microedition.pki.CertificateException: Subject alternative name did not match site name
at com.sun.j2mews.xml.rpc.OperationImpl.invoke(+220)
at service_now.incidents.ServiceNowSoap_Stub.getKeys(+540)
...
Following is my code:
protected void startApp() throws MIDletStateChangeException {
try {
ServiceNowSoap_Stub proxy = new ServiceNowSoap_Stub();
proxy._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, "https://demo.service-now.com/incident.do?SOAP");
proxy._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, "abc");
proxy._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, "abc");
proxy._setProperty(javax.xml.rpc.Stub.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
GetKeys getInc = new GetKeys();
getInc.setActive(Boolean.TRUE);
getInc.setCategory("hardware");
GetKeysResponse resp = new GetKeysResponse();
resp = proxy.getKeys(getInc);
String[] keys = resp.getSys_id();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
The error appear at the line: resp = proxy.getKeys(getInc);
I tried to make an application in J2EE to communicate with this web service and everything was fine, I didn't have any error.
I set the same properties to the Stub such as: ENDPOINT_ADDRESS_PROPERTY, USERNAME_PROPERTY, PASSWORD_PROPERTY.
Could someone please tell me what is wrong?
I really need your help!



Thank you very much for replying.
posted 8 years ago
See if there is something useful on this topic
http://www.coderanch.com/t/459277/Java-Micro-Edition/Mobile/Ksoap-Error-expected-START-TAG
http://www.coderanch.com/t/459277/Java-Micro-Edition/Mobile/Ksoap-Error-expected-START-TAG
burin utit
Greenhorn
Posts: 2

Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
|