Results 1 to 17 of 17
  1. #1
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default hi please help me in soap requset

    hi all,
    please help me
    i'm new in soap protocol
    actually iwant to send a soap request toa service ang get the response
    all the site are blocked so i created a webservice by the eclipse and create the war and deployed in the tomcat servers webapps folder

    then i used the soapUI to see the request sending and the respose that i getting its comming corresect actually its a say hello program the use(me) set the the text in the '?' in the soap ui and on clicking the play button it invokes the service in the webserver and the response is getting

    ok
    how the same can be made by java code so i gone through the
    SAAJ Tutorial - The Java EE 5 Tutorial
    to study the saaj that is the java 1.6(i'm using)
    and used the code in
    Code Examples - The Java EE 5 Tutorial
    there used the ttp://wombat.ztrade.com on running the same i'm getting the
    SEVERE: SAAJ0008: Bad Response; Bad Gateway
    com.sun.xml.internal.messaging.saaj.SOAPExceptionI mpl: java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionI mpl: Bad response: (502Bad Gateway
    at com.sun.xml.internal.messaging.saaj.client.p2p.Htt pSOAPConnection.call(HttpSOAPConnection.java:146)

    so i decided to use the service running in my server (tomcat)
    what all changes has to use to call the same webservce by the soap acessing as the soapUI is using
    please help me if any body can
    i'm waiting for the replys
    please help me
    thanks thanks in advance

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,008
    Rep Power
    20

    Default

    ztrade.com
    What are you expecting from that site?
    You're not even referencing a noticeable endpoint.
    Did you just pick a random page?

  3. #3
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default please help me

    hi
    thanks for your reply that site is that example i got from
    Code Examples - The Java EE 5 Tutorial

    i want to do the same with my localhost that a hellouser webservce program running on my tomcat what all changes do i has to made in the same to get the local host webservice to acess through soap

    please help me

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,008
    Rep Power
    20

    Default

    I suspect that site has changed since that tutorial was written.
    It seems to be simply a search site now.

    So that leaves setting up your server.
    Which is simply a case of deploying your service on it...which I think is in that tutorial?

  5. #5
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default please help me

    hi,that i dont want to know is that site is working or not please tell me how the soap implemetation can be done with the serve is running in my localhost
    lease tell me the steps

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,523
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by javastuden View Post
    hi,that i dont want to know is that site is working or not
    Then why did you mention that site in the first place?

    kind regards,

    Jos

  7. #7
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default please help me

    hello sir i had created a webservce programe as mentioned in
    Creating a Bottom-Up Java Web Service - Eclipsepedia

    the server and the client ok it fine its working
    i had heared that SOAP is used to communicate a webservice by xml though the http so as to do a sample in soap i want to call the same in simple java code as mention in that this Code Examples - The Java EE 5 Tutorial
    so that the qname etc has to change (how can i change and what to do if the servce is running in my sestems localhost)

    send a request by soap and get the response by soap

    have u used SOAPUI in that the wsdl file is given then it will create a soap request and response no?
    like that i has to make the same with java code with out any apache cxf or axis etc

    please help me

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,008
    Rep Power
    20

    Default

    ?
    Are you saying you want to manually write a web service or what?

    I really don't understand what you're getting at.

    Do you want to hand write a WSDL and then generate code from that?

    Also, if you are trying to write a SOAP service just to do Hello World then why are you looking into SAAJ which is all about sending files as attchments over SOAP?

  9. #9
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default

    so then how can i write a hello world program in soap what all necessary thing do i has be remember before i start

    see i'm a beginner so this problem no one helps me i am sitting googling google for a last 2 weeks for the same so i told to please help me to start up

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,008
    Rep Power
    20

    Default

    I still don't understand what exactly you want a tutorial on?
    You say you don't want Axis?
    Then how are you going to run it?

    I can point you to w3schools, but I really don't have a clue what you want.

  11. #11
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default

    please tell me do u had used soap to call a method in the server by doing as mention in this site Code Examples - The Java EE 5 Tutorial
    if u had done then i'm asking how u had done that
    in my hand there is only java 1.6_12 that all
    a tomcat webserver a programe

    package com.tutorial;

    public class Hello {
    public String sayHello(String name){

    return "Hello " + name;

    }

    }
    is residing there and its wsdl files etc are there then how can i call the same with soap request and respose as "hello xxxx" as in the soap response IN JAVA

  12. #12
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,008
    Rep Power
    20

    Default

    That's part of SAAJ!
    You are looking at the wrong part!

    At the least you should be looking here instead. But then that's using JAX-WS and since you say you don't want Axis, then I doubt this will help you.

  13. #13
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default use soapui

    please use soapui
    then it will ask a new project to create then after that add this wsdl file it will create a soap formate for u with ? mark to send the request and on running (in your case it wont run because the server is not right no)it will genetrate soap response
    i want to do the same by java means a same to soap ui by goning though the
    Code Examples - The Java EE 5 Tutorial
    i created the envelop heade body but i want to give the Qname as local host etc and so that the reuest is send and the respose wil be created no?
    i'm right i am new in these part so im asking u
    Attached Files Attached Files

  14. #14
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,008
    Rep Power
    20

    Default

    OK, so this:
    QName bodyName = new QName("http://wombat.ztrade.com","GetLastTradePrice", "m");
    and this:
    URL endpoint = new URL("http://wombat.ztrade.com/quotes");

    Need to be pointing to localhost:<whatever port your tomcta is on, probably 8080> instead of wombat. The endpoint will be that plus whatever the website is called on Tomcat, and the endpoint.

    And if your code is so huge that you cannot post it here it will not get read. I do not open zips.

  15. #15
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default

    hi thank you for your help,
    my issue is not solved so i changed the requirement
    a webservice is there (in my localhost)i have to call by java with soap

  16. #16
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,008
    Rep Power
    20

    Default

    So, what's the webservice?
    When you use soapui to send a request to the service what is the message it sends?
    That should be your basis for forming the SOAP request in code (QNames etc).

    After that, what errors are you getting?

  17. #17
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default so please tell me can we create a soap messag by java

    for example i got the webserve wsdl file then can i create a soap message by that wsdl file,
    so if i got the wsdl file then i used apache cxf file then by doinf wsdl2java xxx.wdl will genetate the java file no so in which part the soap message creation and sencing requst and response is working which jar is doing the http request and changing the java setvalue to a xml format so that its sending to the server as http and getting the response

    please expalin

Similar Threads

  1. soap server
    By boys21 in forum Advanced Java
    Replies: 1
    Last Post: 05-26-2010, 07:08 PM
  2. where soap in jboss
    By javastuden in forum Advanced Java
    Replies: 0
    Last Post: 03-11-2010, 03:28 AM
  3. SOAP Client
    By sathish_2111 in forum Advanced Java
    Replies: 2
    Last Post: 01-27-2010, 07:08 AM
  4. Help with a SOAP message
    By higashij in forum Java Servlet
    Replies: 3
    Last Post: 01-14-2010, 08:52 AM
  5. SOAP Version
    By AlwaysJava in forum Advanced Java
    Replies: 0
    Last Post: 07-20-2009, 11:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •