RMI Client Code Issue

Hello,
Here is my client side RMI program:
import java.rmi.*;
public class MyRemoteClient {
public static void main(String args[]) {
MyRemoteClient mm = new MyRemoteClient();
mm.go();
public void go(){
try{
MyRemote service2 = (MyRemote) Naming.lookup("rmi://xxx.xxx.xx.xx/Hello");
String s = service2.sayHello();
System.out.println(s);
} catch(Exception ex){ex.printStackTrace();}
}Having started RMI Registry and Service Implementor code on the server, if I try to run the above code on the client it fire the following error:
java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at MyRemoteImpl_Stub.sayHello(Unknown Source)
at MyRemoteClient.go(MyRemoteClient.java:11)
at MyRemoteClient.main(MyRemoteClient.java:6)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 7 more
I am wondering as to why is it trying to connect to a local host 127.0.1.1 instead of the IP Address specified at by"xxx.xx.xx.xx" in the program?
I have the stub class and the service interface classes on my client-side.
Thanks.

I am wondering as to why is it trying to connect to a
local host 127.0.1.1 instead of the IP Address
specified at by"xxx.xx.xx.xx" in the program?Because that only specifies where the lookup should be done, i.e. where the Registry is. This lookup() returns a stub to your remote object which has its own IP address and port embedded into it, and that's where 127.0.0.1 is coming from - you're not doing Registry.lookup at this point, you're calling your remote method.
This indicates a DNS or /etc/hosts misconfiguration - your primary IP address is coming up as 127.0.0.1 instead of whatever your public IP address is. Famous Linux issue. You should really fix it in your DNS or /etc/hosts, but you can work around it by setting -Djava.rmi.server.hostname=<public IP address> at the server JVM.

Similar Messages

  • RMI Client on Linux issue.

    I am facing Java RMI problem on Suse Linux.
    RMI server running on solaris and RMI client running on Solaris ---> works fine
    RMI server running on solaris and RMI client running on Linux ---> gives error
    Pls note that RMI server running fine. When invoking remote method from RMI client on Suse Linux, I get following error.
    Java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: RemoteVtskImpl_Stub
    Any help/pointers will be useful.

    Even we tried setting the CLASSPATH to point to those jar files. But still the problem persist.
    At run time is there any way to see what all the _stub files are downloaded in the JVM at the client machine (linux machine in our case) from the server machine (solaris machine in our case).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problem while invoking webservice-method in client-code

    Hi,
    I had written webservice-client-code (using uddi-ext.jar, as i am using uddi for publishing webservices.) which is invoking webservice method successfully with complex datatypes(both for return type and input paramters).
    But while calling following webservice-method from my client-code:
    public ComplexType[] getData(String[] p_str1, String[] p_str2)
    it is throwing exception
    The Exception is:
    [ERROR] - 27 Mar 2007 12:34:38 -failed to invoke operation 'getData' due to an error in the soap layer (SAAJ); nested exception is: Message[failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException: mapping lookup failure. type=['java:language_builtins.lang']:ArrayOfString schema context=TypedSchemaContext{javaType=[Ljava.lang.String;}]
    Although I had done correct registration of mapping of ArrayOfString in client-code:
    registry = m_Service.getTypeMappingRegistry();
                   m_TypeMapping = registry.getTypeMapping(SOAPConstants.URI_NS_SOAP_ENCODING );
                   m_TypeMapping.register( ArrayOfStringHolder.class,
    new QName( "java:language_builtins.lang", "ArrayOfString" ),
    new ArrayOfStringCodec(),
    new ArrayOfStringCodec());
    But some how it doesnt works.
    I had searched on google as well but didnt find any reliable solutions.
    Please advice.
    Edited by meetmrdeepak at 03/27/2007 2:43 AM
    Edited by meetmrdeepak at 03/27/2007 2:45 AM

    See item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].

  • Error while generating java client code from wsdl file

    I am trying to generate a java client code from WSDL file um_workflowSaveCreateProfile.wsdl which includes um_workflowSaveCreateProfile_interface.wsdl file, so I am keeping both the files in the same folder and trying to generate the client code but it is showing me the below error highlighted .
    um_workflowSaveCreateProfile.wsdl
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="E:/DIPPWF/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:oblix="http://www.oblix.com/" xmlns:obinterface="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile_interface" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile" targetNamespace="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile">
         <import namespace="D:/DIPP/WSDL/um_workflowSaveCreateProfile_interface" location="um_workflowSaveCreateProfile_interface.wsdl"/>
         <service name="OblixIDXML_um_workflowSaveCreateProfile_Service">
              <port name="OblixIDXML_um_workflowSaveCreateProfile_Port" binding="obinterface:OblixIDXML_um_workflowSaveCreateProfile_Binding">
                   <soap:address location="http://localhost:7777/identity/oblix/apps/userservcenter/bin/userservcenter.cgi"/>
              </port>
         </service>
    </definitions>
    um_workflowSaveCreateProfile_interface.wsdl
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:oblix="http://www.oblix.com/" xmlns:oblixxmllocalschema="http://www.oblix.com/OblixXMLLocalSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile_interface" targetNamespace="http://www.oblix.com/wsdl/um_workflowSaveCreateProfile_interface">
         <types>
              <xsd:schema targetNamespace="http://www.oblix.com/" elementFormDefault="qualified"
                   xmlns="http://www.oblix.com/"
                   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                        <xsd:include schemaLocation="../XMLSchema/common_parameters.xsd" />
                        <xsd:include schemaLocation="../XMLSchema/common_authentication.xsd" />
                        <xsd:include schemaLocation="../XMLSchema/workflowSaveCreateProfile.xsd" />
              </xsd:schema>
              <xsd:schema targetNamespace="http://www.oblix.com/OblixXMLLocalSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                   <xsd:element name="request">
                        <xsd:complexType>
                             <xsd:sequence>
                                  <xsd:element name="params">
                                       <xsd:complexType>
                                            <xsd:sequence>
                                                 <xsd:element ref="oblix:ObWorkflowName"/>
                                                 <xsd:element ref="oblix:ObDomainName"/>
                                                 <xsd:element ref="oblix:ObWfComment" minOccurs="0"/>
                                                 <xsd:element ref="oblix:noOfFields"/>
                                                 <xsd:element ref="oblix:AttributeParams"/>
                                            </xsd:sequence>
                                       </xsd:complexType>
                                  </xsd:element>
                             </xsd:sequence>
                             <xsd:attribute name="version" type="xsd:string" use="optional"/>
                             <xsd:attribute name="application" type="xsd:string" use="required" />
                             <xsd:attribute name="function" type="xsd:string" use="required" />
                             <xsd:attribute name="mode" type="xsd:string" use="optional"/>
                        </xsd:complexType>
                   </xsd:element>
              </xsd:schema>
         </types>
         <message name="OblixIDXMLInput">
              <part name="authentication" element="oblix:authentication"/>
              <part name="request" element="oblixxmllocalschema:request"/>
         </message>
         <message name="OblixIDXMLOutput">
              <part name="body" element="oblix:Oblix"/>
         </message>
         <portType name="OblixIDXMLPortType">
              <operation name="OblixIDXML_um_workflowSaveCreateProfile">
                   <input message="tns:OblixIDXMLInput"/>
                   <output message="tns:OblixIDXMLOutput"/>
              </operation>
         </portType>
         <binding name="OblixIDXML_um_workflowSaveCreateProfile_Binding" type="tns:OblixIDXMLPortType">
              <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="OblixIDXML_um_workflowSaveCreateProfile">
                   <soap:operation soapAction="http://www.oblix.com/"/>
                   <input>
                        <soap:body use="literal"/>
                   </input>
                   <output>
                        <soap:body use="literal"/>
                   </output>
              </operation>
         </binding>
    </definitions>
    I am using WSDL2 Java for generating the client code .
    Please suggest where am I wrong .
    E:\axis2-1.4\bin>WSDL2Java -uri E:\DIPPWF\um_workflowSaveCreateProfile.wsdl -p R
    ND -d adb -s -o build\client--http-proxy-host 10.74.93.35 --http-proxy-port 80
    Using AXIS2_HOME: E:\axis2-1.4
    Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_02
    Retrieving document at 'E:\DIPPWF\um_workflowSaveCreateProfile.wsdl'.
    Retrieving document at 'um_workflowSaveCreateProfile_interface.wsdl', relative t
    o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile.wsdl'.
    Retrieving schema at 'E:/DIPPWF/XMLSchema/common_parameters.xsd', relative to 'f
    ile:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
    Retrieving schema at 'E:/DIPPWF/XMLSchema/common_authentication.xsd', relative t
    o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
    Retrieving schema at 'E:/DIPPWF/XMLSchema/workflowSaveCreateProfile.xsd', relati
    ve to 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
    Retrieving schema at 'navbar.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/workfl
    owSaveCreateProfile.xsd'.
    Retrieving schema at 'searchform.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/wo
    rkflowSaveCreateProfile.xsd'.
    Retrieving schema at 'component_basic.xsd', relative to 'file:/E:/DIPPWF/XMLSche
    ma/workflowSaveCreateProfile.xsd'.
    Retrieving schema at 'displaytype.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/c
    omponent_basic.xsd'.
    Retrieving schema at 'error.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/compone
    nt_basic.xsd'.
    Retrieving schema at 'component_workflowTicket.xsd', relative to 'file:/E:/DIPPW
    F/XMLSchema/workflowSaveCreateProfile.xsd'.
    Retrieving document at 'E:\DIPPWF\um_workflowSaveCreateProfile.wsdl'.
    Retrieving document at 'um_workflowSaveCreateProfile_interface.wsdl', relative t
    o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile.wsdl'.
    Retrieving schema at 'E:/DIPPWF/XMLSchema/common_parameters.xsd', relative to 'f
    ile:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
    Retrieving schema at 'E:/DIPPWF/XMLSchema/common_authentication.xsd', relative t
    o 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
    Retrieving schema at 'E:/DIPPWF/XMLSchema/workflowSaveCreateProfile.xsd', relati
    ve to 'file:/E:/DIPPWF/um_workflowSaveCreateProfile_interface.wsdl'.
    Retrieving schema at 'navbar.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/workfl
    owSaveCreateProfile.xsd'.
    Retrieving schema at 'searchform.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/wo
    rkflowSaveCreateProfile.xsd'.
    Retrieving schema at 'component_basic.xsd', relative to 'file:/E:/DIPPWF/XMLSche
    ma/workflowSaveCreateProfile.xsd'.
    Retrieving schema at 'displaytype.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/c
    omponent_basic.xsd'.
    Retrieving schema at 'error.xsd', relative to 'file:/E:/DIPPWF/XMLSchema/compone
    nt_basic.xsd'.
    Retrieving schema at 'component_workflowTicket.xsd', relative to 'file:/E:/DIPPW
    F/XMLSchema/workflowSaveCreateProfile.xsd'.
    *[ERROR] More than one part for message OblixIDXMLInput*
    org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException:
    More than one part for message OblixIDXMLInput
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
    ence(WSDL11ToAxisServiceBuilder.java:1162)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
    ence(WSDL11ToAxisServiceBuilder.java:1085)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi
    ng(WSDL11ToAxisServiceBuilder.java:686)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
    int(WSDL11ToAxisServiceBuilder.java:538)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
    ints(WSDL11ToAxisServiceBuilder.java:489)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
    ce(WSDL11ToAxisServiceBuilder.java:363)
    at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
    llServices(WSDL11ToAllAxisServicesBuilder.java:107)
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
    ionEngine.java:147)
    at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
    at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
    Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
    : Error parsing WSDL
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
    ionEngine.java:153)
    at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
    at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
    Caused by: org.apache.axis2.AxisFault: More than one part for message OblixIDXML
    Input
    at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
    ce(WSDL11ToAxisServiceBuilder.java:397)
    at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
    llServices(WSDL11ToAllAxisServicesBuilder.java:107)
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
    ionEngine.java:147)
    ... 2 more
    Caused by: org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessin
    gException: More than one part for message OblixIDXMLInput
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
    ence(WSDL11ToAxisServiceBuilder.java:1162)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
    ence(WSDL11ToAxisServiceBuilder.java:1085)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi
    ng(WSDL11ToAxisServiceBuilder.java:686)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
    int(WSDL11ToAxisServiceBuilder.java:538)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
    ints(WSDL11ToAxisServiceBuilder.java:489)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
    ce(WSDL11ToAxisServiceBuilder.java:363).
    Thanks in advance.
    akshay

    Hello,
    Were you able to resolve this issue ?
    I am seeing the same issue and at my wits end.
    regards
    Amit

  • What's wrong with my DII client code?

    I have the following WSDL for my ASP/IIS web service...
    <?xml version='1.0' encoding='UTF-8' ?>
    <!-- Generated 10/31/03 by Microsoft SOAP Toolkit WSDL File Generator, Version 3.00.1325.0 -->
    <definitions
         name='DCIS'
         targetNamespace='http://ds_00119/DCIS/wsdl/'
         xmlns:wsdlns='http://ds_00119/DCIS/wsdl/'
         xmlns:typens='http://ds_00119/DCIS/type/'
         xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
         xmlns:xsd='http://www.w3.org/2001/XMLSchema'
         xmlns:stk='http://schemas.microsoft.com/soap-toolkit/wsdl-extension'
         xmlns:dime='http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/'
         xmlns:ref='http://schemas.xmlsoap.org/ws/2002/04/reference/'
         xmlns:content='http://schemas.xmlsoap.org/ws/2002/04/content-type/'
         xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
         xmlns='http://schemas.xmlsoap.org/wsdl/'>
         <types>
              <schema
                   targetNamespace='http://ds_00119/DCIS/type/'
                   xmlns='http://www.w3.org/2001/XMLSchema'
                   xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
                   xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
                   elementFormDefault='qualified'>
                   <import namespace='http://schemas.xmlsoap.org/soap/encoding/'/>
                   <import namespace='http://schemas.xmlsoap.org/wsdl/'/>
                   <import namespace='http://schemas.xmlsoap.org/ws/2002/04/reference/'/>
                   <import namespace='http://schemas.xmlsoap.org/ws/2002/04/content-type/'/>
              </schema>
         </types>
         <message name='DCIS.CTXD'>
              <part name='bstrUser' type='xsd:string'/>
              <part name='bstrPassword' type='xsd:string'/>
              <part name='bstrName' type='xsd:string'/>
              <part name='bstrAddress' type='xsd:string'/>
              <part name='bstrPhone' type='xsd:string'/>
         </message>
         <message name='DCIS.CTXDResponse'>
              <part name='Result' type='xsd:string'/>
         </message>
         <portType name='DCISSoapPort'>
              <operation name='CTXD' parameterOrder='bstrUser bstrPassword bstrName bstrAddress bstrPhone'>
                   <input message='wsdlns:DCIS.CTXD'/>
                   <output message='wsdlns:DCIS.CTXDResponse'/>
              </operation>
         </portType>
         <binding name='DCISSoapBinding' type='wsdlns:DCISSoapPort' >
              <stk:binding preferredEncoding='UTF-8'/>
              <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
              <operation name='CTXD'>
                   <soap:operation soapAction='http://ds_00119/DCIS/action/DCIS.CTXD'/>
                   <input>
                        <soap:body
                             use='encoded'
                             namespace='http://ds_00119/DCIS/message/'
                             encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
                             parts='bstrUser bstrPassword bstrName bstrAddress bstrPhone'/>
                   </input>
                   <output>
                        <soap:body
                             use='encoded'
                             namespace='http://ds_00119/DCIS/message/'
                             encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
                             parts='Result'/>
                   </output>
              </operation>
         </binding>
         <service name='DCIS' >
              <port name='DCISSoapPort' binding='wsdlns:DCISSoapBinding' >
                   <soap:address location='http://ds_00119/DCIS/DCIS.ASP'/>
              </port>
         </service>
    </definitions>
    and the following client code...
    import javax.xml.namespace.*;
    import javax.xml.rpc.*;
    import javax.activation.*;
    import javax.mail.*;
    import com.sun.xml.messaging.saaj.*;
    import java.net.*;
    import java.util.*;
    import java.rmi.*;
    public class DIIClient
         public static void main(String[] args)
              try
                   String namespace = "http://ds_00119/DCIS/wsdl/";
                   String endpointURL = "http://ds_00119/DCIS/dcis.asp";
                   String portName = "DCISSoapPort";
                   String functionName = "CTXD";
                   String[] paramNames = {"bstrUser","bstrPassword","bstrName","bstrAddress","bstrPhone"};
                   String[] paramValues = new String[] {"x","y","a","b","c"};
                   String xsdStringType = "<xsd:string>";
                   ServiceFactory factory = ServiceFactory.newInstance();          
                   Call call = factory.createService(new QName("DCIS")).createCall();
                   call.setTargetEndpointAddress(endpointURL);
                   call.setPortTypeName(new QName(namespace, portName));
                   call.setOperationName(new QName(namespace, functionName));
                   call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
                   call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://ds_00119/DCIS/");
                   call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "");
                   call.setProperty(Call.OPERATION_STYLE_PROPERTY, "rpc");
                   for(int i=0; i<5; i++)
                        call.addParameter(paramNames, new QName(xsdStringType),ParameterMode.IN);
                   call.setReturnType(new QName(xsdStringType));          
                   String returnValue = (String) call.invoke(paramValues);
                   System.out.println(returnValue);
              catch(Exception ex)
              ex.printStackTrace();
    when I run this I get:
    java.rmi.RemoteException: WSDLReader:The operation requested in the Soap message with soapAction http://ds_00119/DCIS/action/DCIS isn't defined in the WSDL file. This may be because it is in the wrong namespace or has incorrect case
         at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:369)
         at DIIClient.main(DIIClient.java:45)
    I've tried everything I can think of for the soapAction string and just can't get it to work. What am I doing wrong here?
    I know the service works because I've been using C++ and VB clients for months, but I need to get a Java client up and running soon.
    I've only been looking at Java WS clients for a day, so if anyone knows of a better way to do this then please tell me! I've tried 4 completely different implementations so far and none of them worked.
    Chris

    Dear Chris,
    The problem is in your code itself or the way u've created this web service.
    I'm sending you some sample code. Just change the values of variables and delete unwanted lines according to you. Just go step by step.
    Here is the code
    import javax.xml.rpc.Call;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.JAXRPCException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.ParameterMode;
    public class DllClient {
    private static String qnameService = "IPSProv_pipeService";
    private static String qnamePort = "IPSProv_pipeIFPort";
    private static String BODY_NAMESPACE_VALUE =
    "urn:Foo";
    private static String ENCODING_STYLE_PROPERTY =
    "javax.xml.rpc.encodingstyle.namespace.uri";
    private static String NS_XSD =
    "http://www.w3.org/2001/XMLSchema";
    private static String URI_ENCODING =
    "http://schemas.xmlsoap.org/soap/encoding/";
    public static void main(String[] args) {
    System.out.println("Endpoint address = http://218.248.33.59:8080/ipsprovPipeService/provision?WSDL");
    try {
    ServiceFactory factory =
    ServiceFactory.newInstance();
    Service service =
    factory.createService(
    new QName(qnameService));
    QName port = new QName(qnamePort);
    Call call = service.createCall(port);
    call.setTargetEndpointAddress("http://215.246.33.59:8080/ipsprovPipeService/provision?WSDL");
    call.setProperty(Call.SOAPACTION_USE_PROPERTY,
    new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY,
    call.setProperty(ENCODING_STYLE_PROPERTY,
    URI_ENCODING);
    QName QNAME_TYPE_STRING =
    new QName(NS_XSD, "string");
    call.setReturnType(QNAME_TYPE_STRING);
    call.setOperationName(
    new QName(BODY_NAMESPACE_VALUE,"sp_mgmnt"));
    call.addParameter("String_1", QNAME_TYPE_STRING,
    ParameterMode.IN);
    call.addParameter("String_2", QNAME_TYPE_STRING,
    ParameterMode.IN);
    call.addParameter("String_3", QNAME_TYPE_STRING,
    ParameterMode.IN);
    call.addParameter("String_4", QNAME_TYPE_STRING,
    ParameterMode.IN);
    String[] params = { "A","B"};
    String result = (String)call.invoke(params);
    System.out.println(result);
    } catch (Exception ex) {
    ex.printStackTrace();
    Plz show me the code after u make changes in it and do reply whether it works or not.
    Regards,
    Piyush

  • RMI client-side - how to encrypt,decrypt  in client-side

    I write javacard RMI style. My problem is...
    Source code below is work when it write in applet (card - side)
    but in client-side (reader -side) I copy it to client - side code and test to run, if fail --> throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    It seem to be "javacardx.crypto" and "javacard.security" is make for use in applet in card only. Did I misunderstand?
    if it make for use in applet only, how is possible to do like this " card use privatekey to sign message and send to reader , reader use card's publickey to verify that card sign this signature or not."
    or
    "card use reader's publickey to encrypt message and send to reader, then reader use privatekey to decrypt message (reader authencate itself) "
    because I can't do any of cipher , keybuilder in RMI-client side(reader)
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,false);
    it will throw nullPointerException
    and if (change false to true)
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,true);
    throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    after that I swap this line with
    pri_key = (RSAPrivateKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PRIVATE,KeyBuilder.LENGTH_RSA_512, false);
    since it will do this first (i swap the line already) it also throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    also be the same result with swap
    kp = new KeyPair(KeyPair.ALG_RSA,(short)KeyBuilder.LENGTH_RSA_512 );
    to a first line
    it throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    Please help me
    RSAPrivateKey pri_key;
    RSAPublicKey pub_key;
    KeyPair kp;
    Cipher RSAcipher;
    RSAcipher = Cipher.getInstance(Cipher.ALG_RSA_PKCS1,false);
    pri_key = (RSAPrivateKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PRIVATE,KeyBuilder.LENGTH_RSA_512, false);
    pub_key =(RSAPublicKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PUBLIC,KeyBuilder.LENGTH_RSA_512, false);
    kp = new KeyPair(KeyPair.ALG_RSA,(short)KeyBuilder.LENGTH_RSA_512 );
    kp.genKeyPair();
              pri_key = (RSAPrivateKey) kp.getPrivate();
              pub_key = (RSAPublicKey) kp.getPublic();
    //ENCRYPT
    RSAcipher.init(pri_key, Cipher.MODE_ENCRYPT);
    t_cipherLengthRSA = RSAcipher.doFinal(plaintxt,(short)0, (short)plaintxt.length, t_cipherText, (short)0);
    //DECRYPT
    RSAcipher.init(pub_key, Cipher.MODE_DECRYPT);
    RSAcipher.doFinal(ciphertxt,(short)0,(short) t_cipherLengthRSA, temp1, (short)0);

    I write javacard RMI style. My problem is...
    Source code below is work when it write in applet (card - side)
    but in client-side (reader -side) I copy it to client - side code and test to run, if fail --> throw
    exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHMYou can not share code between card and client. On the card use the classes of javacardx.crypto and on the client side those of javax.crypto and java.security.
    It seem to be "javacardx.crypto" and "javacard.security" is make for use in applet in card only. That is right.
    if it make for use in applet only, how is possible to
    do like this " card use privatekey to sign message
    and send to reader , reader use card's publickey to
    verify that card sign this signature or not." or
    "card use reader's publickey to encrypt message and
    send to reader, then reader use privatekey to decrypt
    message (reader authencate itself) "On each platform you have classes that provide the same cryptographic operations but the interface of these classes is different (because of the limitations of the java card platform).
    because I can't do any of cipher , keybuilder in
    RMI-client side(reader)Use the java.security.KeyFactory instead.
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,false);
    it will throw nullPointerException
    and if (change false to true)
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,true);
    throw exception 0x3 -
    javacard.security.CryptoException.NO_SUCH_ALGORITHMCryptographic support on java cards is optional. Not every card supports every algorithm. Try to use another algo.
    Jan

  • Error in scenario "FILE to HTTP(with SSL)" - HTTP client code 110 reason.

    Hi friends,
    Our scenario is as follows:
    We are trying to send XML file from our SAP-XI to external tool "COMMunix XC" (a multi-protocol EDI platform tool).
    We have configured " FILE TO HTTP(with SSL)" scenario (trying to connect HTTPS/port)
    1. We have created RFC destination of type G and refered the same RFC in Communication channel (Adapter type: HTTP)
    2. We have send the SSL Server certificate to other party and ensure that they have imported at thier end.
    3. We have included the certificates from other party in our SAP XI STRUST under SSL Client (Standard) node.
    4. We have tried " CONNECTION TEST " in the RFC destination created in type G (in STEP 1) and it shows the GREEN TICK at bottom, no other message nor any error message
    When we trigger the communication we recieve the error: HTTP client code 110 reason in SXMB_MONI.
    Please let us know if we have missed out some step.
    What does error message indicate,
    Regards,
    Rehan

    Hi Rehan,
    I see that the PROCTIMEOUT was already at a very high value.
    Does this occur for messages of a particularly large size?  If yes, you could increase the parameter
       icm/HTTP/max_request_size_KB = 2097152
    This would need to be done in the sender/receiver system as well as XI.
    Otherwise you could try reproducing the issue and checking the dev_icm log in the work directory, or go to SMICM -> Goto -> Display trace file
    check for errors like NIECONN_REFUSED or "no service for protocol HTTPS" which can often be related to this type of issue.
    Kind regards,
    Sarah

  • Rmi client throws Connection Refused exception

    My Rmi client throws a Connection Refused exception when i try to run it on remote machine (in this case i run it on my virtualbox macine).
    The virtualbox machine network is in NAT mode (host machine ip should be 10.0.2.2).
    When rmi client starts get registry instance and print in standar output:
    RegistryImpl_Stub[UnicastRef2 [liveRef: [endpoint:[//10.0.2.2/:1099,util,RmiInstances$1@1275d39](remote),objId:[0:0:0, 0]]]]But when rmi client trys to use any of remote methods it throws Connection Refused, but it's to strange because the Connection Refused has 127.0.1.1 as ip.
    java.rmi.ConnectException: Connection refused to host: 127.0.1.1; ....In client RmiInstances code (this class contains all remote implementations) is:
    public class RmiInstances {
        private static RmiInstances instance;
        private IUserManage userManage;
        private IAnalysis analysis;
        private IPacientManage pacientManage;
        private IInsuranceManage insuranceManage;
        private Config config;
        private RmiInstances()
                throws RemoteException, NotBoundException, IOException {
            this.config = Config.getInstance();
            Registry registry = LocateRegistry.getRegistry(config.getServerUrl()+"/",
                    1099, new RMIClientSocketFactory() {
                @Override
                public Socket createSocket(String host, int port) throws IOException {
                    try {
                        URI uri = new URI(config.getServerUrl()+
                                ":"+config.getServerPort());
                        return new Socket(uri.getHost(), uri.getPort());
                    } catch (URISyntaxException ex) {
                        ex.printStackTrace();
                        return null;
            System.out.println(registry);
            userManage = (IUserManage)registry.lookup("RUserManage");
            analysis = (IAnalysis)registry.lookup("RAnalysis");
            pacientManage = (IPacientManage)registry.lookup("RPacientManage");
            insuranceManage = (IInsuranceManage)registry.lookup("RInsuranceManage");
    ...And server code is the next:
    public static void main(String[] args) {
         System.out.println("GNULab Server " + VERSION + " starting...");
         System.setProperty("java.rmi.server.codebase",
              "file:/home/zarovich/workspace/labserver/bin");
         try {
             // Loading config
             System.out.println("Loading config...");
             Config config = Config.getInstance();
             // inicializando rmi registry
             Registry registry;
             if (config.isSsl()) {
              registry = LocateRegistry.createRegistry(
                   config.getServerPort(), new RmiSSLClient(),
                   new RmiSSLServer());
             } else
              registry = LocateRegistry
                   .createRegistry(config.getServerPort());
             // instanciando implementaciones
             RAnalysis rAnalysis = new RAnalysis();
             RInsuranceManage rInsuranceManage = new RInsuranceManage();
             RPacientManage rPacientManage = new RPacientManage();
             RUserManage rUserManage = new RUserManage();
             // registrando interfaz rmi
             registry.rebind("RAnalysis", (IAnalysis) UnicastRemoteObject.exportObject(rAnalysis, 0));
             registry.rebind("RInsuranceManage", (IInsuranceManage) UnicastRemoteObject.exportObject(rInsuranceManage, 0));
             registry.rebind("RPacientManage", (IPacientManage) UnicastRemoteObject.exportObject(rPacientManage, 0));
             registry.rebind("RUserManage", (IUserManage) UnicastRemoteObject.exportObject(rUserManage, 0));
             System.out.println("GNULab Server " + VERSION + " listening ...");
             System.out.println("Registry instance: " + registry.toString());
         } catch (RemoteException e) {
             e.printStackTrace();
            * catch (MalformedURLException e) { e.printStackTrace(); }
            */catch (IOException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
         } catch (JDOMException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
    ...

    I'm solved my problem.
    I just need run my server with -Djava.rmi.serverhost=10.0.2.2 and my client running on my virtualbox machine works!

  • PLAINHTTP_ADAPTER ATTRIBUTE_CLIENT HTTP client code 400 ICM_HTTP_CON_FAILED

    Hi Experts,
    Ssytem details:PI7.1,
    While processing messages  from source system to PI system. we are getting the below error :
    PLAINHTTP_ADAPTER ATTRIBUTE_CLIENT HTTP client code 400 ICM_HTTP_CON_FAILED
    The messages get stuck while processing from source system(abap stack) to PI and every time we need to restart the ICM service and then messages are flowing to the PI system  successfully .
    Additional screenshots are given below:
    Please provide your valuable solutions
    Regards
    Ram

    Hi Rafikul,
    Let me know if time out parameter can be  pinpointed issue .
    icm/server_port_0 = PROT=HTTP,PORT=8000
    Further traces of icm from source system  are below ::
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 77 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Wed Mar  5 16:09:27 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 34 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Wed Mar  5 17:42:33 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 12 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Wed Mar  5 19:43:48 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 3 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Wed Mar  5 19:54:37 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 14 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Wed Mar  5 20:05:22 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 4 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Wed Mar  5 20:06:01 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 8 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Wed Mar  5 20:16:55 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 22 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Wed Mar  5 20:36:43 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 10 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Wed Mar  5 21:45:29 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 0 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Thu Mar  6 02:48:42 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 12 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Thu Mar  6 03:19:56 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 19 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Thu Mar  6 04:20:56 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 1 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Thu Mar  6 05:33:57 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 2 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Thu Mar  6 06:28:58 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 10 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Thu Mar  6 06:46:25 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 0 broken (rc=-8,nirc=-6)
    [Thr 140571804710688] Thu Mar  6 06:46:31 2014
    [Thr 140571804710688] *** WARNING => IcmMsgProcess: connection to WP 1 broken (rc=-8,nirc=-6)
    Regards
    Bharat

  • 10.1.3.1 and standalone RMI client

    I'm migrating our J2EE applications from 10.1.2.0.1 to 10.1.3.1.0. I also have a custom JAAS login module that is used by our applications. I have the login module working successfully and web applications that can call EJBs.
    But I am unable to get a simple RMI client to call the EJBs. I can see from the server logs that the JAAS module executes successfully, but then I get a ClassNotFoundException (seems to be from the server) when the client tries to access the JNDI tree (see stack below on the client; I can't find any log relating to this event on the server).
    I had real problems with RMI access in 10.1.2, seems that Oracle AS isn't really thought through with respect to simple RMI client access. In the system-jazn-data.xml file I have granted my custom principals the RMI login permission. I tried to raise a TAR but it's been rejected because 10.1.3.1.0 is a "preview" version. (Don't you guys want to know about bugs before a release goes into production?)
    Any ideas?
    27-Sep-2006 14:50:46 oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_R
    EMOTE_SERVER
    WARNING: Exception returned by remote server: {0}
    java.lang.ClassNotFoundException: com/evermind/server/ejb/EJBHomeObjectInfo
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at com.evermind.io.ClassLoaderObjectInputStream.resolveClass(ClassLoader
    ObjectInputStream.java:33)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:153
    8)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
    693)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
    at java.util.HashMap.readObject(HashMap.java:1013)
    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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
    713)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
    at com.evermind.server.rmi.RMIClientConnection.handleListContextResponse
    (RMIClientConnection.java:768)
    at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse
    (RMIClientConnection.java:242)
    at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClien
    tConnection.java:205)
    at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RM
    IClientConnection.java:187)
    at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.jav
    a:152)
    at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnec
    tion.java:127)
    at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
    utor.java:814)
    at java.lang.Thread.run(Thread.java:595)
    javax.naming.NamingException: com/evermind/server/ejb/EJBHomeObjectInfo [Root ex
    ception is java.lang.ClassNotFoundException: com/evermind/server/ejb/EJBHomeObje
    ctInfo]
    at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:1
    00)
    at com.evermind.server.rmi.RMIClientConnection.waitForJndiResponse(RMICl
    ientConnection.java:334)
    at com.evermind.server.rmi.RMIClientConnection.list(RMIClientConnection.
    java:293)
    at com.evermind.server.rmi.RMIClient.list(RMIClient.java:392)
    at com.evermind.server.rmi.RMIClientContext.getListValues(RMIClientConte
    xt.java:95)
    at com.evermind.server.rmi.RMIContext.listBindings(RMIContext.java:444)
    at com.evermind.naming.FilterContext.listBindings(FilterContext.java:91)
    at com.evermind.server.ApplicationClientContext.listBindings(Application
    ClientContext.java:127)
    at javax.naming.InitialContext.listBindings(InitialContext.java:406)
    at com.axiomsystems.common.tools.test.APITester.getEJBs(APITester.java:2
    06)
    at com.axiomsystems.common.tools.test.APITester.<init>(APITester.java:17
    3)
    at com.axiomsystems.common.tools.test.APITester.main(APITester.java:68)
    Caused by: java.lang.ClassNotFoundException: com/evermind/server/ejb/EJBHomeObje
    ctInfo
    at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_
    SERVER(RMICall.java:109)
    at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:9
    1)
    ... 11 more

    Hi Debu,
    I have found the problem and a workaround in my code.
    I obtained the initial context ctx with the following properties set:
    Context.INITIAL_CONTEXT_FACTORY (= oracle.j2ee.naming.ApplicationClientInitialContextFactory)
    Context.PROVIDER_URL (= opmn:ormi://myHost:myPort:myOC4J/myApp)
    Context.SECURITY_PRINCIPAL (= my username)
    Context.SECURITY_CREDENTIAL (= my password)
    then I did
    NamingEnumeration en = ctx.listBindings("ejb/myJndiName")
    which resulted in the exception.
    Changing this to
    Context ctx2 = (Context)ctx.lookup("ejb/myJndiName");
    NamingEnumeration en = ctx2.listBindings("");
    has resolved the problem. I'm not sure why this behaves differently, I suppose it may have something to do with the fact that ctx2 is not an InitialContext object. It is an adequate workaround for my application.
    Once I have an EJB reference, invoking methods over RMI works as expected.
    Thanks,
    Keith

  • New to EJBs  exception in client code

    Hi i am new to EJBs when i execute the client code it is giving the following exceptions
    can any one tell me the steps to execute a simple EJB session bean. what class paths and what config and what xml files are required??
    i followed so many tutorials but the problem is not solved
    thanks
    here is the exception i wrote the JNDI name as "HelloWorld" in the weblogic-ejb-jar.xml (i am using weblogic 8.1 application server)
    Full compiler error(s):
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:139: cannot resolve symbol
    symbol  : class HelloHome
    location: class jsp_servlet.__helloclient
            HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class); //[ /HelloClient.jsp; Line: 17]
            ^
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:139: cannot resolve symbol
    symbol  : class HelloHome
    location: class jsp_servlet.__helloclient
            HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class); //[ /HelloClient.jsp; Line: 17]
                              ^
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:139: cannot resolve symbol
    symbol  : class HelloHome
    location: class jsp_servlet.__helloclient
            HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class); //[ /HelloClient.jsp; Line: 17]
                                                                                   ^
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:140: cannot resolve symbol
    symbol  : class Hello
    location: class jsp_servlet.__helloclient
            Hello hello = home.create(); //[ /HelloClient.jsp; Line: 18]
            ^
    4 errorsand the client jsp file is as follows
      <%@ page import="java.util.*"%>
    <%@ page import="javax.naming.InitialContext"%>
    <%@ page import="javax.naming.Context"%>
    <%@page language="java" contentType="text/html"%>
    <html>
        <head>
            <title>JSP Page</title>
        </head>
        <body>
            <%
                Properties props = System.getProperties();
                   out.println("SREENIVAS  FIRST EJB");
              try {
                   Context ctx = new InitialContext(props);
                Object obj = ctx.lookup("HelloWorld");
                HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
                Hello hello = home.create();
                   out.println(hello.hello());
                hello.remove();
                ctx.close();
            } catch (Exception e) {
                e.printStackTrace();
        %></body>
    </html>

    i got the output
    its working
    the change i did is
    i put all the remote,home and local interfaces in a package and added that package to a jar file.
    then i added the jar file to class path.
    import this package into your client class.
    thats it now just deploy your ejbmodule.jar and webapplication.war in the server and test the code
    bye bye

  • Java Webservice Developer Pack client code generation

    Hi,
    I am working on Weblogic Webservices, i am trying to generate client code using 'xrpcc' tool.
    Client code has been generated, and i am able to invoke webservices on the server. But i am not able to receive return value from the server and getting follwing error.
    D:\TMP\java\webservices\wsdl\test\checkfree\nawf>java test.checkfree.nawf.NAWFCl
    ient
    java.rmi.RemoteException: Runtime exception; nested exception is:
    java.lang.NullPointerException
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:234
    at test.checkfree.nawf.GateWayPort_Stub.receiveAccountInfo(GateWayPort_S
    tub.java:60)
    at test.checkfree.nawf.NAWFClient.main(NAWFClient.java:10)
    Caused by: java.lang.NullPointerException
    at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
    ormerIdentityImpl.java:354)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:95)
    ... 2 more
    Please, can any one tell immdly?
    Thanks
    Shiva

    could u post more info !!! like your wsdl ?

  • Invoke BPEL 10g process by Java client code deployed in WebLogic 10.3.3

    Hi,
    I have a problem with the use of JNDI factory While invoking BPEL 10g process using client code deployed in WebLogic 10.3.3.
    Should it be "com.evermind.server.rmi.RMIInitialContextFactory" or "weblogic.jndi.WLInitialContextFactory"?
    (Should the JNDI factory follows the container of BPEL server or the container of client code?)

    BPEL server from SOA Suite (10.1.3.3.1)
    Client code which invokes the BPEL process deployed in WebLogic 10.3.3

  • Error while building iFolder client code on Ubuntu 11

    I have checked out the code from the SVN repository and now want to change some source code and then build it.
    I ran -
    ./configure
    and then,
    make
    but I get the following error -
    Makefile:1: *** missing separator. Stop.
    This is what beginning of my Makefile looks like -
    if LINUX
    SUBDIRS = src help
    DIST_SUBDIRS = $(SUBDIRS) package
    else
    SUBDIRS = src help
    DIST_SUBDIRS = $(SUBDIRS) package
    endif
    Can anybody share the steps needed to compile the client code on Ubuntu 11.
    Thanks.

    trt987,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • Servlet acts as an RMI client to get the current time of day

    my application is servlet acts as an RMI client to get the current time of day from the DaytimeServlet RMI server so iam not getting the correctime....
    import java.io.*;
    import java.rmi.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DaytimeClientServlet extends
    HttpServlet
    DaytimeServer daytime;
    protected DaytimeServer getDaytimeServer() {
    DaytimeServer stub.
    if (System.getSecurityManager() == null) {
    System.setSecurityManager(new
    RMISecurityManager());
    try {
    Registry registry =
    LocateRegistry.getRegistry(getRegistryHost(),
    getRegistryPort());
    return
    (DaytimeServer)registry.lookup(getRegistryName());
    catch (Exception e) {
    getServletContext().log(e, "Problem getting
    DaytimeServer reference");
    return null;
    private String getRegistryName() {
    String name = getInitParameter("registryName");
    return (name == null ? "DaytimeServlet" : name);
    private String getRegistryHost() {
    return getInitParameter("registryHost");
    private int getRegistryPort() {
    try { return
    Integer.parseInt(getInitParameter("registryPort");
    catch (NumberFormatException e) { return
    Registry.REGISTRY_PORT; }
    public void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws
    ServletException, IOException {
    res.setContentType("text/plain");
    PrintWriter out = res.getWriter();
    if (daytime == null) {
    daytime = getDaytimeserver();
    if (daytime == null) {
    throw new UnavailableException(this, "Could
    not locate daytime");
    out.println(daytime.getDate().toString());
    please help me out

    Hi lucentb,
    what i observed from your code is some simple coding faults are there.. so i am giving you some test code..
    i hope this will help you out.
    import java.io.*;
    import java.rmi.*;
    import java.rmi.registry.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DaytimeClientServlet extends HttpServlet
    DaytimeServer daytime;
    protected DaytimeServer getDaytimeServer()
    if (System.getSecurityManager() == null)
    System.setSecurityManager(new RMISecurityManager());
    try {
    Registry registry = LocateRegistry.getRegistry(getRegistryHost(),
    getRegistryPort());
    return
    (DaytimeServer)registry.lookup(getRegistryName());
    catch (Exception e) {
    getServletContext().log(e, "Problem getting DaytimeServer reference");
    return null;
    private String getRegistryName()
    String name = getInitParameter("registryName");
    return (name == null ? "DaytimeServlet" : name);
    private String getRegistryHost() {
    return getInitParameter("registryHost");
    private int getRegistryPort()
    try
    return
    Integer.parseInt(getInitParameter("registryPort")); }
    catch (NumberFormatException e)
    return
    Registry.REGISTRY_PORT;
    public void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws
    ServletException, IOException {
    res.setContentType("text/plain");
    PrintWriter out = res.getWriter();
    if (daytime == null) {
    daytime = getDaytimeServer();
    if (daytime == null) {
    // Couldn't get it, so report we're
    unavailable.
    throw new UnavailableException(this, "Could
    not locate daytime");
    out.println(daytime.getDate().toString());
    If you have any problem after this please send me the exceptions and problem situations with deatils codes..
    Regards,
    TirumalaRao
    Developer Technical Support,
    Sun Microsystems, India.

Maybe you are looking for

  • How can I change an embedded link to a website in a pdf

    How can I change an embedded link to a website in a pdf in Pro XI for Mac?

  • How do i copy library items to a new users when my finder wont open?

    i had the problem of my finder opening and closing constantly, i got told i need to create a new user which i did, the finder problem does not occurr in the new user, i then got told i need to copy my library items i want over to the new users but i

  • Help please problem with nokia n85

    hi guys after updating the nokia n85 to v30.019 the speaker icon of the music folder disspeard in the menu and even the icon of utilities folder disspeard how can i restore the icons i've tried the hard reset and it didn't work ?! waiting for your he

  • Preview and links since 10.4.4 ?

    Good morning, When reading in Preview a PDF file created with Word or Pages (either through PDF Maker or print/save as PDF) with links thereafter activated in Acrobat, those links are dead, they do not work anymore when they worked fine before 10.4.4

  • Macbook Pro 15" Retina doesn't change to the better Graphicchip at Windows7

    Good Morning, i have the following problem with my Macbook. In Windows 7 doesn´t switch my MBP to the GeForce GT 650M, he is only using the Intel HD Graphics 4000. So in Games it is really laggy and not funny to play like this. Games like Minecraft (