Thanks for the info.
I followed the WSClientDII example and created a jboss client trying to access 
a doc/lit service generated by jwsdp. When I run the client, I got 
NullPointerException because the string parameter I passed into the method 
became null somewhere.
I believe this should work unless I'm doing something wrong.
Please help,
Thanks,
Luan

Below is the client code and part of the exception stack:
package mgiparck;
import java.net.*;
import java.io.*;
import javax.xml.namespace.*;
import org.jboss.webservice.client.*;
import org.jboss.axis.client.*;

public class mgiparserJBossclient {
    public static void main(String[] args) throws Exception {
        mgiparserJBossclient mgiparserjbossclient = new mgiparserJBossclient();
        URL wsdlURL= null;
        URL mappingURL = null;
        try {
            wsdlURL = new 
URL("http://localhost:8080/MgiParserServerJBoss/myParserService?wsdl";);
            mappingURL = new 
File("c:/jboss-4.0.3SP1/jbossj2eetutorial/examples/mgiparser/dd/ws/jaxrpc-mapping.xml").toURL();
        } catch (Exception e) {
        }
        QName serviceName = new QName("http://com.mgiparser/MgiParser";, 
"MgiParser");
        ServiceFactoryImpl factory = 
(ServiceFactoryImpl)ServiceFactory.newInstance();
        Service service = 
(org.jboss.axis.client.Service)factory.createService(wsdlURL, mappingURL, null, 
serviceName, null);
        Call call = (org.jboss.axis.client.Call)service.createCall(new 
QName("http://com.mgiparser/MgiParser";, "MgiParserInterfacePort"), 
"getParsingResult");
        call.setTimeout(60000);
        String result = (String)call.invoke(new Object[] {"This is a test"});
        System.out.println("result is: " + result);
  }
}

10:36:45,320 INFO  [STDOUT] incoming message is: null
10:36:45,320 ERROR [InvokerProviderJSE] Error from service endpoint, processing
fault handler chain
java.lang.NullPointerException
        at mgipack.MgiMsgHandler.parseMsg(MgiMsgHandler.java:12)
        at mgipack.MgiParserImpl.getParsingResult(MgiParserImpl.java:12)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.webservice.server.InvokerProviderJSE.invokeServiceEndpoint(
InvokerProviderJSE.java:154)
        at org.jboss.webservice.server.InvokerProvider.invokeMethod(InvokerProvi
der.java:305)
        at org.jboss.axis.providers.java.RPCProvider.invokeTarget(RPCProvider.ja
va:176)
        at org.jboss.webservice.server.InvokerProviderJSE.invokeTarget(InvokerPr
oviderJSE.java:93)
        at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.
java:121)
        at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:3
58)
        at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy
.java:73)
        at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
        at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
        at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)
.........

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3923066#3923066

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3923066


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to