• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling .net web service from weblogic 8.1 and pass french(accented) chars  RSS feed

 
Smart Se
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to call a .net webservice from java. I have generated stub using weblogic 8.1. Now, I have to call a method which takes String parameter as input. When I invoke this methods by passing simple english alphabets in String, it works fine. But when I try to pass french (accented) characters like äëïöüÿ, it gives the following error:

java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException:

Detail:
<detail>
<jwErr:jwErrorDetail xmlns:jwErr="http://www.bea.com/2002/04/jwErrorDetail/">com.bea.control.ServiceControlException: SERVICE FAULT:
Code:javax.xml.soap.SOAPException
String:failed to convert DOM to SOAPEnvelope:weblogic.xml.stream.XMLStreamException: Unable to instantiate the stream, the error was: Malformed UTF-8 char -- is an XML encoding declaration missing? - with nested exception:
[weblogic.xml.stream.XMLStreamException: Unable to instantiate the stream, the error was: Malformed UTF-8 char -- is an XML encoding declaration missing?]
Detail:
END SERVICE FAULT [ServiceException]
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:397)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:423)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:396)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:248)
at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:224)
at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:103)
at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:153)
at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(GenericStatelessSLSBContAdpt.java:62)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:153)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:168)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:46)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:161)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Dispatcher.java:49)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(HttpServerHelper.java:713)
at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(HttpServer.java:49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6722)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: com.bea.control.ServiceControlException: SERVICE FAULT:
Code:javax.xml.soap.SOAPException
String:failed to convert DOM to SOAPEnvelope:weblogic.xml.stream.XMLStreamException: Unable to instantiate the stream, the error was: Malformed UTF-8 char -- is an XML encoding declaration missing? - with nested exception:
[weblogic.xml.stream.XMLStreamException: Unable to instantiate the stream, the error was: Malformed UTF-8 char -- is an XML encoding declaration missing?]
Detail:
END SERVICE FAULT
at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:1240)

I have also tried by passing the accented chars like this way:

byte[] utf8Bytes = "äëïöüÿ".getBytes("UTF8"); and then creating String from this array and pass this to method. But got the same error
Any help will be appreciated.
Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!