axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Beukering Jack <Jack.Beuker...@icl.nl>
Subject RE: Bugs in AXIS Alpha 3 version
Date Tue, 29 Jan 2002 16:15:06 GMT
I think you have to specify in tour client:
    call.setProperty(call.NAMESPACE, "RegistrationServerPort");
instead of
      call.setProperty(call.NAMESPACE, "urn:register");

-----Original Message-----
From: Ramon Turnes [mailto:ramon.turnes-perez@hermes.si]
Sent: dinsdag 29 januari 2002 17:07
To: 'axis-user@xml.apache.org'
Subject: Bugs in AXIS Alpha 3 version



Hi,

I have been trying to invoke a deploy service but though the deploy service
actually exists (appears in the list of available services) something goes 
wrong with the namespaces so I get the error:

The AXIS engine could not find a target service to invoke!  targetService
is urn:register

The deployment file is:


<deployment
    xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

  <!-- Services from RegistrationServer WSDL service -->

  <service name="RegistrationServerPort" provider="java:RPC">
      <parameter name="className"
value="register.RegistrationServerSoapBindingSkeleton"/>
      <parameter name="methodName" value=" registerUserName registerUser
registerUserList registerGroup"/>
      <parameter name="scope" value="Session"/>
  </service>

  <beanMapping
    xmlns:ns="urn:register"
    qname="ns:User"
    languageSpecificType="java:register.User"
  />
  <beanMapping
    xmlns:ns="urn:register"
    qname="ns:Group"
    languageSpecificType="java:register.Group"
  />
</deployment>

and the client application is:


public class TestClient
{
    public static void main(String [] args) {
        try {
            String endpoint = 
                "http://localhost:7000/axis/servlet/AxisServlet";
     
            Service  service = new Service();
            Call     call    = (Call) service.createCall();

            call.setTargetEndpointAddress( new java.net.URL(endpoint) );

            call.setProperty(call.NAMESPACE, "urn:register");
            call.setOperationName( "registerUserName");
        
            String ret = (String) call.invoke( new Object[] { "Ramon Turnes
Perez" } );

            System.out.println("Return value from RegistrationServer: " +
ret);
        } catch (Exception e) {
            System.err.println(e.toString());
        }
    }
}

I have taken a look to samples\addr examples and the only difference is that
I am
using java2wsdl to generate the wsdl file whereas in the example is already
there.
Does somebody have any idea? I am missing something with namespaces? Is
something
else beside the .wsdd file used to deploy the service? Thanks a lot for your
answers.

--------------------------------------
Ramon Turnes Perez 
HERMES SoftLab, Litijska 47 
1000 Ljubljana, SLOVENIA 
Phone: +386 1 5865 638 
Fax:     +386 1 5865 270
E-mail: ramon@hermes.si 
www.hermes-softlab.com 
--------------------------------------


> -----Original Message-----
> From: Ramon Turnes [mailto:ramon.turnes-perez@hermes.si]
> Sent: Friday, January 25, 2002 4:51 PM
> To: 'axis-user@xml.apache.org'
> Subject: Bugs in AXIS Alpha 3 version
> 
> 
> Hi,
> 
> thanks for your answers. Regarding 4.
> 
> you are right, I did not explain it very well. I have a service called
> register.RegistrationServer
> and I want to get the deployment files (deploy.wsdd and 
> undeploy.wsdd) to
> publish
> the server. I name the service RegistrationServer and I map 
> register package
> to "urn:register"
> as you can see from the following commands:
> 
> 
> %java org.apache.axis.wsdlgen.Java2Wsdl
> -l"http://localhost:8080/axis/services/RegistrationServer"
> -n"urn:register" -p"register" "urn:register" -o  
> RegistrationServer.wsdl
> register.RegistrationServer
> 
> %java org.apache.axis.wsdl.Wsdl2java -o generated -d Session -s
> -N"urn:register" register RegistrationServer.wsdl
> 
> In deploy.wsdd I get the following:
> 
>   <service name="RegistrationServerPort" provider="java:RPC">
>       <parameter name="className"
> value="register.RegistrationServerSoapBindingSkeleton"/>
>       <parameter name="methodName" value=" registerUser 
> registerUserList
> registerGroup"/>
>       <parameter name="scope" value="Session"/>
>   </service>
> 
> and in the stub file:
> 
> .....
> call.setProperty(org.apache.axis.transport.http.HTTPTransport.
> ACTION, "");
> call.setProperty(call.NAMESPACE, "urn:register");
> call.setOperationName( "registerUser");
> .....
> 
> so when the client tries to invoke the service I get an error:
> 
> Remote Exception caught: The AXIS engine could not find a 
> target service to
> invoke! targetService is urn:register
> 
> Everything works file if I just change  
> 
> call.setProperty(call.NAMESPACE, "urn:register") 
> 
> TO
> 
> call.setProperty(call.NAMESPACE, "RegistrationServerPort");
> 
> 
> I have just began with SOAP a few days ago (I knew XML but 
> namespaces are
> new to me and 
> I still don't understand them very well). Thanks for your answer.
> 
> --------------------------------------
> Ramon Turnes Perez 
> HERMES SoftLab, Litijska 47 
> 1000 Ljubljana, SLOVENIA 
> Phone: +386 1 5865 638 
> Fax:     +386 1 5865 270
> E-mail: ramon@hermes.si 
> www.hermes-softlab.com 
> --------------------------------------
> 
> 
> > -----Original Message-----
> > From: Russell Butek [mailto:butek@us.ibm.com]
> > Sent: Friday, January 25, 2002 4:18 PM
> > To: axis-user@xml.apache.org
> > Subject: Re: Bugs in AXIS Alpha 3 version
> > 
> > 
> > 1.  char type problem.  You are correct.  Java2WSDL does not 
> > handle char
> > types.  That is because there is no equivalent primitive type 
> > in XML.  It
> > would be better if we printed an error saying that, though, 
> > rather than
> > throwing a NullPointerException.
> > 
> > 2.  overloaded methods problem.  This is a known problem.  
> > We've fixed our
> > bug this week.  Unfortunately, we depend on WSDL4J which also 
> > has a bug.
> > They've been notified of it.  Now, instead of only getting 
> > one registerChar
> > method, you get one of them twice.  I would caution you on 
> > using overloaded
> > methods if you can avoid it.  There are a number of places 
> > where operations
> > are referred to only by name, not by signature (deploy.wsdd). 
> >  So even if
> > this particular bug is fixed, I worry that there may be 
> > deeper issues that
> > we'll run into.
> > 
> > 4.  service registration problem.  I'm a bit puzzled here.  
> > What do you
> > mean by registering a service named "urn:register"?  That's a 
> > namespace,
> > not a service.  And when I ran Java2WSDL/WSDL2Java my 
> deploy.wsdd has:
> > <service name="RegistrationServer".  Could you show me 
> > exactly what you
> > changed in the stub?  Keep in mind that I'm running the 
> > latest driver, so I
> > might have some fix that isn't in alpha 3.
> > 
> > Russell Butek
> > butek@us.ibm.com
> > 
> > 
> > Ramon Turnes <ramon.turnes-perez@hermes.si> on 01/25/2002 
> 06:22:54 AM
> > 
> > Please respond to axis-user@xml.apache.org
> > 
> > To:    "'axis-user@xml.apache.org'" <axis-user@xml.apache.org>
> > cc:
> > Subject:    Bugs in AXIS Alpha 3 version
> > 
> > 
> > 
> > 
> > Hi,
> > 
> > I have started to use AXIS Alpha 3 version and I have found several
> > problems.
> > 
> > 
> > 1 - Generation of WSDL file from the following interface 
> > causes Java2Wsdl
> > to
> > crash:
> > 
> > //Begin of interface
> > 
> > package register;
> > 
> > import java.util.*;
> > 
> > public interface RegistrationServer {
> >     public String registerChar(char cvalue);
> > }
> > 
> > //end of interface
> > 
> > ****************************************************************
> > java org.apache.axis.wsdlgen.Java2Wsdl
> > -l"http://localhost:8080/axis/services/RegistrationServer"
> > -n"urn:register" -p"register" "urn:register" -o 
> > RegistrationServer.wsdl
> > register.RegistrationServer
> > 
> > java.lang.NullPointerException
> >         at 
> org.apache.axis.wsdlgen.Types.getWsdlQName(Types.java:386)
> >         at 
> org.apache.axis.wsdlgen.Types.writePartType(Types.java:143)
> >         at
> > org.apache.axis.wsdlgen.Emitter.writePartToMessage(Emitter.java:571)
> >         at
> > 
> org.apache.axis.wsdlgen.Emitter.writeRequestMessage(Emitter.java:532)
> > 
> >         at 
> > org.apache.axis.wsdlgen.Emitter.writeMessages(Emitter.java:442)
> >         at 
> > org.apache.axis.wsdlgen.Emitter.writePortType(Emitter.java:423)
> >         at org.apache.axis.wsdlgen.Emitter.getWSDL(Emitter.java:224)
> >         at org.apache.axis.wsdlgen.Emitter.emit(Emitter.java:188)
> >         at 
> org.apache.axis.wsdlgen.Java2Wsdl.main(Java2Wsdl.java:278)
> > 
> > ****************************************************************
> > 
> > does it have problems handling char types?
> > 
> > 2 - Either Java2Wsdl or Wsdl2java (I believe the latter) 
> has problems
> > handling
> > overloaded functions in interfaces. If I generate WSDL file from the
> > following
> > interface:
> > 
> > //Begin of interface
> > 
> > package register;
> > 
> > import java.util.*;
> > 
> > public interface RegistrationServer {
> >     public String register(int intvalue);
> >     public String register(double dbvalue);
> > }
> > 
> > //End of interface
> > 
> > and use the resulting WSDL file to generate Stubs and 
> > Skeletons I get the
> > following
> > interface:
> > 
> > //Begin of interface
> > 
> > /**
> >  * RegistrationServerPortType.java
> >  *
> >  * This file was auto-generated from WSDL
> >  * by the Apache Axis Wsdl2java emitter.
> >  */
> > 
> > package register;
> > 
> > public interface RegistrationServerPortType extends 
> java.rmi.Remote {
> >     public java.lang.String register(int arg0) throws
> > java.rmi.RemoteException;
> > }
> > 
> > //End of interface
> > 
> > **************************************************************
> > **************
> > 
> > *
> > 
> > % java org.apache.axis.wsdlgen.Java2Wsdl
> > -l"http://localhost:8080/axis/services/RegistrationServer"
> > -n"urn:register" -p"register" "urn:register" -o 
> > RegistrationServer.wsdl
> > register.RegistrationServer
> > 
> > % java org.apache.axis.wsdl.Wsdl2java -o . -d Session -s 
> > -Nurn:register
> > register RegistrationServer.wsdl
> > 
> > **************************************************************
> > **************
> > 
> > *
> > 
> > This does not happen if I rename one of the register 
> functions in the
> > interface.
> > 
> > 4-In the above examples I am trying to register a service named
> > "urn:register" but the deployment wsdd
> > file registers a service named RegistrationServerPort while
> > RegistrationServerSoapBindingStub class
> > is trying to locate a service named "urn:register" so the 
> > Client is not
> > able
> > to invoke the service. I get
> > the following error:
> > 
> > **************************************************************
> > **************
> > 
> > *
> > 
> > Remote Exception caught: The AXIS engine could not find a 
> > target service to
> > invoke!
> > targetService is urn:register
> > 
> > **************************************************************
> > **************
> > 
> > *
> > 
> > Everything works fine if I change manually the code in the 
> > stub class to
> > search for
> > a service named RegistrationServerPort as it appears in the 
> > deploy.wsdd
> > file.
> > 
> > 
> > Perhaps I should have sent this question to the developers list.
> > 
> > Thanks.
> > 
> > 
> > 
> > --------------------------------------
> > Ramon Turnes Perez
> > HERMES SoftLab, Litijska 47
> > 1000 Ljubljana, SLOVENIA
> > Phone: +386 1 5865 638
> > Fax:     +386 1 5865 270
> > E-mail: ramon@hermes.si
> > www.hermes-softlab.com
> > --------------------------------------
> > 
> > 
> > 
> 

Mime
View raw message