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

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

Expand Messages
  • Chester Chen
    I am usig soap toolkit 2.0 SP2 Axis beta 1. Chester ... Client.mssoapinit( http://localhost:7001/axis/Echo.jws?wsdl , ...
    Message 1 of 9 , 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/
    • Chester Chen
      I am still testing with VB using MS SOAP toolkit 2.0 SP2 and Apache 2.2. I found out that SOAP tookit 2.0 did not work for me is that No deserializer found
      Message 2 of 9 , Apr 1, 2002
      • 0 Attachment
        I am still testing with VB using MS SOAP toolkit 2.0
        SP2 and Apache 2.2. I found out that SOAP tookit 2.0
        did not work for me is that

        "No deserializer found to deserialize a variable using
        encoding style
        http://schemas.xmlsoap.org/soap/encoding/ "

        in WSDL, I changed the return type from
        SOAP-ENC:string to xsd:string so SOAP toolkit will
        take the WSDL. But since Apache soap 2.2 is actually
        using
        SOAP-ENC to encode the data, this cause MS SOAP
        toolkit to stop working.

        My question is

        Can we get around this somehow ?



        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/
      Your message has been successfully submitted and would be delivered to recipients shortly.