unexpected XML reader state. expected: END_ELEMENT but found: CHARACTERS
I'm try to developed a ws client. the server is in Microsoft-IIS/6.0.
the method that i'm try to invoke return void, this is the interface
/**
* Sends a diagnostic request to a device
*
* @param deviceId
* @param url
*/
@WebMethod(operationName = "SendDiagnosticRequestToDevice", action = "http://client.org/SendDiagnosticRequestToDevice")
@RequestWrapper(localName = "SendDiagnosticRequestToDevice", targetNamespace = "http://teste.org/", className = "client.SendDiagnosticRequestToDevice")
@ResponseWrapper(localName = "SendDiagnosticRequestToDeviceResponse", targetNamespace = "http://teste.org/", className = "client.SendDiagnosticRequestToDeviceResponse")
public void sendDiagnosticRequestToDevice(
@WebParam(name = "deviceId", targetNamespace = "http://tempuri.org/")
String deviceId,
@WebParam(name = "url", targetNamespace = "http://teste.org/")
String url);
my client only have this code
DiagnosticsNotificationsWS service = new DiagnosticsNotificationsWS()
DiagnosticsNotificationsWSSoap port = service.getDiagnosticsNotificationsWSSoap();
port.sendDiagnosticRequestToDevice("8670eaab", "http://10.112.80.12/teste?wsdl");
but have follow error:
Exception in thread "main" javax.xml.ws.WebServiceException: unexpected XML reader state. expected: END_ELEMENT but found: CHARACTERS
at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:263)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:545)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:288)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:153)
at com.sun.xml.ws.encoding.soap.internal.DelegateBase.send(DelegateBase.java:85)
at com.sun.xml.ws.client.EndpointIFInvocationHandler.implementSEIMethod(EndpointIFInvocationHandler.java:176)
at com.sun.xml.ws.client.EndpointIFInvocationHandler.invoke(EndpointIFInvocationHandler.java:105)
at $Proxy24.sendDiagnosticRequestToDevice(Unknown Source)
at Main.main(Main.java:45)
Caused by: unexpected XML reader state. expected: END_ELEMENT but found: CHARACTERS
at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyReaderState(XMLStreamReaderUtil.java:193)
at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.decodeFault(SOAPXMLDecoder.java:349)
at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:340)
at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:325)
at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.decodeBody(SOAPXMLDecoder.java:188)
at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.decodeEnvelope(SOAPXMLDecoder.java:139)
at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:256)
... 8 more

