• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Soap response contains wsdl

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I created a SOAP request in java and sent to the webservice, it response contains the wsdl and not the response expected.

The same request sent through SOAPUI responds properly as expected.

I am bit confused can any body help me.

Earlier when i created a sample service and sent a request to the sample. the response for that request was as expected.

I followed the same steps here,but the response is a wsdl .


Regards,
Shasi Sekar
 
Greenhorn
Posts: 16
Android Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can you share some more info like piece of code you are using or web service URL you are hitting so that I can check what is going wrong.

Thanks.
 
Shasi Sekar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Code for creating the soap message and invoking the service


response.writeTo(System.out) ==> returns the wsdl and not the exact response

But when generated soapMessage is used in soapUI it gives the exact response
 
Naren Mane
Greenhorn
Posts: 16
Android Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

1) As I can see that you have WSDL url with you then why are you digging with SAAJ api? If you are aware of AXIS2 , you can directly generate java stub from your wsdl and then just fire method you want to and obtain response. SAAJ apis are not that reliable.

2) Did you try mentioning endpoint url without "?wsdl" ?
Did you verify that your SOAP request is getting constructed as expected and accurately?
Also you can send your soap message directly through a URLConnection.

Provide SOAP request you are sending (One from SOAPUI and one constructed in your code).



Thanks.
 
Shasi Sekar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot naren mane,

It worked well when i removed "?wsdl".

But i am still confused.Can you explain me how it works without adding "?wsdl".
Because when i created a sample web service,I connected it with "?wsdl" and the response was as expected.


MAY BE I AM MISSING SOMETHING.


Thanks in advance
Shasi
 
Naren Mane
Greenhorn
Posts: 16
Android Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

You are welcome Shasi.

1) When you add "?wsdl" to webservice URL and hit it in a browser what you see is a service contract which is also called as WSDL file. It is just a view file mentioning all the bindings, data, apis etc etc.

2) And a webservice url without a "?wsdl" is a service with which data is sent in actual.That is the endpoint URL to which request/data is posted and user receives response accordingly.

Thus if you hit a ws url with "?wsdl", will return you contract and is not a valid service url.It is document URL.


Thanks.
 
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic