Constants for JAX-RPC

Hello!
How can I define constants in a value object? I need constants that should
be used in a value object both by server and client. From Java language
perspective, I can define static final constants in either value object
itself or in separate class/interface. When servicegen and clientgen tasks
create WSDL and remote stubs for value objects, they strip out my constants
definitions.
For now I use separate Constants class that I put manually into client JAR
file. It works, but to make it cleaner I would like to define these
constants in WSDL file. How can I do it?
Thanks in advance!
Michael Jouravlev.

JAX-RPC does not say how to handle public final fileds in
value types.
One way to solve this problem may be to specify fixed attribute
in the xsd:attribute.
eg:
<xsd:attribute name="country" type="xsd:string" fixed="US"/>
But this will work only for simpleTypes. Anyway, I will file a feature
request for this (CR080597). Hope someone(jax-rpc/soap builders)
will comeup with a better solution.
regards,
-manoj
"Michael Jouravlev" <[email protected]> wrote in message
news:[email protected]..
Hello!
How can I define constants in a value object? I need constants that should
be used in a value object both by server and client. From Java language
perspective, I can define static final constants in either value object
itself or in separate class/interface. When servicegen and clientgen tasks
create WSDL and remote stubs for value objects, they strip out myconstants
definitions.
For now I use separate Constants class that I put manually into client JAR
file. It works, but to make it cleaner I would like to define these
constants in WSDL file. How can I do it?
Thanks in advance!
Michael Jouravlev.

Similar Messages

  • Seeking help for JAX-RPC in Eclipse

    Hi, I am going to deploy a web service with JAX RPC in Eclipse.
    I googled the tutorials, but most of them involves priciples and XML stuffs. I feel it is really hard for a beginner.
    I am looking for some snapshots or other materials to demonstate how to use it.
    Any help would be greatly appreciated.

    Hi, I am going to deploy a web service with JAX RPC in Eclipse.
    I googled the tutorials, but most of them involves priciples and XML stuffs. I feel it is really hard for a beginner.
    I am looking for some snapshots or other materials to demonstate how to use it.
    Any help would be greatly appreciated.

  • How can I change namespace prefix for JAX-RPC client request?

    I'm creating a JAX-RPC client to invoke a RPC/encoded web service. The service was generated from a ColdFusion program and for some reason when the SOAP namespace prefix is anything but "soapenv" it returns text/html instead of text/xml. Currently the client is sending requests with the prefix "env" and I'd like to change it to "soapenv".
    I created a type of javax.xml.rpc.handler.GenericHandler and attempted to do the follow:
    @Override public boolean handleRequest(MessageContext p1) {
         SOAPMessage msg = ((SOAPMessageContext) p1).getMessage(); 
         try {
              SOAPPart part = msg.getSOAPPart();
              SOAPEnvelope envelope = part.getEnvelope(); 
              envelope.setPrefix("soapenv"); 
              msg.saveChanges(); 
         } catch(SOAPException ex) {
              // TODO
              return false;
         return true;
    However I get the following exception:
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [UNIMPLEMENTED ] FaultActor [null] Detail [<detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">java.lang.AssertionError: UNIMPLEMENTED
    at weblogic.xml.domimpl.NodeImpl.setPrefix(NodeImpl.java:173)
    at test.MyHandler.handleRequest(MyHandler.java:33)
    at weblogic.wsee.handler.JaxrpcHandlerChain.handleRequest(JaxrpcHandlerChain.java:58)
    at weblogic.wsee.ws.dispatch.server.JaxrpcChainHandler.handleRequest(JaxrpcChainHandler.java:102)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)
    at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)
    at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
    at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:341)
    at test.Approvedsuppliers_Wrap_Stub.echo(Approvedsuppliers_Wrap_Stub.java:31)
    at test.Approvedsuppliers_WrapPortClient.echo(Approvedsuppliers_WrapPortClient.java:130)
    at test.Approvedsuppliers_WrapPortClient.main(Approvedsuppliers_WrapPortClient.java:43)
    Is there any workaround? I appreciate any feedback.
    Thanks, Bill

    What I ended up doing is converting the SOAP message to a string, replacing the namespace prefix and converting it back to a SOAP message.
    @Override
       public boolean handleRequest(MessageContext messageContext) {
          SOAPMessageContext soapMessageContext = (SOAPMessageContext) messageContext;
          SOAPMessage soapMessage = soapMessageContext.getMessage();
          String soapString = convertSOAPToString(soapMessage);
          soapString = soapString.replaceAll("env:", "soapenv:");
          soapString = soapString.replaceAll("xmlns:env", "xmlns:soapenv");
          SOAPMessage newSoapMessage = convertStringToSOAP(soapString);
          MimeHeaders mimeHeader = newSoapMessage.getMimeHeaders();
          mimeHeader.setHeader("SOAPAction", "");
          soapMessageContext.setMessage(newSoapMessage);
          return true;
       private String convertSOAPToString(SOAPMessage soapMessage) {
          StringWriter stringWriter = null;
          try {
             stringWriter = new StringWriter();
             StreamResult streamResult = new StreamResult(stringWriter);
             TransformerFactory transformFactory = TransformerFactory.newInstance();
             Transformer transformer = transformFactory.newTransformer();
             transformer.transform(new DOMSource(soapMessage.getSOAPPart()), streamResult);
          } catch (TransformerException e) {
             throw new RuntimeException(e);
          } finally {
             close(stringWriter);
          return stringWriter.toString();   
       private SOAPMessage convertStringToSOAP(String soapString) {
          SOAPMessage soapMessage = null;
          ByteArrayInputStream byteInputStream = null;
          try {
             MessageFactory msgFactory = MessageFactory.newInstance();
             soapMessage = msgFactory.createMessage();
             SOAPPart soapPart = soapMessage.getSOAPPart();
             // Load the SOAP text into a stream source
             byte[] buffer = soapString.getBytes();
             byteInputStream = new ByteArrayInputStream(buffer);
             StreamSource source = new StreamSource(byteInputStream);
             // Set contents of message
             soapPart.setContent(source);       
          } catch (SOAPException e) {
             throw new RuntimeException(e);
          } finally {
             close(byteInputStream);
          return soapMessage;
       private void close(Closeable closeable) {
          if(closeable != null) {
             try {
                closeable.close();
             } catch (IOException e) {
                // TODO

  • URGENT **** Need help for JAX-RPC Web Service Proxy deploy to OC4J 10.1.3.5

    Hi everyone!
    I’m really new to web services.
    I’m getting a *500 internal server error* while deploying my JAX-RPC web service Proxy to an Oracle AS, in an OC4J, v. 10.1.3.5.0.
    Running my client from my development environment (*jdeveloper 10g, 10.1.3.5.0*) everything functions correctly: from jdeveloper I can contact and use the web service defined by the following endpoint: https://www.medialibrary.it/services/federaMLOL.asmx?WSDL
    I created a "try_ws_client.jsp" file that runs correctly from my local development environment jdeveloper (that uses an embedded oc4j, v. 10.1.3.5.0) but fails when run from the test server (Oracle AS, in an OC4J, v. 10.1.3.5.0), getting, as I mentioned a 500 internal server error, a white page in IE but with FF the message says: The’s an error in the servlet .....
    Here's how I created the ws proxy and how I’m using it to consume the ws I mentioned.
    1. I used the jdeveloper “Create Web Service Proxy” wizard (File > New > Business Tier > Web Services > Web Service Prox) and in the WSDL document URL I put: https://www.medialibrary.it/services/federaMLOL.asmx?WSDL
    2. The operation ended without adding nothing to the web.xml file and creating the proxy files. One of them is: FederaMLOLSoapClient.java that have the WS exposed methods (es: public boolean createUser(String) ) + a “main” method with the example how to use this client to consume the WS.
    public static void main(String[] args) {
    try {
    it.reggiocity.provincia.mlol.proxy.FederaMLOLSoapClient myPort = new it.reggiocity.provincia.mlol.proxy.FederaMLOLSoapClient();
    System.out.println("calling " + myPort.getEndpoint());
    // Add your own code here
    } catch (Exception ex) {
    ex.printStackTrace();
    3. In FederaMLOLSoapClient.java I’ve create the method "tyIt":
    public String tryIt(String username) {
    try {
    it.reggiocity.provincia.mlol.proxy.FederaMLOLSoapClient myPort = new it.reggiocity.provincia.mlol.proxy.FederaMLOLSoapClient();
    if(myPort.createUser(String username)) {
    return “O.K”;
    } else {
    return “K.O”;
    } catch (Exception ex) {
    // logs error
    4. I created my try_ws_client.jsp file that creates FederaMLOLSoapClient object and calls the tryIt method, printing the “OK” or “KO” message.
    <%@ page import="it.reggiocity.provincia.biblioreggiane.*"%>
    <%
    String message = "";
    FederaMLOLSoapClient obj= new FederaMLOLSoapClient( );
    message = obj.tryIt(“AAAAAA70R10H226H”);
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>prova</title>
    </head>
    <body><%=message%></body>
    </html>
    The situation is:
    My try_ws_client.jsp runs correctly from my jdeveloper and the user is created while creating app.ear and deploying it to my Oracle AS/OC4J as mentioned above, I get a 500 Internal Server Error.
    Any idea to find a solution to this problem?
    Please help.
    Take care.
    John M.

    Hi,
    you want to build the Web Service, or you want to consume the Service as a client? If the latter, Web client (ADF?) or Java client?
    Frank

  • How to compile and build a war file for JAX-RPC

    Hi all,
    I know that all who use JAX-RPC knows it.
    How to compile JAX-RPC code which was not the sample code of JWSDP example?.
    Which jar file is to be included in classpath?.
    After compiling,how to make a WAR file so i can deploy it in TOMCAT ...anyone plz

    Nobody answers.But i found a right article which was quite helpfull to do it.
    http://java.sun.com/developer/technicalArticles/WebServices/getstartjaxrpc/

  • Oracle 9iAS R2 support for JAX - RPC / B / P /M

    Hi,
    browsing the web I came accross to the following links:
    http://otn.oracle.com/tech/webservices/htdocs/wsvsm/wsorcl.html
    http://otn.oracle.com/tech/xml/htdocs/standard.html
    And it seems that Oracle 9iAS R2 supports the libs mentioned on Subject.
    From other channels I've been told that this is not true at least for some of them on OC4J 9.0.3/4.
    Can anyone please clarify this ?
    Aren't OC4J 9.0.3/9.0.4 part of 9is R2 ?
    Thanks.
    Giuseppe.

    Actually, JAXB is the preferred mechanism going forward with 10.0.3 JAXRPC Web Services(http://otn.oracle.com/tech/java/oc4j/1003/content_preview.html) - you will see in the XDK 10 beta (http://otn.oracle.com/tech/xml/xdk/xdkbeta.html).
    However, in 9iAS R2 JAXB is not built in ... if you want to go down this road you can try working with the JAXB RI.
    Our plans with 10.0.3 start with support JAXB in the run time but also within the design time of JDeveloper. The goal would be to model your schema in its new visual schema editor, have a design time option to generate the JAXB object model and then implement a Web service that consumes that schema. Of course this could be done out side of JDev - JDev just gives a design time rather than command line tools from the runtime.
    Mike.

  • JAX-RPC and non-primitive data types

    Hello all!
    I am using JWSDP v1.3 and i have a problem using non-primitive data types as return types for my operations.
    Consider the helloservice example of the JWSDP1.3 tutorial. Now suppose that instead of having the simple operation sayHello() that returns a String, we execute a query on a database, get some ResultSetMetaData and we want these Metadata to be the return type of our operation. I.e. have the operation
    public ResultSetMetaData sayHello()
    instead of the
    public String sayHello()
    of the tutorial.
    When trying to build the service i get the following error which is normal, because ResultSetMetaData is not a supported JAX-RPC type.
    run-wscompile: [echo] Running wscompile: [echo] C:\jwsdp\apache-ant\../jaxrpc/bin/wscompile.bat -define -d build - nd build -classpath build config-interface.xml -model build/model. gz [exec] error: invalid type for JAX-RPC structure: java.sql.ResultSetMetaData [exec] Result: 1
    Is there any way to define an operation like this? Can i specify somehow ResultSetMetaData as a supported-type?
    I hope someone can give me some advice on it, because i have lost one evening trying to figure it out myself :)
    Regards,
    Kostas

    Courtesy links to crossposts so people don't waste their time answering a question which has already been answered
    http://forum.java.sun.com/thread.jsp?thread=482875&forum=59&message=2253704
    http://forum.java.sun.com/thread.jsp?thread=482873&forum=331&message=2253699

  • Very basic questions on JAX-RPC and wscompile

    Hello,
    well, I have this tool that generates java packages. The thing is that this tool needs now to generate JAX-RPC compliant java packages. To verify its compilance, I am using wscompile 1.1.3 build R1 and Sun AS Edition 8.2.
    My questions are:
    - In the generated packages, there might some classes with no attributes at all :P(remember that I am handling automatically generated classes). When running wscompile to generate the corresponding WSDL, I am getting "invalid type for JAX-RPC structure", even if it has a default empty constructor. I know it looks stupid, but I could not find anywhere in the JAX-RPC specification saying that for a class to be jaxrpc compliant, it must have at least one attribute. Any idea?
    - It might be the case that I have same class name in different packages:
    mypackage.structures.messages.A
    mypackage.structures.segments.AWhen generating the server stub, I am getting:
    Duplicate type name "{urn:mynamespace}A" for java type "mypackage.structures.segments.A" found.
    Is there a way to tell wscompile to keep the class package name for every class when generating the wsdl? Or is it always building all the classes together in the package specified in the service/packageName within the configuration xml file?
    Thanks a lot in advance for any help.

    1. Does predictive text only work in the SMS app, or does it work in the apps for email, writing notes, etc?
    It works with Safari, the Mail client, the Notes app, and with the SMS app.
    2. Can you turn the predictive text off? (I find it wildly irritating, because I know far better what words I want to write than a pesky phone does!)
    Yes.
    3. Having email sent to a mobile is a whole new world for me! Do I need to subscribe to MobileMe at £££ per month, or is there another way of having email from my three accounts forwarded to my mobile?
    You can access any IMAP or POP account with the iPhone's Mail client, and access multiple email accounts. I currently access to email accounts with the iPhone's mail client - my MobileMe account, and a business POP account. You can access all 3 of your email accounts with the iPhone's Mail client.

  • J2EE Web services and JAX-RPC

    Hello..
    While working with J2EE web services using JDeveloper and OC4J, I noticed that it really doesn't confirm to Sun's JAX-RPC standard. The Web Service interface class does not extend the "Remote" and all methods don't throw "RemoteException" as mandated by JAX-RPC standard.
    I have few questions:
    (1) Are the OC4J J2EE web services completey different from JAX-RPC based web services.??
    (2) Does Oracle have any implementation of JAX-RPC??
    (3) Is Sun the only one promoting and implementing the JAX-RPC standard? Or are there other players?
    thanks...

    (1) Are the OC4J J2EE web services completey different from JAX-RPC based web services.??
    OC4J J2EE Web Services originate from Oracle/Apache SOAP with several differences:
    a. A model where each type of implementation gets a specific servlet (e.g. one for EJB's, one for PL/SQL, one for stateless and stateful Java classes. Architecturally, you can see the picture here:
    http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/generic.903/b10004/orawebservices.htm#1024808
    (scroll down a half page for the picture)
    b. The packaging of the Web services rather than using the Apache SOAP registration mechanism uses something closer to JSR 109 (also known as Web Services for J2EE, part of J2EE 1.4 with JAX-RPC, SAAJ [SOAP API forAttachments in Java] and JAXP [Java API for XML Parsing]), where the Web service is packaged as an ordinary ear file for deployment.
    Oracle built this implementation by extrapolating from the JAX-RPC documentation that was available last year before it was a final specification in an effort to release a production quality Web services implementation that was aligned with JAX-RPC. It has been through two releases - Oracle9iAS 9.02 and Oracle9iAS 9.0.3 and is now being evolved to JAX-RPC as we move to J2EE 1.4.
    (2) Does Oracle have any implementation of JAX-RPC??
    We are planning to release a JAX-RPC implementation in the new year (I don't have specific dates yet) on OC4J. The production implementation of this will be as seamless a migration as possible from the existing implementation. Oracle9i JDeveloper will also add support for JAX-RPC as a 3rd option in its list of choices available. You can get a sense of how such a migration would work by running the Web services wizard in JDev for Apache SOAP and then, in a separate project, running it for Oracle9iAS J2EE Web Services - imagine there being another option for JAX-RPC. The work to migrate should be as simple as running a wizard or command line utility (known as the Web Services Assembler tool in Oracle9iAS).
    (3) Is Sun the only one promoting and implementing the JAX-RPC standard? Or are there other players?
    Pretty much every one in the Java side of industry will be implementing JAX-RPC. The important time to note is when J2EE 1.4 is released ... sometime in the new year ... I believe around March but may be mistaken. Part of J2EE 1.4 is required support for JAX-RPC, SAAJ, Web Services for J2EE etc etc. This will standardize the implementation of Web services. Oracle, like others in the industry, supports the standard protocols, (SOAP), interfaces (WSDL) and registries (UDDI) - what J2EE 1.4 does is standardize the packaging, deployment and implementation (the wrappers generated by the tooling).
    My guess is that around JavaOne (June 2003) there will be a rash of announcements from J2EE vendors announcing support of JAX-RPC and J2EE 1.4 (or early implementations) as we will be in the same race that happened in 2001/2002 when J2EE 1.3 was the spec to announce implementations around.
    Mike.

  • Cannot Run JAX-RPC Hello Service Example

    Hello,
    I am trying to run the helloservice example from the Java Web Services Tutorial v 1.3 (Chapter 12). Upon running the ant build task, I get the following error.
    BUILD FAILED
    file:C:/jwstutorial13/examples/jaxrpc/common/targets.xml:151: Warning: Could not
    find file C:\jwstutorial13\examples\jaxrpc\helloservice\build\model.gz to copy.
    I tried running the ant generate-sei-service task separately. This appears to complete successfully, yet, there is no model file generated.
    Any help/suggestions/insights would be very much appreciated!
    Thanks,
    Sheila

    Thanks!
    I did that before posting my original message. I'm obviously missing something (noting jumps out at me, as far as being wrong.)
    My files look like this:
    File: build.xml (C:\jwstutorial13\examples\jaxrpc\helloservice\build.xml)
    <!DOCTYPE project [
    <!ENTITY jaxrpctargets SYSTEM "../common/targets.xml">
    ]>
    <project name="jaxrpc-tutorial" default="build" basedir=".">
    <property file="../../common/build.properties"/>
    <property file="../common/build.properties"/>
    <property file="build.properties"/>
    &jaxrpctargets;
    <target name="build" depends="build-service"
    description="Executes the targets needed to build the service.">
    </target>
    </project>
    ==================================================================================
    File: build.properties (C:\jwstutorial13\examples\jaxrpc\helloservice\build.properties).
    example=helloservice
    war.path=${tut.root}/examples/jaxrpc/helloservice/${dist}/${deployable.war}
    context.path=${hello.context}
    portable.war=${context.path}-portable.war
    deployable.war=${context.path}.war
    ==================================================================================
    File: build.properties (C:\jwstutorial13\examples\jaxrpc\common\build.properties)
    # This file contains properties common to the tutorial examples
    # for JAX-RPC.
    # tut.root=C:/wspack-docs
    tut.root=${tutorial.install}
    hello.context=hello-jaxrpc
    secure.context=secure-jaxrpc
    mutualauth.context=secure-mutualauth
    url.pattern=/hello
    key.store=${tutorial.home}/jwstutorial13/examples/jaxrpc/mutualauth/keystore.jks
    key.store.password=changeit
    trust.store=${tutorial.home}/jwstutorial13/examples/jaxrpc/mutualauth/cacerts.jks
    trust.store.password=changeit
    hello.endpoint=http://${host}:${port}/${hello.context}${url.pattern}
    secure.endpoint=http://${host}:${port}/${secure.context}${url.pattern}
    mutualauth.endpoint=https://${host}:${secure.port}/${mutualauth.context}${url.pattern}
    build=build
    src=src
    dist=dist
    client.jar=client.jar
    model.file=model.gz
    config.wsdl.file=config-wsdl.xml
    config.interface.file=config-interface.xml
    jwsdp.shared=${jwsdp.home}/jwsdp-shared
    jaxp.home=${jwsdp.home}/jaxp
    jaxrpc.home=${jwsdp.home}/jaxrpc
    saaj.home=${jwsdp.home}/saaj
    wscompile.dir=${jaxrpc.home}/bin
    wsdeploy.dir=${jaxrpc.home}/bin
    javamail.jar=${jwsdp.shared}/lib/mail.jar
    jaf.jar=${jwsdp.shared}/lib/activation.jar
    jaxp-api.jar=${jaxp.home}/lib/jaxp-api.jar
    dom.jar=${jaxp.home}/lib/endorsed/dom.jar
    sax.jar=${jaxp.home}/lib/endorsed/sax.jar
    xalan.jar=${jaxp.home}/lib/endorsed/xalan.jar
    xercesImpl.jar=${jaxp.home}/lib/endorsed/xercesImpl.jar
    jaxrpc-api.jar=${jaxrpc.home}/lib/jaxrpc-api.jar
    jaxrpc-impl.jar=${jaxrpc.home}/lib/jaxrpc-impl.jar
    jaxrpc-spi.jar=${jaxrpc.home}/lib/jaxrpc-spi.jar
    commons-logging.jar=${jwsdp.shared}/lib/commons-logging.jar
    saaj-api.jar=${saaj.home}/lib/saaj-api.jar
    saaj-impl.jar=${saaj.home}/lib/saaj-impl.jar
    relaxngDatatype.jar=${jwsdp.shared}/lib/relaxngDatatype.jar
    xsdlib.jar=${jwsdp.shared}/lib/xsdlib.jar
    jax-qname.jar=${jwsdp.shared}/lib/jax-qname.jar
    ant.jar=${jwsdp.home}/apache-ant/lib/ant.jar
    ==================================================================================
    This is where I thought the problem might be, but I can't determine what's wrong. The pathelements in this file, were set in build.properties ((C:\jwstutorial13\examples\jaxrpc\common\build.properties), referenced above.
    File: targets.xml (C:\jwstutorial13\examples\jaxrpc\common\targets.xml)
    <!-- targets.xml: Referenced by the build.xml files, this file
    contains targets common to all of the jaxrpc examples. -->
    <path id="compile.classpath">
    <pathelement location="${javamail.jar}"/>
    <pathelement location="${jaf.jar}"/>
    <pathelement location="${jaxp-api.jar}"/>
    <pathelement location="${dom.jar}"/>
    <pathelement location="${sax.jar}"/>
    <pathelement location="${xalan.jar}"/>
    <pathelement location="${xercesImpl.jar}"/>
    <pathelement location="${jaxrpc-api.jar}"/>
    <pathelement location="${jaxrpc-impl.jar}"/>
    <pathelement location="${jaxrpc-spi.jar}"/>
    <pathelement location="${commons-logging.jar}"/>
    <pathelement location="${saaj-api.jar}"/>
    <pathelement location="${saaj-impl.jar}"/>
    <pathelement location="${relaxngDatatype.jar}"/>
    <pathelement location="${xsdlib.jar}"/>
    <pathelement location="${jax-qname.jar}"/>
    <pathelement location="${ant.jar}"/>
    <pathelement location="${build}/shared"/>
    </path>
    <path id="run.classpath">
    <path refid="compile.classpath"/>
    <pathelement location="${dist}/${client.jar}"/>
    </path>
    <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" />
    <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" />
    <taskdef name="list" classname="org.apache.catalina.ant.ListTask" />
    <taskdef name="start" classname="org.apache.catalina.ant.StartTask" />
    <taskdef name="stop" classname="org.apache.catalina.ant.StopTask" />
    <taskdef name="install" classname="org.apache.catalina.ant.InstallTask"/>
    <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
    <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/>     
    <target name="install" description="Install web application"
    depends="build">
    <install url="${url}" username="${username}" password="${password}"
    path="/${context.path}" war="file:${example.path}/${build}"/>
    </target>
    <target name="deploy"
    description="Deploys a Web application">
    <deploy url="${url}" username="${username}" password="${password}"
    path="/${context.path}" war="file:${war.path}"
    />
    </target>
    <target name="undeploy"
    description="Undeploys a Web application">
    <undeploy url="${url}" username="${username}" password="${password}"
    path="/${context.path}"
    />
    </target>
    <target name="redeploy"
    description="Undeploys and deploys a Web aplication">
    <antcall target="undeploy" />
    <antcall target="deploy" />
    </target>
    <target name="list"
    description="Lists Web applications">
    <echo message="Listing the applications...."/>
    <list
    url="${url}"
    username="${username}"
    password="${password}"
    />
    </target>
    <target name="start"
    description="Starts a Web application">
    <echo message="Starting the application...."/>
    <start
    url="${url}"
    username="${username}"
    password="${password}"
    path="/${context.path}"
    />
    </target>
    <target name="stop"
    description="Stops a Web application">
    <echo message="Stopping the application...."/>
    <stop
    url="${url}"
    username="${username}"
    password="${password}"
    path="/${context.path}"
    />
    </target>
    <target name="prepare"
    description="Creates the build directory" >
    <echo message="Creating the required directories...." />
    <mkdir dir="${build}/${example}" />
    </target>
    <target name="prepare-dist"
    description="Creates the dist directory" >
    <echo message="Creating the required directories...." />
    <mkdir dir="${dist}" />
    </target>
    <target name="set-wscompile" >
    <condition property="wscompile" value="${wscompile.dir}/wscompile.bat">
    <os family="windows"/>
    </condition>
    <condition property="wscompile" value="${wscompile.dir}/wscompile.sh">
    <not>
    <os family="windows"/>
    </not>
    </condition>
    </target>
    <target name="set-wsdeploy" >
    <condition property="wsdeploy" value="${wsdeploy.dir}/wsdeploy.bat">
    <os family="windows"/>
    </condition>
    <condition property="wsdeploy" value="${wsdeploy.dir}/wsdeploy.sh">
    <not>
    <os family="windows"/>
    </not>
    </condition>
    </target>
    <target name="compile-service" depends="prepare"
    description="Compiles the server-side source code">
    <echo message="Compiling the server-side source code...."/>
    <javac srcdir="${src}"
    destdir="${build}"
    includes="*.java"
    excludes="*Client.java">
    <classpath refid="compile.classpath"/>
    </javac>
    </target>
    <target name="setup-web-inf"
    description="Copies files to build/WEB-INF">
    <echo message="Setting up ${build}/WEB-INF...."/>
    <delete dir="${build}/WEB-INF" />
    <copy todir="${build}/WEB-INF/classes/${example}">
    <fileset dir="${build}/${example}" />
    <fileset dir="${build}/${example}" />
    </copy>
    <copy file="${build}/${model.file}" todir="${build}/WEB-INF" />
    <copy file="web.xml" todir="${build}/WEB-INF" />
    <copy file="jaxrpc-ri.xml" todir="${build}/WEB-INF" />
    </target>
    <target name="package-service" depends="prepare-dist"
    description="Packages the WAR file">
    <echo message="Packaging the WAR...."/>
    <delete file="${dist}/${portable.war}" />
    <jar jarfile="${dist}/${portable.war}" >
    <fileset dir="${build}" includes="WEB-INF/**" />
    </jar>
    </target>
    <target name="process-war" depends="set-wsdeploy"
    description="Runs wsdeploy to generate the ties and
    create a deployable WAR file">
    <delete file="dist/${deployable.war}" />
    <antcall target="run-wsdeploy">
    <param name="param1" value="-o dist/${deployable.war} dist/${portable.war}"/>
    </antcall>
    </target>
    <target name="run-wscompile" depends="prepare,set-wscompile"
    description="Runs wscompile">
    <echo message="Running wscompile:"/>
    <echo message=" ${wscompile} ${param1}"/>
    <exec executable="${wscompile}">
    <arg line="${param1}"/>
    </exec>
    </target>
    <target name="run-wsdeploy" depends="prepare,set-wsdeploy"
    description="Runs wsdeploy">
    <echo message="Running wsdeploy:"/>
    <echo message=" ${wsdeploy} ${param1}"/>
    <exec executable="${wsdeploy}">
    <arg line="${param1}"/>
    </exec>
    </target>
    <target name="generate-sei-service"
    description="Runs wscompile to generate the model file">
    <antcall target="run-wscompile">
    <param name="param1" value="-define -d ${build} -nd ${build}
    -classpath ${build} ${config.interface.file}
    -model ${build}/${model.file}"/>
    </antcall>
    <delete file="${build}/MyHelloService.wsdl"/>
    </target>
    <target name="generate-interface"
    description="Runs wscompile to generate the service endpoint
    interface">
    <antcall target="run-wscompile">
    <param name="param1" value="-import -d ${build} -nd ${build}
    -f:norpcstructures -classpath ${build} ${config.wsdl.file}"/>
    </antcall>
    </target>
    <target name="generate-stubs"
    description="Runs wscompile to generate the client stub classes">
    <antcall target="run-wscompile">
    <param name="param1" value="-gen:client -d ${build}
    -classpath ${build} ${config.wsdl.file}"/>
    </antcall>
    </target>
    <target name="compile-client" depends="prepare"
    description="Compiles the client-side source code" >
    <echo message="Compiling the client source code...."/>
    <javac srcdir="${src}"
    destdir="${build}"
    includes="*.java">
    <classpath refid="compile.classpath"/>
    <classpath path="${build}" />
    </javac>
    </target>
    <target name="package-client" depends="prepare-dist"
    description="Builds the JAR file that contains the client">
    <echo message="Building the client JAR file...."/>
    <delete file="${dist}/${client.jar}" />
    <jar jarfile="${dist}/${client.jar}" >
    <fileset dir="${build}" />
    </jar>
    </target>
    <target name="package-dynamic" depends="prepare-dist"
    description="Builds the JAR file that contains the dynamic proxy client">
    <echo message="Building the client JAR file...."/>
    <delete file="${dist}/${client.jar}" />
    <jar jarfile="${dist}/${client.jar}" >
    <fileset dir="${build}" includes="**/HelloClient.class" />
    <fileset dir="${build}" includes="**/HelloIF.class" />
    </jar>
    </target>
    <target name="build-service" depends="clean,compile-service,generate-sei-service,
    setup-web-inf,package-service,process-war"
    description="Executes the targets needed to build the service.">
    </target>
    <target name="build-static" depends="clean,generate-stubs,
    compile-client,package-client"
    description="Executes the targets needed to build a static stub client.">
    </target>
    <target name="build-dii" depends="clean,prepare,compile-client,package-client"
    description="Executes the targets needed to build a DII client.">
    </target>
    <target name="build-dynamic" depends="clean,prepare,generate-interface,
    compile-client,package-dynamic"
    description="Executes the targets needed to build a dynamic proxy client.">
    </target>
    <target name="build-webclient" depends="clean,generate-stubs"
    description="Executes the targets needed to build a web client.">
    </target>
    <target name="run-client"
    description="Runs a stand-alone (non-J2EE) client">
    <java classname="${client.class}" fork="yes" >
    <arg line="${endpoint.address}" />
    <classpath refid="run.classpath" />
    </java>
    </target>
    <target name="run-secure-client"
    description="Runs a client with basic authentication over SSL">
    <java classname="${client.class}" fork="yes" >
    <arg line="${username} ${password} ${endpoint.address}" />
    <classpath refid="run.classpath" />
    </java>
    </target>
    <target name="run-mutualauth-client"
    description="Runs a client with mutual authentication over SSL">
    <java classname="${client.class}" fork="yes" >
    <arg line="${key.store} ${key.store.password}
    ${trust.store} ${trust.store.password}
    ${endpoint.address}" />
    <classpath refid="run.classpath" />
    </java>
    </target>
    <target name="clean"
    description="Removes the build directory">
    <delete dir="${build}" />
    </target>
    <target name="listprops" depends="set-wscompile"
    description="Displays values of some of the properties of this
    build file">
    <echo message="jaxrpc.home = ${jaxrpc.home}" />
    <echo message="wscompile = ${wscompile}" />
    <echo message="build = ${build}" />
    <echo message="src = ${src}" />
    <echo message="dist = ${dist}" />
    <echo message=" " />
    <echo message="example = ${example}" />
    <echo message="client.jar = ${client.jar}" />
    <echo message="client.class = ${client.class}" />
    <echo message=" " />
    <echo message="host = ${host}" />
    <echo message="port = ${port}" />
    <echo message="secure.port = ${secure.port}" />
    <echo message="trust.store = ${trust.store}" />
    <echo message="trust.store.password = ${trust.store.password}" />
    <echo message=" " />
    <echo message="username = ${username}" />
    <echo message="password = ${password}" />
    <echo message="url = ${url}" />
    <echo message=" " />
    <echo message="context.path = ${context.path}" />
    <echo message="secure.context.path = ${secure.context.path}" />
    <echo message="url.pattern = ${url.pattern}" />
    <echo message="endpoint.address = ${endpoint.address}" />
    <echo message="secure.endpoint = ${secure.endpoint}" />
    <echo message=" " />
    <echo message="war.path = ${war.path}" />
    <echo message="portable.war = ${portable.war}" />
    <echo message="deployable.war = ${deployable.war}" />
    </target>
    ==================================================================================
    File: targets.xml ( C:\jwstutorial13\examples\common\targets.xml)
    <taskdef name="list" classname="org.apache.catalina.ant.ListTask"/>
    <taskdef name="install" classname="org.apache.catalina.ant.InstallTask"/>
    <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
    <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/>     
    <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"/>     
    <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/>     
    <target name="list" description="List web applications" >
    <list url="${url}" username="${username}" password="${password}" />
    </target>
    <target name="install" description="Install web application"
    depends="build">
    <install url="${url}" username="${username}" password="${password}"
    path="/${context.path}" war="file:${build}"/>
    </target>
    <target name="reload" description="Reload web application"
    depends="build">
    <reload url="${url}" username="${username}" password="${password}"
    path="/${context.path}"/>
    </target>
    <target name="remove" description="Remove web application">
    <remove url="${url}" username="${username}" password="${password}"
    path="/${context.path}"/>
    </target>
    <target name="package"
    description="Packages the WAR file">
    <echo message="Packaging the WAR...."/>
    <delete file="dist/${war.file}" />
    <jar jarfile="dist/${war.file}" >
    <fileset dir="${build}" />
    </jar>
    </target>
    <target name="deploy" description="Deploy a Web application">
    <deploy url="${url}" username="${username}" password="${password}"
    path="/${context.path}" war="file:/${example.path}/dist/${war.file}"
    />
    </target>
    <!--<target name="deploy" description="Deploy a Web application">
    <deploy url="${url}" username="${username}" password="${password}"
    path="/${context.path}" war="file:/${example.path}/dist/${war.file}"
    />
    </target> -->
    <target name="undeploy" description="Undeploy web application">
    <undeploy url="${url}" username="${username}" password="${password}"
    path="/${context.path}"/>
    </target>
    ==================================================================================
    File: build.properties (C:\jwstutorial13\examples\common\build.properties)
    tutorial.home=C:/jwstutorial13
    tutorial.install=${tutorial.home}
    username=******
    password=********
    host=localhost
    port=8080
    secure.port=8443
    url=http://${host}:${port}/manager
    ==================================================================================
    Finally, here is how I've got my PATH Environmental Variable Set:
    PATH:
    %JWSDP_HOME%\apache-ant\bin;%JWSDP_HOME%\jwsdp-shared\bin;%JWSDP_HOME%\bin;%JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\
    I set this up according to the instructions at the beginning of the tutorial.
    JWSDP_HOME: C:\jwsdp-1.3
    JAVA_HOME: C:\j2sdk1.4.1_05
    Thanks again for your help.
    Sheila

  • JAX-RPC RI expert

    Hi,
    I am trying to use wscompile (JWSDP 1.3) to compile a web service that has a method whose return type
    is a class below.
    package sample;
    public class Test {
    public Test() { }
    I got an error: invalid type for JAX-RPC structure: test.Test
    Now strange enough, if I add a member say (private int x) to that class along with setter and getter methods, it works fine.
    Can anyone tell me what is wrong with the class above. Sounds like it violates the spec, which I can't think
    why.
    Any input is greatly appreciated.

    Hi,
    I'll suggest that it won't 'compile' because it has no methods. When you add setters / getters it then has methods which can be invoked.
    As it stands has nothing for JAX-RPC to invoke
    Nick

  • JAX-RPC 9.0.4   --- Data Types Supported

    Hi,
    does any body know is java.util.List is a supported Datatype on OC4j 9.0.4.2 for JAX-RPC.
    Cheers
    Gaurav

    Gaurav,
    Not sure which version of JAX-RPC you are intended to run on top of 9.0.4.2 ?
    In any way, if you want your service to work with the majority of the clients, you need to focus on the XML types; not the java types.
    To my knowledge, the List will be mapped to a proprietary type, at best, which make it harder to re-use.
    All the best,
    Eric

  • How to disable http for JAX-WS

    Hi everybody,
    I am facing the problem that I want only https (In the form of one-way-ssl) to be enabled for a web service. In other words, I want to disable the http part.
    For JAX-RPC there used to be the WLHttpsTransport annotation or ant element but they are not available for JAX-WS.
    I know I could restrict the http access by providing a policy file but this is not exactly what I want.
    I don't want the service to report back to the client that some security constraint restricts the access to http. I want the server to report that this ressource is simply not available.
    Do you know of a way to do this?
    Cheers
    Slawo.

    Hi,
    You can add the following entry inside your *"web.xml"* ...
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>app or resource name</web-resource-name>
    <url-pattern>/*</url-pattern> <!-- define all url
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <font color=maroon>
    <user-data-constraint>
    *<transport-guarantee>CONFIDENTIAL</transport-guarantee>*
    </user-data-constraint>
    </font>
    </security-constraint>
    Above will force any Http request to be automatically be converted into HTTPS.
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are here)

  • Help install jwsdp 1.0 and run JAX-RPC  example

    I installed jwsdp1.0 today and I tried to run the Hello world example for JAX-RPC (http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXRPC3.html).
    The problem is with any command passed at the console (ant command or startup (tomcat), deploytool, etc) I always get the following message : Exception in thread "main" java.lang.NoClassDefFoundError: Files/Microsoft.
    The operating system in win XP and jre is 1.4.0.
    The variables I used are JAVA_HOME (D:\Java\j2sdk1.4.0)
    and JWSPD_HOME (d:\java\jwsdp-1_0). Both bin folder are setup on the path variable (%JAVA_HOME%\bin;%JWSPD_HOME%\bin).
    Help will be very much appreciated

    Maybe this is just a typo in your post, but the variable name should be JWSDP_HOME, not JWSPD_HOME.
    Mike

  • JAX-RPC screen does not appear when generating a WS proxy

    I'm using JDev 11.1.1.2. When I tried to generate a Web Service proxy, this screen does NOT appear most of the time. I only saw it appear one time. Do you know why?
    It's step 2 of the wizard.
    Client Style
    + JAX-RPC Web Logic Style
    + JAX-WS Style

    Whenever one tries to generate web service proxies for the first time, JDeveloper allows the user to choose the client style (JAX-RPC Web Logic Style OR JAX-WS Style).
    Once the option is selected, JDeveloper automatically adds the dependent jars in the classpath. When one tries to generate the proxies a second time,
    JDeveloper does not provide an option to select the client type. It defaults to the one which was selected for the first time.
    I was able to overcome the problem using the following approach.
    1. For JAX-RPC client style:
    Right Click the Model (or ViewController) project -> Project Properties -> Libraries and Classpath ->
    Add Library -> select JAX-RPC Web Logic Client, JAX-RPC 11 Web Services
    Remove JAX-WS Web Services library (if present)
    2. For JAX-WS client style:
    Right Click the Model (or ViewController) project -> Project Properties -> Libraries and Classpath ->
    Add Library -> JAX-WS Web Services
    Remove JAX-RPC related libraries (if present)
    I am using Jdeveloper Version 11.1.1.4.0
    - Pranab Garad

Maybe you are looking for

  • Separating obiee server and presentation services via Web Logic Server

    Hello, I'm attempting to Install OBIEE Server 11.1.1.3.0 on Linux (box A). I also am installing Web Logic Server 10.3.3 on Linux (box B) with the plan of deploying presentation services on WLS. I originally did the following: 1. setup Repositoyr usin

  • FM to update output type in sales order

    Hi folks, my problem it's the following, if you update a sales order in tcode va02 and I change the status, automatically it's assigned the output type to this status, that is working fine,  I'm maintaining a report that it changes the status to the

  • How do I save clips individually

    I'm somewhat new to GB, so this should be an easy one. I started working on a project, then decided that since I'll be importing many clips into a Final Cut Project, that I want all my clips to be saved/stored individually. I checked the package cont

  • How to install Quicktime after error -3

    If you're trying to install iTunes on Windows and it dies during the Quicktime installation with a "-3″ error, the way to fix it is to: 1. Open regedit 2. Navigate to HKEYCLASSESROOT –> Installer and select Products 3. Use the Find menu to find quick

  • BR100 for TELESALES

    BR100 for TELESALES I am looking for a BR100 for TELESALES. I have looked in multiple places and have not been able to find one.If anyone knows where I can download one please send me the link. If there is some place to find it, in OPN site let me kn