JAX-RPC client problems and proxy

I have deployed a JAX-RPC service in JBoss, but on the client side, I am getting NullPointerException when I attempt to access the service. I believe I'm not creating the proxy in the client properly. Where I need help is:
1. What should the proper ENDPOINT URI be for the service (my variable "destination" shown below).
2. What should the code in createProxy() look like?
WEB Services Shows:
===================
VehicleInfoService ACTIVE
Address: http://myhost:8080/VehicleInfoService/vehicle
WSDL: http://myhost:8080/VehicleInfoService/vehicle?WSDL
Port QName: {http://myhost:8080/wsdl/VehicleInfoService}VehicleInfoServiceIFPort
Remote interface: testsoap.VehicleInfoServiceIF
Implementation class: testsoap.VehicleInfoServiceImpl
Model: http://myhost:8080/VehicleInfoService/vehicle?model
CLIENT CODE
============
import javax.xml.rpc.*;
import javax.xml.rpc.Stub;
import testsoap.*;
public class TestSOAP
VehicleInfoServiceIF vehicleInfoServiceInf;
private String statusMessage = null;
private static String destination = "http://myhost:8080/VehicleInfoService/v
ehicle";
public TestSOAP()
try
Stub stub = createProxy();
// Address of the service
stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
destination);
vehicleInfoServiceInf = (VehicleInfoServiceIF)stub;
catch (Exception ex)
statusMessage = "Error creating Proxy stub: " + ex.getMessage();
private static Stub createProxy()
return(Stub)(new VehicleInfoService_Impl());

To reply to own posting, I finally discovered that I had a problem with my config.xml file. Once I corrected that, I was able to modify the createProxy entry to:
private static Stub createProxy()
return(Stub)(new testacp.VehicleInfoService_Impl().getVehicleInfoServiceIFPo
rt());
Corrected config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<wsdl location="http://mybox:8080/VehicleInfoService/vehicle?WSDL"
packageName="testsoap"/>
</configuration>
These changes fixed my problem. With the correct entries in config.xml, I no longer got compile errors with "getVehicleInfoServiceIFPort Not Found".

Similar Messages

  • JAX-RPC client access a JAX-WS services

    Hello all,
    There is a little problem I had with webservices and googling for a solution has not help so far.
    I am accessing a JAX-WS webservice from a J2SE 1.4.2 JAX-RPC client application and getting a NoSuchMethodError error from one of the stubs at runtime. The method call is rather a HelloWorld concept but it has not been possible.
    This are the step I took (I am using netbeans 6.0).
    1. I downloaded the JAX-RPC plugin on netbeans
    2. Download the stubs using the wsdl url. I am using the netbeans wizard for this process.
    3. Write my code for get a handle to the endpoint. Using the ServiceFactory.loadClass().
    4. Call the method on the
    Can anyone please help me.

    To make things a little more clearer, this is a post of the error gotten at runtime...
            java.lang.NoSuchMethodError: java.util.Collections.emptyList()Ljava/util/List;
            at com.sun.xml.messaging.saaj.soap.MessageImpl.<clinit>(MessageImpl.java:755)
            at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:47)
            at com.sun.xml.rpc.soap.message.SOAPMessageContext.createMessage(SOAPMessageContext.java:137)
            at com.sun.xml.rpc.client.StreamingSenderState.<init>(StreamingSenderState.java:30)
            at com.sun.xml.rpc.client.StubBase._start(StubBase.java:92)
            at mck.practise.oracle.plsql.PlsqlService_Stub.sayHello(PlsqlService_Stub.java:54)
            at mck.practise.oracle.plsql.HelloWorld.sayRPCHello(HelloWorld.java:34)
            at mck.practise.oracle.plsql.HelloWorld.main(HelloWorld.java:22)The suprising thing is that if I change the application's java platform from JDK 1.4 to Java 5 using the netbeans projects property window, everything works fine.
    Can anyone still suggest on this.
    Regards,

  • Adding Jax-RPC Handlers to OSB Proxy Service

    Hi All,
    I am new to OSB and wanted to know if I can add a Client side (My proxy Service -> external business service) Handler chain to OSB Proxy Services. I know how to add handlers to general webservice. But is there any way to intercept the request by adding handlers to OSB proxy service before it goes to business service?
    Any help is highly appreciated.
    Thanks,
    Swetha

    Hi Eric,
    Thanks for your response. we are trying to access WSRR( manages end point urls for 7 different environments) and generate the end point dynamically at the design time. As we figured out WSRR is not compatible with OSB we are trying to implement these client side (OSB Proxy service) handlers which would get the dynamic endpoint depending on the environment used. I was able to create the handlers for this and set the jar in the classpath but the client service which should be using these handlers have to have these handlers defined in the deployment descriptor(web.xml) which am unable to see with a OSB project.
    Will there be a deployment descriptor(web.xml/webservices.xml) associated with Proxy services on OSB? Or Is there any other way to add custom JAX-RPC Handlers to a proxy service? Or is there any way to connect to WSRR directly?
    Thanks,
    Swetha

  • JAX-RPC client with JDeveloper 12c

    Hello,
    It's the first time I use jax-rpc (I'm used to jax-ws) and looking for help.
    I need to create a client for a JAX-RPC web service using JDeveloper 12c.
    The customer provided to me a WSDL file (I don't have access to the webservice yet). In JDeveloper I created as usual a "Web Service Client and Proxy" providing that wsdl file, but I think the generated code is for a JAX-WS (since there are @WebMethod, @WebServiceClient and @WebService notations that I understood should not be present in JAX-RPC clients.
    Can anyone point me to some documentation about JAX-RPC client developing in JDeveloper 12?
    Thank you,
    Marco

    To make things a little more clearer, this is a post of the error gotten at runtime...
            java.lang.NoSuchMethodError: java.util.Collections.emptyList()Ljava/util/List;
            at com.sun.xml.messaging.saaj.soap.MessageImpl.<clinit>(MessageImpl.java:755)
            at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:47)
            at com.sun.xml.rpc.soap.message.SOAPMessageContext.createMessage(SOAPMessageContext.java:137)
            at com.sun.xml.rpc.client.StreamingSenderState.<init>(StreamingSenderState.java:30)
            at com.sun.xml.rpc.client.StubBase._start(StubBase.java:92)
            at mck.practise.oracle.plsql.PlsqlService_Stub.sayHello(PlsqlService_Stub.java:54)
            at mck.practise.oracle.plsql.HelloWorld.sayRPCHello(HelloWorld.java:34)
            at mck.practise.oracle.plsql.HelloWorld.main(HelloWorld.java:22)The suprising thing is that if I change the application's java platform from JDK 1.4 to Java 5 using the netbeans projects property window, everything works fine.
    Can anyone still suggest on this.
    Regards,

  • JAX-RPC Client for VB-SoapToolkit3.0 WebService

    I need to develop a JAX-RPC client for a VB6.0 WebService (the WebService being generated through MS SoapToolkit3.0).
    I'm using JWSDP 1.0_01. The WSDL that the JWSDP is using to generate the stubs is the one generated by the MS SoapToolkit. My WebService
    has only one method (Public Test(xpto As String)As String) that receives and returns a string.
    So what's the problem:
    - JAX-RPC client sends a SOAP packet different than what the WebService expects, especially in the namespaces. JAX-RPC generates some strange namespaces, like xmlns:ns0="xpto" (xpto is the name of the argument of the WebService) or xmlns:ns1="Result xpto"
    - Looking at the JAX-RPC generated WebService interface, I see that instead of String, the method test receives a StringHolder (???). What's a string holder, and why isn't a String?
    The resumed message returned by the WebService:
    <mserror:description>WSDLReader:None of the matching operations for soapAction http://tempuri.org/Test/action/WS.Test could successfully load the incoming request. Potential typemapper problem HRESULT=0x80070057: The parameter is incorrect.
    - Server:One of the parameters supplied is invalid. HRESULT=0x80070057: The parameter is incorrect.
    </mserror:description>
    Any help would be apreciated.
    Thanks

    Can you send the WSDL that you used to generate the JAXRPC client?
    Thanks

  • Deploying JAX-RPC Client for client-side application

    I have a java Swing client side application that I am attempting to integrate web services capabilities into. The web services were already written (new to web services myself), I am just calling them. Using Oracle's JDeveloper I managed to create proxies for the web services and to call them just fine, once I added the JAX-RPC Client library to my project.
    My only issue is how to deploy. Again within the development environment all works perfectly. I tried references to all the jar files identified by the Oracle JAX-RPC Client library to know luck. I've referenced other jar files I use for deployment with no issues.
    Anyone created standalone applciations before that call web services? How did you deploy the web service related libraries.
    I'm using JDeveloper 10.1.3.3.0 with Java 1.5.0_06.
    I appreciate any guidance provided.

    I found a solution, but it shouldn't have been that difficult. JDeveloper provides a view of what JARs are part of a library. I used that as a starting point of what JARs might be required for my instance. I switched to linking to the individual JARs within their JDeveloper installed locations directly instead of the single library. I then systematically starting removing them one-by-one from my list to determine which were actually being used in my implementation. I did this because there were way too many to deploy. Once that was done I created a separate directory for holding the required JARs files local to my application.
    Lastly, I had to take care of any internal references within the JARs that may link to other JAR files. So I opened each JAR and looked at its manifest and copied those files over. Then I repeated the steps of deternmining if they were really necessary and copying over other internal references until I had the complete list.
    In the end I ended up with a considerable smaller list of JARs then if I had just assumed all JARs within the library and their references. However, it was much more difficult then it needed to be.

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

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

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

  • JAX RPC extension: Problem with document/literal and MyType[]

    Hi,
    I have installed the JAX RPC extension and want to generate a stub from my WSDL file. The WSDL describes a document/literal binding.
    Problem:
    A webservice server method like:
    public wineshop.model.common.SimpleProducer[] getSimpleProducerList() throws RemoteException;
    is translated into a stub method like:
    public UnknownType getSimpleProducerList() throws Exception {..}
    Is an array of own types with the binding style "document/literal" not supported in JAX RPC 1.4 or is it just a bug?
    The WSDL file is generated by JAX RPC 1.4.
    I have installed JWSDP-1.5 and generated a stub with wscompile from the WSDL file. The generated stub has the correct method return type:
    public wineshop.ws.client.SimpleProducer[] getSimpleProducerList()
    throws java.rmi.RemoteException
    It there a workaround like replacing some JDev JARs with JWSDP-1.5 to solve the problem?
    Any hints are welcome.
    Thanks Markus

    repost.....

  • Jax-RPC Client side: How to use multiple X509 client certs ?

    hi, (excuse me for my english)
    i'm looking for an answer to this question:
    I'm using the JAX-RPC libraries (JWSDP 2.0) for a web services client application in my app server (tomcat 4 under 1.4 Sun JVM) with HTTPS connection. All works fine when i'm using system.Setproperties for keystore and trustore.
    Buk now, I want to use different client SSL keys for the same app to consume the web service (one SSL client key for a group of users).
    Is it possible ?
    i've tried using custom SSLSocketFactory and custom KeyManager but it won't works: when the SSL connection is well established once, i can connect to the app with an invalide client cert ! (it seems SSL connection is in cache and i dont't know how to disable this cache).
    I have read some threads on this problem without answers ! (http://forum.java.sun.com/thread.jspa?forumID=331&threadID=333010 and http://forum.java.sun.com/thread.jspa?forumID=331&threadID=600372)
    Thanks
    Edited by: Buck007 on May 26, 2008 9:14 AM

    I have the same problem. If you find the solution please post it here :)
    thanks

  • JAX-RPC Client - java.rmi.RemoteException:/getPort best practices

    We are working on java webservices(JAX-RPC style) and while consuming Java WebService sometime getting ‘Remote Exception’ .I have generated client side code with weblogic ant task “clientgen”.
    1: Exception
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [Failed to invoke end component {service implementation class name} (POJO), operation= {webmethode name}
    -> Failed to invoke method
    ] FaultActor [null] Detail [<detail><java:string xmlns:java="java.io">java.lang.NullPointerException
    </java:string></detail>]; nested exception is:
    weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Failed to invoke end component {service implementation class name} (POJO), operation={webmethode name}
    -> Failed to invoke method
    {Package name}.ManagementPortType_Stub.createXXX(xxxPortType_Stub.java:37) // This line is clientgen generated code
    {From this line its clear that clientgen generated code failed to get webservice port}
    2: Following is our implementation to invoke webservice:
    ManagementService service =
    new ManagementService_Impl(“WSDL URL”)
    ManagementPortType port = service.getManagerHTTPPort();
    Port.getServiceName();
    Our code is executing first two lines for every webservice request, and as per our observation these two lines (mark in bold) is taking long time to execute and due to this sometime gives ‘remote exception’ (when there is more request for web service consumption).
    3: My questions:
    1> Why does it take so long on initialization of service and port object?
    2> Is there any problem if I share “port” object for multiple request?
    3> what are the best practices in this type of implementation?
    Help would be greatly appreciated !

    Hi,
    Thanks for your reply.
    My service is deployed and working fine.
    NPE is due to {Package name}.ManagementPortType_Stub is null and code is executing createXXX() methode on it.
    Anyway i cant do anaything here because this is a clientgen generated code.

  • JAX-RPC client generation with existing packages

    I am creating web services and need to create a client for them for distribution to other projects. Normally I would say to pull it into NB and create a WS client from the wsdl but I have a problem with the data model it creates also.
    1. Not all developers are using NB.
    2. They presently use AXIS on some projects and these projects provide a client to use for development and I will get push back if I don't also.
    3. I want them to be able to use the enterprise data models directly instead of having to develop a mapper to convert from the client packages to the enterprise packages.
    Point 3 is important but not as important as getting the client jar developed.
    So what I need is a way to build a client from a wsdl using the data models for the enterprise, avoiding object mapping if I can. If I can't have that I need to be able to generate client code and be able to go in and extend it to provide a object mapper to the enterprise objects from the generated objects.
    Thanks

    To make things a little more clearer, this is a post of the error gotten at runtime...
            java.lang.NoSuchMethodError: java.util.Collections.emptyList()Ljava/util/List;
            at com.sun.xml.messaging.saaj.soap.MessageImpl.<clinit>(MessageImpl.java:755)
            at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:47)
            at com.sun.xml.rpc.soap.message.SOAPMessageContext.createMessage(SOAPMessageContext.java:137)
            at com.sun.xml.rpc.client.StreamingSenderState.<init>(StreamingSenderState.java:30)
            at com.sun.xml.rpc.client.StubBase._start(StubBase.java:92)
            at mck.practise.oracle.plsql.PlsqlService_Stub.sayHello(PlsqlService_Stub.java:54)
            at mck.practise.oracle.plsql.HelloWorld.sayRPCHello(HelloWorld.java:34)
            at mck.practise.oracle.plsql.HelloWorld.main(HelloWorld.java:22)The suprising thing is that if I change the application's java platform from JDK 1.4 to Java 5 using the netbeans projects property window, everything works fine.
    Can anyone still suggest on this.
    Regards,

  • JAX-RPC Client Handler

    Hi All,
    I am trying to get a simple example client handler to work using JAX-RPC DII.
    The web serivice is a simple one that just returns Hello + name..
    Here is the client code:
    public class Main {
         * @param args the command line arguments
        private static String BODY_NAMESPACE_VALUE = "http://helloservice/";
        private static String NS_XSD = "http://www.w3.org/2001/XMLSchema";
        private static String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
        private static String URI_ENCODING ="http://schemas.xmlsoap.org/soap/encoding/";
        public static void main(String[] args) {
            try {
                     String url ="http://localhost:8080/HelloService/MyHelloService";
                     QName serviceName   = new QName(BODY_NAMESPACE_VALUE,"MyHelloServiceService");
                     QName portTypeName = new QName(BODY_NAMESPACE_VALUE, "MyHelloServicePort");
                     ServiceFactory factory = ServiceFactory.newInstance();
                     Service service = factory.createService(serviceName);
                     Call call = service.createCall();
                     call.setPortTypeName(portTypeName);
                     call.setOperationName(new QName(BODY_NAMESPACE_VALUE, "sayHello"));
                     call.setTargetEndpointAddress(url);
                     call.setProperty(ENCODING_STYLE_PROPERTY,"");
                     //call.setProperty(ENCODING_STYLE_PROPERTY,URI_ENCODING);
                     call.setProperty(Call.OPERATION_STYLE_PROPERTY, "rpc");
                     QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
                     call.setReturnType(QNAME_TYPE_STRING);
                     call.addParameter("name", QNAME_TYPE_STRING, ParameterMode.IN);
                     String[] params = { "Murph!" };
                     HandlerRegistry hr = service.getHandlerRegistry();
                     List<HandlerInfo> list = new ArrayList<HandlerInfo>();
                     HandlerInfo hi = new HandlerInfo(ClientSOAPHandler1.class, null,null);
                     list.add(hi);
                     HandlerInfo hi2 = new HandlerInfo(ClientLogicalHandler1.class, null,null);
                     list.add(hi2);
                     hr.setHandlerChain(portTypeName, list);
                     String result = (String)call.invoke(params);
                     System.out.println(result);
            } catch (ServiceException e)
                e.printStackTrace();
            catch (RemoteException e)
                e.printStackTrace();
    }And the code for the Handlers:
    public class ClientSOAPHandler1 extends ClientSOAPHandlerBase
        private final String HANDLERNAME="ClientSOAPHandler1";
        public ClientSOAPHandler1(){
           super();
           super.setHandlerName(HANDLERNAME);
    import javax.xml.transform.Source;
    import java.util.Set;
    import java.util.TreeSet;
    import javax.annotation.PreDestroy;
    import javax.annotation.PostConstruct;
    import javax.xml.namespace.QName;
    import javax.xml.ws.handler.MessageContext;
    import javax.xml.ws.handler.soap.SOAPHandler;
    import javax.xml.ws.handler.soap.SOAPMessageContext;
    import javax.xml.soap.SOAPMessage;
    import java.io.ByteArrayOutputStream;
    public class ClientSOAPHandlerBase implements SOAPHandler<SOAPMessageContext>
        private String handlerName=null;
        public void setHandlerName(String h) {
            this.handlerName=h;
        public String getHandlerName() {
            return this.handlerName;
        @PostConstruct
        public void myInit() {
            System.out.println("------------------------------------");
            System.out.println("in "+handlerName+":myInit");
            System.out.println("exiting "+handlerName+":myInit");
            System.out.println("------------------------------------");
        @PreDestroy
        public void myDestroy() {
            System.out.println("------------------------------------");
            System.out.println("in "+handlerName+":myDestroy");
            System.out.println("exiting "+handlerName+":myDestroy");
            System.out.println("------------------------------------");
        public Set<QName> getHeaders() {
            return new TreeSet<QName>();
        public boolean handleMessage(SOAPMessageContext context) {
            System.out.println("------------------------------------");
            System.out.println("in "+handlerName+":handleMessage");
            boolean direction= ((Boolean)context.get(SOAPMessageContext.MESSAGE_OUTBOUND_PROPERTY)).booleanValue();
            if (direction) {
                System.out.println("direction = outbound");
            } else {
                System.out.println("direction = inbound");
            dumpMsg(context);
            System.out.println("exiting "+handlerName+":handleMessage");
            System.out.println("------------------------------------");
            return true;
        public void close(MessageContext context) {
            System.out.println("------------------------------------");
            System.out.println("in "+handlerName+":close");
            System.out.println("exiting "+handlerName+":close");
            System.out.println("------------------------------------");
        public boolean handleFault(SOAPMessageContext context) {
            System.out.println("------------------------------------");
            System.out.println("in "+handlerName+":handleFault");
            System.out.println("exiting "+handlerName+":handleFault");
            System.out.println("------------------------------------");
            return true;
        public void dumpMsg(MessageContext context) {
           try {
              SOAPMessage soapmsg = ((SOAPMessageContext)context).getMessage();
              System.out.println("MSG="+getMsgAsString(soapmsg));
           } catch (Exception e) {
               e.printStackTrace();
           return;
        public String getMsgAsString(SOAPMessage message) {
            String msg  = null;
            try {
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                message.writeTo(baos);
                msg = baos.toString();
            } catch (Exception e) {
                e.printStackTrace();
            return msg;
    }The output is as follows:
    run:
    Hello Murph!
    BUILD SUCCESSFUL (total time: 1 second)
    This should print out the various println statements in the Handler, but it doesnt :(- How come? What am I missing?
    I have searched everywhere trying to find the proper way to get a client side handler to work and have had luck. Additionally, I really really need this to work....if anyone could provide help, it would be VERY appreciated...pretty please
    Thanks,
    Daniel

    Any Ideas Anyone?????

  • JWSDP 2.0 JAX-RPC example problem Fast Infoset

    Hi,
    I installed JWSDP 2.0 and and Tomcat 5.0 for JWSDP. The server runs fine and the example HelloWorld is accessible (I can see the WSDL file in my browser: http://localhost:8080/jaxrpc-HelloWorld/hello?WSDL).
    The Problem is that I can not run the client: I tried "ant run-client". The error occurs while trying to create a stub in the file "HelloClient.java" with the following line of code:
    stub = (HelloIF_Stub) (helloWorldService.getHelloIFPort());
    This is the error I get:
    [java] Exception in thread "main" java.lang.NoClassDefFoundError: org/jvnet/fastinfoset/FastInfosetSource
    [java] at hello.HelloWorldService_Impl.getHelloIFPort(HelloWorldService_Impl.java:59)
    [java] at hello.HelloClient.setUp(HelloClient.java:68)
    [java] at hello.HelloClient.main(HelloClient.java:45)
    [java] Java Result: 1
    I am not sure about the structure of the application, so I don't know where to look for the "FastInfosetSurce" file.
    Thanks for any help.
    Best regards.

    Hi,
    I reselved the problem by just copying the FastInfoset to the jaxrpc\lib directory (I am sure this should work in a different way).
    Well, the next problem I am getting is that the "XMLStreamWriter" class cannot be found. This class is contained in jsr173_api.jar.
    I guess my main question is the following:
    Which projects are necessary to get this simple helloWorld example to work?
    I did set the JWSDP_HOME varible. Is there another setting I have to make to have all necessary jar-files available and to be able to run the samples?
    Could anybody point me to a tutorial that does not only show a few lines of code (as the HelloWorld sample in the JWSDP-Tutorial) but that would instead lead me through a step-by-step sample application that I write by myself and actually runs at the end? The example in the JWSDP-Tutorial uses all kinds of existing config files which are not explained.
    Thanks for your help.

  • About JAX-RPC Client

    Hi, I am read the JWSDP tutorial but I don�t understand about the kinds of client: (static stub, dynamic proxy, DDI). I would like know:
    1)What I need to develop each client? (including files)
    2)How works each one?
    3)What the structure generated before I develop and compile the client? (file structure)
    Thanks.
    ps: If someone know any site, that discuss about this for a newbie, I will be very thanks too.

    ...ahhhh, and what of this clients listed above use the WSDL of the Web Service?!?!
    Please help. Thanks;

  • Error while executing JAX-RPC client

    Hi,
    I am trying to run examples of Java Webservices Nutshell. but while running the clinet part using "ant generate-clinet" it is giving me following msg
    and not generating any artifacts.
    [exec] The filename, directory name, or volume label syntax is incorrect
    so if anyone is aware of this then please do post the solution over here
    Thank You...
    ntimesc

    java.lang.ClassNotFoundException: mypackage$MyWebService1SEI
    In addition to the class also generate a interface for the class, mypackage.MyWebService1SEI.java

Maybe you are looking for