Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • 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??
 
Tim Moores
Saloon Keeper
Posts: 3828
79
  • Mark post as helpful
  • send pies
  • 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
  • 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 .



 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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: 3828
79
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!