JWSDP-1_0_01 and xrpcc

With the JWSDP-1_0_01, when I try to run xrpcc I get this error...
Exception in thread "main" java.lang.NoClassDefFoundError: Files
What am I missing here?

I experienced the same problem. The way I solved: Edited the last line of xrpcc.bat file (in JWSDP-1_0_01\bin directory) to take out the PATH which created a too long command line. But I have to add the bin directory of JWSDP!
Original text:
"%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%" -Dcom.sun.launcher.executableName=%PRG% com.sun.jwsdp.launcher.XRPCCExecutable %CMD_LINE_ARGS%
Modified text:
"%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;c:\JWSDP-1_0_01\bin -Dcom.sun.launcher.executableName=%PRG% com.sun.jwsdp.launcher.XRPCCExecutable %CMD_LINE_ARGS%
John

Similar Messages

  • Jwsdp-1_0_01 and wsdeploy Tool

    Hi,
    I am using "jwsdp-1_0_01" software for developing/deploying web serivces, i just installed the software and run the demo Helloworld example it runes fine. but when i developed new Web Service and try to deploy the service using that "wsdeploy" tool (i am using ant build files for that which were bundeled with the demo application) i got a error mesage (see below).
    error: modeler error: uniqueness constraint violation.
    I don't know from where comes that error message but what i know is that, it could be because of any wrong mapping in one of manny ".xml" file. where ..? i have't any clue. If some one have any idea please do response.
    P.S - the same web service is running fine with previous version of Web service development kit, but at that time i used xrpcc tool for making server side code.

    Hi,
    There has been some changes on the JAXRPC side which
    recquires you to to rebuild your jaxrpc end points and
    deploy the endpoints freshly on the new jwsdp1_0_01
    download .......
    Please try that and post back on if you still get the
    constraint error - asengup

  • Error message when using xrpcc in JWSDP 1_0_01

    Dear all,
    I've got the following error message when using xrpcc of JWSDP 1_0_01 for my config.xml file.
    D:\jwsdp-1_0_01\Message>xrpcc -classpath build -both -d build config.xml
    error: invalid element "{http://java.sun.com/jax-rpc-ri/xrpcc-config}configurati
    on" in configuration file (line 2)
    The content of 'config.xml' is shown as follows.
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/jax-rpc-ri/xrpcc-config">
    <rmi name="MessageService"
    targetNamespace="http://messageuri.com/wsdl"
    typeNamespace="http://messageuri/types">
    <service name="MyMessage" packageName="Message">
    <interface name="Message.MessageIF"
    servantName="Message.MessageImpl"/>
    </service>
    </rmi>
    </configuration>
    Thank you for your kind attention!
    Regards,
    Eddie

    Thanks all! I've already solved my previous problem, however, i got another one now.
    =========================================================
    error: unknown model info in configuration file (line 5)
    =========================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <rmi name="MessageService"
    targetNamespace="http://messageuri.com/wsdl"
    typeNamespace="http://messageuri.com/types">
    <service name="MyMessage" packageName="Message">
    <interface name="Message.MessageIF"
    servantName="Message.MessageImpl" />
    </service>
    </rmi>
    </configuration>
    Thanks,
    Eddie

  • Couldn't startup Tomcat in JWSDP-1_0_01

    Hi,
    I have trouble starting the tomcat using the %JWSDP_HOME%\startup.bat. I traced the process and found out that startup.bat calls catalina.bat in the same folder and the following error is generated right after this line in the catalina.bat. (BTW, I am on Windows XP, J2SE 1.4.0)
    rem Execute the Tomcat launcher
    e:\j2sdk1.4.0\jre\bin\java.exe" -classpath startup\..\catalina.bat\..;"E:\com\sun\java\jwsdp-1_0_01\bin;e:\j2sdk1.4.0\bin;E:\apache\jakarta-ant-1.5\bin;E:\microsoft\visualStudioDotNet\FrameworkSDK\Bin;C:\WI
    NDOWS\Microsoft.NET\Framework\v1.0.3705;E:\j2sdkee1.3.1\bin;e:\PATH;E:\oracle\ora90\bin;e:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\" -Dcom.sun.launcher.executableNam
    e=startup\..\catalina.bat com.sun.jwsdp.launcher.TomcatExecutable start
    THIS IS THE ERROR MESSAGE
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options .....
    As you can tell, I have the %JWSDP_HOME%\bin and the J2SE bin in the path. I even have Ant 1.5.1 installed. But it still fails....
    MY PATH VARIABLE:
    %JWSDP_HOME%\bin;%JAVA_HOME%\bin;%ANT_HOME%\bin;E:\microsoft\visualStudioDotNet\FrameworkSDK\Bin;C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705;%J2EE_HOME%\bin;e:\PATH;E:\oracle\ora90\bin;%EProgramFiles%\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%MSSQL_HOME%\80\Tools\BINN;%MSSQL_HOME%\80\Tools\Binn\
    Any idea about this error?
    Any help is greatly appreciated,
    Wilson

    I have the absolutely same problem!
    I was confused about that, so I re-installed the SDK (version 1.4.0.02) and the JWSDP (version 1.0.01). But there was no improvement - its always the same: I type "startup" or "ant" in the console and the following message appears:
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    If I doubleclick the ant.bat or startup.bat, the same happens!
    I ckecked my PATH variable, but the bin directories of JWSDP and SDK are correct. Also the JWSDP_HOME variable is correct.
    I wished anybody could help. I'm very confused.
    any ideas?
    M. Kretzschmar,
    Germany

  • Jwsdp-1_0_01 JAXRPCContextListener failed

    I'm trying to deploy a web service created with the jwsdp-1_0_01 api. Weblogic 7.0 loads it up and trys to deploy but we get a ClassCastException:
    User defined listener com.sun.xml.rpc.server.http.JAXRPCContextListener failed: java.lang.ClassCastException: weblogic.utils.classloaders.ChangeAwareClassLoader.
    JAXRPCContextListener is a standard ServletContextListener used by sun's wsgen and it's listed in the generated web.xml file in the war. This error is preventing the war from being fully deployed.
    I'm using sun tutorial example \jwsdp-1_0_01\docs\tutorial\examples\jaxrpc\hello\* with the documentation/instructions at \jwsdp-1_0_01\docs\tutorial\doc\JAXRPC3.html
    We've been using webservices on 6.1 for the past year without problems. But I can't get this one to go on 7.0.
    Any thoughts?

    WLS 7.0 got its own implementation of JAX-RPC. I think, the exception is
    because the JAX-RPC factorys are mapped to the WLS impls. You could
    remove the mapping by deleting the following files from weblogic.jar or
    webservice.jar:
    META-INF\services\javax.xml.rpc.ServiceFactory
    META-INF\services\javax.xml.soap.MessageFactory
    META-INF\services\javax.xml.soap.SOAPConnectionFactory
    META-INF\services\javax.xml.soap.SOAPFactory
    HTHS,
    -manoj
    "kris young" <[email protected]> wrote in message
    news:3e4446f4$[email protected]..
    I'm trying to deploy a web service created with the jwsdp-1_0_01 api.Weblogic 7.0 loads it up and trys to deploy but we get a ClassCastException:
    >
    User defined listener com.sun.xml.rpc.server.http.JAXRPCContextListenerfailed: java.lang.ClassCastException:
    weblogic.utils.classloaders.ChangeAwareClassLoader.
    >
    JAXRPCContextListener is a standard ServletContextListener used by sun'swsgen and it's listed in the generated web.xml file in the war. This error
    is preventing the war from being fully deployed.
    >
    I'm using sun tutorial example\jwsdp-1_0_01\docs\tutorial\examples\jaxrpc\hello\* with the
    documentation/instructions at \jwsdp-1_0_01\docs\tutorial\doc\JAXRPC3.html
    >
    We've been using webservices on 6.1 for the past year without problems.But I can't get this one to go on 7.0.
    >
    Any thoughts?

  • JWSDP, webservices and weblogic 8.1

    I've been trying to get a web service build via a WSDL provided by a partner company. I have tried without success versions 1.1, 1.3, 1.6 and 2.0 of the JWSDP. I get exceptions during runtime with all of them when I try to call the web service from my client.
    2.0 Can't use because it seems to require Java 1.5
    1.1
    SOAPFaultException Unknow Data Encoding Style
    1.3 and 1.6
    [java] java.lang.NoSuchMethodError: <init>
    [java] at com.mcdata.websvc.riverbed.ExchangeDataResponse_LiteralSerializer.<init>(Ljavax.xml.namespace.QName;L
    java.lang.String;Z)V(ExchangeDataResponse_LiteralSerializer.java:30)
    [java] at com.mcdata.websvc.riverbed.DataExchanger_SerializerRegistry.getRegistry()Ljavax.xml.rpc.encoding.Type
    MappingRegistry;(DataExchanger_SerializerRegistry.java:30)
    [java] at com.mcdata.websvc.riverbed.DataExchanger_Impl.<init>()V(DataExchanger_Impl.java:24)
    [java] at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.createAndSendXML(Ljava.lang.String;)V(R
    iverbedShipmentSubscriberMDB.java:274)
    With each version I have copied the jaxrpc and saaj jar files into the appropriate location so that they get used during the build and are deployed within the EAR.
    I'm getting desparate, does anyone have any idea what is going on here? Is it possible to create a web service client with these tools?

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

  • JWSDP, WSDL and multipart/related problem

    Hi,
    I got a wsdl file that sends multipart/related soap messages and I want to generate a client stub using wscompile.
    This is a short exerpt from the wsdl describing the message I want to send:
    <wsdl:operation name="MessageSubmit">
    <soap:operation/>
    <wsdl:input>
    <mime:multipartRelated>
    <mime:part>
    <soap:body use="literal"/>
    </mime:part>
    <mime:part>
    <mime:content part="content" type="*/*"/>
    </mime:part>
    </mime:multipartRelated>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    The problem I have is that wscompile complains and says: "error: input message of binding operation "MessageSubmit" does not have a SOAP body extension". But it does! It's in there in the multipart/related tags.
    The same wsdl works using tools from systinet. Doesn't JWSDP and wscompile handle multipart/related properly? Anyone else seen this?
    Cheers,
    Stefan

    wscompile does not support mime:multipart binding.

  • JWSDP, webservices and weblogic 8.1 talking to a PHP web service

    Hello all. I have a web service client running in weblogic 8.1 on Redhat, when I try to send the data to the service I get:
    Sep 14, 2006 12:00:29 PM com.sun.xml.messaging.saaj.soap.MessageImpl identifyContentType
    SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
    Sep 14, 2006 12:00:29 PM com.sun.xml.messaging.saaj.soap.MessageImpl <init>
    SEVERE: SAAJ0535: Unable to internalize message
    Thu Sep 14 12:00:29 MDT 2006 RiverbedShipmentSubscriberMDB.createAndSendXML(): Exception: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message; nested exception is:
            HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
    Thu Sep 14 12:00:30 MDT 2006: email information TO: [email protected] FROM: [email protected]
    Thu Sep 14 12:00:30 MDT 2006: sent mail
    java.rmi.RemoteException: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message; nested exception is:
            HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:88)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.createAndSendXML(Ljava.lang.String;)V(RiverbedShipmentSubscriberMDB.java:621)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.onMessage(Ljavax.jms.Message;)V(RiverbedShipmentSubscriberMDB.java:434)
            at weblogic.ejb20.internal.MDListener.execute(Lweblogic.kernel.ExecuteThread;)V(MDListener.java:382)
            at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
            at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    Caused by: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
            at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(Ljava.lang.String;Lcom.sun.xml.rpc.soap.message.SOAPMessageContext;)V(HttpClientTransport.java:140)
            at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderState;)V(StreamingSender.java:96)
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:72)That is using JSWDP 1.6, when I use 1.3 I get a similar message:
    Thu Sep 14 11:46:29 MDT 2006 RiverbedShipmentSubscriberMDB.createAndSendXML(): Exception: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html; nested exception is:
            HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
    Thu Sep 14 11:46:29 MDT 2006: email information TO: [email protected] FROM: [email protected]
    Thu Sep 14 11:46:29 MDT 2006: sent mail
    java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html; nested exception is:
            HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:88)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.createAndSendXML(Ljava.lang.String;)V(RiverbedShipmentSubscriberMDB.java:621)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.onMessage(Ljavax.jms.Message;)V(RiverbedShipmentSubscriberMDB.java:434)
            at weblogic.ejb20.internal.MDListener.execute(Lweblogic.kernel.ExecuteThread;)V(MDListener.java:382)
            at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
            at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    Caused by: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
            at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(Ljava.lang.String;Lcom.sun.xml.rpc.soap.message.SOAPMessageContext;)V(HttpClientTransport.java:140)
            at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderState;)V(StreamingSender.java:96)
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:72)This makes me think that the PHP web service is returning a content type header of text/html instead of text/xml. Is there a way to make the JWSDP code ignore that or to make the PHP code return the correct header content type?
    Here is a similar thread but I'm not having any luck with the answers in it:
    http://forum.java.sun.com/thread.jspa?threadID=643810

    Hello all. I have a web service client running in weblogic 8.1 on Redhat, when I try to send the data to the service I get:
    Sep 14, 2006 12:00:29 PM com.sun.xml.messaging.saaj.soap.MessageImpl identifyContentType
    SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
    Sep 14, 2006 12:00:29 PM com.sun.xml.messaging.saaj.soap.MessageImpl <init>
    SEVERE: SAAJ0535: Unable to internalize message
    Thu Sep 14 12:00:29 MDT 2006 RiverbedShipmentSubscriberMDB.createAndSendXML(): Exception: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message; nested exception is:
            HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
    Thu Sep 14 12:00:30 MDT 2006: email information TO: [email protected] FROM: [email protected]
    Thu Sep 14 12:00:30 MDT 2006: sent mail
    java.rmi.RemoteException: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message; nested exception is:
            HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:88)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.createAndSendXML(Ljava.lang.String;)V(RiverbedShipmentSubscriberMDB.java:621)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.onMessage(Ljavax.jms.Message;)V(RiverbedShipmentSubscriberMDB.java:434)
            at weblogic.ejb20.internal.MDListener.execute(Lweblogic.kernel.ExecuteThread;)V(MDListener.java:382)
            at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
            at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    Caused by: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
            at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(Ljava.lang.String;Lcom.sun.xml.rpc.soap.message.SOAPMessageContext;)V(HttpClientTransport.java:140)
            at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderState;)V(StreamingSender.java:96)
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:72)That is using JSWDP 1.6, when I use 1.3 I get a similar message:
    Thu Sep 14 11:46:29 MDT 2006 RiverbedShipmentSubscriberMDB.createAndSendXML(): Exception: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html; nested exception is:
            HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
    Thu Sep 14 11:46:29 MDT 2006: email information TO: [email protected] FROM: [email protected]
    Thu Sep 14 11:46:29 MDT 2006: sent mail
    java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html; nested exception is:
            HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:88)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.createAndSendXML(Ljava.lang.String;)V(RiverbedShipmentSubscriberMDB.java:621)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.onMessage(Ljavax.jms.Message;)V(RiverbedShipmentSubscriberMDB.java:434)
            at weblogic.ejb20.internal.MDListener.execute(Lweblogic.kernel.ExecuteThread;)V(MDListener.java:382)
            at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
            at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    Caused by: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
            at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(Ljava.lang.String;Lcom.sun.xml.rpc.soap.message.SOAPMessageContext;)V(HttpClientTransport.java:140)
            at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderState;)V(StreamingSender.java:96)
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:72)This makes me think that the PHP web service is returning a content type header of text/html instead of text/xml. Is there a way to make the JWSDP code ignore that or to make the PHP code return the correct header content type?
    Here is a similar thread but I'm not having any luck with the answers in it:
    http://forum.java.sun.com/thread.jspa?threadID=643810

  • JWSDP,Axis and Websphere -help!

    Hi everyone,
    I developed a webservice and created a client with Axis 1.1. Then I deployed the webservice both under Apache/Tomcat and everything works fine (ws is alive, client calls correctly the method exposed), and unde WEBSPHERE 5.1 but even if webservice seems installed correctly (WSDL is visible in browser), when I try to call the method exposed i get
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
    faultSubcode:
    faultString: JAXRPC.JAXRPCSERVLET.30: Internal server error (JAXRPC.JAXRPCSERVLET.43: failed to instantiate service implementor for port "EperWebService")
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}stackTrace: AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
    faultSubcode:
    faultString: JAXRPC.JAXRPCSERVLET.30: Internal server error (JAXRPC.JAXRPCSERVLET.43: failed to instantiate service implementor for port &quot;EperWebService&quot;)
    faultActor:
    faultNode:
    faultDetail:
    JAXRPC.JAXRPCSERVLET.30: Internal server error (JAXRPC.JAXRPCSERVLET.43: failed to instantiate service implementor for port "EperWebService")
         at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
         at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
         at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1675)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1926)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1654)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1926)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1654)
         at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634)
         at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
         at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
         at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
         at org.apache.axis.client.Call.invoke(Call.java:2553)
         at org.apache.axis.client.Call.invoke(Call.java:2248)
         at org.apache.axis.client.Call.invoke(Call.java:2171)
         at org.apache.axis.client.Call.invoke(Call.java:1691)
         at it.keytech.EperWebClient.EperWebServiceIFBindingStub.getListaRicambi(EperWebServiceIFBindingStub.java:169)
         at it.keytech.EperWebClient.TestServlet.doGet(TestServlet.java:35)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356)
         at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
         at org.mortbay.http.HttpContext.handle(HttpContext.java:1723)
         at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:514)
         at org.mortbay.http.HttpContext.handle(HttpContext.java:1673)
         at org.mortbay.http.HttpServer.service(HttpServer.java:879)
         at org.mortbay.http.HttpConnection.service(HttpConnection.java:783)
         at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:945)
         at org.mortbay.http.HttpConnection.handle(HttpConnection.java:800)
         at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
         at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
         at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:454)
    Any ideas? thanks in advance ....

    Did you ever figure this out. Havew the same problem

  • I just install jwsdp-1_0_01.What is "Model" on web service page

    What is Model at http://localhost:8080/hello-jaxrpc/hello?model ?

    This is a model is a complete description of the web service that the JAX-RPC RI uses to generate all code and other artifacts.

  • Documentation for wscompile?

    I finally got around to updating to jwsdp-1_0_01 and was surprised to find that xrpcc was replaced by wscompile in many build.xml files. Except for a few very general remarks in the Tutorial, I can't find any documentation for wscompile at all (Google returns only 4 pages for "wscompile"!).
    Is xrpcc deprecated? (When my old build.xml runs xrpcc, it gives a warning that "sun.tools.javac.Main is deprecated".) Is there a man page, etc., for wscompile?
    Thanks,
    Mike

    Oops, the format of my last message got munged. Here's anoter try:
    Date: 28 Aug 2002
    Title: The JAX-RPC wscompile and wsdeploy Tools
    1 The wscompile Tool
    The wscompile tool generates stubs, ties, serializers,
    and WSDL files used in JAX-RPC clients and services.
    The tool reads as input a configuration file and either
    a WSDL file or an RMI interface that defines the service.
    1.1 Syntax
    wscompile [options] <configuration-file>
    By convention, the configuration file is named config.xml,
    but this is not a requirement.
    The following table lists the wscompile options.
    Note that exactly one of the -import, -define,
    or -gen options must be specified.
      Option                    Description
      -classpath <path>         specify where to find input class files
      -cp <path>                same as -classpath <path>
      -d <directory>            specify where to place generated output files
      -define                   read the service's RMI interface,
                                define a service
      -f:<features>             enable the given features (See the below
                                table for a list of features.  When
                                specifying multiple features, separate
                                them with commas.)
      -features:<features>      same as -f:<features>
      -g                        generate debugging info
      -gen                      same as -gen:client
      -gen:client               generate client artifacts (stubs, etc.)
      -gen:server               generate server artifacts (ties, etc.) and
                                the WSDL file (If you are using wsdeploy
                                you do not specify this option.)
      -gen:both                 generate both client and server artifacts
      -httpproxy:<host>:<port>  specify a HTTP proxy server (port defaults to 8080)
      -import                   read a WSDL file, generate the service's RMI
                                interface and a template of the class that
                                implements the interface
      -keep                     keep generated files
      -model <file>             write the internal model to the given file
      -nd <directory>           specify where to place non-class generated files
      -O                        optimize generated code
      -s <directory>            specify where to place generated source files
      -verbose                  output messages about what the compiler is doing
      -version                  print version information
    The following table lists the features (delimited by commas) that
    may follow the -f option.
      Feature                   Description
      datahandleronly           always map attachments to the DataHandler type
      explicitcontext           turn on explicit service context mapping
      infix=<name>              specify an infix to use for generated serializers
      nodatabinding             turn off data binding for literal encoding
      noencodedtypes            turn off encoding type information
      nomultirefs               turn off support for multiple references
      novalidation              turn off full validation of imported WSDL documents
      searchschema              search schema aggressively for subtypes
      serializeinterfaces       turn on direct serialization of interface types
    1.2 Configuration File
    The wscompile tool reads the configuration file (config.xml),
    which contains information that describes the web service.
    The basic structure of config.xml follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration 
        xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
       <service> or <wsdl> or <modelfile>
    </configuration>
    The <configuration> element may contain exactly one
    <service>, <wsdl>, or <modelfile> element.
    1.2.1 The <service> Element
    If you specify this element, wscompile reads the
    RMI interface that describes the service and
    generates a WSDL file.
    In the <interface> subelement, the name attribute specifies the
    service's RMI interface, and
    the servantName attribute specifies the class that implements
    the interface.
    For example:
    <service name="CollectionIF_Service"
             targetNamespace="http://echoservice.org/wsdl"
             typeNamespace="http://echoservice.org/types"
             packageName="stub_tie_generator_test">
         <interface name="stub_tie_generator_test.CollectionIF"
          servantName="stub_tie_generator_test.CollectionImpl"/>
    </service>
    1.2.2 The <wsdl> Element
    If you specify this element, wscompile
    reads the service's WSDL file and generates
    the service's RMI interface.
    The location attribute specifies the URL of the WSDL
    file, and the packageName attribute specifies
    the package of the classes generated by wscompile.
    For example:
    <wsdl    
        location="http://tempuri.org/sample.wsdl"
        packageName="org.tempuri.sample" />
    1.2.3 The <modelfile> Element
    This element is for advanced users.
    If config.xml contains a <service> or <wsdl> element,
    wscompile generates a model file that
    contains the internal data structures that describe
    the service.
    If you've already generated a model file in
    this manner, then you can reuse it the
    next time you run wscompile.  For example:
    <modelfile location="mymodel.xml.gz"/>
    2.0 The wsdeploy Tool
    The wsdeploy tool reads a WAR file and the jaxrpc-ri.xml
    file and then generates another WAR file that is ready for
    deployment.
    Behind the scenes, wsdeploy runs wscompile with the -gen:server option.
    The wscompile command generates classes and a
    WSDL file which wsdeploy includes
    in the generated WAR file.
    2.1 Syntax
    The syntax for wsdeploy follows:
    wsdeploy <options> <input-war-file>
    The following table lists the tool's options.
    Note that the -o option is required.
      Option                    Description
      -classpath <path>         specify an optional classpath
      -keep                     keep temporary files
      -o <output-war-file>      specify where to place the generated war file
      -tmpdir <directory>       specify the temporary directory to use
      -verbose                  output messages about what the compiler is doing
      -version                  print version information
    2.2 The Input WAR File
    Typically, you create the input WAR file with a
    development tool or with the ant war task.
    Here are the contents of a simple input WAR file:
    META-INF/MANIFEST.MF
    WEB-INF/classes/hello/HelloIF.class
    WEB-INF/classes/hello/HelloImpl.class
    WEB-INF/jaxrpc-ri.xml
    WEB-INF/web.xml
    In this example, HelloIF is the service's RMI interface
    and HelloImpl is the class that implements the interface.
    The web.xml file is the deployment descriptor of a
    web component.  The jaxrpc-ri.xml file is described
    in the next section.
    2.2.2 The jaxrpc-ri.xml File
    The listing that follows shows a jaxrpc-ri.xml file
    for a simple HelloWorld service.
    <?xml version="1.0" encoding="UTF-8"?>
    <webServices
        xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/dd"
        version="1.0"
        targetNamespaceBase="http://com.test/wsdl"
        typeNamespaceBase="http://com.test/types"
        urlPatternBase="/ws">
        <endpoint
            name="MyHello"
            displayName="HelloWorld Service"
            description="A simple web service" 
            interface="hello.HelloIF"  
            implementation="hello.HelloImpl"/> 
        <endpointMapping
            endpointName="MyHello"
            urlPattern="/hello"/>
    </webServices>
    The <webServices> element must contain one or more <endpoint>
    elements.  In this example, note that the interface and
    implementation attributes of <endpoint> specify the
    service's interface and implementation class.
    The <endpointMapping> element associates the service
    port with an element of the endpoint URL path
    that follows the urlPatternBase.
    3 Advanced Topics
    This section is for developers who are familiar with
    WSDL, SOAP, and the JAX-RPC specifications.
    3.1 Namespace Mappings
    Here is a schema type name example:
    schemaType="ns1:SampleType"
    xmlns:ns1="http://echoservice.org/types"
    When generating a Java type from a schema type,
    wscompile gets the class name from the local part of
    the schema type name.
    To specify the package name of the generated
    Java classes, you define a mapping between
    the schema type namespace and the package name.
    You define this mapping by adding a <namespaceMappingRegistry>
    element to the config.xml file.  For example:
    <service>
        <namespaceMappingRegistry>
                <namespaceMapping            
                namespace="http://echoservice.org/types"
                packageName="echoservice.org.types"/>
         </namespaceMappingRegistry>
    </service>
    3.5 Handlers
    A handler accesses a
    SOAP message that represents
    an RPC request or response.
    A handler class must implement
    the javax.xml.rpc.handler interface.
    Because it accesses a SOAP message,
    a handler can manipulate the message with
    the APIs of the javax.xml.soap package.
    Examples of handler tasks:
    * Encryption and decryption
    * Logging and auditing
    * Caching
    * Application-specific SOAP header processing
    A handler chain is a list of handlers.
    You may specify one handler chain for the client
    and one for the server.
    On the client, you include the <handlerChains> element
    in the jaxrpc-ri.xml file.  On the server, you
    include this element in the config.xml file.
    Here is an example of the <handlerChains> element
    in config.xml:
    <handlerChains>
      <chain runAt="server"
         roles=
          "http://acme.org/auditing 
           http://acme.org/morphing"
           xmlns:ns1="http://foo/foo-1">
        <handler className="acme.MyHandler"
          headers ="ns1:foo ns1:bar"/>
          <property 
            name="property" value="xyz"/>
        </handler>
      </chain>
    </handlerChains>
    For more information on handlers, see the SOAP Message Handlers chapter
    of the JAX-RPC specifications.

  • Wsdeploy problem on jdk1.5 with tomcat 4.1.2 and jwsdp 1.0.0.1

    We're trying to upgrade to jdk1.5 from 1.4.0. We're running tomcat 4.1.2 and jwsdp 1.0.0.1. When running wsdeploy, we're receiving the following error:
    [echo] Running wsdeploy...
    [echo] /db/dbdev/jwsdp-1_0_01/bin/wsdeploy.sh -tmpdir build/wsdeploy-generated -o dist/cpws.war dist/cpws-portable.war -verbose
    [exec] Note: sun.tools.javac.Main has been deprecated.
    [exec] 1 warning
    [exec] error: javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:/export/home/dnassirp/RIDE/Profiler/build/wsdeploy-generated/jaxrpc-deploy-a64a8e/WEB-INF/web.xml (No such file or directory)
    [exec] javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:/export/home/dnassirp/RIDE/Profiler/build/wsdeploy-generated/jaxrpc-deploy-a64a8e/WEB-INF/web.xml (No such file or directory)
    [exec] at org.apache.xalan.transformer.TransformerImpl.createResultContentHandler(TransformerImpl.java:1043)
    [exec] at org.apache.xalan.transformer.TransformerImpl.createResultContentHandler(TransformerImpl.java:934)
    The original web.xml file does exist (but in it's original location). There is a web-before.xml in the wsdeploy-generated directory but no web.xml (we're execting that wsdeploy should generate this).
    Has anyone else had this problem? Any suggestions?
    Thanks.

    I'm seeing exactly the same thing in Netbeans.
    I upgraded to Netbeans 5.0 today and used a JDK1.5 (1.5.0_06) that I already had installed as the JDK for it.
    I see exactly the same problem (web.xml not found) with an ant build script that does a wscompile first and which works fine with my previous Netbeans 4.1 install. My Netbeans 4.1 was using a 1.4.2_02 JDK.

  • Bug/flaw in JAX-RPC xrpcc generated output (JWSDP EA1)

    I believe I have found a bug (or flaw) in how xrpcc (JWSDP EA1) is generating stubs and WSDL code as follows:
    If you use simple parameter types (ints, doubles, Strings et al) then xrpcc generates a name that is based on the type (eg. String_1) rather than the
    parm name (senderID) in the WSDL and stub code. I have noticed, however, that if you are using a JavaBean as an input/output parameter to/from a remote method, it generates an XMLSchema ComplexType with the proper names of subelements, so that situation seems to be OK.
    I think this is a bug/flaw in xrpcc...
    For example, if you try to use a remote method that looks somewhat like:
    public int SendTrajectory( String senderID )
    You get the following fragment generated in the WSDL output from xrpcc:
    <message name="sendTrajectory">
    <part name="String_1" type="xsd:string"/>
    whereas I think it should use the actual parameter name for simple parameters and should look like:
    <message name="sendTrajectory">
    <part name="senderID" type="xsd:string"/>
    I read the JAX-RPC Spec (v 0.7....pdf on the Sun web site) and it seems to allude to the fact that the names SHOULD be based on the parameter name in
    section 5.5.5. where it specifically states:
    "Each Java parameter (in the Java method signature) is mapped to a message part in the wsdl:message. This wsdl:message corresponds to the wsdl:input element for the mapped wsdl:operation. Each message part has a name attribute that is mapped based on the name of the Java parameter and a type attribute (an XML data type)"
    ...and the example the shown further down in that section of the JAX-RPC spec re-inforces this opinion.
    The generated code works with the current version of JAX-RPC and xrpcc, that is not the problem. There is a bigger issue with this situation, since you
    cannot (and should not) assume that a web service (even if generated with JAX-RPC) will be invoked by a client that was generated with JAX-RPC tools.
    The problem is really evident when you don't use JAX-RPC to talk to a JAX-RPC generated service, since you have to use these funny names like String_1, Double_3 which have no application context semantics and thus will invariably lead to some really subtle bugs in remote calls.
    We have used JAX-RPC to generate our server side web service in the normal manner. However, our client is running on an embedded Java (CLDC/MIDP
    level device....on an aJile Java chip in fact) where the JAX-RPC footprint is way too massive for the confines of the MIDP/CLDC platform. So we are using the Enhydra kSoap API and libraries on the client end to invoke the back end JAX-RPC service. This works fine by the way! We have successfully invoked JAX-RPC wrapped services from the embedded Java platform. The
    difficulty stems from the fact that the kSOAP api (and others) require you to bind the values of the parameters for the SOAP invocation by using the WSDL <part> name, and so these funny type-based names become visible in your client application code. Ouch!
    For example, my kSOAP calls to invoke our JAX-RPC service look like this (where request is a SOAP web services request using the kSOAP API's):
    request.addProperty ( "String_1", "SaJe314159" );
    request.addProperty ( "Double_2", pvt.getLatitude() );
    request.addProperty ( "Double_3", pvt.getLongitude() );
    request.addProperty ( "Double_4", pvt.getBearing().floatValue() ) );
    request.addProperty ( "Double_5", pvt.getVelocity() );Whereas it should really look like the following, based on our interface definitions:
    request.addProperty ( "senderID", "SaJe314159" );
    request.addProperty ( "latitude", pvt.getLatitude() );
    request.addProperty ( "longitude, pvt.getLongitude() );
    request.addProperty ( "bearing", pvt.getBearing().floatValue() ) );
    request.addProperty ( "velocity", pvt.getVelocity() );The problem is that xrpcc generates the names as in the first example (String_1, Double_2) instead of using the parameter names (eg. "senderID, latitude).
    We can work around this in two ways for now: 1) use the type-based generated name labels for the moment, or 2) go into the xrpcc generated stub code and WSDL and make manual changes. In the longer term, I'm sure you appreciate why either of these workarounds are not acceptable.
    Based on the above, I think that there is a bug/flaw in this version of xrpcc (it's using a parameter type rather than a parameter name to generate the <message>/<part> element in the WSDL (and of course in the generated stubs and such).
    Thoughts? Fix in EA2 perhaps?
    Thanks!
    ....Andrzej

    I've got the same problem. I edited the WSDL and regenerated both Server and Client classes and it then didn't work. Forget the error but it seemed to have incorrectly capitalised a letter in a class/method name.
    I am trying to define a common WSDL doc that our suppliers must conform to when providing us with a web service. My aim is that the common WSDL will be OK for both Java-based web services and .NET based web services. I have succeeded in this task apart from the method parameter name issue. .NET (of course) does it correctly, and its WSDL correctly names the method parameters. However Java Web Services via xrpcc produce this ridiculous String_1, String_2 etc which bear no relation to the method parameters. I cannot very well go to our suppliers who are using .NET and demand that their method/function parameters are named String_1, String_2 - and wouldn't Bill be pleased with my excuse that I'm trying to get equivalence with the deficiencies of Java ?

  • JWSDP and J2EE Integration: Doesn't work. What's the point?

    My problems involve the integration of JWSDP and J2EE as described in these two documents:
    http://developer.java.sun.com/developer/technicalArticles/WebServices/wsj2ee/
    http://java.sun.com/j2ee/documentation/windows_guide.html
    It looks like a long one, but it�s really not that bad. All comments are appreciated.
    I�ve numbered each line-paragraph-section for easy reference later.
    (1) My ultimate goal is to setup a website that displays data from a database. I will use Java, Apache, Oracle, and whatever else I need to create a website that uses servlets, JavaServer Pages (JSP), and JDBC.
    (2) I�ve got four Pentium III computers:
    1. Windows 2000 Server to be the web server (MyWebServer, IP = 10.10.1.1).
    2. Windows 2000 Professional to be the database server (MyDatabaseServer, IP = 10.10.1.2).
    3. Windows 2000 Professional that I use to develop and test (MyDeveloperPC, IP = 10.10.1.3).
    4. Windows 2000 Professional that I use as a client to connect to the website (MyClientPC, IP = 10.10.1.4).
    (3) On MyWebServer I installed the following:
    Java 2 Standard Edition (J2SE)
    Java 2 Enterprise Edition (J2EE)
    Java Web Services Developer Pack (JWSDP)
    The JWSDP tutorial
    Apache HTTP Server
    (4) The files I downloaded and installed are as follows:
    j2sdk-1_4_0-rc-win.exe
    j2sdkee-1_3_1-win.exe
    jwsdp-1_0-ea1-win.exe
    jwsdp-1_0-ea1_01-tutorial.zip
    apache_1.3.23-win32-x86-no_src.exe
    (5) After installing these products, I set the environment variables as follows:
    JAVA_HOME = c:\j2se
    J2EE_HOME = c:\j2ee
    JWSDP_HOME = c:\jwsdp
    Path = c:\j2se\bin;c:\j2ee\bin;c:\jwsdp\bin; [and other previous statements]
    (6) I checked to see that Apache is running as a service. It is.
    On MyWebServer I start Tomcat and J2EE. Both start properly and are operating simultaneously.
    (7) From MyClientPC I open Internet Explorer and in the address box I type:
    http://10.10.1.1
    This displays the page c:\ApacheHTTP\apache\htdocs\index.html.en (The Apache default server installation page.)
    (8) I then enter this address in IE:
    http://10.10.1.1:8080
    This displays the page c:\jwsdp\webapps\root\index.html (The default JWSDP page).
    (9) I then enter this address in IE:
    http://10.10.1.1:8000
    This displays the page c:\j2ee\public_html\index.html (The J2EE 1.3 Default Home Page).
    (10) So far so good. Now I want to test JWSDP as a container for JSP pages.
    (11) I use ant to build the converter app found in the tutorial examples (in folder c:\jwsdp\�\tutorial\examples\gs). I then deploy the converter app to the c:\jwsdp\webapps\gs folder.
    (12) From MyClientPC I open Internet Explorer and in the address box I type:
    http://10.10.1.1:8080/gs
    The converter app works perfectly.
    (13) To eliminate the need to enter the port number, I create a link from the Apache default server installation page to the converter app. From MyClientPC and enter this address into IE:
    http://10.10.1.1
    I then click on the link to the converter app and it works perfectly.
    (14) Question: Is this the best way to display JSP pages without having to enter the port number?
    (15) Now it�s time to integrate JWSDP and J2EE as described in these two documents:
    http://developer.java.sun.com/developer/technicalArticles/WebServices/wsj2ee/
    http://java.sun.com/j2ee/documentation/windows_guide.html
    (16) After I complete this integration I cannot start both Tomcat and J2EE at the same time. This makes sense because they both share port 8080.
    I start Tomcat.
    (17) From MyClientPC and use Internet Explorer to test the various relevant addresses. Everything works the same as it did before except this one:
    http://10.10.1.1:8000
    The page cannot be displayed. The J2EE default home page is not displayed, which makes sense because the J2EE port is no longer 8000; it has been changed to 8080.
    (18) Now I shutdown Tomcat and start J2EE.
    From MyClientPC and use Internet Explorer to test the various relevant addresses:
    (19) http://10.10.1.1:8080
    Displays the JWSDP default home page.
    (20) http://10.10.1.1:8080/gs
    The page cannot be displayed. The converter app no longer works.
    (21) From MyWebServer and use Internet Explorer to test localhost:
    http://localhost:8080
    This displays the J2EE default home page.
    (22) Question: Why does localhost give me a different page than the IP address?
    (23) Question: What was the point of integrating JWSDP and J2EE?
    (24) I want to get the converter app working, so I create a .war file and attempt to add it to the J2EE deploytool (see the two integration documents listed above at section 15.) I create the .war file following the instructions in the JWSDP tutorial:
    http://java.sun.com/webservices/docs/ea1/tutorial/doc/WebApp3.html#64606
    (25) I change to the c:\jwsdp\�\tutorial\examples\gs\build folder.
    I then type:
    jar cvf converter.war .
    A .war file is created.
    (26) I open the deploytool: File, New, Application, and I name it �converter�.
    I attempt to add the .war file: File, Add to Application, Web WAR.
    (27) When I attempt to add the converter.war file I get this error:
    �converter.war does not appear to be a valid web JAR.�
    I tried a few different attempts, all with the same result. I�m stuck.
    (28) I ask again, What was the point of integrating JWSDP and J2EE?
    (29) If this is the preferred configuration, how do I display my JSP pages like the converter app?
    Please help!!!

    The JWSDP tutorial says to be in the �build� folder of the example when issuing the jar command to create the .war file. The build folder is created when I run the �ant build� command.
    Attempt 1 from the command prompt in folder c:\jwsdp\tutorial\examples\gs\build>
    I typed this command:
    jar cvf c:\jaxmservices\converter.war .
    In this case I directed the .war file to be placed in a different folder as you suggested. Here�s the output:
    added manifest
    adding: index.jsp(in = 921) (out= 525)(deflated 42%)
    adding: WEB-INF/(in = 0) (out= 0)(stored 0%)
    adding: WEB-INF/classes/(in = 0) (out= 0)(stored 0%)
    adding: WEB-INF/classes/Converter.class(in = 582) (out= 358)(deflated 38%)
    Didn�t work. Same error as before.
    Attempt 2 from the same folder:
    I typed this command as you suggested (I tried it with and without the final dot):
    jar tvf converter.war
    Here is the output:
    java.io.FileNotFoundException: converter.war (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:103)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at sun.tools.jar.Main.run(Main.java:185)
    at sun.tools.jar.Main.main(Main.java:904)
    I tried a few other variations on these attempts with no luck. I�m stuck.
    I�m attempting to create a .war file out of two files: index.jsp and converter.class.
    Now that I�ve integrated JWSDP and J2EE, is there some other way that I can run the converter app instead of a .war file and the deploytool? In other words, if I go back to using ant to build and deploy converter, where would I deploy it so that it will work with J2EE?
    By the way, it doesn�t have to be converter. I�d be happy if I could get any JSP page to work in J2EE after the integration.
    Forever grateful,
    Logan

  • CLASSPATH, Jar file or zip file visibility during compilation and  run time

    I am using jwsdp-1_0_01 with some success.
    However, making my *.jar or *.zip files
    visible during ant builds is not working.
    Setting a CLASSPATH environment
    variable (BTW: I on a Linux box) seems
    to have no effect. I'm using the ant build
    machinery found the JWSDP download
    jwsdp-1_0_01/docs/tutorial/examples/jaxrpc/
    and as long as I don't reference anything in
    mystuff.zip
    compilation succeeds and tomcat is happy
    to provide my service. How can I get ant
    and tomcat to see 'mystuff.zip' or 'foo.jar'
    or whatever.
    Note: I was able to get past these problems
    using jwsdp-1_0-ea1 but (sigh) nothing learned there
    seems to help here.
    -joe

    Hi joe
    I made changes to targets.xml (in jwsdp-1_0\docs\tutorial\examples\jaxrpc\common) to include my own jar files.
    To enable Tomcat to see the jar files when I install the service, I copied them into jwsdp-1_0\common\lib.
    Here is the modified targets.xml (from Windows):
    <target name="compile-server" depends="prepare" description="Compiles the server-side source code">
    <echo message="Compiling the server-side source code...." />
    <javac srcdir="src" destdir="${build}/shared"
    includes="net\agmodel\metsoap\*.java"
    excludes="net\agmodel\metsoap\*Client.java"
    classpath="C:/jwsdp-1_0/common/lib/genericbroker.jar:C:/jwsdp-1_0/common/lib/weatherdata.jar" />
    </target>
    <target name="compile-client" description="Compiles the client-side source code">
    <echo message="Compiling the client source code...." />
    <javac srcdir="src" destdir="${build}/client" classpath="${jwsdp-jars}:build/shared:build/client:C:\jwsdp-1_0\common\lib\genericbroker.jar:C:\jwsdp-1_0\common\lib\weatherdata.jar" includes="net/agmodel/metsoap/*Client.java" />
    </target>
    Hope this helps.
    Good luck
    Matthew

Maybe you are looking for

  • Error in PDF Conversion

    Hi..am converting spool output to pdf using the FM 'CONVERT_ABAPSPOOLJOB_2_PDF'.  But the resultant output table contains just scrap. My internal output table contains 10 columns and 7 rows. Kindly let me know a solution for this.   CALL FUNCTION 'CO

  • PO rejected due to freight

    Hi All,             There was a PO created with no freight chargesin conditions. Now there is a problem in EDI which got rejected for " Invalid Freight charges for the PO number ############ " . Now, the vendor wants to add freight charges to the PO

  • Transporting ABAP proxy objects from one environment to another

    Hi    I have  ABAP client proxy objects ( classes in ECC 5.0 and the corresponding XI message interfaces on the XI server ) - in my development environment. I need to move the ABAP proxy objects to the Qa environment. Two ways of doing this come to m

  • Remove element in linked list linked list

    here's my codes public class Student     private String name, matric;     public Student(){}     public Student( String name, String matric)        this.name = name;        this.matric = matric;      public String getName()      { return name;}     

  • Convert package to function..

    can anyone convert this package to function so that we can use it in sql command.. {color:#993300}create or replace package metaphone is function generate(s varchar2) return varchar2; end metaphone; show errors;{color} {color:#993300}create or replac