The moose likes BEA/Weblogic and the fly likes Error on Client ws Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Error on Client ws" Watch "Error on Client ws" New topic

Error on Client ws

Herzon Guevara

Joined: Sep 06, 2013
Posts: 1
I tried make a client ws using jax ws, but in the code don't run. I test de request(the same request is built in de code) in Soap Ui and the request is funtional in this tool.

The code is:

String qnameService = "updateServiceService";
String portTypeName = "updateService";
String BODY_NAMESPACE_VALUE = "http://batch/service";
String usuarioWS = usuarioConexion;
String passwordWS = passwordConexion;
String qnamePort = "http://localhostnumberofport)/BatchWebApp/servicio/updateService.wsdl";

QName serviceName = new QName(BODY_NAMESPACE_VALUE,qnameService);
QName portName = new QName(BODY_NAMESPACE_VALUE, portTypeName);

Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_MTOM_BINDING, qnamePort);

Dispatch<SOAPMessage> dispatch = service.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE);

BindingProvider bp = (BindingProvider) dispatch;
MessageFactory mf = ((SOAPBinding) bp.getBinding()).getMessageFactory();

SOAPMessage request = mf.createMessage();
SOAPPart part = request.getSOAPPart();

SOAPEnvelope env = part.getEnvelope();
SOAPHeader header = env.getHeader();
SOAPBody body = env.getBody();



SOAPMessage response = dispatch.invoke(request);
String respuesta = response.getSOAPPart().getDocumentElement().getChildNodes().item(0).getNextSibling().getChildNodes().item(0).getChildNodes().item(0).getTextContent();

The error is the next::

Could not save changes; nested exception is javax.xml.soap.SOAPException: Error getting parts count from MimeMultiPart Message:
javax.xml.ws.soap.SOAPFaultException: Could not save changes; nested exception is javax.xml.soap.SOAPException: Error getting parts count from MimeMultiPart Message:
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
at com.sun.xml.internal.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:176)
at com.sun.xml.internal.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:195)
at Principal.main(Principal.java:166)

Ws using spring ws
Server: Weblogic 10
jdk 6
Client: jax-ws

Tks for your help!.

wood burning stoves
subject: Error on Client ws
Similar Threads
dii client problems..help!
Running a DII client through JSP
Content is not allowed in prolog
JAX-WS Client - Unsupported Content-Type issue
WebServiceProvider annotation