Problems with jax-rpc HelloWorld sample

Hi
Running on Linux Red Hat 9.0
Jwsdp 1.3
I'm following the jwsdp tutorial trying to build the jax-rpc HelloWorld sample. I do what the tutorial says:
"ant build" in the sample directory but it "Fails" with this message:
init:
[echo] -------- HelloWorld Sample --------
prepare:
generate-server:
edit-config:
[wscompile] modeler error: failed to parse document at "/home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld//home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorl
d/etc/HelloWorldService.wsdl": java.io.FileNotFoundException: /home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/Hell
oWorld/etc/HelloWorldService.wsdl (No such file or directory)
[wscompile] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildModel(WSDLModelerBase.java:179)
[wscompile] at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:85)
[wscompile] at com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:61)
[wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:564)
[wscompile] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:40)
[wscompile] at com.sun.xml.rpc.tools.ant.Wscompile.execute(Wscompile.java:686)
[wscompile] at org.apache.tools.ant.Task.perform(Task.java:341)
[wscompile] at org.apache.tools.ant.Target.execute(Target.java:309)
[wscompile] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[wscompile] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[wscompile] at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[wscompile] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[wscompile] at org.apache.tools.ant.Main.start(Main.java:196)
[wscompile] at org.apache.tools.ant.Main.main(Main.java:235)
[wscompile] CAUSE:
[wscompile] failed to parse document at "/home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld//home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/etc/HelloWorl
dService.wsdl": java.io.FileNotFoundException: /home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/etc/Hell
oWorldService.wsdl (No such file or directory)
[wscompile] at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.java:252)
[wscompile] at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitions(WSDLParser.java:170)
[wscompile] at com.sun.xml.rpc.wsdl.parser.WSDLParser.parse(WSDLParser.java:162)
[wscompile] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildModel(WSDLModelerBase.java:126)
[wscompile] at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:85)
[wscompile] at com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:61)
[wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:564)
[wscompile] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:40)
[wscompile] at com.sun.xml.rpc.tools.ant.Wscompile.execute(Wscompile.java:686)
[wscompile] at org.apache.tools.ant.Task.perform(Task.java:341)
[wscompile] at org.apache.tools.ant.Target.execute(Target.java:309)
[wscompile] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[wscompile] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[wscompile] at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[wscompile] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[wscompile] at org.apache.tools.ant.Main.start(Main.java:196)
[wscompile] at org.apache.tools.ant.Main.main(Main.java:235)
[wscompile] CAUSE:
[wscompile] java.io.FileNotFoundException: /home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/etc/HelloWor
ldService.wsdl (No such file or directory)
[wscompile] at java.io.FileInputStream.open(Native Method)
[wscompile] at java.io.FileInputStream.<init>(FileInputStream.java:106)
[wscompile] at java.io.FileInputStream.<init>(FileInputStream.java:66)
[wscompile] at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:69)
[wscompile] at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:156)
[wscompile] at java.net.URL.openStream(URL.java:913)
[wscompile] at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:947)
[wscompile] at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:893)
[wscompile] at org.apache.xerces.impl.XMLEntityManager.startDocumentEntity(XMLEntityManager.java:846)
[wscompile] at org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(XMLDocumentScannerImpl.java:264)
[wscompile] at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:513)
[wscompile] at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:595)
[wscompile] at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
[wscompile] at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:253)
[wscompile] at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:206)
[wscompile] at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.java:248)
[wscompile] at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitions(WSDLParser.java:170)
[wscompile] at com.sun.xml.rpc.wsdl.parser.WSDLParser.parse(WSDLParser.java:162)
[wscompile] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildModel(WSDLModelerBase.java:126)
[wscompile] at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:85)
[wscompile] at com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:61)
[wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:564)
[wscompile] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:40)
[wscompile] at com.sun.xml.rpc.tools.ant.Wscompile.execute(Wscompile.java:686)
[wscompile] at org.apache.tools.ant.Task.perform(Task.java:341)
[wscompile] at org.apache.tools.ant.Target.execute(Target.java:309)
[wscompile] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[wscompile] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[wscompile] at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[wscompile] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[wscompile] at org.apache.tools.ant.Main.start(Main.java:196)
[wscompile] at org.apache.tools.ant.Main.main(Main.java:235)
[wscompile] error: modeler error: failed to parse document at "/home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld//home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/He
lloWorld/etc/HelloWorldService.wsdl": java.io.FileNotFoundException: /home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/home/medimg/pablo/jwsdp-1.3/jaxrpc/sampl
es/HelloWorld/etc/HelloWorldService.wsdl (No such file or directory)
[wscompile] Command invoked: wscompile -d /home/medimg/pablo/jwsdp-1.3/jaxrpc/build/samples/HelloWorld/classes/server -import -keep -model /home/medimg/pablo/jwsdp-
1.3/jaxrpc/build/samples/HelloWorld/model-wsdl-rpcenc.xml.gz -Xprintstacktrace /home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/etc/config.xml -classpath /hom
e/medimg/pablo/jwsdp-1.3/jwsdp-shared/lib/mail.jar:/home/medimg/pablo/jwsdp-1.3/jwsdp-shared/lib/activation.jar:/home/medimg/pablo/jwsdp-1.3/jaxp/lib/jaxp-api.jar:/
home/medimg/pablo/jwsdp-1.3/jaxp/lib/endorsed/dom.jar:/home/medimg/pablo/jwsdp-1.3/jaxp/lib/endorsed/sax.jar:/home/medimg/pablo/jwsdp-1.3/jaxp/lib/endorsed/xalan.ja
r:/home/medimg/pablo/jwsdp-1.3/jaxp/lib/endorsed/xercesImpl.jar:/home/medimg/pablo/jwsdp-1.3/jaxrpc/lib/jaxrpc-api.jar:/home/medimg/pablo/jwsdp-1.3/jaxrpc/lib/jaxrp
c-spi.jar:/home/medimg/pablo/jwsdp-1.3/jaxrpc/lib/jaxrpc-impl.jar:/home/medimg/pablo/jwsdp-1.3/saaj/lib/saaj-api.jar:/home/medimg/pablo/jwsdp-1.3/saaj/lib/saaj-impl
.jar:/home/medimg/pablo/jwsdp-1.3/jwsdp-shared/lib/relaxngDatatype.jar:/home/medimg/pablo/jwsdp-1.3/jwsdp-shared/lib/xsdlib.jar:/home/medimg/pablo/jwsdp-1.3/jwsdp-s
hared/lib/jax-qname.jar:/home/medimg/pablo/jwsdp-1.3/apache-ant/lib/ant.jar:/home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/${compile.classpath}
BUILD FAILED
file:/home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/build.xml:98: wscompile failed
I took a look into the etc/config.xml file and the path location of HelloWorldService.wsdl is fine as follows
"/home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/etc/HelloWorldService.wsdl"
BUT.. after "ant build", the path in th config.xml file automatically change for:
"/home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld//home/medimg/pablo/jwsdp-1.3/jaxrpc/samples/HelloWorld/etc/HelloWorldService.wsdl"
Anybody knows how to solve this problem
HELP !!!
J.Pablo

Hi,
I guess you need some changes in your build script.
One solution would be to specify correct value for location attribute in your config.xml and then
uncomment the call to "edit-config" target as show below in your build.xml file:
<target name="generate-server" depends="prepare">
<!--antcall target="edit-config">
<param name="config.rpcenc.file" value="${config.rpcenc.file}"/>
</antcall-->
-Amol

Similar Messages

  • Problem with JAX-RPC tutorial

    I am studying "The JavaTM Web Services Tutorial"-Java API for XML-based RPC.
    When I read "Deploying the Service", I encounter some errors.
    I type "ant deploy".
    Here is error message:
    Buildfile: build.xml
    deploy:
    BUILD FAILED
    Total time: 3 seconds
    D:\jwsdp-1_0_01\docs\tutorial\examples\jaxrpc\hello\build.xml:14: java.io.FileNotFoundException: http://localhost:8080/manager/deploy?path=%2Fhello-jaxrpc
    I don't know what to do.I can't get any infomation from the tutorial.
    Please help me.Thanks.

    OK!
    I have solved this problem.
    I put build.properties in my home directory(On WinXP, C:\Documents and Settings\myProfile).
    The file looks like this:
    username=my_username
    password=my_password
    I think, when I deploy my web service to Tomcat, Tomcat need to verifiy my infomation. So, I must provide my authorization information to Tomcat.
    build.properties contains infomation which I provide.
    Read "Creating the Build Properties File" in JavaWSTutorial for more details

  • Newbie to attachment with JAX-RPC

    Hi,
    I am new to Web Services. I am developing a web services using oracle technology. I use JDeveloper 10g to create my web services using stateless Java class. Everything are so simple with clicking here and there to generate my WSDL file, web service stub and so on. Oracle use their own servlet as shown below.
    <servlet-name>MyWebService1</servlet-name>
    <servlet-class>oracle.j2ee.ws.StatelessJavaRpcWebService</servlet-class>I had created my interface and implements (Hello.java & HelloImpl.java respectively). Having a method public String sayHello(String param).
    Now, I want to send a attachment (or more than one) to the client using JAX-RPC. My problem now is don't-know-where-to-start. I have gone through a few example but most of the examples are so misleading. I understand that the endpoint of a web services is from servlet. Am I suppose to start my coding to attach the document(*.doc, *.pdf, and so on) to the SOAP object in my Hello.java or HelloImpl.java? Correct me if I am wrong.
    Anyone out there has a sample code of how-to send attachment with JAX-RPC with step-by-step (especially using oracle jdeveloper 10g if exist) article, if any?
    Please help, I am lost. Thanks in advance.
    regards,
    yientau

    Hi,
    I am new to Web Services. I am developing a web services using oracle technology. I use JDeveloper 10g to create my web services using stateless Java class. Everything are so simple with clicking here and there to generate my WSDL file, web service stub and so on. Oracle use their own servlet as shown below.
    <servlet-name>MyWebService1</servlet-name>
    <servlet-class>oracle.j2ee.ws.StatelessJavaRpcWebService</servlet-class>I had created my interface and implements (Hello.java & HelloImpl.java respectively). Having a method public String sayHello(String param).
    Now, I want to send a attachment (or more than one) to the client using JAX-RPC. My problem now is don't-know-where-to-start. I have gone through a few example but most of the examples are so misleading. I understand that the endpoint of a web services is from servlet. Am I suppose to start my coding to attach the document(*.doc, *.pdf, and so on) to the SOAP object in my Hello.java or HelloImpl.java? Correct me if I am wrong.
    Anyone out there has a sample code of how-to send attachment with JAX-RPC with step-by-step (especially using oracle jdeveloper 10g if exist) article, if any?
    Please help, I am lost. Thanks in advance.
    regards,
    yientau

  • JAX-RPC Additional Sample Code

    I am attempting to modify the JAX-RPC HelloWorld scripts to build my own custom application. Is there someplace I can look for more information on creating new JAX-RPC applications? The HelloWorld sample is somewhat limited in explaining what the build scripts are doing, and why.
    Some documentation that describes the different requirements for J2EE app servers and Tomcat would also be helpful.

    section 3.8 of http://java.sun.com/blueprints/guidelines/designing_webservices/html/ details the j2ee side of things

  • Problem with compilation of HelloWorld.java

    hi,
    getting problem with compilation of HelloWorld.java
    CLASSPATH--- C:\java
    PATH--- C:\j2sdk1.4.2_04\bin
    HelloWorld.java source code in: C:\java
    On cmd prompt:
    C:\java>javac HelloWorld.java
    error: cannot read: HelloWorld.java
    1 error
    pls help me with this
    rgds,
    sanlearns

    What does this command yield?
    dir HelloWorld.java

  • How to pass SOAP Attachments with JAX-RPC Web Service

    I'm confused...
    This sample shows how to send/receive SOAP attachments by using the JAX-RPC Handler mechanism. Can somebody confirm if this is the preferred way to do this. I've seen an example wich does something like:
      public interface AttachmentService extends Remote {
        public String storeDocumentService(javax.activation.DataHandler dh, String filename) throws RemoteException;
      }and then uses JAX-RPC utilities to create wsdl, stubs and stuff. Does this have the same result, as what the OTN example shows (from an architecture perspective?
    Thx,
    Jan.

    Well, how an attachment is processed depends on your application logic...if your application logic requires to processing attachments and verify it before processing the SOAP message, handlers could be better option.
    If you need to process the attachment while processing the SOAP message, you can do it in the service implementation class.
    In both the cases you need to get access to SOAPMessage object and from there get the attachments with getAttachments method.

  • Batch operations with JAX-RPC

    I have read a number of different tutorials about Web services and JAX-RPC, and have to come the conclusion that JAX-RPC is the correct approach to use for my project. Most of the examples I have seen involve invoking services which perform a 'one-shot' action e.g. get a Stock Quote.
    My first question is that I am not sure for such 'one-shot' services, how much support there is in the API for sending/receiving arrays of data items. e.g. sending a user's data to a web service which includes an associated list of phone numbers.
    Further if I wanted to send user's data which included an array of nested objects, would I have to implement a serializer/deserialiser plugin?
    My main concern really is how best to handle a batch of requests to the service. My current thought is to use JAX-RPC with an xml document attachment - listing of a number of user's data and their parameters. A 'batch service' would return a response immediately then work through the document and invoke the existing 'single shot' service - which will be hosted on the same web server.
    Is this approach which brings together a number of different ideas from the various JAX-RPC tutorials viable? Are they any better alternatives?
    For example would it be better to implement a JAX-RPC for the single shot service requests and use JAXM for batch service requests? (On the server-side I would still be expecting the batch service to re-use the single-shot service). Can JAXM and JAX-RPC services co-exist on the same web server? I realise that there would be WSDL generated for the JAX-RPC service alone and so for a client developer there will be an inconsistency in terms of how the Web service is accessed.
    Thanks in anticipation

    Hello, I'll try and go through your questions one at a time:
    My first question is that I am not sure for such 'one-shot' services, how much support there is in the API for
    sending/receiving arrays of data items. e.g. sending a user's data to a web service which includes an
    associated list of phone numbers.JAX-RPC has built in support for List type operations. There is no problem sending Arrays of information over the wire. If you were sending an Object of type User, for instance, there would be no problem with User having a List of PhoneNumber types objects as part of it's structure.
    Further if I wanted to send user's data which included an array of nested objects, would I have to implement
    a serializer/deserialiser plugin?Condintional No. If the nested objects contained only data structures that JAX-RPC knows how to deal with, your fine (things like java.lang.String or java.lang.Integer). However, if your nested objects contain types that JAX-RPC does not know how to deal with (i.e. java.sql.TimeStamp), you will have to write a custom serializer/deserializer just like you would if you were passing those objects without them being nested.
    My main concern really is how best to handle a batch of requests to the service. My current thought is to
    use JAX-RPC with an xml document attachment - listing of a number of user's data and their parameters.
    A 'batch service' would return a response immediately then work through the document and invoke the
    existing 'single shot' service - which will be hosted on the same web server.
    Is this approach which brings together a number of different ideas from the various JAX-RPC tutorials
    viable? Are they any better alternatives?As per above you shouldn't have to send an xml document attachment, but I guess you could. Also, for batch processing type tasks you probably want to look at the asychronous mode mentioned in the JAX-RPC part of the JWSDP tutorial.
    For example would it be better to implement a JAX-RPC for the single shot service requests and use
    JAXM for batch service requests? (On the server-side I would still be expecting the batch service to re-use
    the single-shot service). Can JAXM and JAX-RPC services co-exist on the same web server? I realise
    that there would be WSDL generated for the JAX-RPC service alone and so for a client developer there
    will be an inconsistency in terms of how the Web service is accessed.Well, it really is up to you at this point. I assume that you want/need to use web services for access (as opposed to EJBs or any other method). So, I would look at an asychronous web service implementation.

  • Consuming a web service in Oracle9i with JAX-RPC calling

    Hello,
    i need to generate web service client in oracle9i db using jpublisher. And i found in this tutorial http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm that Oracle 9i is not supporting JAX-RPC web services calling, because of JDK 1.3.
    Is there any possibility to consume a web service using JAX-RPC instead of Oracle SOAP in Oracle 9.2 database ?

    I use utl_http pl/sql supplied package for this need - http://akdora.wordpress.com/2007/08/03/calling-a-web-service-by-plsql-utl_http/
    But I believe you may find more information with these resource -
    http://www.oracle.com/technology/sample_code/tech/java/web_services/index.html
    http://forums.oracle.com/forums/forum.jspa?forumID=97
    http://forums.oracle.com/forums/forum.jspa?forumID=99
    http://www.oracle.com/technology/sample_code/tech/java/jsp/dbwebservices.html
    Best regards.

  • Problems with XML-RPC

    Hi everybody.
    Sorry, I've got a french accent, then if you don't understand, dont' be worry ^^
    I try using the apache's xmpl-rpc package, and I have got some problems with the xml-rpc client.
    Here my source :
    public interface ICalculator {
         public int add(int i1, int i2);
         public int subtract(int i1, int i2);
    public class Calculator implements ICalculator {
         public int add(int i1, int i2) {
              return i1 + i2;
         public int subtract(int i1, int i2) {
              return i1 - i2;
    import org.apache.xmlrpc.server.PropertyHandlerMapping;
    import org.apache.xmlrpc.server.XmlRpcServer;
    import org.apache.xmlrpc.server.XmlRpcServerConfigImpl;
    import org.apache.xmlrpc.webserver.WebServer;
    public class Server {
    private static final int port = 8080;
    public static void main(String[] args) throws Exception {
    WebServer webServer = new WebServer(port);
    XmlRpcServer xmlRpcServer = webServer.getXmlRpcServer();
    PropertyHandlerMapping phm = new PropertyHandlerMapping();
    phm.addHandler(Calculator.class.getName(), Calculator.class);
    phm.addHandler(ICalculator.class.getName(), ICalculator.class);
    xmlRpcServer.setHandlerMapping(phm);
    XmlRpcServerConfigImpl serverConfig =
    (XmlRpcServerConfigImpl) xmlRpcServer.getConfig();
    serverConfig.setEnabledForExtensions(true);
    serverConfig.setContentLengthOptional(false);
    webServer.start();
    System.out.println("Serveur XML-RPC is ready");
    import org.apache.xmlrpc.client.XmlRpcClient;
    import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
    import org.apache.xmlrpc.client.XmlRpcCommonsTransportFactory;
    import org.apache.xmlrpc.client.util.ClientFactory;
    public class Client {
    public static void main(String[] args) throws Exception {
    // create configuration
    XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
    config.setServerURL(new URL("http://127.0.0.1:8080/xmlrpc"));
    config.setEnabledForExtensions(true);
    config.setConnectionTimeout(60 * 1000);
    config.setReplyTimeout(60 * 1000);
    XmlRpcClient client = new XmlRpcClient();
    System.out.println("Connection");
    // use Commons HttpClient as transport
    client.setTransportFactory(
    new XmlRpcCommonsTransportFactory(client));
    // set configuration
    client.setConfig(config);
    ClientFactory factory = new ClientFactory(client);
    ICalculator calc = (ICalculator)factory.newInstance(ICalculator.class); //Problems here !!!
    System.out.println("Calculing");
    System.out.println("Result : " + calc.add(2, 3));
    And the error is:
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpException
         at org.apache.xmlrpc.client.XmlRpcCommonsTransportFactory.getTransport(XmlRpcCommonsTransportFactory.java:31)
         at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
         at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
         at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
         at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
         at org.apache.xmlrpc.client.util.ClientFactory$1.invoke(ClientFactory.java:104)
         at $Proxy0.add(Unknown Source)
         at projet.Client.main(Client.java:45)
    Can you help please ?

    The problem is not related to your code, but it seems that there is a missing jar which contains the class org.apache.commons.httpclient.HttpException or perhaps the jar isn't included in your CLASSPATH.
    The jar seems to be commons-httpclient.jar you can found at http://jakarta.apache.org/commons/httpclient

  • Big problems with creative webcam instant (sample included)

    yesterday i purchased a creative webcam instant, and i am dissapointed in the quality of the video.
    The frame rate is great, however there is artifacting and the video jumps around all over the place.
    I have never had a problem with any other imaging devices before, so i cant see why this is happening with this camera.
    This happens with the creative webcam center, and also in any other application that uses video from the camera (such as any instant messenger program)
    Here is a .88 meg file to show you how the video jumps around.
    http://steven.moondrummer.com/misc/space/4328.avi

    Blah! The WEBCamInstant is "cheap" & nasty & for beach light only.
    1. You have a USB-2?
    -> calgarysteven ... 0-24-2004 09:47 PM
    2. Try in WebCamCenter - Capture - Source - Exposure to Min. Too dark?

  • IP address of a remote client with JAX-RPC

    Hi all.
    I wrote a Web Service using JAX-RPC and I'd like to see the IP address of the machine requesting the methods exposed by the service.
    Is there any way to do this?
    Thanks
    Fabio

    I answare myself... let me know if this solution is good. tnx
    Fabio
    import javax.xml.rpc.server.*;
    import javax.xml.rpc.handler.MessageContext;
    import javax.servlet.http.HttpServletRequest;
    public class ServiceImpl implements ServiceIF, ServiceLifecycle {
         public void init(Object context) {
              ServletEndpointContext ctx = (ServletEndpointContext)context;
         public void foo() {
              MessageContext msgCtx = ctx.getMessageContext();
              HttpServletRequest req = (HttpServletRequest)msgCtx.getProperty("com.sun.xml.rpc.server.http.HttpServletRequest");
              String remoteIPAddress = req.getRemoteAddr();
    }

  • Problem with jax-ws and optional attributes

    Hello,
    I'm developing some web services, starting by defining the object model in schemas, then doing WSDL first to define the services.
    I've come across a problem that appears to be caused by jax-ws not properly handling optional attributes. I've tried this with both 2.0 and 2.1ea3 and both fail the same way.
    I created a simplified test case to repeatably demonstrate the problem.
    The type definition for the object looks like this :
    <xsd:complexType name="TestObject" >
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="subId" type="xsd:integer" use="optional" />
    </xsd:complexType>
    And in the wsdl:
    <wsdl:message name="testRequest">
    <wsdl:part name="testrequest" type="mf:TestObject"/>
    </wsdl:message>
    <wsdl:operation name="testAction">
    <wsdl:input name="testRequest" message="mf:testRequest"/>
    <wsdl:output name="successResponse" message="mf:successResponse"/>
    </wsdl:operation>
    and the test code:
    public void testOptionalAttrs()
    TestObject testObj = new TestObject();
    testObj.setName("testName");
    //testObj.setSubId(2);
    MDSProvisioningResourcePortType resourceManager = factory.getGatewayResourceManager();
    boolean success = resourceManager.testAction(testObj);
    Running the test code with the 'setSubId' uncommented works.
    With the 'setSubId' call commented out out results in this error:
    javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
    - with linked exception:
    [com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException]
         at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:301)
         at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:124)
         at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:91)
         at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:225)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:121)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:69)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:541)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:497)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:392)
         at com.sun.xml.ws.client.Stub.process(Stub.java:213)
         at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:238)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:212)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
         at $Proxy58.testAction(Unknown Source)
         at com.qualcomm.mf.prov.ProvisioningGatewayClientFactoryTest.testOptionalAttrs(ProvisioningGatewayClientFactoryTest.java:118)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
         at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
         at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
         at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
         at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
         at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
         at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
         at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
         at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
         at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
         at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
         at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    Caused by: javax.xml.bind.MarshalException
    - with linked exception:
    [com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException]
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:255)
         at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:64)
         at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:105)
         at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:292)
         ... 35 more
    Caused by: com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException
         at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:224)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:239)
         at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeAttributes(ClassBeanInfoImpl.java:302)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:661)
         at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:111)
         at com.sun.xml.bind.v2.runtime.CompositeStructureBeanInfo.serializeBody(CompositeStructureBeanInfo.java:71)
         at com.sun.xml.bind.v2.runtime.CompositeStructureBeanInfo.serializeBody(CompositeStructureBeanInfo.java:19)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:663)
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:250)
         ... 38 more
    Caused by: com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException
         at com.sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.get(AdaptedAccessor.java:33)
         at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.print(TransducedAccessor.java:199)
         at com.sun.xml.bind.v2.runtime.property.AttributeProperty.serializeAttributes(AttributeProperty.java:61)
         at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeAttributes(ClassBeanInfoImpl.java:295)
         ... 44 more
    Caused by: java.lang.NullPointerException
         at org.w3._2001.xmlschema.Adapter3.marshal(Adapter3.java:23)
         at org.w3._2001.xmlschema.Adapter3.marshal(Adapter3.java:1)
         at com.sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.get(AdaptedAccessor.java:31)
         ... 47 more
    So am I missing something or is jax-ws not handling optional attributes correctly?
    Thanks,
    Hank

    Hi,
    This is not a direct answer to your question. But if you want to build restful web services with Weblogic 10.3, why not use Jersey . It is the implementation of the new JAX-RS spec. In my experience, although Jersey is part of the Java EE 6 spec, it appears to work ok with Java EE 5 container like Weblogic 10.3.1. The [JAX-RS section of Java EE tutorial|http://java.sun.com/javaee/6/docs/tutorial/doc/giepu.html] is another good source of example code.
    Edited by: vamsee2 on Sep 25, 2009 12:38 PM

  • Using MIME with JAX-RPC

    Hi,
    I am trying to send simple MIME body part using RPC.
    Where can I find a working code sample ?
    My problem is that I don't know how to pass the SOAPContext to the server side.
    Or failing while trying to deliver an activation DataHandler as parameter to my server side method.
    What is the correct way to do that (without using messaging) ?
    Thanks,
    Eran B.

    Please do not refer me to:
    http://xml.apache.org/soap samples/mime/MimeTest*.java
    The sample does not implement fully this feature.

  • Problems with ADF when running sample EJB, JPA, JSF Tutorial

    Hi,
    I'm new to jDeveloper.
    I've downloaded the version 11.1.1.2.0 and tried to do my first tutorials with the product.
    I started with the sample 'Build Applications with EJB, JPA and JSF' and run to following problems:
    - Part1: Step 10 expose the EJb as a Data Control
    Here right-click FODFacadeBean.java and choose Create Data Control.
    this option 'Create Data Control' does not come up at all. There is not such option
    - Part 2: Step 1 Add Tag Libraries to a project
    The option to select ' ADF Faces Components 11 '
    does not come up either. I can not see any ADF related options...
    Is there something missing from my installation, as I can not access these ADF components ?
    Should I include the ADF components at some stage during the installation to be able to access these
    or is this some licencing option ?
    I downloaded the product yesterday from the public download site, filename jdevstudio11112install.exe
    Jan-Erik

    Hi,
    I'm new to jDeveloper.Welcome to OTN :)
    I've downloaded the version 11.1.1.2.0 and tried to do my first tutorials with the product.
    I started with the sample 'Build Applications with EJB, JPA and JSF' and run to following problems:
    - Part1: Step 10 expose the EJb as a Data Control
    Here right-click FODFacadeBean.java and choose Create Data Control.
    this option 'Create Data Control' does not come up at all. There is not such optionI just tried and able to see the option (and able to generate the DC from the facade as well). Could you please share the tutorial link to see if you are missing something?
    >
    - Part 2: Step 1 Add Tag Libraries to a project
    The option to select ' ADF Faces Components 11 '
    does not come up either. I can not see any ADF related options...Did you select Fusion Web Application (ADF) Template for creating your application? If yes, the ADF Faces Components 11 tag library would've been added by default (Check out in the list of tag libraries that are already added - before clicking on the Add button).
    -Arun

  • Problem with XML Data Streaming sample

    Hello.
    I'm learning to use SAX API in order to insert large XML files into database. I'm trying to run sample xdksample_040602.zip (data stream sample using pl/sql and
    SAX). Everything runs fine until I run "ExDocumentTest.sql" file. I get this error:
    Errors for PROCEDURE DOCEXPAND:
    PL/SQL:SQL Statement ignored
    PLS-00385: type mismatch found at 'P_XML' in SELECT...INTO statement
    PL/SQL:SQL Statement ignored
    PLS-00385:type mismatch found at 'P_DTD' in SELECT...INTO statement
    Please I need to solve this problem. Or... where can I find another sample to do what I want? this seems to be the only sample for inserting XML into the database
    with SAX. I already know how to do it with DOM.
    Eric.

    Hi Eric,
    There is a SAX Loader Sample Application available at XML DB Sample corner page that also demonstrates the insertion of XML into the database with SAX.
    You can find this sample at the following URL:
    http://otn.oracle.com/sample_code/tech/xml/xmldb/index.html
    Hope it helps
    Shefali

Maybe you are looking for

  • Wireless VoIP roaming - getting an 802.11g phone to roam with CCX / CCKM

    Hello, Our group is facing a pretty difficult issue at the moment, we are trying to deploy a wireless Avaya VoIP phone at one of our sites in Australia. The site in question is located in Western Australia, which is on the other side of the continent

  • Unable to edit reports in FR Studio

    Hi All,         I'm using Hyperion11.1.2.2 and  getting the error bellow when trying to edit a FR report into FR Studio. Earlier it was working fine but now its not opening the reports [2013-09-05T17:31:16.747-03:00] [FinancialReporting0] [ERROR] []

  • My Adobe XI software no longer converts Word to PDF files with hyperlinks or page layout preserved.

    Is anyone else having the same problem where the initial installation worked fine and over time, you are no longer able to adjust the setting in the 'convert to PDF' menu for Word documents?  I am now faced with Word documents that lose their hyperli

  • WS Security in ADF BC v/s Non ADF BC services

    Hi, I came to know about ADB BC services being more functionally secure than the plain web services. My question is what makes the ADF BC services functionally secure? If we have to make plain web services secure, what is the procedure? Also, If i th

  • I need an example vi about stepper motor control

    Hi. My system is consist of pc-tio-10 controller, SLOSYN SS2000D6 driver, NEMA 17 stepper motor,and labview5.1. I'm trying to give a pulse to the motor, take a pulse from the motor and control the nmotor. But I don't know what to do. So I want to see