File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: Could not save changes; nested exception is javax.xml.soap.SOAPException: Error getting parts count from MimeMultiPart Message:
at Principal.main(

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

Tks for your help!.

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