Unable to depoly Web Serivce for the source code written in other editors

Hi all,
I am planning to implement webservice with the following code. But I am facing few problems with this can some body help me with this.
The code looks like this AND IS NOT WRITTEN IN Jdeveloper BUT EDITPLUS
package package1;
public class Sum
public int getSum(int a, int b)
          return a+b;
package package2;
public class Sub
public int getSub(int a, int b)
          return a-b;
package package3;
import package1.*;
import package2.*;
public class Mul implements TestInterface
     Sum sm = new Sum();
     Sub sb = new Sub();
public int getMul(int a, int b)
          return sm.getSum(a,b)*sb.getSub(a,b);
public static void main(String [] args)
          Mul ml = new Mul();
          System.out.println(“The result of (3+6)*(3-6) is “+ ml.getMul(3,6));
package package3;
interface TestInterface extends java.rmi.Remote;
     public int getMul(int a, int b) throws java.rmi.RemoteException;
I have written this in editplus. Not in Jdeveloper.
Now I want publish getMul() as web service using Jdeveloper.
I have created a new application work space. And from File-->New
I have choose project from existing source and imported “package3”.
At this stage it was unable to find the class files Sum and Sub so I placed Sum.class and Sub.class in Appliction1-Project1-classes-
Now the Mul class did not have any errors and it compiled fine. When run it gave the correct output.
Using the web service wizard I was able to generate wsdl file , deployment descriptors etc.
The problem I was facing was form this stage when I am trying to deploy it on to a standalone oc4j server it is not able generate the WebServices.war file and hence is not deployed on to the server.
With the same code written in Jdeveloper everything is working fine.
My doubts are
1)     why is it not able to generate WebService.war file?
2)     It is giving some ClassNotFound exception during the deployment. But when compiled and run its giving the correct output.
3)     Even when everything was written from within the Jdevelper it did not include Sum.calss and Sub.class in WebSevice.war. Is there any way we could mention during its (WebService.war) generation , the class files to be Included.
The other issue is how to add an existing source code to already existing project. In my case Once I have imported package3 I also want to import package2 and package1 in different steps.
I thank in advance for helping me.
Raja Vamshi k Gopu

Can you tell us what you mean by correct type of project?
You can start with an empty project. Then, you have to create an "EAR file" deployment profile (New Gallery / General / Deployment Profiles).
So when I deploy a J2SE module onto oc4j server should I specify the class path? If so where ? How can I solve this problem?
Once you deploy your code into oc4j, it becomes a J2EE application. You don't need to deal with the classpath - just make sure that all the required code is included in your .war file. To do so, check the list of classes packaged under the deployement properties dialog.
Can you send me the links of few articles where I can learn more about these kind of stuff?
If you want to assemble applications without to use JDeveloper wizard, you have another option: using the WebServiceAssembler tool that is par of the oc4j bits will help you to do this from a command line promt, and will handle the J2EE packaging aspect for you.
See online documentation (10.1.2): http://download-west.oracle.com/docs/cd/B14099_04/web.htm
In the "Developer's Guide", chapter 9 is about "Web Services Tools"
For JDeveloper J2EE samples, you can start by looking at the OBE: http://www.oracle.com/technology/obe/obe_as_1012/j2ee/index.html
Hope this helps,
Eric

Similar Messages

  • Where can I get the source code of Text Layout Editor?

    Hi, Guys:
    I just want to design horizontal or vertical rulers that are exactly same as the one I see in the Text Layout Editor.
    Please see the url: http://labs.adobe.com/technologies/textlayout/demos/
    But I cann't download any source code. Does anyone know if it's possible to get it? Thanks.

    And now it is possible: http://blogs.adobe.com/tlf/2009/12/new-and-updated-tlf-samples.html

  • Unable to run Web App for the 2nd Time

    Hi,
    I am using Weblogic 8.1 sp5 as my deploying platform. Using the official tutorials, I am able to export my JSC2 web app into a WAR file that is deployable on my Weblogic server.
    Upon running the application, it works perfectly. However, upon closing my browser and then restarting the browser, running the web app again yields exceptions, please refer to the bottom.
    What am I doing wrong? I am suspecting the web-app wasn't detroyed properly when another instances of it is started...
    Please advise.
    Adams
    Error 500--Internal Server Error
    com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(Ljavax/faces/context/FacesContext;)V(ViewHandlerImpl.java:601)
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:316)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(Ljavax/faces/context/FacesContext;)V(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(Ljavax/faces/event/PhaseId;Lcom/sun/faces/lifecycle/Phase;Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.render(Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FacesServlet.java:198)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.TailFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)
         at com.sun.rave.web.ui.util.UploadFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(UploadFilter.java:194)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(RequestDispatcherImpl.java:326)
         at weblogic.servlet.jsp.PageContextImpl.forward(Ljava/lang/String;)V(PageContextImpl.java:150)
         at jsp_servlet.__jscreator_index._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__jscreator_index.java:122)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6985)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(WebAppServletContext.java:3892)
         at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.java:2766)
         at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
         at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
    Caused by: java.lang.RuntimeException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Lcom/sun/data/provider/RowKey;)V(CachedRowSetDataProvider.java:343)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(I)Z(CachedRowSetDataProvider.java:300)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount()I(CachedRowSetDataProvider.java:624)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:806)
         at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:429)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowCount()I(TableRowGroup.java:749)
         at com.sun.rave.web.ui.component.Table.getRowCount()I(Table.java:307)
         at com.sun.rave.web.ui.component.Table.getTableActionsTop()Ljavax/faces/component/UIComponent;(Table.java:539)
         at com.sun.rave.web.ui.renderer.TableRenderer.renderActionsTop(Ljavax/faces/context/FacesContext;Lcom/sun/rave/web/ui/component/Table;Ljavax/faces/context/ResponseWriter;)V(TableRenderer.java:257)
         at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(TableRenderer.java:124)
         at javax.faces.component.UIComponentBase.encodeBegin(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:683)
         at com.sun.rave.web.ui.component.Table.encodeBegin(Ljavax/faces/context/FacesContext;)V(Table.java:811)
         at com.sun.rave.web.ui.util.RenderingUtilities.renderComponent(Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)V(RenderingUtilities.java:78)
         at com.sun.rave.web.ui.renderer.AbstractRenderer.encodeChildren(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(AbstractRenderer.java:194)
         at javax.faces.component.UIComponentBase.encodeChildren(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:701)
         at javax.faces.webapp.UIComponentTag.encodeChildren()V(UIComponentTag.java:607)
         at javax.faces.webapp.UIComponentTag.doEndTag()I(UIComponentTag.java:544)
         at jsp_servlet.__vesselsmovements._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__vesselsmovements.java:1060)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(RequestDispatcherImpl.java:328)
         at com.sun.faces.context.ExternalContextImpl.dispatch(Ljava/lang/String;)V(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:130)
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:311)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(Ljavax/faces/context/FacesContext;)V(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(Ljavax/faces/event/PhaseId;Lcom/sun/faces/lifecycle/Phase;Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.render(Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FacesServlet.java:198)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
    Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.microsoft.jdbc.base.BaseExceptions.createException(Ljava/lang/String;Ljava/lang/String;)Ljava/sql/SQLException;(Unknown Source)
         at com.microsoft.jdbc.base.BaseExceptions.getException(ILjava/lang/String;)Ljava/sql/SQLException;(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.validateParameters(Lcom/microsoft/jdbc/base/BaseParameters;)V(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.validateParameters()V(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.preImplExecute()V(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.commonExecute()V(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal()Ljava/sql/ResultSet;(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery()Ljava/sql/ResultSet;(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery()Ljava/sql/ResultSet;(PreparedStatement.java:124)
         at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(Ljavax/sql/RowSetInternal;)V(CachedRowSetXReader.java:193)
         at com.sun.sql.rowset.CachedRowSetXImpl.execute(Ljava/sql/Connection;)V(CachedRowSetXImpl.java:950)
         at com.sun.sql.rowset.CachedRowSetXImpl.execute()V(CachedRowSetXImpl.java:1410)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute()V(CachedRowSetDataProvider.java:1219)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Lcom/sun/data/provider/RowKey;)V(CachedRowSetDataProvider.java:329)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(I)Z(CachedRowSetDataProvider.java:300)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount()I(CachedRowSetDataProvider.java:624)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:806)
         at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:429)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowCount()I(TableRowGroup.java:749)
         at com.sun.rave.web.ui.component.Table.getRowCount()I(Table.java:307)
         at com.sun.rave.web.ui.component.Table.getTableActionsTop()Ljavax/faces/component/UIComponent;(Table.java:539)
         at com.sun.rave.web.ui.renderer.TableRenderer.renderActionsTop(Ljavax/faces/context/FacesContext;Lcom/sun/rave/web/ui/component/Table;Ljavax/faces/context/ResponseWriter;)V(TableRenderer.java:257)
         at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(TableRenderer.java:124)
         at javax.faces.component.UIComponentBase.encodeBegin(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:683)
         at com.sun.rave.web.ui.component.Table.encodeBegin(Ljavax/faces/context/FacesContext;)V(Table.java:811)
         at com.sun.rave.web.ui.util.RenderingUtilities.renderComponent(Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)V(RenderingUtilities.java:78)
         at com.sun.rave.web.ui.renderer.AbstractRenderer.encodeChildren(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(AbstractRenderer.java:194)
         at javax.faces.component.UIComponentBase.encodeChildren(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:701)
         at javax.faces.webapp.UIComponentTag.encodeChildren()V(UIComponentTag.java:607)
         at javax.faces.webapp.UIComponentTag.doEndTag()I(UIComponentTag.java:544)
         at jsp_servlet.__vesselsmovements._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__vesselsmovements.java:1060)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)

    Well, I have solve this problem myself.. apparently, I used static variables to initalise the app. Changing the static variables to session variables solved the problems.

  • Where to find the source code for MenuTreeListPreviewLayoutController

    Dear All!
    I am desparately searching for the source code of the MenuTreeListPreviewLayoutController. I would like to
    implement a similar Layout Controller than the above mentioned one, but cannot find the code.
    Is anybody able to help me?
    Cheers and thanks in advance
    Ingo

    Hi Ingo,
    you should be able to find and decompile the class com.sapportals.wcm.rendering.layout.cm.MenuTreeListPreviewLayoutController in the JAR km.appl.ui.flex.control_core.jar. This JAR is located under ...<irj-root>\WEB-INF\portal\portalapps\com.sap.km.cm.ui.flex\private\lib
    Hope this helps,
    Robert
    PS: If you have problems to find it, gimme a mail and I'll send you the decompiled version.

  • I want to see the source code of JVM

    Can anyone tell me how to see the source code of JVM, but not the src.zip that including in the java libraries. I just want to know how Java is implemented.
    Thanks a lot for any answer.

    You can get the source code (written in C++) of Sun's VM under the Community Licence arangement. Not sure quite where it is on this site, but if you look for it, I'm sure you'll find it.
    BTW, it's not easy reading.
    Sylvia.

  • I am running 10.6.8 and using iweb for my web site. After several SEO analysis they all indicate I need H1-6 header tags. After looking at the source code I see there are none in iweb. Is it necessary to add? If so, how do I add H Tags to iweb.

    I am running 10.6.8 and using iweb for my web site. After several SEO analysis they all indicate I need H1-6 header tags. After looking at the source code I see there are none in iweb. Are they necessary to add?  Why would one add these tags and how do I add H Tags to iweb? And are there examples to look at? I am slowly learning about simple web design and assumed that iweb was stand alone without having to write code. Is this one of the reasons iweb is no longer supported? Thanks for looking at this!

    A simple text page like this:
    Heading
        sub heading
              text paragraph ....
    Is traditionally represented by html tags like:
    <h1>Heading</h1>
         <h2>sub heading</h2>
              <p>text paragraph ... </p>
    I would guess that the use of h1-h6 tags helps search engines to understand the structure of a page as the tags imply a certain structure.
    This can be compared to more generic tags like <div> that could represent any kind of content - and may be what iWeb uses (you'll have to check yourself).
    I would generally recommend that you use some kind of up to date blog/site building tool, perhaps Wordpress or Squarespace (I haven't used either one myself) that support current web technologies - this should reduce your SEO issues and make it easier to properly support mobile/tablet users.

  • Type-mapping not working correctly, get "Unable to find a javaType for the xmlType" WARNING

    I'm manually creating a web-services.xml file, and using the autogen ant task to
    generate the codec XML/Java classes. The XML definition is provided by SAP.
    The ant build.xml file:
    <project name="buildWebservice" default="stubgen">
    <target name="stubgen">
    <clientgen ear="C:\projects\RMIS\ifrrequests\RMIS.ear"
    packageName="com.aa.rmis.webservice.client"
    clientJar="C:\projects\RMIS\ifrrequests\rmisws-client.jar"
    autotype="False" />
    </target>
    <target name="all" depends="stubgen"/>
    </project>
    The problem is seen below in the output from Ant. Note the WARNINIG. The problem
    is that the xml type cannot be mapped to the Java type.
    C:\projects\RMIS\ifrrequests>ant -buildfile clientbuild.xml
    Buildfile: clientbuild.xml
    stubgen:
    [clientgen] Generating client jar for RMIS.ear ...
    [clientgen] WARNINIG: Unable to find a javaType for the xmlType:['urn:sap-com:do
    cument:sap:business']:PaymentRequest.Create. Make sure that you have registered
    this xml type in the type mapping
    [clientgen] Using SOAPElement instead
    [clientgen] Compiling 4 source files to C:\DOCUME~1\944377\LOCALS~1\Temp\rmisws-
    client.jar-836624340
    [clientgen] Building jar: C:\projects\RMIS\ifrrequests\rmisws-client.jar
    BUILD SUCCESSFUL
    Total time: 17 seconds
    The Java source that has the implementation of the service methods is simply:
    package com.aa.rmis.webservice;
    import com.aa.rmis.ifr.request.*;
    public class TestService
    public TestService()
    public int serviceRequest(PaymentRequestCreate request)
    System.out.println("Received serviceRequest message");
    return 0;
    public void testStringRequest(String request)
    The web-service.xml file is attached, which contains the schema for the SAP PaymentRequest.Create
    object definition.
    Another problem I have, which is probably related, is that the service method
    that has a complex data type (non-built in data type) is not being deployed into
    the WebLogic server. But the other service method that simply takes a String
    parameter is.
    The steps I took are:
    1. Get XML from SAP Interface Repository (IFR) for PaymentRequest
    2. Use ant task autogen to generate the request codec classes
    3. Create the web-services.xml file by inserting the schema definition and the
    mapping file created by the autogen task, and defining the operations
    4. Build web-services.war file that contains all autogen compiled class files,
    the web-services.xml file, and the service implementation class
    5. Build the ear file that holds the web service files
    6. Use the clientgen ant task to generate (included above) to generate the client
    jar file that should contain the proxy for both of the service methods
    Environment:
    * WebLogic 7.02
    * JDK 1.3.1_06
    * JBuilder 9 Enterprise
    * Ant 1.4
    Possible causes:
    * Namespace not being used correctly
    * copied verbatim the mapping xml file generated by autogen into the web-services.xml
    file
    * xml-schema part of web-services.xml might not be set correctly
    * operation definition might not be using the correct namespace
    * Classpath used for ant might not be right
    * Doubt this is the problem, but I'm out of other ideas
    * Set by using the setWLEnv.cmd file provided by WebLogic
    * Tried adding the generated classes directory for my project to the classpath,
    but did not work
    I've been referencing the Programming WebLogic Web Services document throughout
    this entire process. I must be missing something.
    Can anybody from BEA help me out with this problem?
    Thanks in advance.
    [web-services.xml]

    Hi JD,
    I spent a few cycles looking over your web-services.xml file, however I
    don't have any suggestions other that one that looks like you have
    already tried, at the top, in the <schema...>
    targetNamespace="urn:sap-com:document:sap:business"
    Making edits to these generated files can be tricky and my only
    suggestion is to create a small reproducer to run by our outstanding
    support team.
    A quick look at our problem database shows one issue (CR095109) related
    to a similar problem at deploy time that was fixed with 7.0SP3. Again,
    the support folks will be able to help focus in on the issue.
    Regards,
    Bruce
    JD wrote:
    >
    The first posting contains the wrong web-services.xml file. Please refer to this
    one instead.
    "JD" <[email protected]> wrote:
    I'm manually creating a web-services.xml file, and using the autogen
    ant task to
    generate the codec XML/Java classes. The XML definition is provided
    by SAP.
    The ant build.xml file:
    <project name="buildWebservice" default="stubgen">
    <target name="stubgen">
    <clientgen ear="C:\projects\RMIS\ifrrequests\RMIS.ear"
    packageName="com.aa.rmis.webservice.client"
    clientJar="C:\projects\RMIS\ifrrequests\rmisws-client.jar"
    autotype="False" />
    </target>
    <target name="all" depends="stubgen"/>
    </project>
    The problem is seen below in the output from Ant. Note the WARNINIG.
    The problem
    is that the xml type cannot be mapped to the Java type.
    C:\projects\RMIS\ifrrequests>ant -buildfile clientbuild.xml
    Buildfile: clientbuild.xml
    stubgen:
    [clientgen] Generating client jar for RMIS.ear ...
    [clientgen] WARNINIG: Unable to find a javaType for the xmlType:['urn:sap-com:do
    cument:sap:business']:PaymentRequest.Create. Make sure that you have
    registered
    this xml type in the type mapping
    [clientgen] Using SOAPElement instead
    [clientgen] Compiling 4 source files to C:\DOCUME~1\944377\LOCALS~1\Temp\rmisws-
    client.jar-836624340
    [clientgen] Building jar: C:\projects\RMIS\ifrrequests\rmisws-client.jar
    BUILD SUCCESSFUL
    Total time: 17 seconds
    The Java source that has the implementation of the service methods is
    simply:
    package com.aa.rmis.webservice;
    import com.aa.rmis.ifr.request.*;
    public class TestService
    public TestService()
    public int serviceRequest(PaymentRequestCreate request)
    System.out.println("Received serviceRequest message");
    return 0;
    public void testStringRequest(String request)
    The web-service.xml file is attached, which contains the schema for the
    SAP PaymentRequest.Create
    object definition.
    Another problem I have, which is probably related, is that the service
    method
    that has a complex data type (non-built in data type) is not being deployed
    into
    the WebLogic server. But the other service method that simply takes
    a String
    parameter is.
    The steps I took are:
    1. Get XML from SAP Interface Repository (IFR) for PaymentRequest
    2. Use ant task autogen to generate the request codec classes
    3. Create the web-services.xml file by inserting the schema definition
    and the
    mapping file created by the autogen task, and defining the operations
    4. Build web-services.war file that contains all autogen compiled class
    files,
    the web-services.xml file, and the service implementation class
    5. Build the ear file that holds the web service files
    6. Use the clientgen ant task to generate (included above) to generate
    the client
    jar file that should contain the proxy for both of the service methods
    Environment:
    * WebLogic 7.02
    * JDK 1.3.1_06
    * JBuilder 9 Enterprise
    * Ant 1.4
    Possible causes:
    * Namespace not being used correctly
    * copied verbatim the mapping xml file generated by autogen into
    the web-services.xml
    file
    * xml-schema part of web-services.xml might not be set correctly
    * operation definition might not be using the correct namespace
    * Classpath used for ant might not be right
    * Doubt this is the problem, but I'm out of other ideas
    * Set by using the setWLEnv.cmd file provided by WebLogic
    * Tried adding the generated classes directory for my project to
    the classpath,
    but did not work
    I've been referencing the Programming WebLogic Web Services document
    throughout
    this entire process. I must be missing something.
    Can anybody from BEA help me out with this problem?
    Thanks in advance.
    Name: web-services.xml
    web-services.xml Type: ACT Project (text/xml)
    Encoding: base64

  • There is an inconsistency between the authentication mode of target web application and the source web application after migrating to claims

    I've had my farm upgraded from SP2010 to SP2013 for over 6 months now and all is well, however, I was refreshing my staging environment from production and I noticed that one of the databases still shows these errors when I run test-spcontentdatabase:
    Category             : Configuration
    Error             : False
    UpgradeBlocking : False
    Message           : The [SharePoint Web App] web application is configured with claims authentication mode however the content database you are trying to attach is intended to be used against
    a windows classic authentication mode.
    Remedy              : There is an inconsistency between the authentication mode of target web application and the source web application. Ensure that the authentication mode setting in upgraded web application is the
    same as what you had in previous SharePoint 2010 web application. Refer to the link "http://go.microsoft.com/fwlink/?LinkId=236865" for more information.
    This doesn't make sense considering I converted the production web application to claims during the upgrade and then verified all sites were working with claims logins. I also verified that existing AD user identities were converted to claims by checking out
    the database tables. Yet test-spcontentdatabase still thinks there is a mismatch here.
    My farm is SP1 and no further CUs. The point of this particular refresh is so I can update to the November CUs in my test farm. Anyone else see this? Seems like it's a bug/safe to ignore because my stuff is working.
    Thanks,
    Aaron

    See:
    http://thesharepointfarm.com/2014/11/test-spcontentdatabase-classic-to-claims-conversion/
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to display the source code for this friggin' file.

    Below is a rather lengthy bit of code that provides the behavior and attributes of a web server for OpenCyc. I need to know if I can enter some java to have the HTML source code displayed in a separate text file whenever this class returns some resulting webpage. If you have any ideas it will be greatly appreciated.
    -"Will code for foo."
    package org.opencyc.webserver;
    * Class WebServer is simple multithreaded HTTP server
    * with CGI limited to a Cyc connection on default port 3600.
    * <p>
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.util.jar.*;
    import java.text.*;
    import org.opencyc.util.*;
    public class WebServer extends Thread {
         * Singleton WebServer instance.
        public static WebServer current;
         * Default HTTP port.
        protected static int DEFAULT_PORT = 80;
         * Default Cyc base port.
        protected static int DEFAULT_CYC_PORT = 3600;
         * Default directory to serve files from on non-Windows OS.
        protected static String DEFAULT_DIR = "/";
         * Default directory to serve files from on Windows.
        //protected static String DEFAULT_WIN_DIR = "C:\\";
        protected static String DEFAULT_WIN_DIR = "k:\\opencyc\\run\\httpd\\htdocs";
         * File cache capacity.
        protected static final int CACHE_CAPACITY = 100;
         * File cache to improve file serving performance.
        protected static Hashtable fileCache = new Hashtable(CACHE_CAPACITY);
         * Number of files served from this web server.
        protected static long nbrFilesServed = 0;
         * Number of files served from this web server that were found in the cache.
        protected static long nbrCacheHits = 0;
         * Server socket for accepting connections.
        protected ServerSocket server;
         * Directories to serve files from.
        protected ArrayList dirs;
         * Map from String (jar root) to JarFile[] (jar class path).
        protected HashMap map;
         * Webserver HTTP port.
        protected int port;
         * Cyc HTML host.
        protected String cycHost = "localhost";
         * Cyc HTML port.
        protected int cycPort;
         * Expand jar tress.
        protected boolean trees;
         * Requests flag.
        protected boolean traceRequests;
         * Constructs a WebServer object.
         * @param port the port to use
         * @param directories the directory to serve files from
         * @param trees true if files within jar files should be served up
         * @param traceRequests true if client's request text should be logged.
         * @exception IOException if the listening socket cannot be opened, or problem opening jar files.
        public WebServer() throws IOException {
            getProperties();
            server = new ServerSocket(port);
            processDirectories();
         * Class Task processes a single HTTP request.
        protected class Task extends Thread {
             * Socket for the incoming request.
            protected Socket sock;
             * Client socket to the Cyc KB HTML server.
            protected Socket cycHtmlSocket;
             * Output tcp stream.
            protected DataOutputStream out;
             * Contains the file request path for a not-found error message.
            protected String notFoundPath;
             * Contains the first line of a request message.
            protected String methodLine;
             * Contains the body of a POST method.
            protected String bodyLine;
             * Constructs a Task object.
             * @param sock the socket assigned for this request.
            public Task(Socket sock) {
                this.sock = sock;
             * Processes the HTTP request.
            public void run() {
                if (traceRequests)
                    Log.current.println("connection accepted from " + sock.getInetAddress());
                notFoundPath = "";
                try {
                    out = new DataOutputStream(sock.getOutputStream());
                    try {
                        getBytes();
                    catch (Exception e) {
                        Log.current.println("file not found: " + notFoundPath);
                        try {
                            out.writeBytes("HTTP/1.1 404 Not Found\r\n");
                            out.writeBytes("Server: Cyc WebServer\r\n");
                            out.writeBytes("Connection: close\r\n");
                            out.writeBytes("Content-Type: text/html\r\n\r\n");
                            out.writeBytes("<HTML><HEAD>\n");
                            out.writeBytes("<TITLE>404 Not Found</TITLE>\n");
                            out.writeBytes("</HEAD><BODY>\n");
                            out.writeBytes("<H1>404 - Not Found</H1>\n");
                            out.writeBytes("</BODY></HTML>");
                            out.flush();
                        catch (SocketException se) {
                catch (Exception e) {
                    Log.current.printStackTrace(e);
                finally {
                    try {
                        sock.close();
                    catch (IOException e) {
             * Reads the HTTP request and obtains the response.
             * @exception IOException when HTTP request has an invalid format.
            private void getBytes() throws IOException {
                // Below logic is complex because web browsers do not close the
                // socket after sending the request, so must parse message to find
                // the end.
                BufferedReader in = new BufferedReader(new InputStreamReader(sock.getInputStream()));
                ArrayList inBytes = new ArrayList(200);
                int ch = 0;
                boolean postMethod;
                methodLine = in.readLine();
                //if (traceRequests)
                //    Log.current.println("methodLine=" + methodLine);
                bodyLine = "";
                if (methodLine.startsWith("POST /"))
                    postMethod = true;
                else
                    postMethod = false;
                //if (traceRequests)
                //    Log.current.println("postMethod=" + postMethod);
                int ch1 = -1;
                int ch2 = -1;
                int ch3 = -1;
                int ch4 = -1;
                // Read the HTTP request headers.
                while (true) {
                    ch = in.read();
                    inBytes.add(new Integer(ch));
                    ch1 = ch2;
                    ch2 = ch3;
                    ch3 = ch4;
                    ch4 = ch;
                    if (ch1 == '\r' && ch2 == '\n' && ch3 == '\r' && ch4 == '\n')
                        break;
                    if ((! postMethod) &&
                        (! in.ready()) &&
                        ch1 == -1 &&
                        ch2 == -1 &&
                        ch3 == '\r' &&
                        ch4 == '\n') {
                        inBytes.add(new Integer('\r'));
                        inBytes.add(new Integer('\n'));
                        break;
                byte[] byteArray = new byte[inBytes.size()];
                for (int i = 0; i < inBytes.size(); i++) {
                    Integer ich = (Integer) inBytes.get(i);
                    byteArray[i] = ich.byteValue();
                String headers = new String(byteArray);
                if (postMethod) {
                    String lcHeaders = headers.toLowerCase();
                    int i = lcHeaders.indexOf("content-length: ");
                    String contentLength = lcHeaders.substring(i + 16);
                    int j = contentLength.indexOf("\r\n");
                    contentLength = contentLength.substring(0, j);
                    int bodyLen = (new Integer(contentLength)).intValue();
                    for (int k = 0; k < bodyLen; k++) {
                        bodyLine = bodyLine + (new Character((char) in.read())).toString();
                String line = methodLine + "\r\n" + headers + bodyLine;
                if (traceRequests)
                    Log.current.println(line);
                if (postMethod)
                    processHttpPost();
                else
                    if (line.startsWith("GET /"))
                        processHttpGet(line.substring(4));
                    else {
                        Log.current.println("Invalid request = " + line);
                        throw new IOException();
             * Processes an HTTP GET method.
             * @param httpGetPath the path of the file to get.
             * @exception IOException if the file is not found.
            private void processHttpGet(String httpGetPath) throws IOException {
                int i = httpGetPath.indexOf(' ');
                if (i > 0)
                    httpGetPath = httpGetPath.substring(0, i);
                Log.current.println(methodLine + " from " + sock.getInetAddress().getHostName());
                i = httpGetPath.indexOf("cg?");
                if (i > 0) {
                    cycHtmlRequest(httpGetPath.substring(i + 3));
                    return;
                notFoundPath = httpGetPath;
                i = httpGetPath.indexOf('/');
                if (i < 0 || map == null) {
                    if (map == null || httpGetPath.endsWith(".jar")) {
                        for (int j = 0; j < dirs.size(); j++) {
                            String dir = (String) dirs.get(j);
                            String nativePath = dir + httpGetPath;
                            nativePath = nativePath.replace('/', File.separatorChar);
                            if (fileCache.containsKey(nativePath)) {
                                writeDataBytes((byte[]) fileCache.get(nativePath));
                                Log.current.println("...cached");
                                nbrCacheHits++;
                                nbrFilesServed++;
                                return;
                            try {
                                File f = new File(nativePath);
                                byte[] fileBytes = getBytes(new FileInputStream(f), f.length());
                                writeDataBytes(fileBytes);
                                if (fileCache.size() >= CACHE_CAPACITY)
                                    fileCache.clear();
                                fileCache.put(nativePath, fileBytes);
                                Log.current.println("...from " + nativePath);
                                nbrFilesServed++;
                                return;
                            catch (IOException e) {
                    throw new IOException();
                String jar = httpGetPath.substring(0, i);
                httpGetPath = httpGetPath.substring(i + 1);
                JarFile[] jfs = (JarFile[]) map.get(jar);
                if (jfs == null)
                    throw new IOException();
                for (i = 0; i < jfs.length; i++) {
                    JarEntry je = jfs.getJarEntry(httpGetPath);
    if (je == null)
    continue;
    writeDataBytes(getBytes(jfs[i].getInputStream(je), je.getSize()));
    nbrFilesServed++;
    return;
    throw new IOException();
    * Processes an HTTP POST method.
    * @exception IOException if the file is not found.
    private void processHttpPost() throws IOException {
    Log.current.println("POST " + bodyLine + " from " + sock.getInetAddress().getHostName());
    cycHtmlRequest(bodyLine);
    * Reads the specified number of bytes and always close the stream.
    * @param in the file to be read for subsequent downloading.
    * @param length the number of bytes to read from the file.
    * @return An array of bytes from the file.
    * @exception IOException if an error occurs when processing the file.
    private byte[] getBytes(InputStream in, long length) throws IOException {
    DataInputStream din = new DataInputStream(in);
    byte[] bytes = new byte[ (int) length];
    try {
    din.readFully(bytes);
    finally {
    din.close();
    return bytes;
    * Sends the HTML request to Cyc.
    * @param cycPath the portion of the URL which is given to the Cyc HTML server.
    private void cycHtmlRequest(String cycPath) {
    String request = sock.getInetAddress().getHostName() + "&" + cycPath + "#";
    System.out.println("request=" + request);
    ArrayList bytes = new ArrayList(10000);
    try {
    cycHtmlSocket = new Socket(cycHost, cycPort);
    System.out.println("cycHost=" + cycHost + " cycPort=" + cycPort);
    BufferedReader cycIn = new BufferedReader(new InputStreamReader(cycHtmlSocket.getInputStream()));
    PrintWriter cycOut = new PrintWriter(cycHtmlSocket.getOutputStream(), true);
    cycOut.println(request);
    cycOut.flush();
    int ch = 0;
    while (ch >= 0) {
    ch = cycIn.read();
    bytes.add(new Integer(ch));
    catch (Exception e) {
    Log.current.printStackTrace(e);
    byte[] byteArray = new byte[bytes.size()];
    for (int i = 0; i < bytes.size() - 1; i++) {
    Integer ich = (Integer) bytes.get(i);
    byteArray[i] = ich.byteValue();
    try {
    writeTextBytes(byteArray);
    catch (Exception e) {
    Log.current.println(e.getMessage());
    * Responds to the HTTP client with data content from the requested URL.
    * @param bytes the array of bytes from the URL.
    * @exception IOException if there is an error writing to the HTTP client.
    public void writeDataBytes(byte[] bytes) throws IOException {
    out.writeBytes("HTTP/1.1 200 OK\r\n");
    out.writeBytes("Server: Cyc WebServer\r\n");
    out.writeBytes("Connection: close\r\n");
    out.writeBytes("Content-Length: " + bytes.length + "\r\n");
    String prefix = (new String(bytes)).toLowerCase();
    if (prefix.indexOf("<html>") > -1)
    out.writeBytes("Content-Type: text/html\r\n\r\n");
    else
    out.writeBytes("Content-Type: application/java\r\n\r\n");
    out.write(bytes);
    out.flush();
    * Respond to the HTTP client with text content from the requested URL.
    * @param bytes the array of bytes from the URL.
    * @exception IOException if there is an error writing to the HTTP client.
    public void writeTextBytes(byte[] bytes) throws IOException {
    out.writeBytes("HTTP/1.1 200 OK\r\n");
    out.writeBytes("Server: Cyc WebServer\r\n");
    out.writeBytes("Connection: close\r\n");
    out.writeBytes("Content-Length: " + bytes.length + "\r\n");
    out.writeBytes("Content-Type: text/html\r\n\r\n");
    out.write(bytes);
    out.flush();
    * Gets properties governing the web server's behavior.
    private void getProperties() {
    port = DEFAULT_PORT;
    String portProperty = System.getProperty("org.opencyc.webserver.port", "");
    if (! portProperty.equalsIgnoreCase(""))
    port = (new Integer(portProperty)).intValue();
    Log.current.println("Listening on port " + port);
    cycPort = DEFAULT_CYC_PORT;
    String cycPortProperty = System.getProperty("org.opencyc.webserver.cycPort", "");
    if (! cycPortProperty.equalsIgnoreCase(""))
    cycPort = (new Integer(cycPortProperty)).intValue();
    Log.current.println("Cyc connections directed to port " + cycPort);
    String dirsProperty = System.getProperty("org.opencyc.webserver.dirs", "");
    dirs = new ArrayList(3);
    StringTokenizer st = new StringTokenizer(dirsProperty, ";", false);
    while (st.hasMoreTokens()) {
    String dir = st.nextToken();
    dirs.add(dir);
    trees = false;
    String treesProperty = System.getProperty("org.opencyc.webserver.trees", "");
    if (! treesProperty.equalsIgnoreCase(""))
    trees = true;
    traceRequests = false;
    String traceRequestsProperty = System.getProperty("org.opencyc.webserver.traceRequests", "");
    if (! traceRequestsProperty.equalsIgnoreCase("")) {
    traceRequests = true;
    Log.current.println("tracing requests");
    * Adds transitive Class-Path jars to jfs.
    * @param jar the jar file
    * @param jfs the list of jar files to serve.
    * @param dir the jar file directory.
    * @exception IOException if an I/O error has occurred with the jar file.
    private void addJar(String jar, ArrayList jfs, String dir) throws IOException {
    Log.current.println("Serving jar files from: " + dir + jar);
    JarFile jf = new JarFile(dir + jar);
    jfs.add(jf);
    Manifest man = jf.getManifest();
    if (man == null)
    return;
    Attributes attrs = man.getMainAttributes();
    if (attrs == null)
    return;
    String val = attrs.getValue(Attributes.Name.CLASS_PATH);
    if (val == null)
    return;
    dir = dir + jar.substring(0, jar.lastIndexOf(File.separatorChar) + 1);
    StringTokenizer st = new StringTokenizer(val);
    while (st.hasMoreTokens()) {
    addJar(st.nextToken().replace('/', File.separatorChar), jfs, dir);
    * Administrative accessor method that obtains list of directories from which files are served.
    public ArrayList getDirs() {
    return dirs;
    * Administrative method that updates the list of directories from which files are served.
    public synchronized void setDirs(ArrayList dirs) throws IOException {
    this.dirs = dirs;
    fileCache.clear();
    processDirectories();
    * Administrative accessor method that obtains number of files served.
    * @return The number of files served.
    public long getNbrFilesServed() {
    return nbrFilesServed;
    * Administrative accessor method that obtains number of files served from cache.
    * @return The number of files served from the cache.
    public long getNbrCacheHits() {
    return nbrCacheHits;
    * Administrative method that clears the file cache.
    public synchronized void clearFileCache() {
    Log.current.println("Clearing file cache");
    fileCache.clear();
    nbrFilesServed = 0;
    nbrCacheHits = 0;
    * Processes the directories from which files are served, expanding jar trees if
    * directed.
    * @exception IOException if problem occurs while processing the jar files.
    private void processDirectories() throws IOException {
    if (dirs.size() == 0)
    if (File.separatorChar == '\\')
    dirs.add(DEFAULT_WIN_DIR);
    else
    dirs.add(DEFAULT_DIR);
    Iterator directories = dirs.iterator();
    while (directories.hasNext())
    Log.current.println("Serving from " + directories.next());
    if (trees) {
    map = new HashMap();
    for (int j = 0; j < dirs.size(); j++) {
    String dir = (String) dirs.get(j);
    String[] files = new File(dir).list();
    for (int i = 0; i < files.length; i++) {
    String jar = files[i];
    if (!jar.endsWith(".jar"))
    continue;
    ArrayList jfs = new ArrayList(1);
    addJar(jar, jfs, dir);
    map.put(jar.substring(0, jar.length() - 4), jfs.toArray(new JarFile[jfs.size()]));
    * Provides the command line interface for creating an HTTP server.
    * The properties are:
    * <pre>
    * org.opencyc.webserver.port=<HTTP listening port>
    * </pre>
    * which defaults to 80.
    * <pre>
    * org.opencyc.webserver.cycPort=<Cyc connection port>
    * </pre>
    * which defaults to 3600.
    * <pre>
    * org.opencyc.webserver.dirs=<path>;<path> ... ;<path>
    * </pre>
    * with the argument enclosed in quotes if any path contains an
    * embedded space.
    * The default directory on Windows is C:
    * and the default on other systems is / the default
    * can be overridden with this property. By default, all files
    * under this directory (including all subdirectories) are served
    * up via HTTP. If the pathname of a file is <var>path</var> relative
    * to the top-level directory, then the file can be downloaded using
    * the URL
    * <pre>
    * http://<var>host</var>:<var>port</var>/<var>path</var>
    * </pre>
    * Caching of file contents is performed.
    * <pre>
    * org.opencyc.util.log=all
    * </pre>
    * If the all value is given, then all attempts to download files
    * are output.
    * <pre>
    * org.opencyc.webserver.traceRequests
    * </pre>
    * If this property has any value, then the client HTTP requests are
    * output.<p>
    * <pre>
    * org.opencyc.webserver.trees
    * </pre>
    * This property can be used to serve up individual files stored
    * within jar files in addition to the files that are served up by
    * default. If the property has any value, the server finds all jar files
    * in the top-level directory (not in subdirectories). For each
    * jar file, if the name of the jar file is <var>name</var>.jar, then any
    * individual file named <var>file</var> within that jar file (or within
    * the jar or zip files referenced transitively in the Class-Path manifest
    * attribute, can be downloaded using a URL of the form:
    * <pre>
    * http://<var>host</var>:<var>port</var>/<var>name</var>/<var>file</var>
    * </pre>
    * When this property has any value, an open file descriptor and cached
    * information are held for each jar file, for the life of the process.
    * @param args an unused array of command line arguments.
    public static void main(String[] args) {
    Log.makeLog();
    System.out.println("OpenCyc Web Server");
    try {
    // Launch thread to accept HTTP connections.
    current = new WebServer();
    current.start();
    catch (IOException e) {
    e.printStackTrace();
    * Just keep looping, spawning a new thread for each incoming request.
    public void run() {
    try {
    while (true) {
    // Launch thread to process one HTTP request.
    new Task(server.accept()).start();
    catch (IOException e) {
    e.printStackTrace();

    JLundan,
    I want to thank you for responding to the thread I started on the forum at java.sun.com. Your solution to my problem of needing to print the code of the html pages that the file I included generates was just what I was looking for. However, I have some further questions to ask, if you don't mind. To clarify my task I should say that your rephrasing of the problem is accurate: "You wan't to display the contents of the HTML file that the web server produces in response of client's request?"
    Yes, this is what I need to do, but also it needs to display the source code of that html file that the server produces in response to the client's request. Also, in this case, I am the client requesting that the server return some html file, and I'm not sure where the server is. But the webserver.java file that I shared on the forum is on my local machine. I was wondering if I could modify this webserver.java file at my home so that any html file the server returns to me would automatically display the source code. This is a school project of mine and I am stuck on this one thing here.
    Further, where would I put the "foo.html" file so it can be written to?
    FileOuputStream fos = new FileOutputStream("foo.html");
    fos.write(bytes);
    fos.close();
    Thanks so much for your help. I look forward to your response, at your convenience.
    Regards

  • How can one encrypt the source code of a given web page(html, jsp, etc.) ?

    Good Day! I'm just having a hard time of thinking how to encrypt the source code of a given web page(html, jsp, etc.) without affecting how it is previewed in an Internet Browser. What I plan is to disable the capabilities of some malicious Internet users of copying the source codes of my web pages by using the "View Source" option of Internet Explorer and the equivalent function in Netscape Navigator. Please somebody help me in this matter (I'm planning to use an IDEA algorithm using JCE)....
    It would be big help if a running code is supplied.
    Thank you very much in advance.
    God Bless!!!
    - Jonathan Untalan([email protected])

    don't know theses softs. What i know about encrypted web pages, is that you need a secure socket connection (https).
    Your web page will be ciphered, send to the user, and decipher by the browser with the signature file associated to your https connexion.
    It isn't possible to encrypt your page directly, and then decrypt them when requested.
    For the download time, only the server is responsible for this.
    if it is overloaded, then it will slow down its upload.
    Maybe you use some encryption method that require a lot of CPU time.
    For summary : you can only cipher the pipe transport, but not the transported pages.
    Good luck in your search.

  • DRM-61026: Unable to create user session for the following reason: Login failed. Invalid user name or password.

    All Im very new to Oracle DRM and Im trying to get the app setup on Windows server running SQL Server 2008.  When I try to login to the Web Client I keep getting this error.
    DRM-61026: Unable to create user session for the following reason: Login failed. Invalid user name or password.
    Can you please help

    This might be due to The 'Oracle Instance' path may not have been set to a path relative to the 'CSS Bridge Host' (i.e. the Foundation Services machine) on the Configuration > Host Machines > CSS > General tab of the DRM Configuration Utility.
    if this is the case then
    1. Open the DRM Configuration Console.
    2. Go to the Configuration > Host Machines > CSS > General tab of the DRM Configuration Utility.
    3. Ensure that the path in 'Oracle Instance' has been set relative to the 'CSS Bridge Host' (i.e. the Foundation Services machine defined in 'CSS Bridge Host').
    4. If corrections are made to 'Oracle Instance' then restart the DRM services to pick up the change.
    Thanks,
    ~KKT~

  • The source code for my website shows up wrong for title line in firefox but not in other browsers-how can i correct it? My ranking depends on this.

    My title line is correct when I check the source code in Google Chrome. Why is it coming out differently in Firefox?

    Works here.<br />
    I see the same "Accent and English Skills Training for Success" title in Firefox as in Google Chrome although the title tag has a different value: &lt;title&gt;EnglishWorks.us&lt;/title&gt;
    Is that title set via JavaScript?
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (MAC)

  • Web API for the official repositories?

    I'm 99% sure the answer is no, but do we have a web API for the official repositories, à la Aurjson?

    https://www.archlinux.org/packages/search/json/
    https://projects.archlinux.org/archweb. … /search.py
    https://www.archlinux.org/packages/<rep … <pkg>/json
    https://projects.archlinux.org/archweb. … display.py
    It is sadly not documented like the aur one though, but you can dig trough the source to see all the functions etc.
    I also wrote a silly little tool that uses this interface
    Edit: old feature request on it: https://bugs.archlinux.org/task/13026
    Last edited by Mr.Elendig (2013-10-29 12:51:53)

  • Does anybody have the source code for playing video..?

    Hi i am new to J2ME. Does any body have the source code for playing video?

    The WTK includes a video player example. I would start by looking there. In addtion SE and Nokia (if I remember correctly) both have video examples on their developer web sites.
    The developer sites are
    http://forum.nokia.com
    http://developer.sonyericsson.com
    For some of my midlets I use a utility class. You can view the source here:
    http://hostj2me.cliqcafe.com/www/forumtopicview.html?fid=46&categoryId=36&fpn=0
    Works for my needs;

  • Geting error msg "Unable to start Web browser for U" while open Siebel Icon

    hi,
    I have Successfully Installed Siebel 8.1 on Windows 7 Operating System After this when i am trying to open "Siebel Financial Services - ENU" ICON i am getting Error Message that "Unable to start Web browser for your Session".
    I have Internet Explorer 8 on my Windows 7 operating system.
    Waiting for ur Quick Reply.
    THANKING YOU!
    Best Regards
    Oradb.

    Hi,
    Which web browser you were trying to open the siebel application. You should make that web browser as a default browser for your OS.
    Open IE- Tools - Internet Options - Programs - Make Default Browser.
    Try this and let me know the results.
    Regards,
    Joseph

Maybe you are looking for

  • Printing calendar in the month format

    After my upgrade to Leopard I am not able to print my ical by the month. The only options in my print dialog is view by Day or list. How can I fix this?

  • Balance sheet differecess while goods issue business ara wise

    Dear all here we are going to use two business areas A1 and A2 in one company code 1000 1) some times we are going to purchase for business area A1. 2) Some times we are going to purchse for businessa rea A2. here my question is some times we are goi

  • Need to display the Current Quarter Data

    Hi Gurus, We have a requirement in the report as follows: I have a Key Figure - 0Balance. In this it should display the current quarter data. We have 5 plants and this report is specific to a plant X which runs 3 month behind. So in the variables scr

  • Z3200 custom paper list vs. OS X Yosemite (10.10.4)

    Hi. Since I did the upgrade  of OS X Yosemite to version 10.10.4, HP Utility is not able to syncronize the paper list already installed at our printers. Is someone experimenting the same issue? I would appreciate to hear from you how to solve this, b

  • Need help with automatic printing of a page

    I am looking for inputs for a particular scenario; On the Oracle HR Self-service pages, once the employee adds/updates his personal details and submits his changes to be approved by the HR manager, the final confirmation page should be automatically