Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Writing a MS Client to access a Java SOAP Service

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
Simple question.
I have the apache soap server atop Jakarta tomcat.
I want to write a Microsoft Client Application (preferably VBS) to access the a service deployed on the SOAP server.
My confusion is - I have d/l the MS SOAP Toolkit and it takes the notion of a web service for everything. This is not a web service, my SOAP service does not have any wsdl or wsml files with it.
Any ideas?
 
Mayank Bhatia
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey OK, I figured out writing the client and I wrote it as well
For those familiar with Apache SOAP samples, I am trying to invoke the GetAllListings method of the AddressFetcher Service.
Here is the code that I use:
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "POST", "http://r2d2assinmedge:8080/soap/servlet/rpcrouter", False
xmltext = "<SOAP:Envelope xmlns:SOAP=""http://schemas.xmlsoap.org/soap/envelope/"" "& _
"><SOAP:Header/><SOAP:Body>" & _
"<x:getAllListings xmlns:x=""urn:AddressFetcher2""/>" & _
"</SOAP:Body></SOAP:Envelope>"
xmlhttp.send xmltext
strResponse = xmlhttp.responseText
wscript.echo strResponse
Set objXML = CreateObject("MSXML.DOMDOCUMENT")
objXML.load strResponse
wscript.echo "DONE"
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
And here is the response that I get:
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xm
lns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org
/1999/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server.Exception:</faultcode>
<faultstring>java.lang.NullPointerException</faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
I cannot figure out why I am getting a null pointer exception
The method that I try to invoke does not expect any params.
Any clues???
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It it was my problem I would try to take a look at the actual output of the VB client. There may be some tag that is not coming out right.
There is a TcpTunnel and TcpTunnelGui in the org.apache.soap.util.net package that you can use OR you could download the UtilSnoop program I built from:
http://www.lanw.com/books/javasoap/
which is a lot more convenient (I think).
Bill
 
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic