Problem in Jdeveloper 10.1.3, web services and document style.possible bug?

Hello!
I would like to generate a document-style web service from a wsdl file. The problem is that when I use it I get the following error:
"operation echoStruct must have exactly one parameter as part of the SOAP body when used with a document-bare binding. All other parameters must be mapped to headers."
A similar message is shown with other wsdl file that I'm using.
I'm attaching the file that use to test it.
Could you help me and tell me how I can fix it, please? or is it a bug?
Regards,
Antonio.
<definitions xmlns:s1="http://soapinterop.org" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://soapinterop.org/xsd" xmlns:s2="http://soapinterop.org/AbstractTypes" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://soapinterop.org">
     <types>
          <s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/xsd">
               <s:import namespace="http://soapinterop.org"/>
               <s:element name="echoStructParam" type="s0:SOAPStruct"/>
               <s:complexType name="SOAPStruct">
                    <s:sequence>
                         <s:element minOccurs="1" maxOccurs="1" name="varFloat" type="s:float"/>
                         <s:element minOccurs="1" maxOccurs="1" name="varInt" type="s:int"/>
                         <s:element minOccurs="0" maxOccurs="1" name="varString" type="s:string"/>
                    </s:sequence>
               </s:complexType>
               <s:element name="echoStructReturn" type="s0:SOAPStruct"/>
               <s:element name="echoStringArrayParam" type="s1:ArrayOfString"/>
               <s:element name="string" type="s:string"/>
               <s:element name="echoStringArrayReturn" type="s1:ArrayOfString"/>
               <s:element name="echoStringParam" type="s:string"/>
               <s:element name="echoStringReturn" type="s:string"/>
          </s:schema>
          <s:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org">
               <s:import namespace="http://soapinterop.org/xsd"/>
               <s:complexType name="ArrayOfString">
                    <s:sequence>
                         <s:element minOccurs="0" maxOccurs="unbounded" ref="s0:string"/>
                    </s:sequence>
               </s:complexType>
               <s:element name="ArrayOfString1" nillable="true" type="s1:ArrayOfString1"/>
               <s:complexType name="ArrayOfString1">
                    <s:sequence>
                         <s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string"/>
                    </s:sequence>
               </s:complexType>
               <s:element name="string" nillable="true" type="s:string"/>
          </s:schema>
          <s:schema targetNamespace="http://soapinterop.org/AbstractTypes">
               <s:complexType name="StringArray">
                    <s:complexContent mixed="false">
                         <s:restriction base="soapenc:Array">
                              <s:sequence>
                                   <s:element minOccurs="0" maxOccurs="unbounded" name="String" type="s:string"/>
                              </s:sequence>
                         </s:restriction>
                    </s:complexContent>
               </s:complexType>
          </s:schema>
     </types>
     <message name="echoStructSoapIn">
          <part name="echoStructParam" element="s0:echoStructParam"/>
     </message>
     <message name="echoStructSoapOut">
          <part name="echoStructResult" element="s0:echoStructReturn"/>
     </message>
     <message name="echoStringArraySoapIn">
          <part name="echoStringArrayParam" element="s0:echoStringArrayParam"/>
     </message>
     <message name="echoStringArraySoapOut">
          <part name="echoStringArrayResult" element="s0:echoStringArrayReturn"/>
     </message>
     <message name="echoStringSoapIn">
          <part name="echoStringParam" element="s0:echoStringParam"/>
     </message>
     <message name="echoStringSoapOut">
          <part name="echoStringResult" element="s0:echoStringReturn"/>
     </message>
     <portType name="WSDLInteropTestDocLitSoap">
          <operation name="echoStruct">
               <input message="s1:echoStructSoapIn"/>
               <output message="s1:echoStructSoapOut"/>
          </operation>
          <operation name="echoStringArray">
               <input message="s1:echoStringArraySoapIn"/>
               <output message="s1:echoStringArraySoapOut"/>
          </operation>
          <operation name="echoString">
               <input message="s1:echoStringSoapIn"/>
               <output message="s1:echoStringSoapOut"/>
          </operation>
     </portType>
     <binding name="WSDLInteropTestDocLitSoap" type="s1:WSDLInteropTestDocLitSoap">
          <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
          <operation name="echoStruct">
               <soap:operation soapAction="http://soapinterop.org/" style="document"/>
               <input>
                    <soap:body use="literal"/>
               </input>
               <output>
                    <soap:body use="literal"/>
               </output>
          </operation>
          <operation name="echoStringArray">
               <soap:operation soapAction="http://soapinterop.org/" style="document"/>
               <input>
                    <soap:body use="literal"/>
               </input>
               <output>
                    <soap:body use="literal"/>
               </output>
          </operation>
          <operation name="echoString">
               <soap:operation soapAction="http://soapinterop.org/" style="document"/>
               <input>
                    <soap:body use="literal"/>
               </input>
               <output>
                    <soap:body use="literal"/>
               </output>
          </operation>
     </binding>
     <service name="WSDLInteropTestDocLit">
          <port name="WSDLInteropTestDocLitSoap" binding="s1:WSDLInteropTestDocLitSoap">
               <soap:address location="http://mssoapinterop.org/asmx/wsdl/InteropTestDocLit.asmx"/>
          </port>
     </service>
</definitions>

Dev update: WSDL file seems fine. The problem is that it's for a document-bare service and, by default, the Unwrap Wrapped Parameters option on step 2 of the top-down wizard is enabled and checked. This means that we try to pick apart the input message into a series of parameters, yielding the error shown because a document-bare operation must have only one input parameter.
If the Unwrap Wrapped Parameters option is unchecked, creation of the top-down service will succeed. In future, we ought to disable the option completely for everything but document-wrapped services, as that's the only time it applies.
This is covered by bug 4630382.

Similar Messages

  • Quick Web Services Using Document Style Messaging

    Hello all,
    I am using Apache Axis and am trying to set up a document style (message based) webservice that will receive a DOM object, modify that DOM object, and return it as a new DOM object. I have not problems with standard RPC style webservices, but am unsure as to where to go with the more complex. I have included everything that may be helpful to give me an answer.....
    I have set up my webservice (a very simple one to get this going):
    package testing.webservices;
    import org.w3c.dom.Document;
    import org.apache.axis.MessageContext;
    public class DocTest{
    public Document doSubmission(MessageContext msgContext, Document inDoc)throws Exception{
    return inDoc;
    I set this class up in Axis with my deploy.wsdd file:
    <deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
    xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
    <service name="DocService" style="java:MSG">
    <parameter name="className" value="testing.webservices.DocTest" />
    <parameter name="allowedMethods" value="doSubmission" />
    </service>
    </deployment>
    When I look at Axis it lists this DocService as an active service. Can anyone tell me what the client code would look like to send a Document object to my simple webservice and receive a document object back? Any help would be greatly appreciated.
    J-Rod
    NOTE: This is what I have so far:
    import .....
    public class DocTestClient{
    public static void main(String[] args) throws Exception {
    String fileName = "C:\\Dev\\MyXmlFile.xml";
    String uri = "file:" + new File(fileName).getAbsolutePath( );
    DocumentBuilderFactory factory =DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document doc = builder.parse(uri);
    String endpointURL = "http://localhost:8080/axis/services/DocService";
    Service service = new Service();
    Call call = (Call) service.createCall();
    call.setTargetEndpointAddress(new java.net.URL(endpointURL) );
    call.setOperationName(new QName("http://testing.webservices", "doSubmission") );
    ?????? WHAT DO I DO HERE to access the send the doc object and receive it back?????
    }

    Just thought I'd post an update. We figured out how to stream the required data as a string so I OK now. We ended up going with java:RPC to string data back and forth.
    Thanks
    J-Rod

  • Problem generating stubs for Java EJB web service deployed in OAS

    I created an EJB web service and I've successfully deployed it in my Oracle App Server. Some of the methods work fine but others produce the ff error:
    org.apache.soap.SOAPException - java.lang.IllegalArgumentException: No Serializer found to serialize [classname] using encoding style [encoding]It seems that the objects specified as parameters in the web service methods exposed are the only ones that had stubs generated for them. Other objects I use, which are usually wrapped inside a Vector, did not have generated stubs.
    Example:
         public String loginUser(UserDTO userDTO) throws RemoteException, NamingException, SQLException;
    public String addItems (Vector vecItems) throws RemoteException, NamingException, SQLException; // where vecItems is a collection of ItemDTO objects     In this scenario, stubs were generated for the UserDTO class, but not for the ItemDTO class. In effect, calling the addItems method resulted to the exception I mentioned above.
    I did a workaround wherein I declared a dummy method which accepted all the types of objects I needed as parameters so all the necessary stubs can be generated, but this fix doesn't feel like it's the proper solution to my problem.
    If anyone can help me, it would be greatly appreciated. Thanks!

    Crossposted:
    Problem generating stubs for Java EJB web service deployed in OAS

  • Envy 100 410A Web Services and Ipod problems

    Hi,
    I purchased the Envy 410A and I'm having a few problems.  I have two Macbooks and a 4th gen Ipod Touch setup on a wireless network with a Linksys WRT100 router.  First, what's working:
    I successfully installed the printer on both computers through USB and I can print wirelessly from each without any difficulties.  (I set a fixed IP address for the printer to avoid having to 'find' it each time it got a new address by DHCP.)
    Here are my problems:
    1) On setup, the printer successfully connected to the HP web service and printed out a code for ePrinting.  I entered this code and was able to print via email.  However, sometime between last night and today (and after I installed 6 updates) the printer reported that it no longer had an email address.  I turned off Web Services to troubleshoot, but now when I try to enable it I get the "Problem Connecting to the Web Services Server" error.  Powercycling the router and/or printer does not fix this.  Nor does turning off the printer's wireless functions for 5 minutes.  I've tried restoring factory defaults, but it did not actually restore anything.  How can I fix this?  Is the server down, or is something screwed up?
    2) My iPod Touch is completely updated to iOS 4.2, bluetooth is turned off, and I've verified that it's on the same network as the printer, but I cannot detect the printer on my iPod either through Apple's AirPrint or through the HP iPhoto App 3.0.  Both just say "No printers found".  This is really frustrating since I bought this with printing from mobile devices in mind.  Any advice?
    Thanks for your help,
    Dave

    I am glad your first problem is resolved. When it comes to iPod having OS 4.2, the device supports AirPrint which is new from Apple.
    For more information on how to use the AirPrint on your iPod refer to below link:
    http://h10025.www1.hp.com/ewfrf/wc/document?lc=en&dlc=en&cc=us&docname=c02623193
    If the iPod still does not find the printer, try unchecking the option "Enable Multicast Streams" in the router EWS page and see if it works or not. Contact your router support for more info.
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • Problem compiling java file to access web service! newbie troubles !

    I am new to web services and this is my first program...
    I am compiling java file which has import statement like:
    import org.apache.soap.util.xml.*;
    import org.apache.soap.*;
    import org.apache.soap.rpc.*;
    It says ----- package org.apache.soap.util.xml does not exist as one of errors..
    I have a folder that I named soap myself and I have activation.jar,serces.jar,mail.jar,soap.jar in it.
    I added c:\soap in my classpath and this was supposed to be the quickstart way to try an example out...
    but it gives me compilation errors... what should I do ?

    You'll need to specify each jar file in the classpath. c:\soap\xerces.jar;c:\soap\sax.jar;....

  • Problem with MDM web services and webdynpro

    Hi MDMguru,
    I have created web services from SDN example: it reads the MDM version.
    If I use J2ee Navigator Web Services and I try  mywebservices, it works very well.
    I have created a webdynpro (from this SDN Example https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20an%20email-client%20using%20web%20dynpro%20and%20web%20services.pdf).
    I have followed step by step the example.
    But when run webdynpro and it calls my webservices it not works because it throws this exception:
    javax.xml.rpc.soap.SOAPFaultException: Exception in method getVersion. , Debug ,  , com.enel.sap.ws.component.WSComponent.VersionMDM , sap.com/tcwddispwda , J2EE_GUEST
    Can someone help me?

    It appears that %ROWTPYE is not supported directly, and that we need to create a TYPE to wrap the return data
    Thanks to Marc Thompson for the details (http://marc-on-oracle.blogspot.co.uk/2007/12/11g-database-installation-and-native.html)
    PD

  • Pl/Sql web service and collections not working

    Hello
    I'm trying to create a web service from a function in a package which returns a collection. The creation of the web service and its deployment seem to work correctly. I do get the following warning :
    WARNING: OWS-00077 The Value Type class: pxWsLang.PamLanguagerecordBase does not have a valid JAVA Bean pattern
    but I don't think this is the source of the problem.
    When I try to test the web service using the endpoint in the wsdl I get the following answer in the browser:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>Error creating target: pxWsLang.WsLangUser</faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>
    In the DOS window for the OC4J I get the following error :
    2006-11-15 09:21:25.852 ERROR OWS-04005 An error occurred for port: {http://pxWs
    Lang/WsLang.wsdl}wsLangSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creati
    ng target: pxWsLang.WsLangUser.
    The PL/SQL code is as follows :
    Object:
    CREATE OR REPLACE TYPE PAM_LanguageRecord as OBJECT
    NR NUMBER(3),
    SYMBOL VARCHAR2(2)
    Collection:
    CREATE OR REPLACE Type PAM_LanguageTable as Table of PAM_LanguageRecord;
    Package body :
    create or replace package body PAM_TEST is
    function CursorTest return Pam_LanguageTable is
    Res_LangTable PAM_LanguageTable;
    cursor cur is select * from stc_languages;
    begin
    Res_LangTable := new PAM_LanguageTable();
    for Rec in cur loop
    Res_LangTable.Extend(1);
    Res_LangTable(cur%ROWCOUNT) := new PAM_LanguageRecord
    (Rec.NR,
    Rec.SYMBOL
    end loop;
    Return Res_LangTable;
    end;
    end;
    I'm using JDeveloper version 10.1.3.1.0.3984
    How can I get this to work ? (without using Apache Axis or other tools :-)
    Is it supposed to work ?
    Many Thanks
    Paul

    Hi,
    for the "error creating target" problem I found the solution here:
    [WS from a PL/SQL package]: Error creating target
    Hope this helps.
    Regards,
    Patrik

  • Web services and EJB3 @resource annotation

    This block of code works fine when NetworkViewBean is left as a @Stateless session bean.
    Once I have JDeveloper 10.1.3 production expose it as a web service, I can no longer call the Entity Manager @Resource.
    I always get a java.lang.NullPointerException returned.
    Any ideas?? thanks for your help!
    @WebService(name = "NetworkViewWS", serviceName = "NetworkViewWS")
    public class NetworkViewBean {
    @Resource
    private EntityManager em;
    public NetworkViewBean() { }
    public String getDeviceVendorModel(String name) {
    if (name == null || name.length()== 0) return "Null Input Parameter Specified";
    NetDevice N= null;
    try {
    N= (NetDevice)em.createNamedQuery("findByDeviceName").setParameter(0, name).getSingleResult();
    catch(Exception E) { E.printStackTrace();  return null; }
    return "Vendor= "+ N.getVendor()+ ", Model= "+ N.getModelNumber();

    Hi Joshua,
    The problem is that you are using a regular Java web service and in 10.1.3.0.0 we do not have support for dependency injection in the container in the web container i.e. you cannot use annotations such as EJB, Resource in any classes in the web container.
    You have two options:
    1. Lookup an EJB from regular Java web service (JSR-181)
    or
    2. Make your Web service as a EJB 3.0 web service
    Here what you can do to create an EJB 3.0 web service from JDev
    1. Create an EJB 3.0 Session bean with remote interface
    2. Change your remote interface to a web service end-point change @Remote to @WebService (import javax.jws.WebService)
    3. You do not have to use @WebMethod, we automatically expose all methods in the end-point interface in the web service
    4. You can inject EJB using @EJB
    5. Create a deployment profile for the EJB-jar and deploy the ejb-jar and the EJB will be exposed as a web service. The context-uri for the web service will be /ejb-jarName
    Hope this helps!
    -Debu Panda
    OC4J Product Management
    blog: http://debupanda.com
    -Debu

  • Web service and servlets in the same project...web.xml?

    Hello, I have a problem with my web service.
    I have a server, which displays a web service. I programmed this service with JAXRPC.
    I have a client, in another directory. I succeded in compiling, deploying and running the web service.
    The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
    These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
    But of course, it's not working by itself. I know there's something to do with the web.xml files.
    The thing is that I created a web.xml file for the service, and another for the servlets.
    I was thinking of joining both of them in one xml file, but everything crashes then...
    Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
    Thanks for any help
    Philippe

    Hello, I have a problem with my web service.
    I have a server, which displays a web service. I programmed this service with JAXRPC.
    I have a client, in another directory. I succeded in compiling, deploying and running the web service.
    The problem is that after I tried to integrate this service in an existing project. This project contains servlets. In these servlets, I'm using sessions.
    These servlets are on the same side as the server of the web service. Because of the implementation of my code, I'd like to use in the class that represents the server of the service, the same session as the one I'm using in the servlets.
    But of course, it's not working by itself. I know there's something to do with the web.xml files.
    The thing is that I created a web.xml file for the service, and another for the servlets.
    I was thinking of joining both of them in one xml file, but everything crashes then...
    Could someone tell me how to create a project with a web service and servlets, and mostly how to configure the xml file??
    Thanks for any help
    Philippe

  • Quick questions on the topic of Web Services and EJB POJOs

    I have been reading about Web Services and the data types that are aloud as operation parameters and return types. I was wondering what the standard practice for return types; is it to use the Entity classes straight and customize the WSDL instead of letting the EE container do it (avoid cyclic problems in the schema that can occur when using entity 1-to-many and many-to-1 mappings) or; is it to off load the data into a DTO/VO/Bean and let the EE container take care of all the schema mapping for the WSDL? I look at the EE tutorial and bought a EE book both use very basic examples that do not include connecting to a database or using EJB3 for the data store.
    Thanks for any information

    bump

  • Web services and control characters

    Hi,
    We are using JAXWS and JAXB to create web services. We have a problem with our current data because it sometimes contains "bad" characters, such as control characters. Is there a nice way for us to remove these characters when creating the messages or when retrieving the data from the database? We use java persistence / hibernate to retrieve the data from the database.
    I would prefer a method that doesn't include having to "clean" each string manually...
    Thanks!

    hi, i�m doing something like you but in jbuilder that is another IDE, i don�t know if it is useful for you but i entered to the help of jbuilder and i wrote in the index "web services" and then i found a topic called : "export classes as webservices" and in that place i can see some steps to follow, may be in eclipse you can find something like this.

  • Need advice about web services and Java beans

    Hi
    I am very new to web services and to Java beans as well.
    I am trying to understand if and how a web service can use functionality I have in a Java bean. I couldn't find any documentation I can use.
    For example:
    InitialContext ic = new InitialContext();
    Adder adder = (Adder) ic.lookup("ejb/AdderJNDI");In a EJB client project (I'm working with Eclipse) if I add the EJB project to the build path, the Adder interface is recognized.
    Theoritacally I thought I can do the same in a web service server project, but the Adder interface is not recognized.
    Is there something I can read to understand how I need to use the EJB or implement the web service?
    Many thanks
    Sigal

    Okay....I think I made some errors with the original scenario:
    It basically comes down to this....I think. OCS Calendar has a set of Java classes and methods that provide an abstraction for their web services interface. I know how to create something to use these classes using an IDE like JDeveloper, but I'm not sure how that would work with HTML DB.
    I've noticed that the SQL Workshop has a place for Java sources and classes, and I've heard mentions of PL/SQL wrapping. Is there a way to import classes into an HTML DB workspace, wrap 'em up, and access them via PL/SQL?
    Thanks again,
    Jonathan

  • [jaxrpc] defining web services and WSDL spec

    Greetings,
    I'm starting in JAXRPC web service's concepts and its WSDL specification. After I tested some samples from the jaxrpc tutorial, I tried to make my custom web service, but, I have problems when I deploy the web service and I tried to see in my browser the endpoint url - I got a internal server exception! I pick up the hello sample, I added to it my custom core sample web service functionality - using the same operations, the same signatures methods - and it worked fine!!
    So, what' is wrong? The main difference between them is that I have differents configuration files for xrpcc that will give a wsdl files for each one. Whats changes? The service name? The interface/package name? Is there some kind of limitation in the package name convention with the service names beyound the basic ones in the xrpcc (jaxrpc) specification?
    thanks,
    Pedro Salazar.

    I upgraded webservices developer pack to 1.0 version (final) and I solved my problems!
    Pedro Salazar

  • Web services and e print not working on 7520e

    After the update it instructed me to turn off my printer so the update could take effect which I did but my printer would not turn back on. leaving it overnight it was the same the next day so I had to unplug it from the wall outlet. I lost my internet connection and no matter what I did I could not get it to connect.I called cloud services who put in a network address of 192.168.223.1 and hung up leaving me with no printer and sending me an email to get my ISP server to fix.
    I called HP support and they got it connected just fine but when I try to log into my printers web page it still has my
    hp email address but when I try to get to the web page it leads me to Launch HP network check.
     on the front of my printer it says unable to connect to the internet, enter a proxy address, my server does not use one.
    I tried to disable web services and then enabled them again hoping to get a new code but no luck. In my own network it has the last digit different to the one being used and set as a static IP address . I was not able to scroll any Apps before any of this happened, is the server down or has anyone any ideas how to fix this. has anyone else got the same problem. The schedulled Apps printed off just fine before this.

    Hello dylon,
    Thank you for being an active member of the HP support community.  I understand that your Photosmart 7520 printer is indicating that it is not connected since doing a firmware update  last week.
    Please start by setting a manual IP address and manual DNS servers.  Please use this post with the steps and screen shots on how to do this.  The screen shots are for the Photosmart 7510 but the steps are the same.
    If you find that you are still unable to connect to web services please call HP’s Cloud Services at 1-855-785-2777 if you live in the USA/Canada region. If you live outside the USA/Canada region please click here to find the Technical Support number for your country/region.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Java app with web service and servlets

    Hi. I intend to make a java application which exposes some methods as a web service and as jsp/servlets. It's core functionality is not really web centric, but its more a java app with a web tier. I am not sure about how the architecture of such a system would look like using the java platform. I currently see three options:
    1. Run everything in a servlet container like tomcat. I hesitate to do this because i would be putting a lot of functionality which isn't about the web into a servlet container. Also, I have a lot of application scope data that is maintained and shared by all servlets/web services. However, it would be really easy just to put everything into tomcat and use ServletContext to maintain some global objects.
    2. Use a Java EE to seperate application/business logic and data access into session beans and entity beans. I hesitate to this because it seem a bit overkill because the system isn't very big or complex right now. It also means that I would have to learn to use EJB's instead of just using some POJOs.
    3. Run the web tier in a servlet container and the main app in a separate JVM, and then connect the tier by sending serialized objects over TCP sockets. I don't like writing network code but at least there is some separation of the tiers.
    What would you do? Maybe I have overlooked a much better solution to the problem?
    Let me just say that the system is the product of a student project spanning one semester, so it's important to choose the RIGHT solution (architectural-wise) instead of the something quick and dirty that is hard to defend.

    jschell wrote:
    Run everything in a servlet container like tomcatTomcat is a JEE container.Now I am confused. Maybe you mean Glassfish? Tomcat is definitely a web container(?).
    Let me just say that the system is the product of a student project spanning one semester, so it's important to choose the RIGHT solution (architectural-wise) That pretty much makes it impossible then.
    1. A "Right" solution is generally only proven by time.
    2. It requires a great deal of knowledge about the business domain.Yeah, you are right. Let be try to rephrase it. What solution (pattern) would be considered the most common or appropriate when you have a Java App and want to expose a few methods as a website and web service?
    I hesitate to do this because i would be putting a lot of functionality which isn't about the web into a servlet container. Also, I have a lot of application scope data that is maintained and shared by all servlets/web servicesHuh? Do you already have an exposed web service? If you already have a server which other clients communicate then where does this functionality that you don't want to be tomcat running now? Or where do you think that you want to run it? And if you are or do run it somewhere else then tomcat could access it the same way any other client accesses that server.Sorry, that sentence was written badly. I don't have anything right now. What I meant to write was that I will have a lot of application scope data, objects that are kept in memory as long as the server is running, shared by multiple servlet instances.

Maybe you are looking for