Java 6 web services and Tomcat?

I recently installed Java SE 6 and want to know how to use the web services that come with it with Tomcat 5.5.
Searching the internet yields no answers.
Specifically, I need to know what needs to go into the web.xml file to publish the web service, whether another xml file is needed, whether Tomcat should have any jars added to its internal directories, etc.
I realize that some of these questions are Tomcat-specific, and I plan to post on a Tomcat-related forum as well, but these are all Java SE 6 -related questions, so I'm hoping that posting here should yield some answers too.
Thanks in advance,
Inna

Thanks for your reply.
I found how to do this, though it took a lot of searching.
I'm including the info in this post in case it can help anyone in the future.
This info was found on: http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=51&t=004355 and is copied almost verbatim below.
The steps are:
Download and unpack the jax-ws (use https://jax-ws.dev.java.net/jax-ws-20-fcs/)
Copy all *.jar from the lib dir into $CATALINA_HOME/shared/lib
Create a directoy for the service under $CATALINA_HOME/webapps
Copy the class structure from the web service into WEB-INF/classes in that directory
Create a sun-jaxws.xml in WEB-INF
Create web.xml in WEB-INF
Start tomcat. Done
The web.xml should look something like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
  <listener>
    <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener
    </listener-class>
  </listener>
<servlet>
  <servlet-name>HelloService</servlet-name>
  <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
  <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
  <servlet-name>HelloService</servlet-name>
  <url-pattern>/hello</url-pattern>
</servlet-mapping>
<session-config>
  <session-timeout>60</session-timeout>
</session-config>
</web-app>The sun-jaxws.xml can look like this:
<?xml version="1.0" encoding="UTF-8"?>
<endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0">
  <endpoint  name="HelloService"        implementation="com.techyatra.hellows.HelloServer" url-pattern="/hello" />
</endpoints>After starting tomcat you can access the service under
http://localhost:8080/HelloService/helloHope this helps someone.
Inna

Similar Messages

  • Java web Service and Tomcat

    Hello,
    how can I set where service save files. Becouse when I save file in web service running on Tomcat 6.0, it is in directory Tomcat\bin.

    Well how do you tell it which file/directory to save it in?
    Just with new File("myFileName.txt") ?
    In that case it just uses the current working directory which normally just happens to be the Tomcat/bin directory.
    Better way is to use the constructor for File which takes two arguments - a directory and a filename
    File saveDirectory = new File("c:/data/webservicefiles/");
    File saveFile = new File(saveDirectory, "myFileName.txt");
    Of course the directory for saving should be configurable somewhere. In a properties file most likely.

  • 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.

  • 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

  • Deploying a VB dll using some web service and accessing it through java

    I'm new to Web Services Based Programming. I would like to know whether this is possible and if so has anyone tried it. I want to create a vb dll that contains the remote methods that the client will access from a java program. After going thru a lot of articles, I'm still unsure on how to do this. I found one method was to Create a VB program/dll, deploy it in a web service and create the java program that accesses by another web service.
    I'm doing this as part of my lab syllabus. The thing is My lab exercises do not state anything about the technologies that I can use to do this.
    This is all that is stated there:-
    Creation Of DLL Using VB And Deploy it in Java
    I just cant get any ideas other than deploying both the parts as web services. If anyone has Better ideas for this, I would really appreciate it.
    I dont know anything about CORBA for languages other than Java and I'm already using the servlets and EJB's in my normal life. I'm also learning the ORB based programming in java. Therefore your help will probably help me learn something new then what I know.

    Sorry I wasn't too specific in my last question.
    This is my java class calling the native method print
    //HeyWorld.java
    class HeyWorld {
    private native void print();
    public static void main(String[] args) {
    new HeyWorld().print();
    static {
    System.loadLibrary("HeyWorld");
    In this case, my C method for calling a C++ method: HelloWorld.cpp
    #include "jni.h"
    #include "stdio.h"
    #include "stdafx.h"
    #Include "HeyWorld.h" //this is where i get my function prototype
    #include "Test.h" //this is the C++ header where the print method and the Test class is
    JNIEXPORT void JNICALL
    Java_HeyWorld_print(JNIEnv *env, jobject obj)
    CTest a; //CTest is the print class I created
    a.print();
    //This is the header for Test.h
    class CTest: public CWinApp
    public:
         CTest(); //constructor
         void print(); //our method
    //And this is the implementation of the class Test.cpp
    void CTest::print()
         printf("Hey World!\n");
         return ;
    I could compile the Test.cpp, HeyWorld.cpp successfully. However when I tried to compile HeyWorld.cpp using
    cl -I<path of jdk include> -I<path of jdk include win32> -LD HeyWorld.cpp -FeHeyWorld.dll,
    the VC++ 6.0 compiler gave me this error:
    HeyWorld.obj:error LNK2001: unresolved external symbol "public:_thiscall CTest::CTest(void)"
    HeyWorld.obj:error LNK2001: unresolved external symbol "public:_thiscall CTest::print(void)"
    Thanks for the help.

  • Java API (web services) for  exportMetadata and importMetadata

    We ususally use WLST command : exportMetadata and importMetadata to export/import MDS. is there any corresponding web services or Java API avalaible for the similar purpose?
    Thanks

    Hi,
    U can expose a EJB or a java class as a webservice in webdynpro and u can use it in webdynpro directly and if u want to use it through Portal u need to create proxies and do it.
    U can go through this weblog which helps u in creating a Bean as a webservice.
    /people/sap.user72/blog/2005/09/15/creating-a-web-service-and-consuming-it-in-web-dynpro
      And u can expose the services created in XI also as webservices.
    Regards,
    Sirisha.

  • Is it possible to deploy Web Services to Tomcat?

    Good day,
    Can anybody tell me or it is possible to deploy Web Services to Tomcat 5.5.x ? It is possble for ADF, so I was wondering or it is possble for Web Services.
    I tried to deploy it with the following libraries:
    J2EE (excluding the servlet.jar using the filter, while this package is already present in Tomcat)
    Oracle SOAP
    Struts Runtime
    JSP Runtime
    and manually added as library:
    wsserver.jar
    wsdl.jar
    WebServicesHtmlXmlWizard.jar
    The situation at this moment is that after deployment, and execution by the a http browser the http request screens shows up as expected (I have been used Embedded stubs), but after sending I get a:
    28-Sep-2005 11:03:36 org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet MyWebService1 threw exception
    java.lang.NoClassDefFoundError: oracle/aurora/ncomp/java/ClassNotFound
         at oracle.j2ee.ws.StatelessJavaRpcWebService.getGenerator(StatelessJavaRpcWebService.java:28)
         at oracle.j2ee.ws.RpcWebService.generateWrapperClass(RpcWebService.java:461)
         at oracle.j2ee.ws.RpcWebService.generate(RpcWebService.java:414)
         at oracle.j2ee.ws.RpcWebService.getWrapper(RpcWebService.java:532)
         at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:631)
         at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1173)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)
    Any sugestions? Or is there a different behaviour between Oracle en Tomcat version caused by modifications from the apache source.
    I should appreciate it to get some more details about this issue.

    JDeveloper will only directly support deployment of web services to an Apache 2.2 Web Server.

  • How to deploy business objects web services on tomcat

    Hi everyone can anyone tell how i need to deploy business objects web services on tomcat, i installed business objects on unix server.what r the steps i need to follow in order to deploy web services on business objects. this web services must be called by a java program externally, that the reason i am deploying web services.
    i downloaded business objects web services portal sample zip file. the wssdkj2eeportal directory is created with ant_scripts,src, dsws.config and wsportalassemblyscripts.bat.
    i am trying to configure the dsws.config, by modifying it to
    <configuration version="1.0">
       <WebService Name="BusinessObjects Enterprise XI 3.1 sp3" Icon="image/java.gif">
          XI 3.1 Web Services
          <Connection URL="http://169.111.33.61:8080/dswsbobje/services/session" Proxy="0" Timeout="120000" />
       </WebService>
       <Proxy Name="Outside" URL="http://http-cache.mycompany.com:3667" />
    </configuration>
    what i need to do in order to deploy
    i am using bo xi 3.1 sp3

    Hi,
    You deploy all the web applications provided by BOE with the use of Wdeploy tool installed with BOE installation, for details please reffer the following document
    [BusinessObjects Enterprise XI 3.1 Web Application Deployment Guide for UNIX*|http://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000715844%26_SCENARIO=01100035870000000202]
    Regards,
    Ramu.
    Edited by: Gowda Timma Ramu on Nov 9, 2010 8:39 PM

  • 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

  • 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

  • [Integrated SOA Gateway] Publish Java based web service

    Welcome!
    Lately I have been trying to publish Java based web service through Integrated SOA Gateway. The documentation states that:
    +"Custom interface definitions can be created for various interface types including custom interface definitions for XML Gateway Map, Business Event, PL/SQL, Concurrent Program, Business Service Object, Java (except for Java APIs for Forms subtype) and Composite Service for BPEL type."+ (Integrated SOA Gateway Developer's Guide Release 12.1, "Creating and Using Custom Integration Interfaces")
    After familiarizing myself with $FND_TOP/bin/irep_parser.pl and $FND_TOP/bin/FNDLOAD tools, I have started coding my POJOs. Initially I have come up with three classes - request/response objects and service implementation. Service implementation has been annotated with "@rep:X" descriptors according to "Java Annotations" section of the documentation. While invoking $FND_TOP/bin/irep_parser.pl I have received errors about class resolution. My solution was to transform request and response types to static inner classes. This way I ended up with one *.java source file (see below).
    * Sample ISG Service.
    * @rep:scope public
    * @rep:product AP
    * @rep:displayname My Custom ISG Service.
    public class MyService {
    public static class Request {
    private String id;
    public void setId(String id) {
    this.id = id;
    public String getId() {
    return id;
    public static class Response {
    private String data;
    public void setData(String data) {
    this.data = data;
    public String getData() {
    return data;
    * Sample operation.
    * @param request Request Object.
    * @return Return Object.
    * @rep:displayname Test operation.
    * @rep:category BUSINESS_ENTITY SAMPLE_SERVICE
    public MyService.Response testOperation(MyService.Request request) {
    MyService.Response response = new MyService.Response();
    response.setData("Some Data");
    return response;
    ILDT file has been successfully created and uploaded. However, I could not see the "Generate WSDL" button on Integrated Repository website. Is there any particular interface or superclass that my service implementation should extend? I have reviewed "PurchaseOrderSDO" example posted in the developer's guide (page 407), but I couldn't come up with a working solution. Could you provide me with more detailed tutorial/example? Which documentation sections should I read again?
    After searching through forum, I have spotted $FND_TOP/bin/soagenerate.sh script, and thought that lack of "Generate WSDL" button was an EBS defect. After running the script, I have received an error:
    Error in Service Generation.
    ServiceGenerationError: Interface Type (JAVA) Interface SubType (null) is not supported.
    oracle.apps.fnd.soa.util.SOAException: ServiceGenerationError: Interface Type (JAVA) Interface SubType (null) is not supported.
         at oracle.apps.fnd.soa.provider.wsdl.ArtifactsFactory.getArtifactsGenerator(ArtifactsFactory.java:55)
         at oracle.apps.fnd.soa.provider.wsdl.WSDLGenerator.generateServiceWSDL(WSDLGenerator.java:128)
         at oracle.apps.fnd.soa.provider.wsdl.ServiceGenerator.generateSOAService(ServiceGenerator.java:75)
         at oracle.apps.fnd.soa.provider.wsdl.ServiceGenerator.generateSingleService(ServiceGenerator.java:88)
         at oracle.apps.fnd.soa.provider.wsdl.ServiceGenerator.main(ServiceGenerator.java:419)
    I would be grateful for any suggestions. Has anyone published Java based web service through ISG?
    Best regards,
    Lukasz

    I tried the following as per Oracle support and able to generate the wsdl though, but not invoke the webservices.
    1. Applied the patch 8607523
    2. Took the translator.jar file from the patch 8857799 and replaced the current translator.jar file
    3. Deploy the adapters.
    $FND_TOP/bin/txkrun.pl -script=CfgOC4JApp -applicationname=pcapps
    -oc4jpass=welcome -runautoconfig=No

  • How to connect to external web service and convert XML to a table

    Hi experts,
      I need to connect to external/non-SAP web service and convert XML in that site to a SAP table?
    Is there a function call(SE37) to do this? Is it a must for me to install AS JAVA or PI and configure enterprise service? Please provide a link for me to retrieve relevant infomation, thx.

    No, you don't need PI or the Java stack for this.  You can create an ABAP proxy using the WSDL file for the web service and call the web service using the proxy class in an ABAP program.  You can transform the XML response to internal tables/structures/variables using a transformation template that you create.

  • 2 Java ME Web Service Errors of "Not Compliant with JSR-172"

    This happened when I use Microsoft's ASMX-based WSDL file on a Java ME WS client.
    Say I had a test.asmx WSDL. Then I use NetBeans, and I go to New > Java ME Web Service Client
    I tried to import from running web service, URL "http://www.testhost.com/wspackage/test.asmx?WSDL"
    and then the popup validation error told me "Reference in element is not supported by this version of stub compiler"
    also the X logo error told me "testasmx.wsdl is not compliant with Java ME Web Services specification (JSR-172)"
    I wondered what's going on? Is there any data types not supported by JSR-172? Which is it?
    When I "Validate XML" this ASMX file, it pops this:
    "Error: src-resolve: Cannot resolve the name 's:schema' to a(n) 'element declaration' component."
    The "types" section of my WSDL are like this:
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions 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:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/MMWebServices/Coverage"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    targetNamespace="http://tempuri.org/MMWebServices/Coverage" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/MMWebServices/Coverage">
    <s:import namespace="http://www.w3.org/2001/XMLSchema" />
    <s:element name="ViewListDoctor">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="iUserId" type="s:int" />
    <s:element minOccurs="1" maxOccurs="1" name="iASchId" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="sSearchKeyword" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dsView">
    <s:complexType>
    <s:sequence>
    <s:element ref="s:schema" /> // <<error occured on this line, and every time the ref="s:schema" shows up <<
    Anyone have experienced this?

    Yes, thx u. I didn't realized I was posting on the wrong section (Enterprise) so I posted again to the J2ME/MIDP section since it was all about mobility. Please delete the first post.

  • Java Class Web Service

    Which the best way to make a webservice based on a java class in JDeveloper 10.1.2?
    I need to make a webservice that make some queries in views of BPEL's dehydration DB, but I would not like that this webservice was a BPEL process in the Process Manager, with gone off instances being to each query. Therefore I intend to make a java class that it executes the queries and it returns the results.
    However it would like a structuralized payload, instead of returning a primitive and soap-serialized type, I would like to return a complex type.
    Example of return message:
    ... SOAP Message ...
    <payload>
    <sensors>
    <sensor>
    <date>2006-sep-11</date>
    <activity>invoke partner</activity>
    </sensor>
    <sensor>
    <date>2006-sep-11</date>
    <activity>receive partner</activity>
    </sensor>
    </sensors>
    </payload>
    ... SOAP Message ...
    Well, JDeveloper 10.1.2 can't make this work easiest for me ... the wizard can't work with classes returning complex types.
    I tried many ways to do this: top-down and bottom-up approach's, but without success.
    Also tried made a wsdl and using schemac generate facades classes, write a deploy file and, and after some difficult made the deploy in my OC4J. But invoking the webservice the server returns this message:
    "javax.servlet.ServletException: WSDL Generation exception: java.lang.Exception org.collaxa.thirdparty.dom4j.Namespace is not a java bean: must have a default constructor"
    Well, sorry, but I'm a java newbie and I have no idea about what can I do in this case. But I think that the error isn't in my class. :-(
    Ok, also tried to do this, for test, in JDeveloper 10.1.3, but without success too.
    Following some examples and tutorials, I tried to use the wizard "Create J2EE webservice" using WSIF, but doesn't works for me.
    I read the blog posts:
    "Revisiting Java and WSIF"
    http://blogs.oracle.com/reynolds/2006/08/10#a112
    "Using Java from BPEL"
    http://blogs.oracle.com/reynolds/discuss/msgReader$10?mode=day
    And many others...
    But, in fact, the things doesn't works like in the tutorials...
    Someone can help-me?
    Thanks for help and sorry for my rusted english.

    As far as I can tell, the SOAPContext is not magically there in Oracle Web services so you have to revert to Oracle SOAP (which is where the OracleSOAPContext comes from and is pretty much Apache SOAP 2.3.1 with fixes and a couple things to make it work in our environment - e.g. like a slightly updated SOAPContext class).
    We ship Oracle SOAP with our distribution in the soap.ear file located in the <oc4J_home>\soap\webapps directory. Just add this line (tailored to your config) to your server.xml:
    <application name="soap" path="../../../soap/webapps/soap.ear" auto-start="true" />
    and the line:
    <web-app application="soap" name="soap" root="/soap" />
    to your http-web-site.xml and your Oracle SOAP environment should be set up with an endpoint of:
    http://127.0.0.1:8888/soap/servlet/soaprouter
    Then build your Web service and in your method add the SOAPContext parameter. Here is a simple method that should print out the remote IP, after casting to the OracleSOAPContext:
    public String sayHello( SOAPContext ctx, String test)
    OracleSOAPContext octx = (OracleSOAPContext)ctx;
    System.out.println("Remote address: " + octx.getRemoteAddress());
    return "Hello: " + test;
    For completeness, the dd file looks like:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <isd:service
    id="mypackage3.Class1"
    xmlns:isd="http://xml.apache.org/xml-soap/deployment">
    <isd:provider
    type="java"
    methods="sayHello"
    scope="Request">
    <isd:java class="mypackage3.Class1" static="false"/>
    </isd:provider>
    <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
    </isd:service>
    Mike.

  • 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.

Maybe you are looking for