Loading ...
Sorry, an error occurred while loading the content.

7356Re: [soapbuilders] Can someone help on Axis webservice and MS VBA client error

Expand Messages
  • Chester Chen
    Mar 31, 2002
    • 0 Attachment
      I am usig
      soap toolkit 2.0 SP2
      Axis beta 1.

      Chester
      --- Sai Chekuri <schekuri@...> wrote:
      > Chen,
      >
      > Could you please clarify :
      > - what version of sopa toolkit, SP that you are
      > using
      > - What version of Axis
      >
      > It is not working for me from VBA. I am using Axis
      > alpha3 and soap toolkit v2.0, no SP.
      >
      > Thanks,
      > Sai
      >
      > --- Chester Chen <chesterxgchen@...> wrote:
      > > A typo:
      > > should be:
      > >
      > > ......Echo.class has to be in the same directory
      > as
      > > Echo.java .....
      > >
      > > --- Chester Chen <chesterxgchen@...> wrote:
      > > > Sorry, I did not make that clear.
      > > >
      > > > use Echo.java file drop into .../axis directory
      > > and
      > > > rename it as .Echo.jws
      > > >
      > > > you should get wsdl by calling
      > > > ?wsdl
      > > >
      > > > for example on my machine it's
      > > > http://localhost:7001/axis/Echo.jws?wsdl
      > > >
      > > > It does not, check Echo.class file or restart
      > the
      > > > server. I noticed Echo.class has to be in the
      > > same
      > > > directory as Echo.class inorder for Axis to find
      > > it.
      > > >
      > > > No matter what package Eacho has.
      > > >
      > > > Check your service name and port name and method
      > > > name
      > > > from your wsdl and put them in VB code.
      > > >
      > > > In my case, the method name is echoMe, the
      > service
      > > > name is EchoService and port is Echo.
      > > >
      > > > THIS APPROACH -- using ".JWS" works for Echo,
      > this
      > > > simple program. --- Is still does not work with
      > > my
      > > > real program, it simply return Blank WSDL for my
      > > > java
      > > > code, no error, nothing.
      > > >
      > > > The other Approachs, deploy service using AXIS
      > > .WSDD
      > > > file and then use ?wsdl or use java2WSDL neither
      > > > works
      > > > for me.
      > > >
      > > > Chester
      > > >
      > > >
      > > > Then call the following in VB program
      > > >
      > > >
      > > > Private Sub Connect()
      > > > Set Client = New SoapClient
      > > > ' -- this one works
      > > > Call
      > > >
      > >
      >
      Client.mssoapinit("http://localhost:7001/axis/Echo.jws?wsdl",
      > > > "EchoService", "Echo")
      > > >
      > > > End Sub
      > > >
      > > > Private Sub Command1_Click()
      > > > On Error GoTo ErrorHandler
      > > >
      > > > Connect
      > > > Text2.Text = CStr(Client.echoMe(Text1.Text))
      > > >
      > > > Exit Sub
      > > > ErrorHandler:
      > > > MsgBox Client.faultstring, vbExclamation
      > > >
      > > >
      > > > End Sub
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > > --- Sai Chekuri <schekuri@...> wrote:
      > > > > Chen,
      > > > >
      > > > > You said, It works. You meant the way I did.
      > > > >
      > > > > Please clarify. It is not working for me. Do I
      > > > have
      > > > > to
      > > > > make any changes.
      > > > >
      > > > > Thanks,
      > > > > Sai
      > > > > --- Chester Chen <chesterxgchen@...>
      > > wrote:
      > > > > > I tried this approach and It WORKS for .jws
      > > > file.
      > > > > >
      > > > > > But it does not work with following
      > > approaches:
      > > > > > 1. deploy through deployment descriptor:
      > > > > > I got nullpointer exception when I try to
      > > get
      > > > > > ?wsdl
      > > > > > 2. generate WSDL through java2WSDL and then
      > > copy
      > > > > the
      > > > > > wsdl to appserver and direct access wsdl,
      > > > > > with two problem:
      > > > > > a. using .jws generated WSDL is
      > > different
      > > > > from
      > > > > >
      > > > > > java2wsdl generated file, java2wsdl
      > using
      > > > > > SOAP-ENC
      > > > > >
      > > > > > encoding style, while .jws using xsd
      > > style.
      > > > > >
      > > > > > b. After I manually change them, I
      > still
      > > > > > geting
      > > > > > "resource not found on server" error
      > > > > >
      > > > > > any clues ?
      > > > > >
      > > > > > Chester
      > > > > >
      > > > > >
      > > > > >
      > > > > > --- Chester Chen <chesterxgchen@...>
      > > > wrote:
      > > > > > > Thanks with the code.
      > > > > > >
      > > > > > > I did very similar thing except for my
      > > > > endpoint
      > > > > > > is
      > > > > > > point to Apache SOAP 2.2.
      > > > > > >
      > > > > > > I will try this too.
      > > > > > >
      > > > > > >
      > > > > > > Chester
      > > > > > >
      > > > > > > --- schekuri <schekuri@...> wrote:
      > > > > > > > I am doing something like this:
      > > > > > > >
      > > > > > > >
      > > > > > > > public class EchoMe {
      > > > > > > > public String echoStr(String str)
      > > > > > > > {
      > > > > > > > return str;
      > > > > > > > }
      > > > > > > > }
      > > > > > > >
      > > > > > > >
      > > > > > > > from VBA:
      > > > > > > > Dim client As SoapClient
      > > > > > > > Set client = New SoapClient
      > > > > > > > On Error Resume Next
      > > > > > > > If Err <> 0 Then
      > > > > > > > MsgBox "Could not initialize."
      > > > > > > > End
      > > > > > > > End If
      > > > > > > > Call
      > > > > > > >
      > > > > > >
      > > > > >
      > > > >
      > > >
      > >
      >
      client.mssoapinit("http://localhost:8080/axis/EchoMe.jws?
      > > > > > > > wsdl", "EchoMe", "EchoMePort")
      > > > > > > > If Err <> 0 Then
      > > > > > > > MsgBox "Failure: " &
      > > client.faultstring
      > > > > > > > End
      >
      === message truncated ===


      __________________________________________________
      Do You Yahoo!?
      Yahoo! Greetings - send holiday greetings for Easter, Passover
      http://greetings.yahoo.com/
    • Show all 9 messages in this topic