• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to send a soap message by argument to the server usingservice without call

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear seniors
i m creating one web service . My aim is to create the web service for a given xml file.That is the input is one xml file for my java class i want to create the soap message for the given xml input and pass it to server the server has one implementation class and one interface class using one build xml i m creating the war file for server.

""Now i want to send the SOAPMESSAGE argument to the server.Using SERVICE how to send the argument to the server.""

ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service helloService = serviceFactory.createService(helloWsdlUrl,new QName(nameSpaceUri,serviceName));
JAXMClient.JAXMServiceIF objSoap=(JAXMClient.JAXMServiceIF)
helloService.getPort(new QName(nameSpaceUri,portName),JAXMClient.JAXMServiceIF.class);
SOAPMessage soapResult=objSoap.onMessage(message);

JAXMServiceIF is my server side interface.

i got the error in this place.

how can i send the soap message by argumnt to server



thanks
 
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

i got the error in this place.


How do you expect to get any advice if you don't give the details of the error? Java error/exception messages can be very informative - you need to learn how to read them.
Bill
 
sakthi vadivelan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry sir,i attached my error message with this mail below see that and give me the solution
thank you very much for considering my request

regards
This is my error message

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Compiling the client source code....
Compiling 1 source file to D:\Sample\service\eighthillclient\build
D:\Sample\service\eighthillclient\src\JAXMClient.java:72: cannot resolve

symbol : class JAXMServiceIF
location: class JAXMClient.JAXMClient
JAXMClient.JAXMServiceIF objSoap=(JAXMClient.JAXMServiceIF)
^
D:\Sample\service\eighthillclient\src\JAXMClient.java:72: cannot resolve

symbol : class JAXMServiceIF
location: class JAXMClient.JAXMClient
JAXMClient.JAXMServiceIF objSoap=(JAXMClient.JAXMServiceIF)
^
D:\Sample\service\eighthillclient\src\JAXMClient.java:73: cannot resolve

symbol : class JAXMServiceIF
location: class JAXMClient.JAXMClient
helloService.getPort(new QName(nameSpaceUri,portName),JAXMClie
iceIF.class);
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
William Brogden
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

That is a typical compiler error due to the compiler not being able to find that class.
Either the class is not on the classpath the compiler is using, the class is not imported properly to your source code, -OR- you have made an error in the spelling of the class or package.
Bill
 
sakthi vadivelan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i got solve that errors the error was occuared because of the naming collision i chenge the class name and package name that gave me the splution for that error.Now i got one new error the error is
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
[javac] D:\Sample\service\eighthillclient\src\jAXMClient.java:71: onMessage(
JAXMClient.SOAPMessage) in JAXMClient.JAXMServiceIF cannot be applied to (javax.
xml.soap.SOAPMessage)
[javac] SOAPMessage soapResult=objSoap.onMessage(msg);
[javac] ^
[javac] 1 error

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
how can i rectify this error
i use this method to invoke the the server interface and pass the SOAPMessage argument to this server
"""""""""""""""""""""""""""""""""""""""""
SOAPMessage soapResult=objSoap.onMessage(message);

"""""""""""""""""""""""""""""
i gave the full interface invokation in my first querry


please give me the solution
 
William Brogden
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

This error message is saying that the signature of the onMessage method does not match the class of the object you are trying to pass. In other words, a JAXMClient.SOAPMessage can not be cast to a xml.soap.SOAPMessage reference.
 
sakthi vadivelan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for considering my request

another query also i have how to pass the soap message as argument to the server interface class.The connection.call method doesnt use for our requirement so please give me the solution

thanks
 
sakthi vadivelan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please anybody know the solution give me the solution
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
William quite clearly explained that your compilation error is because you're trying to invoke a method which expects to get an instance of "foo.Bar" while you're giving it an instance of "abc.def.Bar".
 
sakthi vadivelan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
now that error cleared but it gave me a new error i cant send the soap message from client to the server so how to send the soap message without using connection.call(); method

thanks for considering my request
reply
    Bookmark Topic Watch Topic
  • New Topic