• 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

IF REST is HTTP and SOAP is Protocol independent then Why ?

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was just curious , currently the address in my WSDL SOAP File is

<wsdl:port name="ImsPort" binding="tns:ImsBinding">
<soap:address location="http://localhost:87/SomeMethod"/>
</wsdl:port>

Now since SOAP response is passed along with the HTTP response , Why is this working with port 87 ? isnt 80 the HTTP port) while deploying the service ??
I would appreciate it if someone could explain how this would work I know i am missing something here... )

Also Incase of rest i am testing my REST application using

since REST runs over http ? How is it running over 6517 port ?? Wasnt that suppose to be 80 ? I am using Jersey??
 
Saloon Keeper
Posts: 7590
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand everything you wrote, but HTTP is not confined to port 80 - it can run on any port that you care to configure Tomcat for.
 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Tim for your initial reply . I guess my initial post was a bit unclear.
Let me rephrase my questions:
1- I read and observed (TCPmon) that incase of SOAP webservices , the soap message is transferred through HTTP. I know it could use other protocols as well like SMTP etc.
Now what i am curious about is that in my WSDL file I am using port 87 for communication and it works. I wanted to know how does JAX-WS know that it is suposed to be transferred over HTTP even though port 87 is not an http port ??
WSDL file states :


2-Now about REST webservices they require HTTP to work.
so why do we get an HTTP response from our webservice when we do something like this

How is the webservice bein mapped to 6517 when the http port in 80 ?

I hope my questions make sense .



 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:HTTP is not confined to port 80 - it can run on any port that you care to configure.

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:

Tim Moores wrote:HTTP is not confined to port 80 - it can run on any port that you care to configure.


I understand that. Let me Further clarify my question

I wanted to know how does JAX-WS know that it is suposed to be transferred over HTTP even though port 87 is not an http port ?? Since http can be configured to run on any port , How does JVM map 87 to port 80 then ?? When i run my SOAP example so this question has two parts
1-how does JAX-WS know that it is suposed to be transferred over HTTP
2-Since http can be configured to run on any port , How does JVM map 87 to port 80

 
Tim Moores
Saloon Keeper
Posts: 7590
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What makes you think that there's any mapping going on? If you access port 87, and that's configured for HTTP, then that's where the traffic goes. Not port 80.

JAX-WS is a SOAP-over-HTTP API; it uses no other protocols.
 
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic