Avatar billede fredand Forsker
19. februar 2009 - 19:48 Der er 3 kommentarer og
1 løsning

How to specify the url to a Webservice?

Hello!

I must have been sick during this in class ;-)

How ever I'm into a project where we should deploy a webservice.
But it seems lika I always have problem finding the url to the webservice after deploy.
Now I hope to learn this once and for all.

We got an wsdl that everything is generated from.

We use XmlBeans to generate all objects to pass between client and server.

We use Axis 1.4 <axis.wsdl2java>-ant-task to generate client and server stubs. (I'm not at work right now but I'm pretty sure thats the name of the task-tag)

We use maven to build a war with the webservice.

We deploy the war into a Weblogic 8.1.4.

This give us an link under "Testing" in the Weblogic console to the war-app:
http://172.31.25.22:8001/the_web_service_project/
This is never the url to the wsdl, but this is the one presented in the Weblogic-console.

In the wsdl (used from begining and generating) we got this at the end:

<service name="TheService">
  <port name="ThePort" binding="thews:TheBinding">
  <soap:address location="http://localhost:8080/axis2/services/TheService" />
  </port>
</service>

Correct me if I'm wrong when I say that soap:address-element does not specify in any way where the service should be at the end? Or does it?
It would be nice if I could specify it relative from for eg:
http://172.31.25.22:8001/the_web_service_project/

We have tried like
http://172.31.25.22:8001/the_web_service_project/TheService?wsdl
http://172.31.25.22:8001/the_web_service_project/axis2/services/TheService?wsdl

And alot of more urls that we can think of, but no wsdl in return.

I really hope that some one could help me out with this.

Is the soap:address-element used in some way to specify the url to the wsdl during generating?

Or how do i find out the url?

Best regards
Fredrik
Avatar billede arne_v Ekspert
19. februar 2009 - 19:56 #1
It has been some time since I worked with this, but as I remember it then:
- the host and port parts of the URL is obviously given
- the path part is /web-app-name/services/name-specified-in-wsdd-file for the service itself (append ?wsdl to get the WSDL)
Avatar billede fredand Forsker
19. februar 2009 - 20:49 #2
Thanks alot Arne!

I will confirm that I have tried it when I get back to work tomorrow!

If it not work I bet we have some other problem, with the build of the war perhaps.

Best regards

Fredrik
Avatar billede fredand Forsker
02. juli 2010 - 21:11 #3
Hello Arne!

I'm doing some cleaning among my posts.

I recall your answer helped me!

Please give a svar!

Best regards
Fredrik
Avatar billede arne_v Ekspert
02. juli 2010 - 21:22 #4
OK
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester