How to compile and deploy JAX-WS web service from commandline (!) ?

I have read a couple of tutorials about how to create and deploy web services with
certain IDEs (e.g. Eclipse).
But I found no guide on how to compile a java web service source from command line !!
Lets say I have a java source class with annotations inside (like "@WebMethod").
How do I generate with the built-in j2ee v5 tools from a web service from command line and deploy it e.g. to TomCat or JBoss ?
Is there somewhere such a simple step-by-step intro?
Thx
Peter

You can download JWSDP 2.0 from sun and install it. Under jaxws (the installed directory) you can find sample directory which has build.xml can be run from command prompt using ant. if you want in detail means go through the build.xml and use wsgen.bat or wsimport under the bin directory of jaxws
Edited by: Muyallu_Bala on Apr 14, 2008 5:49 AM

Similar Messages

  • Calling One Jax RPC Web Service from another in Oracle AS 10.1.3

    We have a number of services residing in the same Oracle 10.1.3 app server container. These are deployed as Jax RPC Web Services
    I am trying to figure out what are the different options to have once web service invoke an operation on another (without directly linking to the Java code). The reason we want to keep separation as far as possible is that these services may later migrate to different app servers and in the spirit of SOA all we want to change when a service migrates is address and would like everything else to remain the same.
    So for example, if Web Service A needs to invoke an operation X in web service B,
    One way to do this seems to be to generate a proxy for web service B, include the proxy in Web Service A and then simply do B.X() from Web Service A.
    Is this is the best way to do it ?
    Are there other alternative approaches available ? Such as using the built in ESB features of Oracle App Server 10.1.3?
    Any pointers will be greatly appreciated.
    Thanks
    RR

    Found document of 10.1.3.1.0 how to Creating a Custom Identity Service Plug-in
    Oracle® BPEL Process Manager Administrator's Guide
    10g (10.1.3.1.0)
    Part Number B28982-03
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28982/plugin.htm
    But may be no help.

  • Calling One Jax/rpc web service from another.

    We have a number of services residing in the same Oracle 10.1.3 app server container. These are deployed as Jax RPC Web Services
    I am trying to figure out what are the different options to have once web service invoke an operation on another (without directly linking to the Java code). The reason we want to keep separation as far as possible is that these services may later migrate to different app servers and in the spirit of SOA all we want to change when a service migrates is address and would like everything else to remain the same.
    So for example, if Web Service A needs to invoke an operation X in web service B,
    One way to do this seems to be to generate a proxy for web service B, include the proxy in Web Service A and then simply do B.X() from Web Service A.
    Is this is the best way to do it ?
    Are there other alternative approaches available ? Such as using the built in ESB features of Oracle App Server 10.1.3?
    Any pointers will be greatly appreciated.
    Thanks
    RR

    Hi all,
    I've managed to get this working by using the following property settings:
    System.getProperties().setProperty("http.proxyHost", "Proxy_Hostname");
    System.getProperties().setProperty("http.proxyPort", "8080");
    System.getProperties().setProperty("http.nonProxyHosts", "localhost,hostbox09");
    And solving the authentication problem using this property setting on the java cmd line:
    -Dweblogic.net.proxyAuthenticatorClassName=com.mycompany.MyProxyAuthenticator
    This class is an impl class of weblogic.common.ProxyAuthenticator interface.
    The other thing to note is that MyProxyAuthenticator needs to be in the server pre_classpath.
    Then I just call JAX-RPC or JAX-WS web service client calls as normal.
    Regards,
    Paul

  • Can not access JAX-WS web service from mobile or desktop as client

    Hello Dears,
    I developed a web service and client for that web service, and every thing is ok, but when secure the web service and try to invoke it from it's static stub from desktop application or from mobile appliaction it failed and it gice me this error,
    Exception in thread "main" com.sun.xml.ws.client.ClientTransportException: HTTP
    transport error: javax.net.ssl.SSLHandshakeException:
    sun.security.validator.ValidatorException: PKIX path building failed:
    sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid
    certification path to requested target
    at
    com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:134)
    at
    com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:140)
    at
    com.sun.xml.xwss.XWSSClientPipe.process(XWSSClientPipe.java:118)
    at
    com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
    at
    com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
    at
    com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
    at
    com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
    at
    com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
    at
    com.sun.xml.ws.client.Stub.process(Stub.java:248)
    at
    com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
    at
    com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
    at
    com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at
    com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
    at
    $Proxy34.add(Unknown Source)
    at
    com.myeclipse.ws.WebServiceClient.main(WebServiceClient.java:11)
    so, what i can do to fix this error.

    WIS is not suppported on WLS JAX-WS. You'll need to use other authentication mechanisms such as http basic (which you tried already), or message-level security such as UNT, or SAML.
    Regards,
    Pyounguk

  • How to pass username/password to BPEL web service from java proxy?

    Hi all,
    Environment : SOA Suite 11g
    I am using basic http authentication in my SOA services using "oracle/wss_http_token_client_policy" policy. Now i need to invoke these SOA web services from a java proxy.
    Please let me know how this can be done.
    Thanks in advance

    Have you tried the below posts ?
    BPEL to invoke Webservice secured with HTTP Basic authentication
    Invoke a BPEL process using HTTP Basic Authentication
    http://docs.oracle.com/cd/E21764_01/web.1111/e13713/owsm_appendix.htm#CHDBAHBI
    Thanks,
    Vijay

  • How to compile and deploy an ejb into Sun ONE app.server 7.0

    I am new to Sun ONE application server. I Have .java files and deployment descriptor files with me. How should proceed. When i tried to use asant it is saying that build.xml not found. I copied build.xml from some other directory to the current directory. Then it is saying that common.xml not found. Please help.
    Regards,
    Nagaraju.

    Hi,
    The build.xml file should be in a directory from where
    you are running the asant command.
    To resolve the common.xml file not found error,
    open your build.xml and check from which location the common.xml file is incuded.
    In the sample application it is four directories above
    the directory where build.xml is located.
    You can copy the common.xml in the current directory and then change the following in your build.xml
    <!ENTITY include SYSTEM "../../../../common.xml">
    to <!ENTITY include SYSTEM "common.xml">
    Hope this helps.
    Get back in case you have more issues

  • Creating And Deploying A JWSDP Web Service Client to Weblogic 8.1

    This setup produces an EAR containing a message driven bean in a jar file. When the MDB receives a message
    it checks to see if there is any data in a database table and if so calls the web service with that data. These instructions
    are for MS-Windows environments.
    In my setup I have:
    the weblogic domain at c:\b2b80
    the jwsdp at c:\apps\jwsdp-1.3
    extra jar files for the app server in c:\b2b80\lib
    the main weblogic installation at c:\apps\weblogic810\
    1> Download the the JWSDP version you wish to use and install it. (In this example I'm using 1.3)
    2> Create a project structure for you client like this:
         /project
              /earbuild
                   /META-INF
              /ejbbuild
                   /META-INF
              /ejbsource
              /wssource
    3> in the /project directory you will need a build.xml file that looks something like this: (the ant build targets are described at the end of this document)
    ==============================================================
    <?xml version="1.0"?>
    <project name="svcowner" default="buildall" basedir=".">
         <property file="classpath.settings"/>
         <property name="wssource" value="wssource"/>
         <property name="ejbsource" value="ejbsource"/>
         <property name="compileejbdest" value="ejbbuild"/>
         <property name="earbuilddest" value="earbuild"/>
         <property name="jarfilename" value="svcownerejb.jar"/>
         <property name="earfilename" value="svcowner.ear"/>
         <property name="debug" value="true"/>
         <property name="deprecation" value="true"/>
         <!-- this runs the create.bat which has all of the wscompile parameters -->
         <target name="cmdline_wscompile">
              <exec executable="wssource/create.bat"/>
         </target>
         <target name="compileejb" depends="cmdline_wscompile">
              <javac debug="${debug}" srcdir="${wssource}" classpath="${BUILD_CLASSPATH}"
                   destdir="${compileejbdest}" includes="**/*.java" deprecation="${deprecation}"/>
              <javac debug="${debug}" srcdir="${ejbsource}" classpath="${BUILD_CLASSPATH}"
                   destdir="${compileejbdest}" includes="**/*.java" deprecation="${deprecation}"/>
         </target>
         <target name="buildejbjar" depends="compileejb">
              <jar jarfile="${earbuilddest}/${jarfilename}" manifest="${compileejbdest}/META-INF/MANIFEST.txt">
                   <fileset dir="${compileejbdest}">
                        <include name="**/*.*"/>
                   </fileset>
              </jar>
         </target>
         <target name="buildear" depends="buildejbjar">
              <jar jarfile="${earfilename}">
                   <fileset dir="${earbuilddest}">
                        <include name="**/*.*"/>
                   </fileset>
              </jar>
         </target>
         <target name="deploy">
              <copy file="${earfilename}" todir="../../config/domain/applications"/>
         </target>
         <target name="buildall" description="build everything" depends="buildear, deploy">
         </target>
    </project>
    ==============================================================
    4> You need a matching classpath.settings file in the same directory, something like this:
    ==============================================================
    BUILD_CLASSPATH=/b2b80/lib/saaj-impl.jar;/b2b80/lib/saaj-api.jar;/b2b80/lib/jaxrpc-api.jar;/b2b80/lib/jaxrpc-impl.jar;c:/b2b80/lib/jaxrpc-spi.jar/b2b80/classes/;/b2b80/classes;/apps/weblogic810/server/lib/weblogic.jar;/apps/weblogic810/server/lib/weblogic_sp.jar;/apps/weblogic810/server/lib/xmlx.jar;/apps/weblogic810/server/ext/weblogic-tags.jar;/apps/weblogic810/server/ext/jdbc/oracle/920/ojdbc14_g.jar;/b2b80/lib/log4j.jar
    ==============================================================
    5> In the /project/earbuild/META-INF directory you need an application.xml file:
    ==============================================================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
    <application>
    <display-name>svcownerb2b</display-name>
    <description>Application description</description>
    <module>
    <ejb>svcownerejb.jar</ejb>
    </module>
    </application>
    ==============================================================
    6> The /project/ejbsource directory contains the source for the client application. In my case this is a message driven bean (note that code below isn't complete). The most important part of the code below is the setting of the javax.xml.soap.MessageFactory system property.
    System.getProperties().put("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
    If you don't do this a weblogic class will be used and the code will fail.
    ==============================================================
    package com.svcclient.ejb.svcownershipment;
    import java.text.*;
    import java.io.*;
    import java.sql.*;
    import java.util.Properties;
    import javax.ejb.*;
    import javax.jms.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    import com.svcclient.util.*;
    import org.w3c.dom.*;
    import com.svcclient.websvc.svcowner.*;
    import javax.xml.rpc.Stub;
    public class SvcOwnerShipmentSubscriberMDB implements MessageDrivenBean, MessageListener
    private transient MessageDrivenContext mdc = null;
    private static Context context;
    private final static String CLASSNAME = "SvcOwnerShipmentSubscriberMDB";
    private String DATASOURCE_JNDI = "svcclient.b2b";
    private static DataSource mDS = null;
    private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    public SvcOwnerShipmentSubscriberMDB()
    System.getProperties().put("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
    try
    if (context == null)
    context = new InitialContext() ;
    if (mDS == null)
    mDS = (DataSource)context.lookup(DATASOURCE_JNDI);
    catch (NamingException ex)
    ex.printStackTrace();
    catch(Exception ex)
    ex.printStackTrace();
    public void onMessage(javax.jms.Message message)
    TextMessage msg = null;
    String ordernumber = null;
    String lineid = null;
    try
    if (message instanceof TextMessage)
    msg = (TextMessage) message;
    ordernumber = msg.getStringProperty("ordernumber");
                   // the JMS message contains a property that is an order number
    createAndSendXML(ordernumber);
    catch (Throwable ex)
    ex.printStackTrace();
    private void createAndSendXML(String ordernumber)
    if(ordernumber==null)
    return;
    PreparedStatement statement = null;
    ResultSet rset = null;
    java.sql.Connection conn = null;
    try
    conn = DBHelper.getConnection(mDS,"SvcOwnerShipmentSubscriberMDB.createAndSendXML");
    statement = conn.prepareStatement("select * from ..."); // you SQL here
    statement.setString(1,ordernumber);
    rset = statement.executeQuery();
    StringBuffer data = new StringBuffer();
    data.append("<? version=\"1.0\"?>\n");
    data.append("<shippingRequest>\n");
    while(rset.next())
    data.append("\t<order_date>"+dateFormat.format(new java.util.Date(rset.getTimestamp("SCHEDULE_SHIP_DATE").getDate()))+"</order_date>\n");
    data.append("\t<brand_name>svcclient</brand_name>\n");
    data.append("\t<shipRequestType>Sale</shipRequestType>\n");
    data.append("</shippingRequest>\n");
              // call the web service with the data from the database
    DataExchanger_Impl impl = new DataExchanger_Impl();
    Stub stub = (Stub)(impl.getDataExchangerSoap());
    DataExchangerSoap dx = (DataExchangerSoap)stub;
    String resp = dx.exchangeData("svcclient", "mypassword", "Sales", data.toString());
    catch(SQLException sqle)
    sqle.printStackTrace();
    catch(Exception e)
    e.printStackTrace();
    finally
    try
    if (rset != null)
    rset.close();
    if (statement != null)
    statement.close();
    if (conn != null)
    conn.close();
    catch(Exception x){}
    public void ejbCreate() { System.out.println("In SvcOwnerShipmentSubscriberMDB.ejbCreate()"); }
    public void setMessageDrivenContext(MessageDrivenContext mdc) { this.mdc = mdc; }
    public void ejbRemove() throws javax.ejb.EJBException { System.out.println("In SvcOwnerShipmentSubscriberMDB.remove()"); }
    ==============================================================
    7> The /project/ejbbuild/META-INF directory needs a MANIFEST.txt file.
    Manifest-Version: 1.0
    8> The /project/ejbbuild/META-INF directory needs a ejb-jar.xml file. This just sets up the MDB which is the client.
    ==============================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>SvcOwnerShipmentSubscriberMDB</display-name>
    <enterprise-beans>
    <message-driven>
    <display-name>SvcOwnerShipmentSubscriberMDB</display-name>
    <ejb-name>SvcOwnerShipmentSubscriberMDB</ejb-name>
    <ejb-class>com.svcclient.ejb.svcownershipment.SvcOwnerShipmentSubscriberMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>NonDurable</subscription-durability>
    </message-driven-destination>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>SvcOwnerShipmentSubscriberMDB</ejb-name>
    <method-name>onMessage</method-name>
    <method-params>
    <method-param>javax.jms.Message</method-param>
    </method-params>
    </method>
    <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    ==============================================================
    9> The /project/ejbbuild/META-INF directory needs a weblogic-ejb-jar.xml file.
    ==============================================================
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN" "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>SvcOwnerShipmentSubscriberMDB</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>5</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <!-- JNDI Name of the Topic that the SvcOwnerShipmentSubscriberMDB listens for messages on -->
    <destination-jndi-name>jms.svcownerShipmentsTopic</destination-jndi-name>
    </message-driven-descriptor>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ==============================================================
    10> The /project/wssource directory needs a dataexchange.wsdl file. This is the WSDL describing the web service
    we want to connect to with our client.
    ==============================================================
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns="https://www.svcowner.com/mfg/DataExchange/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    targetNamespace="https://www.svcowner.com/mfg/DataExchange/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    name="">
    <wsdl:types>
    <s:schema elementFormDefault="qualified"
    targetNamespace="https://www.svcowner.com/mfg/DataExchange/">
    <s:element name="exchangeData">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="sender" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="transactionType" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="exchangeDataResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="exchangeDataResult" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </wsdl:types>
    <wsdl:message name="exchangeDataSoapIn">
    <wsdl:part name="parameters" element="tns:exchangeData" />
    </wsdl:message>
    <wsdl:message name="exchangeDataSoapOut">
    <wsdl:part name="parameters" element="tns:exchangeDataResponse" />
    </wsdl:message>
    <wsdl:portType name="DataExchangerSoap">
    <wsdl:operation name="exchangeData">
    <wsdl:input message="tns:exchangeDataSoapIn" />
    <wsdl:output message="tns:exchangeDataSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="DataExchangerSoap" type="tns:DataExchangerSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="exchangeData">
    <soap:operation soapAction="https://www.svcowner.com/mfg/DataExchange/exchangeData"
    style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="DataExchanger">
    <wsdl:port name="DataExchangerSoap" binding="tns:DataExchangerSoap">
    <soap:address location="https://svc.svcowner.com/mfg/dataexchange.php" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    ==============================================================
    10> The /project/wssource directory needs a websvc_config.xml file. This file tells wscompile where
    to find the WSDL file and the package name for the generated classes.
    ==============================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
         <wsdl location="wssource/dataexchange.wsdl" packageName="com.svcclient.websvc.svcowner"/>
    </configuration>
    ==============================================================
    11> The /project/wssource directory needs a create.bat file. This just sets up the environment
    and calls the wscompile batch file in the JWSDP. I had to tweak the wscompile.bat file to match
    my environment as well.
    ==============================================================
    SETLOCAL
    SET WSDP=C:\apps\jwsdp-1.3\
    SET ANT_HOME=%WSDP%;apache-ant
    SET PATH=%ANT_HOME%\bin;%WSDP%jaxrpc\bin;%PATH%
    SET JAVA_HOME=c:\apps\weblogic810\jrockit81sp2_141_05
    call wscompile -gen:client -s ./wssource -keep -g -d ejbbuild wssource/websvc_config.xml
    ==============================================================
    12> The /project directory needs a build.bat file. Just a way for me to make sure my
    environment is set up right before doing the build.
    ==============================================================
    SETLOCAL
    SET ANT_HOME=c:\apps\jakarta-ant-1.4.1
    SET PATH=%ANT_HOME%\bin;%PATH%
    SET JAVA_HOME=c:\apps\weblogic810\jrockit81sp2_141_05
    call ant -buildfile build.xml %1 %2 %3 %4 %5 %6 %7 %8 %9
    ==============================================================
    13> You need to copy the following jar files from the JWSDP into a location they can be used by the
    app server during run time and also for the build process. In my set up this is c:\b2b80\lib. Note that
    these are pointed to by the file in step 4.
    c:\apps\jwsdp-1.3\jaxrpc\lib\jaxrpc-api.jar
    c:\apps\jwsdp-1.3\jaxrpc\lib\jaxrpc-impl.jar
    c:\apps\jwsdp-1.3\jaxrpc\lib\jaxrpc-spi.jar
    c:\apps\jwsdp-1.3\saaj\lib\saaj-api.jar
    c:\apps\jwsdp-1.3\saaj\lib\saaj-impl.jar
    14> You must make sure that the jar file in step 13 are at the front of the classpath for the
    weblogic server. WL comes with classes that conflict with these jars.
    15> I also had to add the root ssl certificate from the partners certificate authority to the java keystore
    using the keytool because this service uses SSL:
    C:\apps\weblogic810\jrockit81sp2_141_05\jre\bin>keytool -import -keystore ..\lib\security\cacerts -alias svcownerroot -keypass password -file c:\temp\svcownerroot.cer
    ==============================================================
    So the idea is this, you run the /project/build.bat file from within the /project directory. This
    calls ant which uses the build.xml file to create everything and copy the EAR to the weblogic deployment
    directory. The default ant target is buildall.
    The cmdline_wscompile target runs the /project/wssource/create.bat file which in turn runs the wscompile.bat
    file from the jwsdp. This causes the dataexchange.wsdl file to processed and the client files to be generated.
    The generated java files go into the /project/wssource directory. The generated class files go into the
    /project/ejbbuild directory. They need to be there so the MDB can use them.
    Next the compileejb ant target compiles the MDB java file and places the resulting class file into the
    /project/ejbbuild directory.
    Next the buildejbjar ant target takes everything in the /project/ejbbuild directory and creates the ejb jar
    file that will be included in the EAR. This file is placed in the /project/earbuild directory.
    Finally the buildear ant target takes everything in the /project/ejbbuild directory and produces the EAR
    file for deployment. The EAR file is placed in the /project directory.
    The deploy task simply copies the EAR file into the weblogic domain applications directory.

    It's really the web service that determines what kind of authentication is required. You can't just use any old strategy. If the web service isn't expecting it in that form, it won't work. Typically, either HTTP BASIC Auth or WS-Security is used. You'd have to contact the people responsible for the web service to know what kind of auth it requires.

  • How we can call asynchronous jax-ws web services in OSB 10g r3?

    Hello everybody,
    We're using the Oracle Service BUS 10.3 here, and we'd like to make some calls from business services to web services in some asynchronous way.
    We know Jax-ws provides the callback way and the pooling async way to call it, but as this kind of "operations" are generated in the service consumer stub (and our service consumer rigth now is the OSB itself through the Business Service), we are trying to discover how Oracle Service BUS would use this async feature.
    IMHO, the callback approach would be better, since the response pipeline itself should be trigged when the response is ready.
    Is the OSB 10.3 ready to use async calls with Jax-WS or we should continue using Jax-Rpc with soap over xml to solve this issue?
    Thanks!
    Edited by: lucas.teixeira on 26/05/2009 05:05

    It is important to remember that in our situation here, we'd like to use the Jax-Ws specification. We could use the Jax-RPC and call our service using the JMS transport and the @WLJmsTransport, we know, but this is out of our plans, since the WL implementation of it will enqueue every requisition in just one consumer for the WS.
    Anyone can help us calling async jax-ws services from the OSB ?
    Thanks!

  • Deploying JAX-WS web service to weblogic server 9.2

    Hi,
    I want to deploy webservice created with JAX-WS 2.1 RI to BEA Weeblogic Server 9.2. After some research on forums and groups I have:
    sun-jaxws.xml
    <endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0">
    <endpoint name="TSOrganization"
    implementation="service.TsOrganizationImpl"
    url-pattern="/SOA/tsorganization"/>
    </endpoints>
    web.xml
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <listener>
    <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>TsOrganization</servlet-name>
    <servlet-class>sun.com.xml.ws.transport.http.servlet.WSServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>TsOrganization</servlet-name>
    <url-pattern>/SOA/tsorganization</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    weblogic.xml
    <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
    <context-root>/SOA/tsorganization</context-root>
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    </weblogic-web-app>
    weblogic-application.xml
    <weblogic-application xmlns="http://www.bea.com/ns/weblogic/90">
    <application-param>
    <param-name>webapp.encoding.default</param-name>
    <param-value>UTF-8</param-value>
    </application-param>
    <prefer-application-packages>
    <package-name>javax.jws.*</package-name>
    </prefer-application-packages>
    </weblogic-application >
    application.xml
    <application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
    <display-name>TSOrganization</display-name>
    <module>
    <web>
    <web-uri>TsOrganizationWS.war</web-uri>
    <context-root>/SOA/tsorganization</context-root>
    </web>
    </module>
    </application>
    I've included all the libraries from JAX-WS 2.1.3 into WEB-INF/lib in war file, packed it into ear and deployed. When I try to start deployed application I get following error:
    javax.servlet.ServletException: [HTTP:101249][weblogic.servlet.internal.WebAppServletContext@aed2df - appName: 'TSOrganization', name: '/SOA/tsorganization', context-path: '/SOA/tsorganization']: Servlet class sun.com.xml.ws.transport.http.servlet.WSServlet for servlet TsOrganization could not be loaded because the requested class was not found in the classpath . java.lang.ClassNotFoundException: sun.com.xml.ws.transport.http.servlet.WSServlet.
    although the missing class is in jaxws-rt.jar included in WEB-INF/lib folder.
    Any ideas what to try next?

    Ok.. with some help I found the error...
    servlet class is com.sun... and not sun.com :-S
    but everything else is right.. so it can be like reference for deploying jaxws service on weblogic 9.2.

  • How to pass XMLNode to JAX-RPc web service

    I am new to web services using JAX-RPC.
    Here is my problem. I need to pass Node object from org.w2c.dom.Node to webservice (using JAX-RPC) and return canonicalBytes back to client.
    I know I cannot pass Node directly as a parameter to the method (checked Java Language Typed supported by JAX-RPC).
    So to cheat the system, I put in this Node object into a vector and then passed this vector to web service.
    Here is the exception:-
    java.rmi.RemoteException: serialization error: no serializer is registered for (class oracle.xml.parser.v2.XMLElement, null); nested exception is:
         serialization error: no serializer is registered for (class oracle.xml.parser.v2.XMLElement, null)
         at com.peppercoin.webservice.security.ISignatureVerification_Stub.getCanonicalBytes(ISignatureVerification_Stub.java:77)
         at HelloClient.main(HelloClient.java:29)
    Caused by: serialization error: no serializer is registered for (class oracle.xml.parser.v2.XMLElement, null)
         at com.sun.xml.rpc.encoding.DynamicSerializer.getSerializerForObject(DynamicSerializer.java:69)
         at com.sun.xml.rpc.encoding.DynamicSerializer.serialize(DynamicSerializer.java:52)
         at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.serialize(ReferenceableSerializerImpl.java:59)
         at com.sun.xml.rpc.encoding.soap.CollectionSerializer.serializeArrayElements(CollectionSerializer.java:72)
         at com.sun.xml.rpc.encoding.soap.CollectionSerializer.serializeArrayInstance(CollectionSerializer.java:55)
         at com.sun.xml.rpc.encoding.soap.CollectionSerializerBase.serialize(CollectionSerializerBase.java:98)
         at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.serialize(ReferenceableSerializerImpl.java:59)
         at com.peppercoin.webservice.security.ISignatureVerification_getCanonicalBytes_RequestStruct_SOAPSerializer.doSerializeInstance(ISignatureVerification_getCanonicalBytes_RequestStruct_SOAPSerializer.java:62)
         at com.sun.xml.rpc.encoding.ObjectSerializerBase.serialize(ObjectSerializerBase.java:100)
         at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.serialize(ReferenceableSerializerImpl.java:59)
         at com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.java:441)
         at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:63)
         at com.peppercoin.webservice.security.ISignatureVerification_Stub.getCanonicalBytes(ISignatureVerification_Stub.java:60)
         ... 1 more
    Every works great as long as i put in strings in Vector.
    Is there a work around or did i miss anything, Please help
    I am using Oracle Parser
    Thanks
    Sagar Malisetti

    You can't "cheat the system" this way. The serializer for Vector is trying to find a serializer for the elements in the Vector instance that it received. So, it is trying to find a serializer for whatever is the the runtime type of your org.w3c.dom.Node. When it can't find such a serializer in the TypeMappingRegistry, it throws the exception.

  • How to supervise (and fix) using BPEL web services in AIA?

    We have unbelievably many problems with using AIA & web services concerned. Is there any way of online monitoring using the web services, checking data/parameters provided and fixing what needed - before a disasters comes? The supervising layer should work WITHOUT the same environment (rather on the system level) in order to be on a qualitative much higher reliability level. I would gratefully appreciate any experience to help us from heavy problems...

    Hello,
    With one button you want to perform 3(Create, Update and Delete) operation
    To create:
    First check whether the data exist with full combination of Name,Desc and City.
    If not exist you can execute the create function.
    If exist, get confirmation to delete the item by pop up. Using item ID you can perform Delete operation
    To Update:
    How you want to update the item, by keeping unique value or combination of columns?
    based on that you can perform the update operation.
    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

  • How to embed user credentials in Secured Web Service from OBIEE 11gFMW?

    I am trying to invoke a webservice that I successfully exposed as a WSDL Web Service using EBS Integrated SOA Gateway. I am using OBIEE 11g Action Framework which uses WebLogic.
    Here are the steps I completed:
    - I exposed a WSDL web service in EBS R12 via Integrated SOA Gateway
    - I granted the access to this service in EBS R12 to user SYSADMIN
    - I used OBIEE 11g to make a Action to call the Web service (using Action Framework) by searching for the WSDL
    - When I try to execute the action: I get the error:
    Action could not be invoked.
    ServiceExecutionFailure :
    Error invoking web service HR_PHONE_API_Service at endpoint http://ip-10-87-33-3.ec2.internal:8000/webservices/SOAProvider/plsql/hr_phone_api/ Missing <wsse:Security> in SOAP Header
    PROBLEM: I am unsure how to add the credentials for SYSADMIN user and password to add the SOAP username/pwd to the outgoing call. According to the documentation in the Integrators guide, FMW Security guide, and Web Logic guides..seems we have to configure the SOAP call to have the proper credentials. The documentation is not very clear on exactly how to do this. I tried to set up the credential store and an account in ActionFrameWorkConfig.xml but I am still missing something. I am logged into OBIEE as biadmin and I am trying to call a webservie in EBS that is granted to SYSADMIN/sysadmin user. Pls advise.

    I am trying to invoke a webservice that I successfully exposed as a WSDL Web Service using EBS Integrated SOA Gateway. I am using OBIEE 11g Action Framework which uses WebLogic.
    Here are the steps I completed:
    - I exposed a WSDL web service in EBS R12 via Integrated SOA Gateway
    - I granted the access to this service in EBS R12 to user SYSADMIN
    - I used OBIEE 11g to make a Action to call the Web service (using Action Framework) by searching for the WSDL
    - When I try to execute the action: I get the error:
    Action could not be invoked.
    ServiceExecutionFailure :
    Error invoking web service HR_PHONE_API_Service at endpoint http://ip-10-87-33-3.ec2.internal:8000/webservices/SOAProvider/plsql/hr_phone_api/ Missing <wsse:Security> in SOAP Header
    PROBLEM: I am unsure how to add the credentials for SYSADMIN user and password to add the SOAP username/pwd to the outgoing call. According to the documentation in the Integrators guide, FMW Security guide, and Web Logic guides..seems we have to configure the SOAP call to have the proper credentials. The documentation is not very clear on exactly how to do this. I tried to set up the credential store and an account in ActionFrameWorkConfig.xml but I am still missing something. I am logged into OBIEE as biadmin and I am trying to call a webservie in EBS that is granted to SYSADMIN/sysadmin user. Pls advise.

  • How to access BW RFC FM as web service from Enterprise portal using SSO

    We have developed a custom remote function module in our BW system. We are accessing this function module as a webservice from a java class we have written. This java class access the BW webservice and formats the output. We created a webservice on top of this java class and deployed on the Enterprise Portal. SSO is setup between EP and BW systems. So when i make call to the BW RFC webservice, i would like to make use of SSO setup between EP and BW instead of hardcoding the user id and password while calling the webservice. Please advise on how to achive this.
    Thanks for the help.
    Thanks
    Hari
    Edited by: Hari Krishna Nalluri on Mar 19, 2008 12:41 PM

    Hi,
    Go to webserive perspective -> WebService Configuration -> Expand config node->Security-> Select HTTP Authentication and check Use SAP logon tickets option.
    Ashutosh

  • HOw to consume/configure a third party web service from webDynpro

    Hi
    I have create a Adaptive webservice model .
    1. selected the UDDI or URL option after decalring the model name and package.
    2. Default metadata destination = ImgGen
    3. Definig execution destination = Exec.
    4. Entered the WSDL url  AND GENERATED THE WEB SERVICES SUCCESSFULLY.( HTTP://(SERVERNAme):port/WSName/some.asmx?WSDL )
    I HAVE DEFINED dYNAMIC PROXY USING vISUAL ADMIN.
    Visual admin >> Web services security >> Runtime >> security configuration >> Webservice clients >> sap.com >> DynamicWSProxies >>
    Gave destination Name same as default metadata and created one more for execution( step 2 aND 3) AND url =(HTTP://(SERVERNAme):port/WSName/some.asmx)
    restarted thre server.
    When I try to consume the webservices
    I am getting the following error.
      java.io.IOException: com.sap.engine.lib.xml.util.NestedException: Parser exception occurred:Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Document is not well-formed: Start-tag 'p' is different from end-tag 'ul'(:main:, row:61, col:19) -> com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Document is not well-formed: Start-tag 'p' is different from end-tag 'ul'(:main:, row:61, col:19)(:main:, row=61, col=19) -> com.sap.engine.lib.xml.parser.ParserException: Document is not well-formed: Start-tag 'p' is different from end-tag 'ul'(:main:, row:61, col:19)
    com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WS metadata destination 'ImgGen' and WS interface 'WSImgGenerationSoap'. One possible reason is that the metadata destination 'ImgGen' has not been properly configured; check configuration.
         at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:440)
         at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.readOperationsFromWSDL(WSModelInfo.java:372)
         at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadataInternal(WSModelInfo.java:342)
         at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:326)
         at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo$Cache.getModelInfo(WSModelInfo.java:199)
         at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getModelInfoFromCacheOrCreate(WSModelInfo.java:1035)
         at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getModelInfoFromCacheOrCreate(WSModelInfo.java:248)
         at com.sap.tc.webdynpro.model.webservice.gci.WSTypedModel.<init>(WSTypedModel.java:41)
         at com.pk.ws.model.ImgGen.<init>(ImgGen.java:59)
         at com.pk.ws.WdImgGenWS.genImage(WdImgGenWS.java:208)
         at com.pk.ws.wdp.InternalWdImgGenWS.genImage(InternalWdImgGenWS.java:288)
         at com.pk.ws.WdImgGenWSView.onActionGenImage(WdImgGenWSView.java:143)
         at com.pk.ws.wdp.InternalWdImgGenWSView.wdInvokeEventHandler(InternalWdImgGenWSView.java:156)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
         at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Caused by: java.io.IOException: com.sap.engine.lib.xml.util.NestedException: Parser exception occurred:Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Document is not well-formed: Start-tag 'p' is different from end-tag 'ul'(:main:, row:61, col:19) -> com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Document is not well-formed: Start-tag 'p' is different from end-tag 'ul'(:main:, row:61, col:19)(:main:, row=61, col=19) -> com.sap.engine.lib.xml.parser.ParserException: Document is not well-formed: Start-tag 'p' is different from end-tag 'ul'(:main:, row:61, col:19)
         at com.sap.engine.services.webservices.espbase.query.WSDLReader.checkForException(WSDLReader.java:100)
         at com.sap.engine.services.webservices.espbase.query.WSQueryImpl.initialize(WSQueryImpl.java:312)
         at com.sap.engine.services.webservices.espbase.query.WSQueryImpl.findWSInterfaces(WSQueryImpl.java:151)
         at com.sap.engine.services.webservices.server.management.discovery.ServiceDiscoveryImpl.getWSDLUrl(ServiceDiscoveryImpl.java:71)
         at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:128)
         at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:429)
         ... 41 more
    Any hint or solution is highly appreciated.
    thanks
    pk
    Edited by: Prashanth Kiran on Jul 22, 2009 10:11 PM
    Edited by: Prashanth Kiran on Jul 22, 2009 10:14 PM

    Thanks Siva,
    My version
    Version: 7.0.09
    Build id: 200608262203
    I need to push my webdynpro application into QA system. so third party webservices also move to it's own QA system.
    Now Once I need to move my code to QA the webservice should point to third party webservice's QA system.
    This is the reason I am defining them in the Visual admin.
    This works fine when I use without using default destiation metadata and  execution .
    Since I need to move them to QA and at the same time webservice host is also moving to its QA server, I need to change the reference so that my webdynro model points to the QA server where the webservice is pointing.
    Please note WebAS QA server where my webdynpro for java program is depoloyed and the WEbservice is hosted in a different server and is a non SAP webservice.
    regards
    PK

  • How to compile and deploy JSP code from Unix server command line?

    I am new to JSP technology. We are thinking to modify some of JSP code to meet our need. But I am not sure what I should do after I change JSP code. How can I compile the changed code? How to deploy? How to publish on the web?

    All files are regenerated if changed.
    That goes for the .java and the .class files that are created. The jsp server checks to see if the current version is the latest. If it is, nothing gets changed or recompiled. If things are different, programs are recompiled.
    Youll notice that if you have a new jsp it always takes longer the first time. Or even when you change a jsp, the first time takes the longest for the page to come up in a browser. This is because of recompiling.
    Does this make any sense?
    Adam

Maybe you are looking for

  • IPhone4 Upgrade to 4.1: No Longer Receive Calls At Home

    The wife and I both have the iphone4 and it had been working great until we updated to ios 4.1. Since then neither of us can receive calls or texts at home. We can make calls no problem and send texts as well but we are constantly missing calls, voic

  • How can we transfer from message no in report to r/3 system?

    in a report we have have messgge,customer, some other colums, i want to jump from messge number to ,r/3 system to now about the detailed information of that message number.

  • Unit Test code using wrong persistence unit

    In the midst of learning Maven, I created a simple application in which I am using JPA (Java Persistence 1.0.2) with EclipseLink implementation (2.0.2). Note: This is an Application Managed environment. So I manually control EntityManager's life cycl

  • SRM-MDM catalog custom field

    HI, We are loading external supplier item in out SRM-MDM 3.0 catalog. Soem of the Items have additonal field which desbite the item in more detail (like length, color and so on). During the import we can easy add the field as attribute and see in the

  • MTE Node Collection Missing

    I'm currently working on setting up our CCMS alerts and I've noticed that some of the MTE nodes do not have data or analysis methods assigned to them. I can see that on my CEN some are missing but if I go to another server which the CEN is monitoring