Exception when calling response.setContentLength

Hi
I have a JSP page which calls a Java class that streams a PDF file to the browser.
This works great with Netscape/Mozilla/Opera, but not with Internet Explorer.
I got a tip that I should set the content length, but this fails. This is the exception I got:
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '240' bytes instead of stated: '61574' bytes.
at weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:446)
at weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1026)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2560)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Here is my Java method:
public void produserPDF(int brev_lnr, HttpServletResponse response, HttpServletRequest req) throws Exception {
byte b[];
int length = 0;
//Genererer PDF dokument. Returneres som en blob
lotteri.n_blob_brev lotteristub;
lotteristub = lotteri.n_blob_brevHelper.narrow(session.create("lotteri/n_blob_brev"));
try {
     //A byte array containing the PDF document
b = lotteristub.of_b_produser_pdf(brev_lnr, "BLOB");
String userAgent = req.getHeader("User-Agent");
//Triggering dialog box if browser is IE
if ((userAgent.indexOf("MSIE 5") != -1) ||(userAgent.indexOf("MSIE 6.0") != -1)) {
response.setHeader("Content-Type","application/x-octet-stream");
response.setHeader("Content-disposition", "attachment; filename=test.pdf");
} else {
response.setHeader("Content-Type","application/pdf");
//Setting the content length. This fails!!
response.setContentLength(b.length);
//get the output stream
BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
out.write(b, 0, length);
out.flush();
out.close();
} catch (IOException e) {
logger.toWLlog( "Lotteri, IOException", e.getMessage());
} catch (Exception e) {
//throw new Exception("Error executing lotteristub.of_b_produser_pdf");
logger.toWLlog( "Lotteri", e.getMessage());
Any suggestions are very much appreciated?
Yours
Anders Rodahl

Anders,
Try the following code:
try
          response.setContentType("application/pdf");
          // later - do description               //
          FileInputStream MyIn = new FileInputStream(sFileName);
          File FS = new File(sFileName);
          Long L = new Long(FS.length());
          //byte byteArray[] = new byte[L.intValue()];     
          byte byteArray[] = new byte[8192];     
          response.setContentLength(L.intValue());
          java.io.OutputStream os = response.getOutputStream();
          int iCount = 0;     
          while((iCount = MyIn.read(byteArray)) != -1) {
               os.write(byteArray, 0, iCount);
          MyIn.close();
          os.flush();
          os.close();
catch (java.io.IOException ex)
}

Similar Messages

  • MSS - Business Event Details - Error Unexpected Exception when Calling RFC

    Dear Experts,
    Manager is getting the Error "Unexpected Exception when Calling RFC from Profile Application 'Business Event' when he tries to get the Training history of ONE employee in MSS. However, he is getting the details for the other employees of his department.
    Any inputs on this?
    Thank you.

    I believe it is our custom iView that is incorrect.

  • Exception when calling SOAP Lookup-API async

    Hello,
    i'm calling a SOAP-Comunication Channel (Lookup-API) out of my MessageMapping. The WebService Called is <u>asynchron</u> because i just send some data and i don't care about the result. The WebService itselfs is implemented on our XI. In other words: we call us self.
    In order to call my WebService asynchronous, i added <i>&QualityOfService=ExactlyOnce</i> at the end of the URL. The SOAP-Action is:
    <i>http://sap.com/xi/WebService/soap1.1</i>
    The problem is: the WebService works perfekt! But: in my mapping i get
    nevertheless the following exception:
    Errorcom.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel SOAP_Receiver_SetIdocStatusAsync (Party: , Service: SetIdocStatus, Object ID: f6b1ce38e9fa332cba4eb1a6f0a3e17f) null com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel SOAP_Receiver_SetIdocStatusAsync (Party: , Service: SetIdocStatus, Object ID: f6b1ce38e9fa332cba4eb1a6f0a3e17f) null at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:96) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.af.service.api.AFException at com.sap.aii.af.service.api.AdapterAccess.call(AdapterAccess.java:122) at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:87) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    The problem is: i don't know how to check for the HTTP-Header, because
    my call
    <i>SOAPOutPayload = accessor.call(payload);</i>
    throws the mentioned exception, even though it works behind the scene.
    Is it possible to check for the HTTP-Response-Code in the catch block?
    We want to avoid an synchronous scenario because we don't need the result and the WebService is rather slow.

  • Scripting API: Com exception when calling Session.Record

    Hi,
    I'm communicating with SAP Scripting API Com-Object from my Net application.
    When the Scripting events are disable in server side (by setting sapgui/user_scripting_disable_recording=TRUE in the server profile see Note 692245) ans i try to set the GuiSession.Record property to true i recieve a COM exception.
    System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
    at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
    at SAPFEWSELib.ISapSessionTarget.set_Record(Boolean )
    My question is - is this is the expected behavior? (I wouldn't expect exception when mode is disabled).
    Thanks,
    Dror.

    The problem is: i don't know how to check for the HTTP-Header, because
    my call
    <i>SOAPOutPayload = accessor.call(payload);</i>
    throws the mentioned exception, even though it works behind the scene.
    Is it possible to check for the HTTP-Response-Code in the catch block?
    We want to avoid an synchronous scenario because we don't need the result and the WebService is rather slow.

  • NO_PERMISSION Exception when calling secured EJB-methods

    In WL6.1, I have an Ejb with secured methods. The (Swing) client application accesses the Ejb through rmi-iiop using the JDK1.3.1 Orb.
    Unfortunately, it seems that the caller identity (which was supplied in the InitialContext lookup) is not propagated
    to the server: any call to a secured method
    fails with a CORBA NO_PERMISSION Exception.
    Non secured methods work fine.
    Using the t3 protocol the program also works fine, but that would require
    the 25Mb weblogic.jar on all clients,
    which is unattainable for us.
    Any ideas how this situation can be corrected?
    -Allard Siemelink

    I am still getting the NO_PERMISSION Exception when using "weblogic.jndi.WLInitialContextFactory".
    We use Sun's JRE, version 1.3.1_01.
    Am I forgetting something?
    My code is as follows:
    InitialContext context = null;
    try {
    Hashtable ht = new Hashtable();
    ht.put(InitialContext.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    ht.put(InitialContext.PROVIDER_URL, "iiop://localhost:80");
    ht.put(InitialContext.SECURITY_PRINCIPAL, "system");
    ht.put(InitialContext.SECURITY_CREDENTIALS, "system_password");
    context = new InitialContext(ht);
    Object objHome = context.lookup(EJB_NAME);
    MyHome myHome = (MyHome)PortableRemoteObject.narrow(objHome, MyHome.class);
    MyRemote myRemote = myHome.create();
    //NEXT LINE Crashes when method is secured:
    myRemote.securedMethod();
    finally {
    if (context!=null) context.close();
    Andy Piper <[email protected]> wrote:
    Allard Siemelink <[email protected]> writes:
    In WL6.1, I have an Ejb with secured methods. The (Swing) client applicationaccesses the Ejb through rmi-iiop using the JDK1.3.1 Orb.
    Unfortunately, it seems that the caller identity (which was suppliedin the InitialContext lookup) is not propagated
    to the server: any call to a secured method
    fails with a CORBA NO_PERMISSION Exception.Make sure you are using WLInitialContextFactory and not
    CNCtxFactory. Only the former will give you security.
    andy

  • Netweaver throwing following exception when calling the ProductionOrder WS

    Hi,
    when calling the ProductionOrder web service I get the following exception from the system:
    nested exception is: com.sap.engine.services.ts.exceptions.BaseSystemException: Exception ( SAP J2EE Engine JTA Transaction : [0ffffffaa60fffffffe00103e] ) in rollback.
    The system was migrated from Netweaver CE 7.1 SP4 to SP5 before the error started to occur.
    Any ideas how to fix this? Start/Stopping ME didn't do the trick.
    Kind Regards,
    Christoph Mertins

    Yes the stack trace is:
    System exception 
    [EXCEPTION]
    javax.ejb.EJBException: nested exception is: com.sap.engine.services.ts.exceptions.BaseSystemException: Exception ( SAP J2EE Engine JTA Transaction : [0ffffffaa60fffffffe0013ffffffb6] ) in rollback.
    com.sap.engine.services.ts.exceptions.BaseSystemException: Exception ( SAP J2EE Engine JTA Transaction : [0ffffffaa60fffffffe0013ffffffb6] ) in rollback.
    at com.sap.engine.services.ts.jta.impl.TransactionImpl.rollback(TransactionImpl.java:921)
    at com.sap.engine.services.ts.jta.impl.TransactionManagerImpl.rollback(TransactionManagerImpl.java:486)
    at com.sap.engine.services.ejb3.runtime.impl.TransactionAttributeHandler$Required.error(TransactionAttributeHandler.java:296)
    at com.sap.engine.services.ejb3.runtime.impl.TransactionAttributeHandler$TransactionAttributeErrorsHandler.error(TransactionAttributeHandler.java:130)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:40)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
    at $Proxy3782.create(Unknown Source)
    at com.sap.me.productdefinition.wserpimpl.productionOrder.ProductionOrderPersister.createOrUpdate(ProductionOrderPersister.java:133)
    at com.sap.me.productdefinition.wserpimpl.GenericVOServiceImpl.createOrUpdate(GenericVOServiceImpl.java:57)
    at com.sap.me.productdefinition.wserpimpl.productionOrder.ProductionOrderServiceHandlerAdapter.updateProductionOrder(ProductionOrderServiceHandlerAdapter.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at com.visiprise.frame.proxy.DefaultInterceptor.intercept(DefaultInterceptor.java:31)
    at com.visiprise.frame.proxy.InterceptorChain.process(InterceptorChain.java:48)
    at com.visiprise.frame.proxy.ProxyContext.process(ProxyContext.java:67)
    at com.visiprise.frame.proxy.AdviceInterceptor.intercept(AdviceInterceptor.java:45)
    at com.visiprise.frame.proxy.InterceptorChain.process(InterceptorChain.java:48)
    at com.visiprise.frame.proxy.GenericSOProxy.invoke(GenericSOProxy.java:81)
    at $Proxy3884.updateProductionOrder(Unknown Source)
    at com.sap.me.production.ws.ProductionOrderService.updateProductionOrder(ProductionOrderService.java:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at com.sap.engine.services.webservices.runtime.JavaClassImplementationContainer.invokeMethod(JavaClassImplementationContainer.java:96)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:525)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:494)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:260)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:178)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWithLogging(ServletDispatcherImpl.java:114)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:72)
    at com.sap.engine.services.webservices.servlet.SOAPServletExt.doPost(SOAPServletExt.java:90)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:162)
    at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:81)
    at com.sap.me.webservice.ClearServiceContextFilter.doFilter(ClearServiceContextFilter.java:28)
    at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:73)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:461)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:298)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:397)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:48)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:83)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:243)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:78)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:43)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:428)
    at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:247)
    at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:45)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:327)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException is thrown by the pooled connection: com.sap.sql.log.OpenSQLException: Connection object com.sap.sql.jdbc.vendor.VendorConnectionHandle@aa1bf8e has already been closed.
    at com.sap.engine.services.dbpool.spi.LocalTXManagedConnectionImpl.throwBaseResourceException(LocalTXManagedConnectionImpl.java:89)
    at com.sap.engine.services.dbpool.spi.LocalTXManagedConnectionImpl.rollback(LocalTXManagedConnectionImpl.java:389)
    at com.sap.engine.services.ts.jta.impl.TransactionImpl.rollback(TransactionImpl.java:813)
    ... 83 more
    Caused by: com.sap.sql.log.OpenSQLException: Connection object com.sap.sql.jdbc.vendor.VendorConnectionHandle@aa1bf8e has already been closed.
    at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:83)
    at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:122)
    at com.sap.sql.jdbc.vendor.VendorConnectionHandle.validate(VendorConnectionHandle.java:383)
    at com.sap.sql.jdbc.vendor.VendorConnectionHandle.setAutoCommit(VendorConnectionHandle.java:38)
    at com.sap.engine.services.dbpool.spi.LocalTXManagedConnectionImpl.rollback(LocalTXManagedConnectionImpl.java:386)
    ... 84 more

  • Exception when calling ABAP Proxy modelled in SAP PI: CL_SOAP_RUNTIME_ROOT

    Hi,
    We have a scenario where we:
    1. Modell an interface in SAP PI
       This interface contains a complex type from a different namespace
    2. Use it to create an ABAP proxy in backend system
    3. Configure it with SOAManager
    4. Call the ABAP proxy ws directly from a third-party system (biztalk)
    We're currently testing calling the ABAP proxy from soapUI, but get a strange exception thrown by the SOAP framework in ABAP backend.
    The test in soapUI is setup by importing the WSDL acquired from SOAMANAGER.
    The error message we in the SOAP response is:
    CX_SY_REF_IS_INITIAL:Exception CX_SOAP_ROOT occurred
    (program: CL_SOAP_RUNTIME_ROOT==========CP, include: CL_SOAP_RUNTIME_ROOT==========CM004, line: 130)..
    An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally,
    nor declared in a RAISING clause.Dereferencing of the NULL reference
    It is a very low level error from the CL_SOAP_RUNTIME_ROOT program and not a descriptive error message at all.
    We've checked the user and the authorizations it has, we've redone the SOAManager config but the problem persists.
    We find no dumps in the ABAP proxy since the request never reaches it.
    For a limited time I'll make WSDL and SOAP response available
    WSDL (some values anonymized) available at http://dl.dropbox.com/u/4379928/SOAP/project.wsdl
    Complete SOAP response is available at http://dl.dropbox.com/u/4379928/SOAP/soap_data.xml
    Any ideas on where to look?

    Hi,
    We've now managed to implement a workaround.
    The workaround was to create the endpoint in PI as well.
    So that the traffic goes from third-party solution->PI-> WS-enabled ABAP Proxy
    When we did this initially, we got some errors related to the asynch method of this call, but this was resolved by changing the channel from "best effort" to "Guaranteed delivery". 
    Still we don't know what the root cause of the initial problem was, but we assume it is related to the asynch nature of the service (though we have other asynch proxies that work without problems).
    Regards
    Dagfinn

  • Exception when calling web service from Oracle forms 10g

    Hi All,
    I am trying to integrate Oracle Forms 10g(V 10.1.2.0.2.) with Web Services.
    There is a java class named 'authenticate' which is generated using Oracle JDeveloper.
    This class is included in the forms application by using "Import Java Class" feature.
    Forms built the following funtion based on that class:
    -- Method: authenticate (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    FUNCTION authenticate(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2,
    a1 VARCHAR2) RETURN VARCHAR2 IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    message('here1');
    RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'mypackage/AuthenticatorWebServiceServiceStub',
    'authenticate', '(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;', args);
    message('here2');
    END;
    However when the above code is invoked it shows the message 'here1' on the form and then throws the following exception: java.lang.Exception: java.lang.ClassCastException
    Please suggest me what's wrong with the code. I appreciate your time and help.
    Thanks,
    Scott.

    My primary skill is PL/SQL but the only information I found on Oracle's site to call a web service from a 10g Form was creating a jar file and importing the java class. Since I don't want to ask our corporate IT to make changes on the UNIX box for the jar files I went a different route.
    I use UTL_HTTP.BEGIN_REQUEST to call a URL then load I load the data to a table as a CLOB since we have more than 4000 characters. Now I need to parse the XML and load it into a form. I have never done this so if there is a helpful site please let me know. I have looked at several sites but none do what I want.
    Thanks

  • CX_SY_CONVERSION_NO_DATE_TIME:XSLT exception when calling Web Service

    I have created a Web Service on our Sandbox SAP server and am attempting to call it from our DEV SAP Server.  The returning structure contains date fields that sometimes are null. A null date field in SAP is equal to 00000000.
    When I call the Web Service and the date values are null, I get the following exception:
    CX_SY_CONVERSION_NO_DATE_TIME:XSLT exception.An error occurred when deserializing in the simple transformation program /1SAI/TXS982F8A669D1A54B7AD0D.
    Value 0000-00-00 is not a valid date in accord with the XML format for ABAP
    I would not expect to see this type of error, sense the call is between two SAP systems. 
    Is there anyway to fix this without moving space to any null date field in the function module?
    That's kind of annoying to do sense I have so many date fields.
    Example:
    IF date1 IS INITIAL.
        MOVE space TO date1.
    ENDIF.
    IF date2 IS INITIAL.
        MOVE space TO date2.
    ENDIF.
    IF date3 IS INITIAL.
        MOVE space TO date3.
    ENDIF.
    IF date4 IS INITIAL.
        MOVE space TO date4.
    ENDIF.

    Hi All,
    I got a solution for this exception. Hope it will help to all facing this problem.
    I was using proxy created from SE80.
    In my proxy for exporting parameters of methods I have changed all date fields.
    Earlier it was having Techn. type under Attributes of fields : XSDDATE_D. I chnaged this to DATS.
    It worked fine.
    Manish

  • Server exception when calling Naming.rebind()  method

    Hello,
    I'm new at RMI and seem couldn't figure out a solution to my problem.
    I'm calling Naming.rebind(...) in my code and got the exception below.
    I'm not sure what's going on. Could somebody please advice?
    com.myPackage.myClassRemote (this is not the original name) is my remote interface that is going to be used by clients side.
    Thanks in advance for all the help.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: com.myPackage.myClassRemote
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:385)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    at java.lang.Thread.run(Thread.java:595)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Naming.java:160)
    .....

    Malcom -
    This is an interesting problem that I could find no bugs or notes about. I hate to say it, but it sounds like the type of issue you will need to call Oracle Support on. Sounds like the type of thing that may need a test case and is too detailed for the forum.
    The only thing I could think of to even suggest (which I am sure you have already done) is make sure that you make it GLOBAL so that if you come back to it will still be there. I guess there is the possibility that when it works is because it has not yet been garbage collected.
    Regards,
    Candace Stover
    Forms Product Management

  • Throwinf an exception when calling 'SUSR_INTERNET_USERSWITCH'

    hi all,
    i am using sap stanandard function module 'CRM_ISA_IUSER_LOGIN' for authenticating internet users.inside this function module it is calling another
    function module 'SUSR_INTERNET_USERSWITCH'.when i am debugging this one it is returning an exception 'MORE THEN ONE MODE'.
    what might be the reason.
    thans
    balu

    Hi Balu,
    I think you should post this Question in the Business Server Pages (BSP). But my guess is that when you debug this application the exception is thrown because the Internet User perhaps is limited to one mode.
    Regards
    Gregor

  • Nullpointer exception when calling Task.getPayloadAsElement()

    Hi all,
    I have deployed an simple bpel in my 10.1.3.1 bpel engine. The proces contains a simpel human tasks, which I want to complete using the human workflow 10.1.3 api. This is the task message which includes my payload:
    initiateTask_ApproveLoanRequestTask
    [2006/12/04 20:59:48]
    Invoked 2-way operation "initiateTask" on partner "TaskService".
    - <messages>
    - <initiateTaskInput>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    - <initiateTask xmlns="http://xmlns.oracle.com/bpel/workflow/taskService">
    - <task xmlns="http://xmlns.oracle.com/bpel/workflow/task">
    <title>
    Aprove Loan Request task
    </title>
    - <payload>
    - <approveLoanRequestPayload xmlns="http://xmlns.oracle.com/approveLoanRequest">
    <nameRequester>
    Tom
    </nameRequester>
    <loanRequest>
    1000
    </loanRequest>
    <currency/>
    <isApproved/>
    </approveLoanRequestPayload>
    </payload>
    <taskDefinitionURI>
    http://xesoa1.iteye.local:8894/orabpel/default/approveLoanRequest/1.0/ApproveLoanRequestTask/ApproveLoanRequestTask.task
    </taskDefinitionURI>
    <creator>
    Tom
    </creator>
    <ownerUser>
    bpeladmin
    </ownerUser>
    <ownerGroup/>
    <priority>
    3
    </priority>
    <identityContext/>
    <userComment/>
    <attachment/>
    - <processInfo>
    <domainId>
    default
    </domainId>
    <instanceId>
    100008
    </instanceId>
    <processId>
    approveLoanRequest
    </processId>
    <processName>
    approveLoanRequest
    </processName>
    <processType>
    BPEL
    </processType>
    <processVersion>
    1.0
    </processVersion>
    </processInfo>
    <systemAttributes/>
    <systemMessageAttributes/>
    <titleResourceKey/>
    <callback/>
    <identificationKey/>
    </task>
    </initiateTask>
    </part>
    </initiateTaskInput>
    - <initiateTaskResponseMessage>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    - <initiateTaskResponse xmlns="http://xmlns.oracle.com/bpel/workflow/taskService">
    - <workflowContext xmlns="http://xmlns.oracle.com/bpel/workflow/common">
    - <credential>
    <login>
    bpeladmin
    </login>
    <identityContext>
    jazn.com
    </identityContext>
    </credential>
    <token>
    13PdID5l3hQSt5QrDDwIyW0GK01koYzxtTLKFTV8e75uWJsSEkJuTRpE7+PJfcK3VL1koQYczeHlUE3fl4yvA9GAsezTFonLuQtb84khaEJpaOUFsBflwg1c5n7J/JE37eJW6HeqoT2utGTwWCfWP3Pm9InF5TUTQkqsguXpd29z+qEllTtnbJAbSRtyeUu5TtQGzcQcBWedYko8rql7XGSFba/O5DJriVW/nrgH7oC5c4diUencB0aVZzWTW2jrOogcTxbQfk8=
    </token>
    </workflowContext>
    - <task xmlns="http://xmlns.oracle.com/bpel/workflow/task">
    <title>
    Aprove Loan Request task
    </title>
    - <payload>
    - <approveLoanRequestPayload xmlns="http://xmlns.oracle.com/approveLoanRequest">
    <nameRequester>
    Tom
    </nameRequester>
    <loanRequest>
    1000
    </loanRequest>
    <currency/>
    <isApproved/>
    </approveLoanRequestPayload>
    - <approveLoanRequestPayload xmlns="http://xmlns.oracle.com/approveLoanRequest">
    <nameRequester>
    Tom
    </nameRequester>
    <loanRequest>
    1000
    </loanRequest>
    <currency/>
    <isApproved/>
    </approveLoanRequestPayload>
    </payload>
    <taskDefinitionURI>
    http://xesoa1.iteye.local:8894/orabpel/default/approveLoanRequest/1.0/ApproveLoanRequestTask/ApproveLoanRequestTask.task
    </taskDefinitionURI>
    <creator>
    Tom
    </creator>
    <ownerUser>
    bpeladmin
    </ownerUser>
    <ownerGroup/>
    <priority>
    3
    </priority>
    <identityContext>
    jazn.com
    </identityContext>
    <userComment/>
    <attachment/>
    - <processInfo>
    <domainId>
    default
    </domainId>
    <instanceId>
    100008
    </instanceId>
    <processId>
    approveLoanRequest
    </processId>
    <processName>
    approveLoanRequest
    </processName>
    <processType>
    BPEL
    </processType>
    <processVersion>
    1.0
    </processVersion>
    </processInfo>
    - <systemAttributes>
    <approvalDuration>
    0
    </approvalDuration>
    <assignedDate>
    2006-12-04T20:59:47.547+01:00
    </assignedDate>
    - <assigneeGroups>
    <id>
    Supervisor
    </id>
    </assigneeGroups>
    <createdDate>
    2006-12-04T20:59:47.555+01:00
    </createdDate>
    <digitalSignatureRequired>
    false
    </digitalSignatureRequired>
    <expirationDate/>
    <inShortHistory>
    true
    </inShortHistory>
    <isGroup>
    true
    </isGroup>
    <numberOfTimesModified>
    1
    </numberOfTimesModified>
    <passwordRequiredOnUpdate>
    false
    </passwordRequiredOnUpdate>
    <pushbackSequence>
    -1
    </pushbackSequence>
    <secureNotifications>
    false
    </secureNotifications>
    <state>
    ASSIGNED
    </state>
    <taskId>
    2043f79925decda1:559dec6a:10f4e2a1a3b:-7ac9
    </taskId>
    <taskNumber>
    10063
    </taskNumber>
    - <updatedBy>
    <id>
    Tom
    </id>
    </updatedBy>
    <updatedDate>
    2006-12-04T20:59:47.555+01:00
    </updatedDate>
    <version>
    1
    </version>
    <versionReason>
    TASK_VERSION_REASON_INITIATED
    </versionReason>
    <taskDefinitionId>
    default_approveLoanRequest_1.0_ApproveLoanRequestTask
    </taskDefinitionId>
    <taskDefinitionName>
    ApproveLoanRequestTask
    </taskDefinitionName>
    </systemAttributes>
    <systemMessageAttributes/>
    <titleResourceKey/>
    <callback/>
    <identificationKey/>
    </task>
    </initiateTaskResponse>
    </part>
    </initiateTaskResponseMessage>
    </messages>
    When I want to parse the payload to binding objects the method task.getPayloadAsElement returns a nullpointer exception. I'm using the Remote client variant of the API.
    I hope some one can help me on this issue.
    Thanks in advance!
    -Tom

    The task payload is not populated when fetching a list of tasks using the queryTasks() method. You need to explicitly call getTaskDetailsById() or getTaskDetailsByNumber() to retrieve the complete task with the payload. Then the method task.getPayloadAsElement() should return you the payload as expected.

  • Why there's error stating "unreported exception" when call function

         public void actionPerformed(ActionEvent evt)
              Object obj = evt.getSource();
              if (obj == DeleteButton)
                   readfile(); // Error here
                   deletefile();
                   rename();
    ========================================================================
         public void readfile() throws Exception
              BufferedReader in = new BufferedReader(new FileReader("WhiteCollar2.txt"));
              line=in.readLine();
              found=0;
              while (line!=null)
                   if ((line.substring(0,6)).equals((String)textfield.getText()))
                        System.out.println("CORRECT\n");
                        found=1;
                   else
                        writefile();                    
                   line=in.readLine();
    ========================================================================
    How come when I call the above readfile(), it gives me :
    DeleteScreen.java:70: unreported exception java.lang.Exception; must be caught or declared to be thrown
    readfile();
    However if I change to the following :
    try{readfile()};
    catch (Exception e) {}
    The code works fine. I am still figuring out on throwing exceptions etc. But how come I already throw exceptions it still complains exception not declared?
    Thanks and Rgds

    but the writefile() function which I called in the
    read() also throw exception but how come I do not need
    to catch it for the write()?The error message says it all: must be caught or declared to be thrown. Thus, you must either catch the exception using try-catch or you must declare that your method throws the exception using the throws declaration.
    Your call to writefile() is in the method readfile() that already declares that it throws Exception. So there is no problem there.
    BTW, you should know that it is generally ill-advised to catch or declare exception using the superclass Exception. You should use as specific an exception class as possible. In this case I suppose it would be IOException.

  • ClassDefNotFound Exception when calling PL/SQL Web Service

    Hi to all J2EE'ers.
    I'm trying to construct a sample PLSQL Web Service. I'm using a 10g R1 Database Server, Apache HTTP Server from the 10g Companion CD, and OC4J 9.0.4 (I think it's called "standalone" OC4J), all on Linux (Suse 9.1).
    I set up a simple package on the DB server, containing a simple method named "get_payload(p_arg in varchar2) return varchar2".
    Assembling and deploying worked well (i.e., java -jar WebServiceAssembler.jar -config config-payload.xml, followed by java -jar admin.jar ormi://localhost admin admin -deploy ... and -bindWebApp ...), and after deployment I am able to navigate to the service endpoint, but when trying to test the method named "getPayload(String param0)", after entering the parameter value and clicking "Invoke" I receive an error from the Web Server:
    500 Internal Server Error
    java.lang.NoClassDefFoundError: oracle/aurora/ncomp/java/ClassNotFound
         at oracle.j2ee.ws.StatelessStoredProcRpcWebService.getGenerator(StatelessStoredProcRpcWebService.java:17)
         at oracle.j2ee.ws.RpcWebService.generateWrapperClass(RpcWebService.java:443)
         at oracle.j2ee.ws.RpcWebService.generate(RpcWebService.java:396)
         at oracle.j2ee.ws.RpcWebService.getWrapper(RpcWebService.java:514)
         at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:613)
         at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1117)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:733)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Here's the file config-payload.xml I used for assembling the service (access data has been obfuscated):
    <web-service>
    <display-name>Payload Sample Web Service</display-name>
    <description>Stateless Java Document Stye Web Service Example</description>
    <destination-path>./PayloadSampleService.ear</destination-path>
    <temporary-directory>/tmp</temporary-directory>
    <context>/payloadws</context>
    <stateless-stored-procedure-java-service>
    <jar-generation>
    <schema>Username/Password</schema>
    <db-url>jdbc:oracle:thin:@Server:1521:ServiceName</db-url>
    <db-pkg-name>sample_websrv_pkg</db-pkg-name>
    </jar-generation>
    <uri>/payload</uri>
    <database-JNDI-name>jdbc/OracleDS</database-JNDI-name>
    </stateless-stored-procedure-java-service>
    <wsdl-gen>
         <wsdl-dir>wsdl</wsdl-dir>
         <option name="force">true</option>
         <option name="httpServerURL">http://localhost:8888</option>
    </wsdl-gen>
    <proxy-gen>
         <proxy-dir>proxy</proxy-dir>
         <option name="include-source">true</option>
    </proxy-gen>
    </web-service>
    I scanned the web up and down to find references to similar problems, but to no avail. Any ideas how I could nail down the issue? WHAT class def can not be found? What code is around line 17 of StatelessStoredProcRpcWebService.java?
    TIA for any input.
    Werner

    www.proxy.us.oracle.com -> www-proxy.us.oracle.com - looks like set in the obsetenv.bat file

  • Get Inaccessible WSDL Exception when call the CRMOD WS

    Hi All,
    I download the Contact general WSDL, then Generate Web Service Proxy with JAX-WS(Version = Oracle WebServices (11.1.1.0.0, build 100408.1504.05443)) in JDeveloper(11.1.1.0).
    Then I wrote the following code to invoke the ContactInsert method.
    public class ContactClient
    @WebServiceRef
    private static Contact_Service contact_Service;
    final static QName qName = new QName("urn:crmondemand/ws/ecbs/contact/", "Contact");
    private static String server = "https://secure-ausomxdsa.crmondemand.com/Services/Integration;";
    public static void main(String [] args) throws Exception
    File kstore = new File("D:\\Oracle\\Middleware\\jdk160_18\\jre\\lib\\security\\jssecacerts");
    boolean exists = kstore.exists();
    if(!exists) {
    throw new FileNotFoundException(kstore.getName());
    System.setProperty("javax.net.ssl.trustStore", kstore.getAbsolutePath());
    URL url = getWSDLURL(server);
    System.out.println(url.toString());
    Contact_Service contact_Service = new Contact_Service(url, qName);
    Contact contact = contact_Service.getContact();
    ContactInsertInput contactInsertInput = new ContactInsertInput();
    contactInsertInput.setListOfContact(prepareInsertData());
    contactInsertInput.setEcho("off");
    ContactInsertOutput contactInsertOutput = new ContactInsertOutput();
    contactInsertOutput = contact.contactInsert(contactInsertInput);
    getOutPutResult(contactInsertOutput);
    private static URL getWSDLURL (String urlStr) throws Exception{
    GetSessionId getSessionId = new GetSessionId();
    URL url = null;
    try {
    url = new URL(urlStr+"JSESSIONID="+getSessionId.getSessionId());
    } catch (MalformedURLException e) {
    e.printStackTrace();
    throw new RuntimeException(e);
    return url;
    private static ListOfContactData prepareInsertData(){
    ListOfContactData listOfContactData = new ListOfContactData();
    ContactData contactData = new ContactData();
    contactData.setContactFirstName("Joerg");
    contactData.setContactLastName("Wallmueller");
    contactData.setExternalSystemId("1234");
    listOfContactData.getContact().add(contactData);
    return listOfContactData;
    private static void getOutPutResult(ContactInsertOutput result){
    ListOfContactData listOfContactData = new ListOfContactData();
    listOfContactData = result.getListOfContact();
    ContactData contactData = new ContactData();
    contactData = listOfContactData.getContact().get(0);
    System.out.println(contactData.getCustomerId());
    Then I run the script, get the error:
    Exception in thread "main" com.sun.xml.internal.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.
    java.io.IOException: Server returned HTTP response code: 400 for URL: https://secure-ausomxdsa.crmondemand.com/Services/Integration;jsessionid=7c48ff64e251b2dc4667415290e54afbc2dd3762264182ea62b35aec974aa1b5.e3iRbxmSbx50ax8NbxuSbN8Se0
    java.io.IOException: Server returned HTTP response code: 400 for URL: https://secure-ausomxdsa.crmondemand.com/Services/Integration;jsessionid=7c48ff64e251b2dc4667415290e54afbc2dd3762264182ea62b35aec974aa1b5.e3iRbxmSbx50ax8NbxuSbN8Se0?wsdl
         at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(Unknown Source)
         at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
         at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source)
         at javax.xml.ws.Service.<init>(Unknown Source)
         at crmondemand.ws.ecbs.user.User_Service.<init>(User_Service.java:42)
         at ws.crmod.oracle.UserWSInvoke.main(UserWSInvoke.java:33)
    Any body can tell me why the response is 400? It takes me a lot of time. Thanks
    帖子经 [email protected]编辑过

    Hi All,
    I download the Contact general WSDL, then Generate Web Service Proxy with JAX-WS(Version = Oracle WebServices (11.1.1.0.0, build 100408.1504.05443)) in JDeveloper(11.1.1.0).
    Then I wrote the following code to invoke the ContactInsert method.
    public class ContactClient
    @WebServiceRef
    private static Contact_Service contact_Service;
    final static QName qName = new QName("urn:crmondemand/ws/ecbs/contact/", "Contact");
    private static String server = "https://secure-ausomxdsa.crmondemand.com/Services/Integration;";
    public static void main(String [] args) throws Exception
    File kstore = new File("D:\\Oracle\\Middleware\\jdk160_18\\jre\\lib\\security\\jssecacerts");
    boolean exists = kstore.exists();
    if(!exists) {
    throw new FileNotFoundException(kstore.getName());
    System.setProperty("javax.net.ssl.trustStore", kstore.getAbsolutePath());
    URL url = getWSDLURL(server);
    System.out.println(url.toString());
    Contact_Service contact_Service = new Contact_Service(url, qName);
    Contact contact = contact_Service.getContact();
    ContactInsertInput contactInsertInput = new ContactInsertInput();
    contactInsertInput.setListOfContact(prepareInsertData());
    contactInsertInput.setEcho("off");
    ContactInsertOutput contactInsertOutput = new ContactInsertOutput();
    contactInsertOutput = contact.contactInsert(contactInsertInput);
    getOutPutResult(contactInsertOutput);
    private static URL getWSDLURL (String urlStr) throws Exception{
    GetSessionId getSessionId = new GetSessionId();
    URL url = null;
    try {
    url = new URL(urlStr+"JSESSIONID="+getSessionId.getSessionId());
    } catch (MalformedURLException e) {
    e.printStackTrace();
    throw new RuntimeException(e);
    return url;
    private static ListOfContactData prepareInsertData(){
    ListOfContactData listOfContactData = new ListOfContactData();
    ContactData contactData = new ContactData();
    contactData.setContactFirstName("Joerg");
    contactData.setContactLastName("Wallmueller");
    contactData.setExternalSystemId("1234");
    listOfContactData.getContact().add(contactData);
    return listOfContactData;
    private static void getOutPutResult(ContactInsertOutput result){
    ListOfContactData listOfContactData = new ListOfContactData();
    listOfContactData = result.getListOfContact();
    ContactData contactData = new ContactData();
    contactData = listOfContactData.getContact().get(0);
    System.out.println(contactData.getCustomerId());
    Then I run the script, get the error:
    Exception in thread "main" com.sun.xml.internal.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.
    java.io.IOException: Server returned HTTP response code: 400 for URL: https://secure-ausomxdsa.crmondemand.com/Services/Integration;jsessionid=7c48ff64e251b2dc4667415290e54afbc2dd3762264182ea62b35aec974aa1b5.e3iRbxmSbx50ax8NbxuSbN8Se0
    java.io.IOException: Server returned HTTP response code: 400 for URL: https://secure-ausomxdsa.crmondemand.com/Services/Integration;jsessionid=7c48ff64e251b2dc4667415290e54afbc2dd3762264182ea62b35aec974aa1b5.e3iRbxmSbx50ax8NbxuSbN8Se0?wsdl
         at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(Unknown Source)
         at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
         at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source)
         at javax.xml.ws.Service.<init>(Unknown Source)
         at crmondemand.ws.ecbs.user.User_Service.<init>(User_Service.java:42)
         at ws.crmod.oracle.UserWSInvoke.main(UserWSInvoke.java:33)
    Any body can tell me why the response is 400? It takes me a lot of time. Thanks
    帖子经 [email protected]编辑过

Maybe you are looking for

  • Simple ODBC connections to LC forms using LC Designer

    This tutorials demonstrates how to setup and connect to an MS Access Database using Adobe LiveCycle Designer.

  • Is Apple TV going to get Amazon Prime?

    Is Apple TV going to get Amazon Prime?

  • Storage location for material to be made mendatory and default

    Hi, We are generating PR of material through CJ2N. I want to make storage location filed in generatl data tab of material, mandatory as well defalut value depending upon the project. If defalult value can not come depending upon project defination th

  • Labels in 10g using

    I'm trying to customize the label template in 10g. I'm using the PRINT_EXTERNAL_SEARCH_RESULTS_LABELS service along with ReportMaker.  I'm customizing <@dynamichtml create_barcode_report_external@> in pcm_barcode_template_resource.htm.  I've almost g

  • P6 v8.1 not saving changes

    Just upgraded to v8.1 and now finding that if I make any changes to a schedule e.g. delete an activity or delete resources from an activity. The next time that I open that project, it reverts to before the changes were made. I have also noticed that