Ciao Schumy2000, il web service non è pubblicato sulla mia macchina, si trova in remoto. Ma al momento lo sto testando con un mockup di SoapUi...ho creato la mia classe client:
codice:
package it.sia.webinterface.ws.sms;
import java.net.MalformedURLException;
import java.net.URL;
public class TestSMS {
public static void main(String[] args) throws MalformedURLException {
URL url= new URL("http://p02150624:8088/mockSms2Binding?wsdl");
Sms serviceSms=new Sms(url);
SmsDelegate smsDelegate=serviceSms.getSms2();
int risposta=smsDelegate.sendPlus("user", "PSW", "Multa da pagare", "3388264202", "0", true, 0, 1, null, "Peppa Luongo", "NON");
System.out.println("RetCode = "+risposta);
}
}
Ho lanciato questa classe client, ma ottengo la seguente eccezione:
codice:
6-mar-2015 9.03.55 com.sun.xml.internal.ws.model.RuntimeModeler getRequestWrapperClass
INFO: Dynamically creating request wrapper Class net.aliaslab.sc_sms_ws.SendLongConcatenatoWithRcpt
26-mar-2015 9.03.55 com.sun.xml.internal.ws.model.RuntimeModeler getResponseWrapperClass
INFO: Dynamically creating response wrapper bean Class net.aliaslab.sc_sms_ws.SendLongConcatenatoWithRcptResponse
26-mar-2015 9.03.55 com.sun.xml.internal.ws.model.RuntimeModeler getRequestWrapperClass
INFO: Dynamically creating request wrapper Class net.aliaslab.sc_sms_ws.SendLongConcatenato
26-mar-2015 9.03.55 com.sun.xml.internal.ws.model.RuntimeModeler getResponseWrapperClass
INFO: Dynamically creating response wrapper bean Class net.aliaslab.sc_sms_ws.SendLongConcatenatoResponse
Exception in thread "main" javax.xml.ws.WebServiceException: Unable to create JAXBContext
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:153)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:83)
at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:244)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:687)
at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:675)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:330)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
at javax.xml.ws.Service.getPort(Service.java:92)
at it.sia.webinterface.ws.sms.Sms.getSms2(Sms.java:55)
at it.sia.webinterface.ws.sms.TestSMS.main(TestSMS.java:15)
Caused by: java.security.PrivilegedActionException: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 28 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "{http://sc_sms_ws.aliaslab.net/}SMSStatus". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at it.sia.webinterface.ws.sms.SMSStatus
Qualcuno ha idea di cosa si potrebbe trattare?